diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a2426e86d82..38004a07a3d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,7 +18,6 @@ jobs:
name: lint
runs-on: ubuntu-latest
timeout-minutes: 5
-
steps:
- uses: actions/checkout@v4
@@ -40,7 +39,6 @@ jobs:
name: test
runs-on: ubuntu-latest
timeout-minutes: 30
-
steps:
- uses: actions/checkout@v4
@@ -61,6 +59,7 @@ jobs:
examples:
name: examples
runs-on: ubuntu-latest
+ if: github.repository == 'cloudflare/cloudflare-python'
timeout-minutes: 5
steps:
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 3b4c2d4ba94..bd7f384477c 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.1.0"
+ ".": "4.2.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 025f3a2867d..760dac5bd91 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,4 @@
-configured_endpoints: 1655
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ed9f898b31619623e50d660d04beca50e44987bfd3eb3a6ff98d3bca2a9c569.yml
+configured_endpoints: 1711
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-081c85aaff4176a6887a5cd88d02e125ba9de863a7cdf30ee28fc65ddafe6c35.yml
+openapi_spec_hash: 96411a46013095a31ff6b4cb1000e19d
+config_hash: 67f412c990647f3cb598378fa22a9db5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c1c116b532..94d037f1b3a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,240 @@
# Changelog
+## 4.2.0 (2025-04-15)
+
+Full Changelog: [v4.1.0...v4.2.0](https://github.com/cloudflare/cloudflare-python/compare/v4.1.0...v4.2.0)
+
+### Features
+
+* **api:** Add workers telemetry routes ([#2619](https://github.com/cloudflare/cloudflare-python/issues/2619)) ([8cac041](https://github.com/cloudflare/cloudflare-python/commit/8cac0410ae7ba56e7a225f9941c59f514b32f730))
+* **api:** api update ([e85fd3b](https://github.com/cloudflare/cloudflare-python/commit/e85fd3bff37bc605f9e8e5def4c493a738b8071b))
+* **api:** api update ([7ec167e](https://github.com/cloudflare/cloudflare-python/commit/7ec167e31a612fcc5d95cc76eef23322200577cb))
+* **api:** api update ([7e72c20](https://github.com/cloudflare/cloudflare-python/commit/7e72c205a207d0c67b8408f5094db3e2b1397f16))
+* **api:** api update ([03cf461](https://github.com/cloudflare/cloudflare-python/commit/03cf46109d2376ff0ee422d75595ccf97c9e0f24))
+* **api:** api update ([10074be](https://github.com/cloudflare/cloudflare-python/commit/10074beff848ced63f112db3cd5056b8fb6d4e40))
+* **api:** api update ([653ba83](https://github.com/cloudflare/cloudflare-python/commit/653ba832c268d54a4888fb9481dae73cece0da46))
+* **api:** api update ([5dc20ca](https://github.com/cloudflare/cloudflare-python/commit/5dc20ca13808db9bc3138fc99fefdbbbe9630607))
+* **api:** api update ([e1217b9](https://github.com/cloudflare/cloudflare-python/commit/e1217b9e9451da1283068d85fbf2af38767bfeb6))
+* **api:** api update ([dc0917c](https://github.com/cloudflare/cloudflare-python/commit/dc0917c0178091fd1c71b16e79692a6f9f996629))
+* **api:** api update ([102efc7](https://github.com/cloudflare/cloudflare-python/commit/102efc7df402028e125832387e3634a72b88af4e))
+* **api:** api update ([0993c37](https://github.com/cloudflare/cloudflare-python/commit/0993c37ffd0b73e51599b32136f45b82c8d71505))
+* **api:** api update ([c865424](https://github.com/cloudflare/cloudflare-python/commit/c865424779e3d62482cf80ecbab39d780acec7ca))
+* **api:** api update ([613b066](https://github.com/cloudflare/cloudflare-python/commit/613b066c47c59f2533973b7b463dcad361c2cc6e))
+* **api:** api update ([a89f918](https://github.com/cloudflare/cloudflare-python/commit/a89f918cb30a4431a7e1e5f0a44570e4187e5367))
+* **api:** api update ([38264b9](https://github.com/cloudflare/cloudflare-python/commit/38264b9ec0f617153350fbf400c4187298fcddca))
+* **api:** api update ([e16267a](https://github.com/cloudflare/cloudflare-python/commit/e16267a629d3dec1f1e62a3cb736fd8a708809c9))
+* **api:** api update ([eb6fae8](https://github.com/cloudflare/cloudflare-python/commit/eb6fae8d7fbc0be2395e1dcc2fac0b4ac22961ff))
+* **api:** api update ([aed9105](https://github.com/cloudflare/cloudflare-python/commit/aed9105b3dd43d9ab2e87b0e997116e6d1adc522))
+* **api:** api update ([30711dc](https://github.com/cloudflare/cloudflare-python/commit/30711dcb5e51a4d8d1c1e669f60550aaf95aee5d))
+* **api:** api update ([4411185](https://github.com/cloudflare/cloudflare-python/commit/44111852836514fb8ebd04e35fec088583329bcc))
+* **api:** api update ([b09c932](https://github.com/cloudflare/cloudflare-python/commit/b09c932a8ed093063a1fb6a41ac2b5e74caa018f))
+* **api:** api update ([45dfe02](https://github.com/cloudflare/cloudflare-python/commit/45dfe02c9557f2308c7b52f5da5cae2580e44ac2))
+* **api:** api update ([f1908a6](https://github.com/cloudflare/cloudflare-python/commit/f1908a68f564e0f34bc51313986388018188a51b))
+* **api:** api update ([d0e0993](https://github.com/cloudflare/cloudflare-python/commit/d0e0993ecfc6cc75e7d844ca6940177fc82afa3c))
+* **api:** api update ([44f4acd](https://github.com/cloudflare/cloudflare-python/commit/44f4acdf059a4168e736c914a1f51f88750e7e07))
+* **api:** api update ([bd9ff3f](https://github.com/cloudflare/cloudflare-python/commit/bd9ff3f19f4b96e35f61209785d01ad576f88632))
+* **api:** api update ([3a22603](https://github.com/cloudflare/cloudflare-python/commit/3a226030b6e456cc84a7c143c07e6a5bf0191148))
+* **api:** api update ([6f299c2](https://github.com/cloudflare/cloudflare-python/commit/6f299c269ec328760aa40507efa9c8a3248c13c2))
+* **api:** api update ([3431847](https://github.com/cloudflare/cloudflare-python/commit/3431847ccee1cac91b21a9377d0afabb279b1e71))
+* **api:** api update ([572cea5](https://github.com/cloudflare/cloudflare-python/commit/572cea52456da64ce25cf2af7397e0c7cc17011c))
+* **api:** api update ([be8901a](https://github.com/cloudflare/cloudflare-python/commit/be8901a334d35cad2d5de28da71d346efad3df7f))
+* **api:** api update ([251b1c5](https://github.com/cloudflare/cloudflare-python/commit/251b1c53a1059bdb6c1c85e9e275b536553999d6))
+* **api:** api update ([bdeeabd](https://github.com/cloudflare/cloudflare-python/commit/bdeeabd2c235c98a0a6193723922aa72ba4d2603))
+* **api:** api update ([1e30e99](https://github.com/cloudflare/cloudflare-python/commit/1e30e99370e55eb59d5b9a7bdefa2e1afe08f976))
+* **api:** api update ([dce5a72](https://github.com/cloudflare/cloudflare-python/commit/dce5a7227299b5cc8b87589f7578831f8fd31519))
+* **api:** api update ([f67e265](https://github.com/cloudflare/cloudflare-python/commit/f67e265f2787f830a18cb361972ae8121288d97a))
+* **api:** api update ([f1a1c62](https://github.com/cloudflare/cloudflare-python/commit/f1a1c6294f799b76daa2941878dec64a5837b9d2))
+* **api:** api update ([aa6c424](https://github.com/cloudflare/cloudflare-python/commit/aa6c4248fb6d95fd3638f9423a631c48069c4740))
+* **api:** api update ([9ad780b](https://github.com/cloudflare/cloudflare-python/commit/9ad780bd7796a64a8a378c9e3fc797f304ef4de8))
+* **api:** api update ([61193fb](https://github.com/cloudflare/cloudflare-python/commit/61193fb7fbee2d9495644e18772cbf7b34e4914d))
+* **api:** api update ([373f016](https://github.com/cloudflare/cloudflare-python/commit/373f0160830523f52c20135c3fd742df01ac79b8))
+* **api:** api update ([273677b](https://github.com/cloudflare/cloudflare-python/commit/273677b55f41fdd42ff2e2cad63ed37a4cd66d02))
+* **api:** api update ([23b082f](https://github.com/cloudflare/cloudflare-python/commit/23b082f976b7e0babac7c8538794109ca1126398))
+* **api:** api update ([49e2d4a](https://github.com/cloudflare/cloudflare-python/commit/49e2d4a0b1c2d23233fdc6a0ce1a676481e7f0f4))
+* **api:** api update ([c17b312](https://github.com/cloudflare/cloudflare-python/commit/c17b312c8bff80136ed1d777c1ff96f67ba89680))
+* **api:** api update ([eca3148](https://github.com/cloudflare/cloudflare-python/commit/eca314842aa6180d1e8b8c469866607818d1c856))
+* **api:** api update ([4438262](https://github.com/cloudflare/cloudflare-python/commit/44382623e3d9a2bae81850100df9fe5996be9949))
+* **api:** api update ([0dad5f4](https://github.com/cloudflare/cloudflare-python/commit/0dad5f4d955a49e23baf46c5f245976b91beed6d))
+* **api:** api update ([42f691a](https://github.com/cloudflare/cloudflare-python/commit/42f691aec8e56c7a78c5a03bcfca949005d5f660))
+* **api:** api update ([23c6841](https://github.com/cloudflare/cloudflare-python/commit/23c68412ba0f5eefc877da4f8c6c2cad5f74617d))
+* **api:** api update ([8f3663b](https://github.com/cloudflare/cloudflare-python/commit/8f3663b510665368dfb991680392141dfc84820f))
+* **api:** api update ([eba5c50](https://github.com/cloudflare/cloudflare-python/commit/eba5c508122f602a876fefc727b26e82134a1dec))
+* **api:** api update ([57c7202](https://github.com/cloudflare/cloudflare-python/commit/57c72027cd070db573252293916a9bfa60196bfc))
+* **api:** api update ([cbda17d](https://github.com/cloudflare/cloudflare-python/commit/cbda17de3c1106d3c126cd2c3783c9e594fec0e8))
+* **api:** api update ([953fb8d](https://github.com/cloudflare/cloudflare-python/commit/953fb8db9ab3a1bdae503bbc5ad61f7d3667f209))
+* **api:** api update ([ce34afd](https://github.com/cloudflare/cloudflare-python/commit/ce34afd6c526afa728432ff9ac597e67f2398ed4))
+* **api:** api update ([d85a07a](https://github.com/cloudflare/cloudflare-python/commit/d85a07aee29dd4f08edef1ac0e49b64fe6237fe3))
+* **api:** api update ([3848bd7](https://github.com/cloudflare/cloudflare-python/commit/3848bd7b004bd9b14ae57418b2d15be510fd6a32))
+* **api:** api update ([57b7463](https://github.com/cloudflare/cloudflare-python/commit/57b746398b155ff5b56ba9ab24d524d4ebbb04d9))
+* **api:** api update ([6210e57](https://github.com/cloudflare/cloudflare-python/commit/6210e57db5934d1f93914f917a6446b7b9c6751d))
+* **api:** api update ([4bc277e](https://github.com/cloudflare/cloudflare-python/commit/4bc277e575fcc59bdca79a3dbc9ab9e5c7361fc7))
+* **api:** api update ([4df3a4f](https://github.com/cloudflare/cloudflare-python/commit/4df3a4f4274c8d0ca8900e710a2433c4709d939b))
+* **api:** api update ([8722b88](https://github.com/cloudflare/cloudflare-python/commit/8722b88cb187138515d3af6b9b9e815120a77fb3))
+* **api:** api update ([7247ced](https://github.com/cloudflare/cloudflare-python/commit/7247ced3e733c1b2a83e2f943c6497e9be57fa6f))
+* **api:** api update ([8ae828e](https://github.com/cloudflare/cloudflare-python/commit/8ae828e9d70403c0e07844e032781969b97fbf3b))
+* **api:** api update ([3f8891a](https://github.com/cloudflare/cloudflare-python/commit/3f8891a76a10a232bca7b1ba144bc7f35b95eb95))
+* **api:** api update ([3888d80](https://github.com/cloudflare/cloudflare-python/commit/3888d80b04653165033d940e0d374568920d9e76))
+* **api:** api update ([d252dd8](https://github.com/cloudflare/cloudflare-python/commit/d252dd84efb21fc83ef8c4a747aff42a879b48aa))
+* **api:** api update ([9c120cb](https://github.com/cloudflare/cloudflare-python/commit/9c120cb108440013d1d1b4d6e0ee534294540d25))
+* **api:** api update ([c979950](https://github.com/cloudflare/cloudflare-python/commit/c979950ad05fb1c88c3b7453ec3dc2186874c016))
+* **api:** api update ([2e73038](https://github.com/cloudflare/cloudflare-python/commit/2e730388dbc206a9099e65df6fbac6d97fa13589))
+* **api:** api update ([14e7dbc](https://github.com/cloudflare/cloudflare-python/commit/14e7dbc7502f54f024212bb84ba2872554d63517))
+* **api:** api update ([98f235a](https://github.com/cloudflare/cloudflare-python/commit/98f235a5d835a536d02876f49f30f5cde34996fa))
+* **api:** api update ([cd9cb6a](https://github.com/cloudflare/cloudflare-python/commit/cd9cb6add926e91d9531bfe8b29efb534e6ca0a1))
+* **api:** api update ([64d826b](https://github.com/cloudflare/cloudflare-python/commit/64d826bd56d9a7d9807a1ea8034fc11fcd4d0be5))
+* **api:** api update ([6aaabc5](https://github.com/cloudflare/cloudflare-python/commit/6aaabc5daf15c0f610396f2928890a2ed8d2a37d))
+* **api:** api update ([c922be4](https://github.com/cloudflare/cloudflare-python/commit/c922be4f3b0493d4d067dd0bacfaa524cebed5c9))
+* **api:** api update ([5c88239](https://github.com/cloudflare/cloudflare-python/commit/5c88239fedbf73437e78a2fec5f6f9c8f04d3fcb))
+* **api:** api update ([0a9a84c](https://github.com/cloudflare/cloudflare-python/commit/0a9a84c88e572bb6f1e88474a5afc5ce92dcc539))
+* **api:** api update ([8f1dc2f](https://github.com/cloudflare/cloudflare-python/commit/8f1dc2f0cc7336b1cc3b73580bc56fc885d74660))
+* **api:** api update ([22cd00d](https://github.com/cloudflare/cloudflare-python/commit/22cd00dc81f1c984ae33d6a27c2e5178ebbb1488))
+* **api:** api update ([96c7239](https://github.com/cloudflare/cloudflare-python/commit/96c7239e99977cb0783aa33eb0a6b46f44ab57ef))
+* **api:** api update ([49e9a1a](https://github.com/cloudflare/cloudflare-python/commit/49e9a1a135936f39ce72d76f085023bd0a393ff1))
+* **api:** api update ([73a9508](https://github.com/cloudflare/cloudflare-python/commit/73a9508a2d0e23088162a5b38163549e5bf53362))
+* **api:** api update ([bd58af6](https://github.com/cloudflare/cloudflare-python/commit/bd58af6628c0b730daba9d67f134b5deb6521263))
+* **api:** api update ([1278a59](https://github.com/cloudflare/cloudflare-python/commit/1278a59d5daf23d0bc3222b6c6a82a86862a6902))
+* **api:** api update ([c0f0403](https://github.com/cloudflare/cloudflare-python/commit/c0f0403193b1b47d387dbae643bf58d10a91f4d8))
+* **api:** api update ([b407dee](https://github.com/cloudflare/cloudflare-python/commit/b407dee5b67930e0b19fc25756b0ef745e6d49ea))
+* **api:** api update ([e91354b](https://github.com/cloudflare/cloudflare-python/commit/e91354b8b2de99b6084c6962da3ab28c8ba8bb9d))
+* **api:** api update ([c02dec9](https://github.com/cloudflare/cloudflare-python/commit/c02dec92907e0ab397ae9c1795170b165587fa71))
+* **api:** api update ([19242ad](https://github.com/cloudflare/cloudflare-python/commit/19242ad1ef1c8ffa0a1c9d1e6b9760956620d441))
+* **api:** api update ([16d6638](https://github.com/cloudflare/cloudflare-python/commit/16d6638cc43c52b6e983eceea2e45cd9c70a94b1))
+* **api:** api update ([6ded951](https://github.com/cloudflare/cloudflare-python/commit/6ded9515622da31af2c802f55c0f60d4db582ee7))
+* **api:** api update ([d661a85](https://github.com/cloudflare/cloudflare-python/commit/d661a85d2b8638b9bbe904c35baf4436622f3e91))
+* **api:** api update ([6d1caaa](https://github.com/cloudflare/cloudflare-python/commit/6d1caaaa585469171965de75c214693e415977ff))
+* **api:** api update ([2442ef4](https://github.com/cloudflare/cloudflare-python/commit/2442ef49e9b21ee1e4828322c8e5ff48b83d3455))
+* **api:** api update ([9e04549](https://github.com/cloudflare/cloudflare-python/commit/9e0454975ce08bc379c2ee82c14e88ff768483e3))
+* **api:** api update ([e3581f4](https://github.com/cloudflare/cloudflare-python/commit/e3581f48cb355721a086b9c2fefdca689857d3b2))
+* **api:** api update ([ff03c5b](https://github.com/cloudflare/cloudflare-python/commit/ff03c5b633e38a3f126269587477b67c62f5d3ee))
+* **api:** api update ([8c7bfe9](https://github.com/cloudflare/cloudflare-python/commit/8c7bfe91fc2140a4350134514f830f4358fd4750))
+* **api:** api update ([81fe226](https://github.com/cloudflare/cloudflare-python/commit/81fe2264282674120b17908866b7d01b73b285d3))
+* **api:** api update ([c33ea2e](https://github.com/cloudflare/cloudflare-python/commit/c33ea2e1d18942adb9c88d2d78f035ec2454035a))
+* **api:** api update ([c1f2df6](https://github.com/cloudflare/cloudflare-python/commit/c1f2df680cbce01ca63f0b743da988da36dd644c))
+* **api:** api update ([fef07c2](https://github.com/cloudflare/cloudflare-python/commit/fef07c29dfb0528c0bb4f2f886c2cc72f5a2de27))
+* **api:** api update ([a171eca](https://github.com/cloudflare/cloudflare-python/commit/a171ecaa23d1c28f88f2f26a1de03a75f6bae197))
+* **api:** api update ([5271c53](https://github.com/cloudflare/cloudflare-python/commit/5271c5352c4dc86185f83edb6bfe2206faa81f94))
+* **api:** api update ([618e905](https://github.com/cloudflare/cloudflare-python/commit/618e905bf9dcd84c5334705e4c692653b3b15d8c))
+* **api:** api update ([c723180](https://github.com/cloudflare/cloudflare-python/commit/c7231804efd474e98ff9119b0f391ce02643df73))
+* **api:** api update ([8756cce](https://github.com/cloudflare/cloudflare-python/commit/8756cce53469d482cdb5f816b15716829e1f05fc))
+* **api:** api update ([11cba1e](https://github.com/cloudflare/cloudflare-python/commit/11cba1eab80fc8b7b1178ace7102d90ae3aed5d7))
+* **api:** api update ([c3bc0db](https://github.com/cloudflare/cloudflare-python/commit/c3bc0db331c824611d3e8d5e21438c666488f72a))
+* **api:** api update ([92b95fd](https://github.com/cloudflare/cloudflare-python/commit/92b95fd2eb9189dc2ee0d48a4a4f9deec798ecfd))
+* **api:** api update ([0e9fcd1](https://github.com/cloudflare/cloudflare-python/commit/0e9fcd1f385b7c894ab38435ea71e2285fef852a))
+* **api:** api update ([f11ee75](https://github.com/cloudflare/cloudflare-python/commit/f11ee75aa6a51d4336aef121471631314d4c0097))
+* **api:** api update ([fd5011f](https://github.com/cloudflare/cloudflare-python/commit/fd5011fee62b2e1f704ce65c5faebb20b52a7b62))
+* **api:** api update ([522175c](https://github.com/cloudflare/cloudflare-python/commit/522175c537aa5b581cc0ac0ab9d137bcf78b52e1))
+* **api:** api update ([86396aa](https://github.com/cloudflare/cloudflare-python/commit/86396aaa7933f3048b123d1e9657fde37af4159c))
+* **api:** api update ([0d149f0](https://github.com/cloudflare/cloudflare-python/commit/0d149f02030523140c1e9c6cd7e435651dc225d0))
+* **api:** api update ([f2c6867](https://github.com/cloudflare/cloudflare-python/commit/f2c686726a21a7f04a131bed8166fc9abeb22e99))
+* **api:** api update ([7c66e21](https://github.com/cloudflare/cloudflare-python/commit/7c66e21eee0c608ef2616d84cbbb9d95d5acfd13))
+* **api:** api update ([d7fcece](https://github.com/cloudflare/cloudflare-python/commit/d7fcecefa7acbf7ec6074db36e3ae4a83d196d07))
+* **api:** api update ([cf1c2c6](https://github.com/cloudflare/cloudflare-python/commit/cf1c2c6a5cb278dec8f50c51841e254b7b949a2c))
+* **api:** api update ([12d29f1](https://github.com/cloudflare/cloudflare-python/commit/12d29f1cf40e11082653f6fa823853fbc21e19a2))
+* **api:** api update ([80744d8](https://github.com/cloudflare/cloudflare-python/commit/80744d8ac7e177ae628138c7a3e5e56fb68f97a8))
+* **api:** api update ([c736922](https://github.com/cloudflare/cloudflare-python/commit/c73692289250e39291121d952d5ec701c129a079))
+* **api:** api update ([421b7b7](https://github.com/cloudflare/cloudflare-python/commit/421b7b7abffa8cf5d03b21b42bae2dbb8186ab6b))
+* **api:** api update ([734d348](https://github.com/cloudflare/cloudflare-python/commit/734d348cd0742d40b2cdbe96d2a272751c55eb1f))
+* **api:** api update ([ac90c58](https://github.com/cloudflare/cloudflare-python/commit/ac90c5896bbc5f716930ce6b67d54bbe1594cc59))
+* **api:** api update ([1913a92](https://github.com/cloudflare/cloudflare-python/commit/1913a92bf977fae35bb1ba17436e0ec3e681fa6d))
+* **api:** api update ([3dac189](https://github.com/cloudflare/cloudflare-python/commit/3dac18969d30a8f8cbf1e08f94b8d0dee2629337))
+* **api:** api update ([8f7d997](https://github.com/cloudflare/cloudflare-python/commit/8f7d997f262d65d86d2c5f1241cd28b92b0df771))
+* **api:** api update ([1f32ecd](https://github.com/cloudflare/cloudflare-python/commit/1f32ecd77acab2b6c60ca2d24bb072e07bd8330f))
+* **api:** api update ([#2585](https://github.com/cloudflare/cloudflare-python/issues/2585)) ([fd7a7e1](https://github.com/cloudflare/cloudflare-python/commit/fd7a7e17c47482e78686899a6261870f3344921e))
+* **api:** api update ([#2586](https://github.com/cloudflare/cloudflare-python/issues/2586)) ([d6d3bbd](https://github.com/cloudflare/cloudflare-python/commit/d6d3bbdb5b1ccf172316e7f99768c4640e7c05a3))
+* **api:** api update ([#2587](https://github.com/cloudflare/cloudflare-python/issues/2587)) ([e86b92d](https://github.com/cloudflare/cloudflare-python/commit/e86b92df3e19c29258be2317da7df0489aaf7776))
+* **api:** api update ([#2590](https://github.com/cloudflare/cloudflare-python/issues/2590)) ([c0af54e](https://github.com/cloudflare/cloudflare-python/commit/c0af54eecf431477663ab886bbde26dfad27008a))
+* **api:** api update ([#2592](https://github.com/cloudflare/cloudflare-python/issues/2592)) ([91e21f5](https://github.com/cloudflare/cloudflare-python/commit/91e21f5bd25dde058a018507db0fbedce4f06277))
+* **api:** api update ([#2595](https://github.com/cloudflare/cloudflare-python/issues/2595)) ([2abce88](https://github.com/cloudflare/cloudflare-python/commit/2abce88acc9a097534773563c9703ce54893e030))
+* **api:** api update ([#2597](https://github.com/cloudflare/cloudflare-python/issues/2597)) ([f20e40f](https://github.com/cloudflare/cloudflare-python/commit/f20e40fba7a9a9db05b59115f68cffc3efbea0cf))
+* **api:** api update ([#2598](https://github.com/cloudflare/cloudflare-python/issues/2598)) ([d610102](https://github.com/cloudflare/cloudflare-python/commit/d610102b1bc5662ad632c9ec0ba75fa3d85f05a0))
+* **api:** api update ([#2602](https://github.com/cloudflare/cloudflare-python/issues/2602)) ([0e423c6](https://github.com/cloudflare/cloudflare-python/commit/0e423c61ef967c7aad0099309ed94bdcf5e121be))
+* **api:** api update ([#2603](https://github.com/cloudflare/cloudflare-python/issues/2603)) ([61b7eee](https://github.com/cloudflare/cloudflare-python/commit/61b7eeea18fc5fefc511ad0af7ae1746daf1d8ad))
+* **api:** api update ([#2604](https://github.com/cloudflare/cloudflare-python/issues/2604)) ([eadd868](https://github.com/cloudflare/cloudflare-python/commit/eadd86836599974af27978ea1161fa7b3870a9e7))
+* **api:** api update ([#2605](https://github.com/cloudflare/cloudflare-python/issues/2605)) ([1ec78c3](https://github.com/cloudflare/cloudflare-python/commit/1ec78c34c458955874ece65bf105a9397d123185))
+* **api:** api update ([#2608](https://github.com/cloudflare/cloudflare-python/issues/2608)) ([f64b014](https://github.com/cloudflare/cloudflare-python/commit/f64b014d549d1d8271ffd1872a54f389c732ad41))
+* **api:** api update ([#2611](https://github.com/cloudflare/cloudflare-python/issues/2611)) ([2afa2d3](https://github.com/cloudflare/cloudflare-python/commit/2afa2d3b8ae77a1202c1435f61f896970115dc86))
+* **api:** api update ([#2612](https://github.com/cloudflare/cloudflare-python/issues/2612)) ([2424b0d](https://github.com/cloudflare/cloudflare-python/commit/2424b0da94f1ed146ce00d53bee24f5770ea6409))
+* **api:** api update ([#2613](https://github.com/cloudflare/cloudflare-python/issues/2613)) ([6a71e41](https://github.com/cloudflare/cloudflare-python/commit/6a71e416ae130e7e705319ee9f84293cf5034928))
+* **api:** api update ([#2615](https://github.com/cloudflare/cloudflare-python/issues/2615)) ([7c78d90](https://github.com/cloudflare/cloudflare-python/commit/7c78d9020cf164e746d34d0a81ab73584f719562))
+* **api:** api update ([#2616](https://github.com/cloudflare/cloudflare-python/issues/2616)) ([28e0c77](https://github.com/cloudflare/cloudflare-python/commit/28e0c7765a3520802ac58a323e65d6d12abd943f))
+* **api:** api update ([#2618](https://github.com/cloudflare/cloudflare-python/issues/2618)) ([a697679](https://github.com/cloudflare/cloudflare-python/commit/a697679baa42a39b714b2f7e70c61cc36411000a))
+* **api:** api update ([#2620](https://github.com/cloudflare/cloudflare-python/issues/2620)) ([689d871](https://github.com/cloudflare/cloudflare-python/commit/689d8714e789b9a75129cc9493bb4fa138f102b6))
+* **api:** api update ([#2621](https://github.com/cloudflare/cloudflare-python/issues/2621)) ([c1bcdc4](https://github.com/cloudflare/cloudflare-python/commit/c1bcdc486ee660c01292e9a290f3fbf21d7f1f3d))
+* **api:** api update ([#2622](https://github.com/cloudflare/cloudflare-python/issues/2622)) ([0c2494a](https://github.com/cloudflare/cloudflare-python/commit/0c2494a79662cd5f822c31f42aedc4d2d42abd53))
+* **api:** api update ([#2623](https://github.com/cloudflare/cloudflare-python/issues/2623)) ([41f7540](https://github.com/cloudflare/cloudflare-python/commit/41f7540c5d9b87b4e146628d989dc7624a06da60))
+* **api:** api update ([#2629](https://github.com/cloudflare/cloudflare-python/issues/2629)) ([b3e54f7](https://github.com/cloudflare/cloudflare-python/commit/b3e54f76ca270888605d02ac10f710e51cf77911))
+* **api:** api update ([#2633](https://github.com/cloudflare/cloudflare-python/issues/2633)) ([41ddaf9](https://github.com/cloudflare/cloudflare-python/commit/41ddaf9a22d139922d83bb112f8f3486b66257e4))
+* **api:** api update ([#2634](https://github.com/cloudflare/cloudflare-python/issues/2634)) ([41e03bc](https://github.com/cloudflare/cloudflare-python/commit/41e03bcb70a445f4c68bf3c52b41e8321b4f24aa))
+* **api:** api update ([#2635](https://github.com/cloudflare/cloudflare-python/issues/2635)) ([7fc5804](https://github.com/cloudflare/cloudflare-python/commit/7fc580436b0b968a6f4e85f5ed246c4f2fe88ba9))
+* **api:** api update ([#2636](https://github.com/cloudflare/cloudflare-python/issues/2636)) ([c19449e](https://github.com/cloudflare/cloudflare-python/commit/c19449ed1b9aea141f38ab1b16bff8ba529076da))
+* **api:** api update ([#2637](https://github.com/cloudflare/cloudflare-python/issues/2637)) ([f171c1a](https://github.com/cloudflare/cloudflare-python/commit/f171c1aa3bd47b1cb1124264d0ecde0201fed025))
+* **api:** api update ([#2638](https://github.com/cloudflare/cloudflare-python/issues/2638)) ([5c0c4f7](https://github.com/cloudflare/cloudflare-python/commit/5c0c4f71ab2ad7a07b87c0e7bc88f48917548c5d))
+* **api:** api update ([#2642](https://github.com/cloudflare/cloudflare-python/issues/2642)) ([866a694](https://github.com/cloudflare/cloudflare-python/commit/866a694eeff106087d3a9074c3018f40262bb5a5))
+* **api:** api update ([#2643](https://github.com/cloudflare/cloudflare-python/issues/2643)) ([cae95fc](https://github.com/cloudflare/cloudflare-python/commit/cae95fc76e7408286bc6cdd747f8e2f7079489bc))
+* **api:** api update ([#2644](https://github.com/cloudflare/cloudflare-python/issues/2644)) ([2731e5a](https://github.com/cloudflare/cloudflare-python/commit/2731e5a3b3ef80e4d9daf3ea51f9fac5c9cbb0ee))
+* **api:** api update ([#2645](https://github.com/cloudflare/cloudflare-python/issues/2645)) ([24fcaa9](https://github.com/cloudflare/cloudflare-python/commit/24fcaa9e89a8654c913a7bd2f9ba215bb5d250f3))
+* **api:** api update ([#2646](https://github.com/cloudflare/cloudflare-python/issues/2646)) ([c7c9bdf](https://github.com/cloudflare/cloudflare-python/commit/c7c9bdfadc4b9593ab947c247268e2f6691b3a3d))
+* **api:** api update ([#2648](https://github.com/cloudflare/cloudflare-python/issues/2648)) ([c43fb40](https://github.com/cloudflare/cloudflare-python/commit/c43fb4025f4420a251f27ea8e6e7a6ca271861df))
+* **api:** manual updates ([553bbf1](https://github.com/cloudflare/cloudflare-python/commit/553bbf1c6039ce6a0266356a0bc4dbcdfd793cb5))
+* **api:** manual updates ([9114751](https://github.com/cloudflare/cloudflare-python/commit/911475116e05067847eefd9bf9ef60077aa3be29))
+* **api:** manual updates ([4ecbc97](https://github.com/cloudflare/cloudflare-python/commit/4ecbc9745d74e834d3c617ee6be019d0e598a371))
+* **api:** manual updates ([4713a3f](https://github.com/cloudflare/cloudflare-python/commit/4713a3f6d9a4728affac71e47fa2949d9c0d9d4e))
+* **api:** manual updates ([a808a96](https://github.com/cloudflare/cloudflare-python/commit/a808a966a85d25243bd9ee43b8881ae2f95e4590))
+* **api:** manual updates ([#2593](https://github.com/cloudflare/cloudflare-python/issues/2593)) ([20a30c8](https://github.com/cloudflare/cloudflare-python/commit/20a30c8b8b122dd0c4f2e97d2c7bc088d6e79a55))
+* **api:** manual updates ([#2627](https://github.com/cloudflare/cloudflare-python/issues/2627)) ([85e3f9d](https://github.com/cloudflare/cloudflare-python/commit/85e3f9dd5ba86b628005f5d54a7332739408301e))
+* **api:** manual updates ([#2628](https://github.com/cloudflare/cloudflare-python/issues/2628)) ([aca7ce9](https://github.com/cloudflare/cloudflare-python/commit/aca7ce96b809806896855a5242202ad18d15d1e8))
+* **api:** patch and put endpoints for d1 database ([77f2bd3](https://github.com/cloudflare/cloudflare-python/commit/77f2bd3da93965aebc51932bb064d9a9985414a7))
+* **api:** Update workers telemetry route methods ([#2639](https://github.com/cloudflare/cloudflare-python/issues/2639)) ([1a848ad](https://github.com/cloudflare/cloudflare-python/commit/1a848ad5832adcc60a68d34e3b843d35a6e67740))
+* **browser_rendering:** add json, links and markdown support ([#2589](https://github.com/cloudflare/cloudflare-python/issues/2589)) ([6bf2153](https://github.com/cloudflare/cloudflare-python/commit/6bf21538a1a5f05b0c110d9756a5b3b357d1861b))
+* **devices:** add next generation under devices ([a0198a6](https://github.com/cloudflare/cloudflare-python/commit/a0198a64d4b6ee0b93004fa418a3b49a949fbd9a))
+* **devices:** add registrations support ([#2624](https://github.com/cloudflare/cloudflare-python/issues/2624)) ([d5f09fe](https://github.com/cloudflare/cloudflare-python/commit/d5f09fec979f27c46b66d149ef917b09d42e5019))
+* **docs:** add secrets store to navigation ([885de82](https://github.com/cloudflare/cloudflare-python/commit/885de8256b507443229d763aca76bf63d60c54e1))
+* **pipelines:** add support ([#2641](https://github.com/cloudflare/cloudflare-python/issues/2641)) ([b0d60ec](https://github.com/cloudflare/cloudflare-python/commit/b0d60ecda8be741f340618542ebe9d5911f2fe70))
+* **pipelines:** add terraform resource ([5fc996c](https://github.com/cloudflare/cloudflare-python/commit/5fc996ccb050a3db92e9054351d492e802043960))
+* **r2:** add super_slurper endpoints ([#2588](https://github.com/cloudflare/cloudflare-python/issues/2588)) ([7f3f5f1](https://github.com/cloudflare/cloudflare-python/commit/7f3f5f1562ffc8c841633fe8a6bbdf7e4aa30bee))
+* **secret_store:** add support ([#2625](https://github.com/cloudflare/cloudflare-python/issues/2625)) ([41c78d1](https://github.com/cloudflare/cloudflare-python/commit/41c78d17e21ba4dc52c9204c0ebcba820025f8a8))
+* **secrets_store:** remove incorrect bulk edit endpoint ([#2626](https://github.com/cloudflare/cloudflare-python/issues/2626)) ([67ff68f](https://github.com/cloudflare/cloudflare-python/commit/67ff68fd35d53fa24025bc525a466c88ea438737))
+* support API versioning ([#2651](https://github.com/cloudflare/cloudflare-python/issues/2651)) ([b7ea434](https://github.com/cloudflare/cloudflare-python/commit/b7ea434cfd1199a0cccab952eb37f8a88995f613))
+* **workers:** add script_and_version_settings methods ([#2591](https://github.com/cloudflare/cloudflare-python/issues/2591)) ([a68be4a](https://github.com/cloudflare/cloudflare-python/commit/a68be4aeff11ebe649470adc05c796deccfb3489))
+* **workflows:** add events ([#2600](https://github.com/cloudflare/cloudflare-python/issues/2600)) ([38a74ad](https://github.com/cloudflare/cloudflare-python/commit/38a74ad8305a104c3128bdd7da549eac31132698))
+
+
+### Bug Fixes
+
+* **client:** send all configured auth headers ([#2614](https://github.com/cloudflare/cloudflare-python/issues/2614)) ([7a6e890](https://github.com/cloudflare/cloudflare-python/commit/7a6e890568bf47dbe3689a82bcaab1ca591b0598))
+* **client:** support serialising multipart entries as json ([8d08f3e](https://github.com/cloudflare/cloudflare-python/commit/8d08f3e79bb33bccbb9ed893b35a8c404b5b2fc4))
+* correct workers upload types ([b5f3e03](https://github.com/cloudflare/cloudflare-python/commit/b5f3e03959afdb5e23ffd3a90683a3177f248a0e))
+* **perf:** optimize some hot paths ([e16ac57](https://github.com/cloudflare/cloudflare-python/commit/e16ac573caa9c1d1e7ab411cea0a212c3780bc83))
+* **perf:** skip traversing types for NotGiven values ([78745d0](https://github.com/cloudflare/cloudflare-python/commit/78745d0a927ee08ad557eb9cea7af63910ff4986))
+
+
+### Chores
+
+* **client:** minor internal fixes ([0c7fc17](https://github.com/cloudflare/cloudflare-python/commit/0c7fc1751703d0d64388b65a7acf977ff95e48b3))
+* configure new SDK language ([0648395](https://github.com/cloudflare/cloudflare-python/commit/0648395a1b0f496781253a2bbdc252c94042c2a8))
+* **internal:** codegen related update ([#2610](https://github.com/cloudflare/cloudflare-python/issues/2610)) ([850aa28](https://github.com/cloudflare/cloudflare-python/commit/850aa28a9c6d51b10ac4534ab6dd77b3e8558430))
+* **internal:** codegen related update ([#2630](https://github.com/cloudflare/cloudflare-python/issues/2630)) ([6590e50](https://github.com/cloudflare/cloudflare-python/commit/6590e50afb96e1e638781891c38591867f617ca1))
+* **internal:** expand CI branch coverage ([#2647](https://github.com/cloudflare/cloudflare-python/issues/2647)) ([a1c546f](https://github.com/cloudflare/cloudflare-python/commit/a1c546fa0cd8153f57cc1c695c3d36e1a0e21811))
+* **internal:** force response_info model generation ([#2601](https://github.com/cloudflare/cloudflare-python/issues/2601)) ([56948f0](https://github.com/cloudflare/cloudflare-python/commit/56948f0d1b9bb2043ef929150a8020a25d67bd60))
+* **internal:** minor test fixes ([#2594](https://github.com/cloudflare/cloudflare-python/issues/2594)) ([d5b1186](https://github.com/cloudflare/cloudflare-python/commit/d5b1186c0ad479040c7e1b41bd3285278b2ad8b1))
+* **internal:** only run examples workflow in main repo ([#2617](https://github.com/cloudflare/cloudflare-python/issues/2617)) ([5f8d57e](https://github.com/cloudflare/cloudflare-python/commit/5f8d57e280713c22df026c85fed7af0ca0f74339))
+* **internal:** reduce CI branch coverage ([19203d0](https://github.com/cloudflare/cloudflare-python/commit/19203d0728a4452a745df7a015bda449b7a8f225))
+* **internal:** remove trailing character ([#2596](https://github.com/cloudflare/cloudflare-python/issues/2596)) ([9dd6028](https://github.com/cloudflare/cloudflare-python/commit/9dd6028b173aeb5dbf0a41d2065b566949e2a9d4))
+* **internal:** slight transform perf improvement ([#2631](https://github.com/cloudflare/cloudflare-python/issues/2631)) ([c0f9513](https://github.com/cloudflare/cloudflare-python/commit/c0f95136ed2d48d29b16bdedb9db9cd29d7ecb15))
+* **internal:** update pyright settings ([4c44ffa](https://github.com/cloudflare/cloudflare-python/commit/4c44ffa67f654ea710ce98d0237fbdd2628b0e76))
+* **internal:** update response_info ([#2599](https://github.com/cloudflare/cloudflare-python/issues/2599)) ([22b50cd](https://github.com/cloudflare/cloudflare-python/commit/22b50cd2aabf069b361cdb41085d42ed13350db2))
+* **internal:** update shared response info for optional fields ([f61be23](https://github.com/cloudflare/cloudflare-python/commit/f61be23b84eda99c0822b46b59066f33e87c29d7))
+* more workers fixes ([ba88051](https://github.com/cloudflare/cloudflare-python/commit/ba880515f0e56e2b7444198bf63ac0bbe860b8f2))
+* **pipelines:** move pipeline nav hierarchy ([f2f7291](https://github.com/cloudflare/cloudflare-python/commit/f2f729145340986e0d9a10e810b13fd6b944a39f))
+* revert auth handling ([#2650](https://github.com/cloudflare/cloudflare-python/issues/2650)) ([84e9f49](https://github.com/cloudflare/cloudflare-python/commit/84e9f492640d995fd1751cd370983d7caf2dfc59))
+* slight wording improvement in README ([#2640](https://github.com/cloudflare/cloudflare-python/issues/2640)) ([2ecb76c](https://github.com/cloudflare/cloudflare-python/commit/2ecb76c754287e3abb6188bb9ff11d3c154f338e))
+* **tests:** improve enum examples ([#2632](https://github.com/cloudflare/cloudflare-python/issues/2632)) ([44d9b44](https://github.com/cloudflare/cloudflare-python/commit/44d9b445d2ecd6f6acc92f0f0889a6d420e51fa1))
+
+
+### Documentation
+
+* swap examples used in readme ([#2609](https://github.com/cloudflare/cloudflare-python/issues/2609)) ([88a0e75](https://github.com/cloudflare/cloudflare-python/commit/88a0e7527a3d52fb8c9913fabe7cf6ad97cdd50f))
+
## 4.1.0 (2025-03-18)
Full Changelog: [v4.0.0...v4.1.0](https://github.com/cloudflare/cloudflare-python/compare/v4.0.0...v4.1.0)
diff --git a/README.md b/README.md
index 44548f084d5..603a1859f26 100644
--- a/README.md
+++ b/README.md
@@ -151,17 +151,16 @@ from cloudflare import Cloudflare
client = Cloudflare()
-account = client.accounts.create(
- name="name",
- type="standard",
- unit={"id": "f267e341f3dd4697bd3b9f71dd96247f"},
+zone = client.zones.create(
+ account={"id": "023e105f4ecef8ad9ca31a8372d0c353"},
+ name="example.com",
)
-print(account.unit)
+print(zone.account)
```
## File uploads
-Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
+Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
```python
from pathlib import Path
diff --git a/api.md b/api.md
index 50bdbfeb44b..b7d11d45ece 100644
--- a/api.md
+++ b/api.md
@@ -151,7 +151,7 @@ from cloudflare.types.origin_ca_certificates import (
Methods:
- client.origin_ca_certificates.create(\*\*params) -> Optional[OriginCACertificate]
-- client.origin_ca_certificates.list(\*\*params) -> SyncSinglePage[OriginCACertificate]
+- client.origin_ca_certificates.list(\*\*params) -> SyncV4PagePaginationArray[OriginCACertificate]
- client.origin_ca_certificates.delete(certificate_id) -> Optional[OriginCACertificateDeleteResponse]
- client.origin_ca_certificates.get(certificate_id) -> Optional[OriginCACertificate]
@@ -985,18 +985,13 @@ Methods:
Types:
```python
-from cloudflare.types.custom_nameservers import (
- CustomNameserver,
- CustomNameserverDeleteResponse,
- CustomNameserverAvailabiltyResponse,
-)
+from cloudflare.types.custom_nameservers import CustomNameserver, CustomNameserverDeleteResponse
```
Methods:
- client.custom_nameservers.create(\*, account_id, \*\*params) -> Optional[CustomNameserver]
- client.custom_nameservers.delete(custom_ns_id, \*, account_id) -> SyncSinglePage[CustomNameserverDeleteResponse]
-- client.custom_nameservers.availabilty(\*, account_id) -> SyncSinglePage[CustomNameserverAvailabiltyResponse]
- client.custom_nameservers.get(\*, account_id) -> SyncSinglePage[CustomNameserver]
# DNSFirewall
@@ -2115,7 +2110,7 @@ Methods:
Types:
```python
-from cloudflare.types.rate_limits import Action, Methods, RateLimit, RateLimitDeleteResponse
+from cloudflare.types.rate_limits import Action, RateLimit, RateLimitDeleteResponse
```
Methods:
@@ -2479,6 +2474,22 @@ Methods:
- client.workers.scripts.secrets.delete(secret_name, \*, account_id, script_name) -> object
- client.workers.scripts.secrets.get(secret_name, \*, account_id, script_name) -> Optional[SecretGetResponse]
+### ScriptAndVersionSettings
+
+Types:
+
+```python
+from cloudflare.types.workers.scripts import (
+ ScriptAndVersionSettingEditResponse,
+ ScriptAndVersionSettingGetResponse,
+)
+```
+
+Methods:
+
+- client.workers.scripts.script_and_version_settings.edit(script_name, \*, account_id, \*\*params) -> Optional[ScriptAndVersionSettingEditResponse]
+- client.workers.scripts.script_and_version_settings.get(script_name, \*, account_id) -> Optional[ScriptAndVersionSettingGetResponse]
+
## AccountSettings
Types:
@@ -2520,56 +2531,63 @@ Methods:
- client.workers.subdomains.update(\*, account_id, \*\*params) -> Optional[SubdomainUpdateResponse]
- client.workers.subdomains.get(\*, account_id) -> Optional[SubdomainGetResponse]
-# KV
+## Observability
-## Namespaces
+### Telemetry
Types:
```python
-from cloudflare.types.kv import (
- Namespace,
- NamespaceUpdateResponse,
- NamespaceDeleteResponse,
- NamespaceBulkDeleteResponse,
- NamespaceBulkUpdateResponse,
+from cloudflare.types.workers.observability import (
+ TelemetryKeysResponse,
+ TelemetryQueryResponse,
+ TelemetryValuesResponse,
)
```
Methods:
-- client.kv.namespaces.create(\*, account_id, \*\*params) -> Optional[Namespace]
-- client.kv.namespaces.update(namespace_id, \*, account_id, \*\*params) -> Optional[NamespaceUpdateResponse]
-- client.kv.namespaces.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[Namespace]
-- client.kv.namespaces.delete(namespace_id, \*, account_id) -> Optional[NamespaceDeleteResponse]
-- client.kv.namespaces.bulk_delete(namespace_id, \*, account_id, \*\*params) -> Optional[NamespaceBulkDeleteResponse]
-- client.kv.namespaces.bulk_update(namespace_id, \*, account_id, \*\*params) -> Optional[NamespaceBulkUpdateResponse]
-- client.kv.namespaces.get(namespace_id, \*, account_id) -> Optional[Namespace]
+- client.workers.observability.telemetry.keys(\*, account_id, \*\*params) -> SyncSinglePage[TelemetryKeysResponse]
+- client.workers.observability.telemetry.query(\*, account_id, \*\*params) -> TelemetryQueryResponse
+- client.workers.observability.telemetry.values(\*, account_id, \*\*params) -> SyncSinglePage[TelemetryValuesResponse]
-### Analytics
+# KV
+
+## Namespaces
Types:
```python
-from cloudflare.types.kv.namespaces import Components, Schema
+from cloudflare.types.kv import Namespace, NamespaceUpdateResponse, NamespaceDeleteResponse
```
Methods:
-- client.kv.namespaces.analytics.list(\*, account_id, \*\*params) -> Optional[Schema]
-- client.kv.namespaces.analytics.stored(\*, account_id, \*\*params) -> Optional[Components]
+- client.kv.namespaces.create(\*, account_id, \*\*params) -> Optional[Namespace]
+- client.kv.namespaces.update(namespace_id, \*, account_id, \*\*params) -> Optional[NamespaceUpdateResponse]
+- client.kv.namespaces.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[Namespace]
+- client.kv.namespaces.delete(namespace_id, \*, account_id) -> Optional[NamespaceDeleteResponse]
+- client.kv.namespaces.get(namespace_id, \*, account_id) -> Optional[Namespace]
### Keys
Types:
```python
-from cloudflare.types.kv.namespaces import Key
+from cloudflare.types.kv.namespaces import (
+ Key,
+ KeyBulkDeleteResponse,
+ KeyBulkGetResponse,
+ KeyBulkUpdateResponse,
+)
```
Methods:
- client.kv.namespaces.keys.list(namespace_id, \*, account_id, \*\*params) -> SyncCursorLimitPagination[Key]
+- client.kv.namespaces.keys.bulk_delete(namespace_id, \*, account_id, \*\*params) -> Optional[KeyBulkDeleteResponse]
+- client.kv.namespaces.keys.bulk_get(namespace_id, \*, account_id, \*\*params) -> Optional[KeyBulkGetResponse]
+- client.kv.namespaces.keys.bulk_update(namespace_id, \*, account_id, \*\*params) -> Optional[KeyBulkUpdateResponse]
### Metadata
@@ -2637,6 +2655,7 @@ Methods:
- client.queues.update(queue_id, \*, account_id, \*\*params) -> Optional[Queue]
- client.queues.list(\*, account_id) -> SyncSinglePage[Queue]
- client.queues.delete(queue_id, \*, account_id) -> QueueDeleteResponse
+- client.queues.edit(queue_id, \*, account_id, \*\*params) -> Optional[Queue]
- client.queues.get(queue_id, \*, account_id) -> Optional[Queue]
## Consumers
@@ -2667,6 +2686,19 @@ Methods:
- client.queues.messages.ack(queue_id, \*, account_id, \*\*params) -> Optional[MessageAckResponse]
- client.queues.messages.pull(queue_id, \*, account_id, \*\*params) -> SyncSinglePage[MessagePullResponse]
+## Purge
+
+Types:
+
+```python
+from cloudflare.types.queues import PurgeStatusResponse
+```
+
+Methods:
+
+- client.queues.purge.start(queue_id, \*, account_id, \*\*params) -> Optional[Queue]
+- client.queues.purge.status(queue_id, \*, account_id) -> Optional[PurgeStatusResponse]
+
# APIGateway
## Configurations
@@ -4811,8 +4843,10 @@ from cloudflare.types.d1 import (
Methods:
- client.d1.database.create(\*, account_id, \*\*params) -> D1
+- client.d1.database.update(database_id, \*, account_id, \*\*params) -> D1
- client.d1.database.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DatabaseListResponse]
- client.d1.database.delete(database_id, \*, account_id) -> object
+- client.d1.database.edit(database_id, \*, account_id, \*\*params) -> D1
- client.d1.database.export(database_id, \*, account_id, \*\*params) -> DatabaseExportResponse
- client.d1.database.get(database_id, \*, account_id) -> D1
- client.d1.database.import\_(database_id, \*, account_id, \*\*params) -> DatabaseImportResponse
@@ -4969,6 +5003,64 @@ Methods:
- client.r2.temporary_credentials.create(\*, account_id, \*\*params) -> TemporaryCredentialCreateResponse
+## SuperSlurper
+
+### Jobs
+
+Types:
+
+```python
+from cloudflare.types.r2.super_slurper import (
+ JobCreateResponse,
+ JobListResponse,
+ JobAbortResponse,
+ JobAbortAllResponse,
+ JobGetResponse,
+ JobPauseResponse,
+ JobProgressResponse,
+ JobResumeResponse,
+)
+```
+
+Methods:
+
+- client.r2.super_slurper.jobs.create(\*, account_id, \*\*params) -> Optional[JobCreateResponse]
+- client.r2.super_slurper.jobs.list(\*, account_id, \*\*params) -> SyncSinglePage[JobListResponse]
+- client.r2.super_slurper.jobs.abort(job_id, \*, account_id) -> str
+- client.r2.super_slurper.jobs.abort_all(\*, account_id) -> str
+- client.r2.super_slurper.jobs.get(job_id, \*, account_id) -> Optional[JobGetResponse]
+- client.r2.super_slurper.jobs.pause(job_id, \*, account_id) -> str
+- client.r2.super_slurper.jobs.progress(job_id, \*, account_id) -> Optional[JobProgressResponse]
+- client.r2.super_slurper.jobs.resume(job_id, \*, account_id) -> str
+
+#### Logs
+
+Types:
+
+```python
+from cloudflare.types.r2.super_slurper.jobs import LogListResponse
+```
+
+Methods:
+
+- client.r2.super_slurper.jobs.logs.list(job_id, \*, account_id, \*\*params) -> SyncSinglePage[LogListResponse]
+
+### ConnectivityPrecheck
+
+Types:
+
+```python
+from cloudflare.types.r2.super_slurper import (
+ ConnectivityPrecheckSourceResponse,
+ ConnectivityPrecheckTargetResponse,
+)
+```
+
+Methods:
+
+- client.r2.super_slurper.connectivity_precheck.source(\*, account_id, \*\*params) -> Optional[ConnectivityPrecheckSourceResponse]
+- client.r2.super_slurper.connectivity_precheck.target(\*, account_id, \*\*params) -> Optional[ConnectivityPrecheckTargetResponse]
+
# WorkersForPlatforms
## Dispatch
@@ -5109,6 +5201,68 @@ Methods:
- client.zero_trust.devices.list(\*, account_id) -> SyncSinglePage[Device]
- client.zero_trust.devices.get(device_id, \*, account_id) -> Optional[DeviceGetResponse]
+### Devices
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.devices import (
+ DeviceListResponse,
+ DeviceDeleteResponse,
+ DeviceGetResponse,
+ DeviceRevokeResponse,
+)
+```
+
+Methods:
+
+- client.zero_trust.devices.devices.list(\*, account_id, \*\*params) -> SyncCursorPagination[DeviceListResponse]
+- client.zero_trust.devices.devices.delete(device_id, \*, account_id) -> object
+- client.zero_trust.devices.devices.get(device_id, \*, account_id) -> DeviceGetResponse
+- client.zero_trust.devices.devices.revoke(device_id, \*, account_id) -> object
+
+### Resilience
+
+#### GlobalWARPOverride
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.devices.resilience import (
+ GlobalWARPOverrideCreateResponse,
+ GlobalWARPOverrideGetResponse,
+)
+```
+
+Methods:
+
+- client.zero_trust.devices.resilience.global_warp_override.create(\*, account_id, \*\*params) -> Optional[GlobalWARPOverrideCreateResponse]
+- client.zero_trust.devices.resilience.global_warp_override.get(\*, account_id) -> Optional[GlobalWARPOverrideGetResponse]
+
+### Registrations
+
+Types:
+
+```python
+from cloudflare.types.zero_trust.devices import (
+ RegistrationListResponse,
+ RegistrationDeleteResponse,
+ RegistrationBulkDeleteResponse,
+ RegistrationGetResponse,
+ RegistrationRevokeResponse,
+ RegistrationUnrevokeResponse,
+)
+```
+
+Methods:
+
+- client.zero_trust.devices.registrations.list(\*, account_id, \*\*params) -> SyncCursorPagination[RegistrationListResponse]
+- client.zero_trust.devices.registrations.delete(registration_id, \*, account_id) -> object
+- client.zero_trust.devices.registrations.bulk_delete(\*, account_id, \*\*params) -> object
+- client.zero_trust.devices.registrations.get(registration_id, \*, account_id) -> RegistrationGetResponse
+- client.zero_trust.devices.registrations.revoke(\*, account_id, \*\*params) -> object
+- client.zero_trust.devices.registrations.unrevoke(\*, account_id, \*\*params) -> object
+
### DEXTests
Types:
@@ -5349,12 +5503,13 @@ Methods:
Types:
```python
-from cloudflare.types.zero_trust.devices import OverrideCodeListResponse
+from cloudflare.types.zero_trust.devices import OverrideCodeListResponse, OverrideCodeGetResponse
```
Methods:
- client.zero_trust.devices.override_codes.list(device_id, \*, account_id) -> Optional[OverrideCodeListResponse]
+- client.zero_trust.devices.override_codes.get(registration_id, \*, account_id) -> OverrideCodeGetResponse
## IdentityProviders
@@ -5609,7 +5764,7 @@ from cloudflare.types.zero_trust.access.applications import (
Methods:
- client.zero_trust.access.applications.policy_tests.create(\*, account_id, \*\*params) -> Optional[PolicyTestCreateResponse]
-- client.zero_trust.access.applications.policy_tests.get(policy_test_id, \*, account_id, \*\*params) -> Optional[PolicyTestGetResponse]
+- client.zero_trust.access.applications.policy_tests.get(policy_test_id, \*, account_id) -> Optional[PolicyTestGetResponse]
##### Users
@@ -5621,7 +5776,7 @@ from cloudflare.types.zero_trust.access.applications.policy_tests import UserLis
Methods:
-- client.zero_trust.access.applications.policy_tests.users.list(policy_test_id, \*, account_id, \*\*params) -> SyncSinglePage[UserListResponse]
+- client.zero_trust.access.applications.policy_tests.users.list(policy_test_id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[UserListResponse]
### Certificates
@@ -7109,6 +7264,7 @@ from cloudflare.types.radar.bgp import (
RouteAsesResponse,
RouteMoasResponse,
RoutePfx2asResponse,
+ RouteRealtimeResponse,
RouteStatsResponse,
)
```
@@ -7118,6 +7274,7 @@ Methods:
- client.radar.bgp.routes.ases(\*\*params) -> RouteAsesResponse
- client.radar.bgp.routes.moas(\*\*params) -> RouteMoasResponse
- client.radar.bgp.routes.pfx2as(\*\*params) -> RoutePfx2asResponse
+- client.radar.bgp.routes.realtime(\*\*params) -> RouteRealtimeResponse
- client.radar.bgp.routes.stats(\*\*params) -> RouteStatsResponse
### IPs
@@ -7560,9 +7717,11 @@ Types:
from cloudflare.types.radar.attacks.layer3 import (
SummaryBitrateResponse,
SummaryDurationResponse,
+ SummaryIndustryResponse,
SummaryIPVersionResponse,
SummaryProtocolResponse,
SummaryVectorResponse,
+ SummaryVerticalResponse,
)
```
@@ -7570,9 +7729,11 @@ Methods:
- client.radar.attacks.layer3.summary.bitrate(\*\*params) -> SummaryBitrateResponse
- client.radar.attacks.layer3.summary.duration(\*\*params) -> SummaryDurationResponse
+- client.radar.attacks.layer3.summary.industry(\*\*params) -> SummaryIndustryResponse
- client.radar.attacks.layer3.summary.ip_version(\*\*params) -> SummaryIPVersionResponse
- client.radar.attacks.layer3.summary.protocol(\*\*params) -> SummaryProtocolResponse
- client.radar.attacks.layer3.summary.vector(\*\*params) -> SummaryVectorResponse
+- client.radar.attacks.layer3.summary.vertical(\*\*params) -> SummaryVerticalResponse
#### TimeseriesGroups
@@ -7651,9 +7812,11 @@ Types:
from cloudflare.types.radar.attacks.layer7 import (
SummaryHTTPMethodResponse,
SummaryHTTPVersionResponse,
+ SummaryIndustryResponse,
SummaryIPVersionResponse,
SummaryManagedRulesResponse,
SummaryMitigationProductResponse,
+ SummaryVerticalResponse,
)
```
@@ -7661,9 +7824,11 @@ Methods:
- client.radar.attacks.layer7.summary.http_method(\*\*params) -> SummaryHTTPMethodResponse
- client.radar.attacks.layer7.summary.http_version(\*\*params) -> SummaryHTTPVersionResponse
+- client.radar.attacks.layer7.summary.industry(\*\*params) -> SummaryIndustryResponse
- client.radar.attacks.layer7.summary.ip_version(\*\*params) -> SummaryIPVersionResponse
- client.radar.attacks.layer7.summary.managed_rules(\*\*params) -> SummaryManagedRulesResponse
- client.radar.attacks.layer7.summary.mitigation_product(\*\*params) -> SummaryMitigationProductResponse
+- client.radar.attacks.layer7.summary.vertical(\*\*params) -> SummaryVerticalResponse
#### TimeseriesGroups
@@ -9145,6 +9310,18 @@ Methods:
- client.workflows.instances.status.edit(instance_id, \*, account_id, workflow_name, \*\*params) -> StatusEditResponse
+### Events
+
+Types:
+
+```python
+from cloudflare.types.workflows.instances import EventCreateResponse
+```
+
+Methods:
+
+- client.workflows.instances.events.create(event_type, \*, account_id, workflow_name, instance_id, \*\*params) -> object
+
## Versions
Types:
@@ -9520,6 +9697,42 @@ Methods:
- client.browser_rendering.snapshot.create(\*, account_id, \*\*params) -> Optional[SnapshotCreateResponse]
+## Json
+
+Types:
+
+```python
+from cloudflare.types.browser_rendering import JsonCreateResponse
+```
+
+Methods:
+
+- client.browser_rendering.json.create(\*, account_id, \*\*params) -> JsonCreateResponse
+
+## Links
+
+Types:
+
+```python
+from cloudflare.types.browser_rendering import LinkCreateResponse
+```
+
+Methods:
+
+- client.browser_rendering.links.create(\*, account_id, \*\*params) -> LinkCreateResponse
+
+## Markdown
+
+Types:
+
+```python
+from cloudflare.types.browser_rendering import MarkdownCreateResponse
+```
+
+Methods:
+
+- client.browser_rendering.markdown.create(\*, account_id, \*\*params) -> str
+
# CustomPages
Types:
@@ -9537,3 +9750,80 @@ Methods:
- client.custom_pages.update(identifier, \*, account_id, zone_id, \*\*params) -> Optional[CustomPageUpdateResponse]
- client.custom_pages.list(\*, account_id, zone_id) -> SyncSinglePage[object]
- client.custom_pages.get(identifier, \*, account_id, zone_id) -> Optional[CustomPageGetResponse]
+
+# SecretsStore
+
+## Stores
+
+Types:
+
+```python
+from cloudflare.types.secrets_store import (
+ StoreCreateResponse,
+ StoreListResponse,
+ StoreDeleteResponse,
+)
+```
+
+Methods:
+
+- client.secrets_store.stores.create(\*, account_id, \*\*params) -> SyncSinglePage[StoreCreateResponse]
+- client.secrets_store.stores.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[StoreListResponse]
+- client.secrets_store.stores.delete(store_id, \*, account_id) -> Optional[StoreDeleteResponse]
+
+### Secrets
+
+Types:
+
+```python
+from cloudflare.types.secrets_store.stores import (
+ SecretCreateResponse,
+ SecretListResponse,
+ SecretDeleteResponse,
+ SecretBulkDeleteResponse,
+ SecretEditResponse,
+ SecretGetResponse,
+)
+```
+
+Methods:
+
+- client.secrets_store.stores.secrets.create(store_id, \*, account_id, \*\*params) -> SyncSinglePage[SecretCreateResponse]
+- client.secrets_store.stores.secrets.list(store_id, \*, account_id, \*\*params) -> SyncV4PagePaginationArray[SecretListResponse]
+- client.secrets_store.stores.secrets.delete(secret_id, \*, account_id, store_id) -> Optional[SecretDeleteResponse]
+- client.secrets_store.stores.secrets.bulk_delete(store_id, \*, account_id) -> SyncSinglePage[SecretBulkDeleteResponse]
+- client.secrets_store.stores.secrets.edit(secret_id, \*, account_id, store_id, \*\*params) -> Optional[SecretEditResponse]
+- client.secrets_store.stores.secrets.get(secret_id, \*, account_id, store_id) -> Optional[SecretGetResponse]
+
+## Quota
+
+Types:
+
+```python
+from cloudflare.types.secrets_store import QuotaGetResponse
+```
+
+Methods:
+
+- client.secrets_store.quota.get(\*, account_id) -> Optional[QuotaGetResponse]
+
+# Pipelines
+
+Types:
+
+```python
+from cloudflare.types.pipelines import (
+ PipelineCreateResponse,
+ PipelineUpdateResponse,
+ PipelineListResponse,
+ PipelineGetResponse,
+)
+```
+
+Methods:
+
+- client.pipelines.create(\*, account_id, \*\*params) -> PipelineCreateResponse
+- client.pipelines.update(pipeline_name, \*, account_id, \*\*params) -> PipelineUpdateResponse
+- client.pipelines.list(\*, account_id, \*\*params) -> PipelineListResponse
+- client.pipelines.delete(pipeline_name, \*, account_id) -> None
+- client.pipelines.get(pipeline_name, \*, account_id) -> PipelineGetResponse
diff --git a/pyproject.toml b/pyproject.toml
index 94e2b8e68f3..3fa4470f8af 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "cloudflare"
-version = "4.1.0"
+version = "4.2.0"
description = "The official Python library for the cloudflare API"
dynamic = ["readme"]
license = "Apache-2.0"
@@ -147,11 +147,10 @@ exclude = [
]
reportImplicitOverride = true
+reportOverlappingOverload = false
reportImportCycles = false
reportPrivateUsage = false
-reportOverlappingOverload = false
-
[tool.ruff]
line-length = 120
diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py
index 649c86dfde8..23424601d2f 100644
--- a/src/cloudflare/_base_client.py
+++ b/src/cloudflare/_base_client.py
@@ -54,11 +54,13 @@
PostParser,
RequestFiles,
HttpxSendArgs,
+ HttpxFileTypes,
RequestOptions,
+ MultipartSyntax,
HttpxRequestFiles,
ModelBuilderProtocol,
)
-from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
+from ._utils import is_dict, is_list, asyncify, is_given, is_tuple, lru_cache, is_mapping, is_mapping_t, is_sequence_t
from ._compat import PYDANTIC_V2, model_copy, model_dump
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
from ._response import (
@@ -331,6 +333,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
_client: _HttpxClientT
_version: str
_base_url: URL
+ _api_version: str
max_retries: int
timeout: Union[float, Timeout, None]
_strict_response_validation: bool
@@ -342,6 +345,7 @@ def __init__(
*,
version: str,
base_url: str | URL,
+ api_version: str,
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None = DEFAULT_TIMEOUT,
@@ -350,6 +354,7 @@ def __init__(
) -> None:
self._version = version
self._base_url = self._enforce_trailing_slash(URL(base_url))
+ self.api_version = api_version
self.max_retries = max_retries
self.timeout = timeout
self._custom_headers = custom_headers or {}
@@ -409,7 +414,8 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0
idempotency_header = self._idempotency_header
if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers:
- headers[idempotency_header] = options.idempotency_key or self._idempotency_key()
+ options.idempotency_key = options.idempotency_key or self._idempotency_key()
+ headers[idempotency_header] = options.idempotency_key
# Don't set these headers if they were already set or removed by the caller. We check
# `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case.
@@ -423,6 +429,8 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0
if timeout is not None:
headers["x-stainless-read-timeout"] = str(timeout)
+ headers["api-version"] = self.api_version
+
return headers
def _prepare_url(self, url: str) -> URL:
@@ -484,7 +492,24 @@ def _build_request(
raise TypeError(
f"Expected query input to be a dictionary for multipart requests but got {type(json_data)} instead."
)
- kwargs["data"] = self._serialize_multipartform(json_data)
+
+ if options.multipart_syntax == 'json':
+ json_data = cast("Mapping[str, object]", json_data)
+ if is_mapping_t(files):
+ files = {
+ **files,
+ **self._serialize_multiapartform_json(json_data),
+ }
+ elif is_sequence_t(files):
+ files = [
+ *files,
+ *self._serialize_multiapartform_json(json_data).items(),
+ ]
+ else:
+ assert not files, "this case should only be hit when there are no files"
+ files = self._serialize_multiapartform_json(json_data)
+ else:
+ kwargs["data"] = self._serialize_multipartform(json_data)
# httpx determines whether or not to send a "multipart/form-data"
# request based on the truthiness of the "files" argument.
@@ -516,6 +541,22 @@ def _build_request(
**kwargs,
)
+ def _serialize_multiapartform_json(self, data: Mapping[str, object]) -> dict[str, HttpxFileTypes]:
+ serialized: dict[str, HttpxFileTypes] = {}
+ for key, value in data.items():
+ if isinstance(value, Mapping) or is_list(value) or is_tuple(value):
+ serialized[key] = (None, json.dumps(value).encode("utf-8"), "application/json")
+ else:
+ serialized[key] = (
+ None,
+ self.qs._primitive_value_to_str(
+ value # type: ignore
+ ).encode("utf-8"),
+ "text/plain",
+ )
+
+ return serialized
+
def _serialize_multipartform(self, data: Mapping[object, object]) -> dict[str, object]:
items = self.qs.stringify_items(
# TODO: type ignore is required as stringify_items is well typed but we can't be
@@ -785,6 +826,7 @@ def __init__(
*,
version: str,
base_url: str | URL,
+ api_version: str,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
http_client: httpx.Client | None = None,
@@ -815,6 +857,7 @@ def __init__(
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
base_url=base_url,
+ api_version=api_version,
max_retries=max_retries,
custom_query=custom_query,
custom_headers=custom_headers,
@@ -943,6 +986,10 @@ def _request(
request = self._build_request(options, retries_taken=retries_taken)
self._prepare_request(request)
+ if options.idempotency_key:
+ # ensure the idempotency key is reused between requests
+ input_options.idempotency_key = options.idempotency_key
+
kwargs: HttpxSendArgs = {}
if self.custom_auth is not None:
kwargs["auth"] = self.custom_auth
@@ -1315,6 +1362,7 @@ def __init__(
*,
version: str,
base_url: str | URL,
+ api_version: str,
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
@@ -1343,6 +1391,7 @@ def __init__(
super().__init__(
version=version,
base_url=base_url,
+ api_version=api_version,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
max_retries=max_retries,
@@ -1475,6 +1524,10 @@ async def _request(
request = self._build_request(options, retries_taken=retries_taken)
await self._prepare_request(request)
+ if options.idempotency_key:
+ # ensure the idempotency key is reused between requests
+ input_options.idempotency_key = options.idempotency_key
+
kwargs: HttpxSendArgs = {}
if self.custom_auth is not None:
kwargs["auth"] = self.custom_auth
@@ -1794,6 +1847,7 @@ def make_request_options(
idempotency_key: str | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
post_parser: PostParser | NotGiven = NOT_GIVEN,
+ multipart_syntax: MultipartSyntax | None = None,
) -> RequestOptions:
"""Create a dict of type RequestOptions without keys of NotGiven values."""
options: RequestOptions = {}
@@ -1819,6 +1873,9 @@ def make_request_options(
# internal
options["post_parser"] = post_parser # type: ignore
+ if multipart_syntax is not None:
+ options["multipart_syntax"] = multipart_syntax
+
return options
diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py
index f3a20643345..68d07ed3714 100644
--- a/src/cloudflare/_client.py
+++ b/src/cloudflare/_client.py
@@ -4,6 +4,7 @@
import os
from typing import TYPE_CHECKING, Any, Union, Mapping
+from datetime import datetime
from typing_extensions import Self, override
import httpx
@@ -73,6 +74,7 @@
snippets,
spectrum,
hostnames,
+ pipelines,
registrar,
turnstile,
vectorize,
@@ -97,6 +99,7 @@
abuse_reports,
email_routing,
magic_transit,
+ secrets_store,
waiting_rooms,
bot_management,
cloudforce_one,
@@ -142,6 +145,7 @@
from .resources.ssl.ssl import SSLResource, AsyncSSLResource
from .resources.argo.argo import ArgoResource, AsyncArgoResource
from .resources.logs.logs import LogsResource, AsyncLogsResource
+ from .resources.pipelines import PipelinesResource, AsyncPipelinesResource
from .resources.user.user import UserResource, AsyncUserResource
from .resources.web3.web3 import Web3Resource, AsyncWeb3Resource
from .resources.audit_logs import AuditLogsResource, AsyncAuditLogsResource
@@ -199,6 +203,7 @@
from .resources.healthchecks.healthchecks import HealthchecksResource, AsyncHealthchecksResource
from .resources.email_routing.email_routing import EmailRoutingResource, AsyncEmailRoutingResource
from .resources.magic_transit.magic_transit import MagicTransitResource, AsyncMagicTransitResource
+ from .resources.secrets_store.secrets_store import SecretsStoreResource, AsyncSecretsStoreResource
from .resources.waiting_rooms.waiting_rooms import WaitingRoomsResource, AsyncWaitingRoomsResource
from .resources.cloudforce_one.cloudforce_one import CloudforceOneResource, AsyncCloudforceOneResource
from .resources.email_security.email_security import EmailSecurityResource, AsyncEmailSecurityResource
@@ -276,6 +281,7 @@ def __init__(
api_email: str | None = None,
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
+ api_version: str | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
@@ -323,9 +329,13 @@ def __init__(
if base_url is None:
base_url = f"https://api.cloudflare.com/client/v4"
+ if api_version is None:
+ api_version = datetime.today().strftime('%Y-%m-%d')
+
super().__init__(
version=__version__,
base_url=base_url,
+ api_version=api_version,
max_retries=max_retries,
timeout=timeout,
http_client=http_client,
@@ -886,6 +896,18 @@ def custom_pages(self) -> CustomPagesResource:
return CustomPagesResource(self)
+ @cached_property
+ def secrets_store(self) -> SecretsStoreResource:
+ from .resources.secrets_store import SecretsStoreResource
+
+ return SecretsStoreResource(self)
+
+ @cached_property
+ def pipelines(self) -> PipelinesResource:
+ from .resources.pipelines import PipelinesResource
+
+ return PipelinesResource(self)
+
@cached_property
def with_raw_response(self) -> CloudflareWithRawResponse:
return CloudflareWithRawResponse(self)
@@ -985,6 +1007,7 @@ def copy(
api_email: str | None = None,
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
+ api_version: str | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
http_client: httpx.Client | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
@@ -1022,6 +1045,7 @@ def copy(
api_email=api_email or self.api_email,
user_service_key=user_service_key or self.user_service_key,
base_url=base_url or self.base_url,
+ api_version=api_version or self.api_version,
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
http_client=http_client,
max_retries=max_retries if is_given(max_retries) else self.max_retries,
@@ -1083,6 +1107,7 @@ def __init__(
api_email: str | None = None,
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
+ api_version: str | None = None,
timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
@@ -1130,9 +1155,13 @@ def __init__(
if base_url is None:
base_url = f"https://api.cloudflare.com/client/v4"
+ if api_version is None:
+ api_version = datetime.today().strftime('%Y-%m-%d')
+
super().__init__(
version=__version__,
base_url=base_url,
+ api_version=api_version,
max_retries=max_retries,
timeout=timeout,
http_client=http_client,
@@ -1693,6 +1722,18 @@ def custom_pages(self) -> AsyncCustomPagesResource:
return AsyncCustomPagesResource(self)
+ @cached_property
+ def secrets_store(self) -> AsyncSecretsStoreResource:
+ from .resources.secrets_store import AsyncSecretsStoreResource
+
+ return AsyncSecretsStoreResource(self)
+
+ @cached_property
+ def pipelines(self) -> AsyncPipelinesResource:
+ from .resources.pipelines import AsyncPipelinesResource
+
+ return AsyncPipelinesResource(self)
+
@cached_property
def with_raw_response(self) -> AsyncCloudflareWithRawResponse:
return AsyncCloudflareWithRawResponse(self)
@@ -1792,6 +1833,7 @@ def copy(
api_email: str | None = None,
user_service_key: str | None = None,
base_url: str | httpx.URL | None = None,
+ api_version: str | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
http_client: httpx.AsyncClient | None = None,
max_retries: int | NotGiven = NOT_GIVEN,
@@ -1829,6 +1871,7 @@ def copy(
api_email=api_email or self.api_email,
user_service_key=user_service_key or self.user_service_key,
base_url=base_url or self.base_url,
+ api_version=api_version or self.api_version,
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
http_client=http_client,
max_retries=max_retries if is_given(max_retries) else self.max_retries,
@@ -2435,6 +2478,18 @@ def custom_pages(self) -> custom_pages.CustomPagesResourceWithRawResponse:
return CustomPagesResourceWithRawResponse(self._client.custom_pages)
+ @cached_property
+ def secrets_store(self) -> secrets_store.SecretsStoreResourceWithRawResponse:
+ from .resources.secrets_store import SecretsStoreResourceWithRawResponse
+
+ return SecretsStoreResourceWithRawResponse(self._client.secrets_store)
+
+ @cached_property
+ def pipelines(self) -> pipelines.PipelinesResourceWithRawResponse:
+ from .resources.pipelines import PipelinesResourceWithRawResponse
+
+ return PipelinesResourceWithRawResponse(self._client.pipelines)
+
class AsyncCloudflareWithRawResponse:
_client: AsyncCloudflare
@@ -2996,6 +3051,18 @@ def custom_pages(self) -> custom_pages.AsyncCustomPagesResourceWithRawResponse:
return AsyncCustomPagesResourceWithRawResponse(self._client.custom_pages)
+ @cached_property
+ def secrets_store(self) -> secrets_store.AsyncSecretsStoreResourceWithRawResponse:
+ from .resources.secrets_store import AsyncSecretsStoreResourceWithRawResponse
+
+ return AsyncSecretsStoreResourceWithRawResponse(self._client.secrets_store)
+
+ @cached_property
+ def pipelines(self) -> pipelines.AsyncPipelinesResourceWithRawResponse:
+ from .resources.pipelines import AsyncPipelinesResourceWithRawResponse
+
+ return AsyncPipelinesResourceWithRawResponse(self._client.pipelines)
+
class CloudflareWithStreamedResponse:
_client: Cloudflare
@@ -3557,6 +3624,18 @@ def custom_pages(self) -> custom_pages.CustomPagesResourceWithStreamingResponse:
return CustomPagesResourceWithStreamingResponse(self._client.custom_pages)
+ @cached_property
+ def secrets_store(self) -> secrets_store.SecretsStoreResourceWithStreamingResponse:
+ from .resources.secrets_store import SecretsStoreResourceWithStreamingResponse
+
+ return SecretsStoreResourceWithStreamingResponse(self._client.secrets_store)
+
+ @cached_property
+ def pipelines(self) -> pipelines.PipelinesResourceWithStreamingResponse:
+ from .resources.pipelines import PipelinesResourceWithStreamingResponse
+
+ return PipelinesResourceWithStreamingResponse(self._client.pipelines)
+
class AsyncCloudflareWithStreamedResponse:
_client: AsyncCloudflare
@@ -4128,6 +4207,18 @@ def custom_pages(self) -> custom_pages.AsyncCustomPagesResourceWithStreamingResp
return AsyncCustomPagesResourceWithStreamingResponse(self._client.custom_pages)
+ @cached_property
+ def secrets_store(self) -> secrets_store.AsyncSecretsStoreResourceWithStreamingResponse:
+ from .resources.secrets_store import AsyncSecretsStoreResourceWithStreamingResponse
+
+ return AsyncSecretsStoreResourceWithStreamingResponse(self._client.secrets_store)
+
+ @cached_property
+ def pipelines(self) -> pipelines.AsyncPipelinesResourceWithStreamingResponse:
+ from .resources.pipelines import AsyncPipelinesResourceWithStreamingResponse
+
+ return AsyncPipelinesResourceWithStreamingResponse(self._client.pipelines)
+
Client = Cloudflare
diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py
index b51a1bf5f94..8b5d2648486 100644
--- a/src/cloudflare/_models.py
+++ b/src/cloudflare/_models.py
@@ -31,6 +31,7 @@
Timeout,
NotGiven,
AnyMapping,
+ MultipartSyntax,
HttpxRequestFiles,
)
from ._utils import (
@@ -681,7 +682,7 @@ def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:
setattr(typ, "__pydantic_config__", config) # noqa: B010
-# our use of subclasssing here causes weirdness for type checkers,
+# our use of subclassing here causes weirdness for type checkers,
# so we just pretend that we don't subclass
if TYPE_CHECKING:
GenericModel = BaseModel
@@ -738,6 +739,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
idempotency_key: str
json_data: Body
extra_json: AnyMapping
+ multipart_syntax: MultipartSyntax
@final
@@ -750,6 +752,7 @@ class FinalRequestOptions(pydantic.BaseModel):
timeout: Union[float, Timeout, None, NotGiven] = NotGiven()
files: Union[HttpxRequestFiles, None] = None
idempotency_key: Union[str, None] = None
+ multipart_syntax: Union[MultipartSyntax, None] = None
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
# It should be noted that we cannot use `json` here as that would override
diff --git a/src/cloudflare/_types.py b/src/cloudflare/_types.py
index 0d42772c5b6..81cd5757e17 100644
--- a/src/cloudflare/_types.py
+++ b/src/cloudflare/_types.py
@@ -71,6 +71,8 @@
]
HttpxRequestFiles = Union[Mapping[str, HttpxFileTypes], Sequence[Tuple[str, HttpxFileTypes]]]
+MultipartSyntax = Literal["query", "json"]
+
# Workaround to support (cast_to: Type[ResponseT]) -> ResponseT
# where ResponseT includes `None`. In order to support directly
# passing `None`, overloads would have to be defined for every
@@ -100,6 +102,7 @@ class RequestOptions(TypedDict, total=False):
params: Query
extra_json: AnyMapping
idempotency_key: str
+ multipart_syntax: MultipartSyntax
# Sentinel class used until PEP 0661 is accepted
diff --git a/src/cloudflare/_utils/_transform.py b/src/cloudflare/_utils/_transform.py
index 18afd9d8bd5..b0cc20a7355 100644
--- a/src/cloudflare/_utils/_transform.py
+++ b/src/cloudflare/_utils/_transform.py
@@ -5,13 +5,15 @@
import pathlib
from typing import Any, Mapping, TypeVar, cast
from datetime import date, datetime
-from typing_extensions import Literal, get_args, override, get_type_hints
+from typing_extensions import Literal, get_args, override, get_type_hints as _get_type_hints
import anyio
import pydantic
from ._utils import (
is_list,
+ is_given,
+ lru_cache,
is_mapping,
is_iterable,
)
@@ -108,6 +110,7 @@ class Params(TypedDict, total=False):
return cast(_T, transformed)
+@lru_cache(maxsize=8096)
def _get_annotated_type(type_: type) -> type | None:
"""If the given type is an `Annotated` type then it is returned, if not `None` is returned.
@@ -126,7 +129,7 @@ def _get_annotated_type(type_: type) -> type | None:
def _maybe_transform_key(key: str, type_: type) -> str:
"""Transform the given `data` based on the annotations provided in `type_`.
- Note: this function only looks at `Annotated` types that contain `PropertInfo` metadata.
+ Note: this function only looks at `Annotated` types that contain `PropertyInfo` metadata.
"""
annotated_type = _get_annotated_type(type_)
if annotated_type is None:
@@ -142,6 +145,10 @@ def _maybe_transform_key(key: str, type_: type) -> str:
return key
+def _no_transform_needed(annotation: type) -> bool:
+ return annotation == float or annotation == int
+
+
def _transform_recursive(
data: object,
*,
@@ -184,6 +191,15 @@ def _transform_recursive(
return cast(object, data)
inner_type = extract_type_arg(stripped_type, 0)
+ if _no_transform_needed(inner_type):
+ # for some types there is no need to transform anything, so we can get a small
+ # perf boost from skipping that work.
+ #
+ # but we still need to convert to a list to ensure the data is json-serializable
+ if is_list(data):
+ return data
+ return list(data)
+
return [_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
if is_union_type(stripped_type):
@@ -245,6 +261,11 @@ def _transform_typeddict(
result: dict[str, object] = {}
annotations = get_type_hints(expected_type, include_extras=True)
for key, value in data.items():
+ if not is_given(value):
+ # we don't need to include `NotGiven` values here as they'll
+ # be stripped out before the request is sent anyway
+ continue
+
type_ = annotations.get(key)
if type_ is None:
# we do not have a type annotation for this field, leave it as is
@@ -332,6 +353,15 @@ async def _async_transform_recursive(
return cast(object, data)
inner_type = extract_type_arg(stripped_type, 0)
+ if _no_transform_needed(inner_type):
+ # for some types there is no need to transform anything, so we can get a small
+ # perf boost from skipping that work.
+ #
+ # but we still need to convert to a list to ensure the data is json-serializable
+ if is_list(data):
+ return data
+ return list(data)
+
return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data]
if is_union_type(stripped_type):
@@ -393,6 +423,11 @@ async def _async_transform_typeddict(
result: dict[str, object] = {}
annotations = get_type_hints(expected_type, include_extras=True)
for key, value in data.items():
+ if not is_given(value):
+ # we don't need to include `NotGiven` values here as they'll
+ # be stripped out before the request is sent anyway
+ continue
+
type_ = annotations.get(key)
if type_ is None:
# we do not have a type annotation for this field, leave it as is
@@ -400,3 +435,13 @@ async def _async_transform_typeddict(
else:
result[_maybe_transform_key(key, type_)] = await _async_transform_recursive(value, annotation=type_)
return result
+
+
+@lru_cache(maxsize=8096)
+def get_type_hints(
+ obj: Any,
+ globalns: dict[str, Any] | None = None,
+ localns: Mapping[str, Any] | None = None,
+ include_extras: bool = False,
+) -> dict[str, Any]:
+ return _get_type_hints(obj, globalns=globalns, localns=localns, include_extras=include_extras)
diff --git a/src/cloudflare/_utils/_typing.py b/src/cloudflare/_utils/_typing.py
index 278749b1475..1958820f8d4 100644
--- a/src/cloudflare/_utils/_typing.py
+++ b/src/cloudflare/_utils/_typing.py
@@ -13,6 +13,7 @@
get_origin,
)
+from ._utils import lru_cache
from .._types import InheritsGeneric
from .._compat import is_union as _is_union
@@ -66,6 +67,7 @@ def is_type_alias_type(tp: Any, /) -> TypeIs[typing_extensions.TypeAliasType]:
# Extracts T from Annotated[T, ...] or from Required[Annotated[T, ...]]
+@lru_cache(maxsize=8096)
def strip_annotated_type(typ: type) -> type:
if is_required_type(typ) or is_annotated_type(typ):
return strip_annotated_type(cast(type, get_args(typ)[0]))
diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py
index 7dd1f280c27..1013e2ad416 100644
--- a/src/cloudflare/_version.py
+++ b/src/cloudflare/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "cloudflare"
-__version__ = "4.1.0" # x-release-please-version
+__version__ = "4.2.0" # x-release-please-version
diff --git a/src/cloudflare/resources/abuse_reports.py b/src/cloudflare/resources/abuse_reports.py
index 09f63ae53af..36df04172b5 100644
--- a/src/cloudflare/resources/abuse_reports.py
+++ b/src/cloudflare/resources/abuse_reports.py
@@ -64,16 +64,6 @@ def create(
],
*,
account_id: str,
- address1: str,
- agent_name: str,
- agree: Literal[0, 1],
- city: str,
- country: str,
- host_notification: Literal["send", "send-anon", "none"],
- original_work: str,
- owner_notification: Literal["send", "send-anon", "none"],
- signature: str,
- state: str,
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -83,25 +73,36 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -115,74 +116,83 @@ def create(
Args:
report_type: The abuse report type
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
- may be released by Cloudflare to third parties such as the Lumen Database
- (https://lumendatabase.org/).
-
- agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+ act: The abuse report type
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
- original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
- signature: Required for DMCA reports, should be same as Name. An affirmation that all
- information in the report is true and accurate while agreeing to the policies of
- Cloudflare's abuse reports
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
- state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- act: The abuse report type
-
comments: Any additional comments about the infringement not exceeding 2000 characters
company: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
justification: A detailed description of the infringement, including any necessary access
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
unique
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -194,11 +204,6 @@ def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -224,12 +229,6 @@ def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
- trademark_number: str,
- trademark_office: str,
- trademark_symbol: str,
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -239,8 +238,11 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -249,19 +251,23 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -275,23 +281,20 @@ def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- trademark_number: Text not exceeding 1000 characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- trademark_office: Text not exceeding 1000 characters
+ email2: Should match the value provided in `email`
- trademark_symbol: Text not exceeding 1000 characters
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- act: The abuse report type
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -317,13 +320,12 @@ def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -333,11 +335,18 @@ def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -354,10 +363,11 @@ def create(
title: Text not exceeding 255 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
extra_headers: Send extra headers
@@ -384,9 +394,6 @@ def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -396,8 +403,11 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -406,13 +416,15 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -421,7 +433,6 @@ def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -435,17 +446,20 @@ def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -471,13 +485,12 @@ def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -487,11 +500,18 @@ def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -514,11 +534,6 @@ def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -544,9 +559,6 @@ def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -556,8 +568,11 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -566,13 +581,15 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -581,7 +598,6 @@ def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -595,17 +611,20 @@ def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -631,13 +650,12 @@ def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -647,11 +665,18 @@ def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -674,11 +699,6 @@ def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -704,10 +724,6 @@ def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- ncmec_notification: Literal["send", "send-anon", "none"],
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -717,8 +733,11 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -727,12 +746,15 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -741,7 +763,6 @@ def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -755,20 +776,20 @@ def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- act: The abuse report type
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -794,24 +815,33 @@ def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- email2: Should match the value provided in `email`
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -834,11 +864,6 @@ def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -864,9 +889,6 @@ def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -876,8 +898,11 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -886,13 +911,15 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -901,7 +928,6 @@ def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -915,17 +941,20 @@ def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -951,13 +980,12 @@ def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -967,11 +995,18 @@ def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -994,11 +1029,6 @@ def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1024,7 +1054,6 @@ def create(
],
*,
account_id: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -1034,8 +1063,11 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -1044,15 +1076,15 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -1061,7 +1093,6 @@ def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1075,11 +1106,21 @@ def create(
Args:
report_type: The abuse report type
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
act: The abuse report type
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -1104,11 +1145,6 @@ def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
-
host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -1116,9 +1152,6 @@ def create(
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -1127,11 +1160,18 @@ def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -1152,13 +1192,8 @@ def create(
trademark_office: Text not exceeding 1000 characters
- trademark_symbol: Text not exceeding 1000 characters
-
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
+ trademark_symbol: Text not exceeding 1000 characters
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1184,9 +1219,6 @@ def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- ncsei_subject_representation: bool,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -1196,8 +1228,11 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -1206,13 +1241,15 @@ def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -1221,7 +1258,6 @@ def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1235,15 +1271,20 @@ def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -1269,29 +1310,33 @@ def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
justification: A detailed description of the infringement, including any necessary access
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -1314,11 +1359,6 @@ def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1329,34 +1369,7 @@ def create(
"""
...
- @required_args(
- [
- "account_id",
- "address1",
- "agent_name",
- "agree",
- "city",
- "country",
- "host_notification",
- "original_work",
- "owner_notification",
- "signature",
- "state",
- ],
- [
- "account_id",
- "host_notification",
- "justification",
- "owner_notification",
- "trademark_number",
- "trademark_office",
- "trademark_symbol",
- ],
- ["account_id", "host_notification", "justification", "owner_notification"],
- ["account_id", "host_notification", "justification", "ncmec_notification", "owner_notification"],
- ["account_id", "owner_notification"],
- ["account_id", "host_notification", "ncsei_subject_representation", "owner_notification"],
- )
+ @required_args(["account_id", "act", "email", "email2", "name", "urls"])
def create(
self,
report_type: Literal[
@@ -1371,16 +1384,6 @@ def create(
],
*,
account_id: str,
- address1: str | NotGiven = NOT_GIVEN,
- agent_name: str | NotGiven = NOT_GIVEN,
- agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
- city: str | NotGiven = NOT_GIVEN,
- country: str | NotGiven = NOT_GIVEN,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- original_work: str | NotGiven = NOT_GIVEN,
- owner_notification: Literal["send", "send-anon", "none"],
- signature: str | NotGiven = NOT_GIVEN,
- state: str | NotGiven = NOT_GIVEN,
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -1390,25 +1393,36 @@ def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1424,34 +1438,36 @@ def create(
f"/accounts/{account_id}/abuse-reports/{report_type}",
body=maybe_transform(
{
+ "act": act,
+ "email": email,
+ "email2": email2,
+ "name": name,
+ "urls": urls,
"address1": address1,
"agent_name": agent_name,
"agree": agree,
"city": city,
- "country": country,
- "host_notification": host_notification,
- "original_work": original_work,
- "owner_notification": owner_notification,
- "signature": signature,
- "state": state,
- "act": act,
"comments": comments,
"company": company,
+ "country": country,
"destination_ips": destination_ips,
- "email": email,
- "email2": email2,
+ "host_notification": host_notification,
"justification": justification,
- "name": name,
"ncmec_notification": ncmec_notification,
"ncsei_subject_representation": ncsei_subject_representation,
+ "original_work": original_work,
+ "owner_notification": owner_notification,
"ports_protocols": ports_protocols,
+ "reported_country": reported_country,
+ "reported_user_agent": reported_user_agent,
+ "signature": signature,
"source_ips": source_ips,
+ "state": state,
"tele": tele,
"title": title,
"trademark_number": trademark_number,
"trademark_office": trademark_office,
"trademark_symbol": trademark_symbol,
- "urls": urls,
},
abuse_report_create_params.AbuseReportCreateParams,
),
@@ -1501,16 +1517,6 @@ async def create(
],
*,
account_id: str,
- address1: str,
- agent_name: str,
- agree: Literal[0, 1],
- city: str,
- country: str,
- host_notification: Literal["send", "send-anon", "none"],
- original_work: str,
- owner_notification: Literal["send", "send-anon", "none"],
- signature: str,
- state: str,
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -1520,25 +1526,36 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1552,74 +1569,83 @@ async def create(
Args:
report_type: The abuse report type
- address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
- may be released by Cloudflare to third parties such as the Lumen Database
- (https://lumendatabase.org/).
-
- agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
+ act: The abuse report type
- city: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
- original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ agent_name: The name of the copyright holder. Text not exceeding 60 characters. This field
+ may be released by Cloudflare to third parties such as the Lumen Database
+ (https://lumendatabase.org/).
- signature: Required for DMCA reports, should be same as Name. An affirmation that all
- information in the report is true and accurate while agreeing to the policies of
- Cloudflare's abuse reports
+ agree: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports
- state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ city: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
- act: The abuse report type
-
comments: Any additional comments about the infringement not exceeding 2000 characters
company: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ country: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
destination_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
justification: A detailed description of the infringement, including any necessary access
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+ original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
+ signature: Required for DMCA reports, should be same as Name. An affirmation that all
+ information in the report is true and accurate while agreeing to the policies of
+ Cloudflare's abuse reports
+
source_ips: A list of IP addresses separated by ‘ ’ (new line character). The list of source
IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be
unique
+ state: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
tele: Text not exceeding 20 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -1631,11 +1657,6 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1661,12 +1682,6 @@ async def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
- trademark_number: str,
- trademark_office: str,
- trademark_symbol: str,
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -1676,8 +1691,11 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -1686,19 +1704,23 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
+ trademark_number: str | NotGiven = NOT_GIVEN,
+ trademark_office: str | NotGiven = NOT_GIVEN,
+ trademark_symbol: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1712,23 +1734,20 @@ async def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
-
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- trademark_number: Text not exceeding 1000 characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- trademark_office: Text not exceeding 1000 characters
+ email2: Should match the value provided in `email`
- trademark_symbol: Text not exceeding 1000 characters
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- act: The abuse report type
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -1754,13 +1773,12 @@ async def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -1770,11 +1788,18 @@ async def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -1791,10 +1816,11 @@ async def create(
title: Text not exceeding 255 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
+ trademark_number: Text not exceeding 1000 characters
+
+ trademark_office: Text not exceeding 1000 characters
+
+ trademark_symbol: Text not exceeding 1000 characters
extra_headers: Send extra headers
@@ -1821,9 +1847,6 @@ async def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -1833,8 +1856,11 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -1843,13 +1869,15 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -1858,7 +1886,6 @@ async def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1872,17 +1899,20 @@ async def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -1908,13 +1938,12 @@ async def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -1924,11 +1953,18 @@ async def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -1951,11 +1987,6 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1981,9 +2012,6 @@ async def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -1993,8 +2021,11 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -2003,13 +2034,15 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -2018,7 +2051,6 @@ async def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -2032,17 +2064,20 @@ async def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -2068,13 +2103,12 @@ async def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -2084,11 +2118,18 @@ async def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -2111,11 +2152,6 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2141,10 +2177,6 @@ async def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- ncmec_notification: Literal["send", "send-anon", "none"],
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -2154,8 +2186,11 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -2164,12 +2199,15 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
+ ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -2178,7 +2216,6 @@ async def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -2192,20 +2229,20 @@ async def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- act: The abuse report type
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -2231,24 +2268,33 @@ async def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- email2: Should match the value provided in `email`
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -2271,11 +2317,6 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2301,9 +2342,6 @@ async def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- justification: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -2313,8 +2351,11 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -2323,13 +2364,15 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ justification: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -2338,7 +2381,6 @@ async def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -2352,17 +2394,20 @@ async def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- justification: A detailed description of the infringement, including any necessary access
- details and the exact steps needed to view the content, not exceeding 5000
- characters
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -2388,13 +2433,12 @@ async def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
+ justification: A detailed description of the infringement, including any necessary access
+ details and the exact steps needed to view the content, not exceeding 5000
+ characters
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -2404,11 +2448,18 @@ async def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -2431,11 +2482,6 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2461,7 +2507,6 @@ async def create(
],
*,
account_id: str,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -2471,8 +2516,11 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -2481,15 +2529,15 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -2498,7 +2546,6 @@ async def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -2512,11 +2559,21 @@ async def create(
Args:
report_type: The abuse report type
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
-
act: The abuse report type
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ email2: Should match the value provided in `email`
+
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
+
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -2541,11 +2598,6 @@ async def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
-
host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -2553,9 +2605,6 @@ async def create(
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
@@ -2564,11 +2613,18 @@ async def create(
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -2591,11 +2647,6 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2621,9 +2672,6 @@ async def create(
],
*,
account_id: str,
- host_notification: Literal["send", "send-anon", "none"],
- ncsei_subject_representation: bool,
- owner_notification: Literal["send", "send-anon", "none"],
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -2633,8 +2681,11 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
address1: str | NotGiven = NOT_GIVEN,
agent_name: str | NotGiven = NOT_GIVEN,
agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
@@ -2643,13 +2694,15 @@ async def create(
company: str | NotGiven = NOT_GIVEN,
country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
+ ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
state: str | NotGiven = NOT_GIVEN,
@@ -2658,7 +2711,6 @@ async def create(
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -2672,15 +2724,20 @@ async def create(
Args:
report_type: The abuse report type
- host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ act: The abuse report type
- ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+ email: A valid email of the abuse reporter. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
- owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
- reports cannot be anonymous.
+ email2: Should match the value provided in `email`
- act: The abuse report type
+ name: Text not exceeding 255 characters. This field may be released by Cloudflare to
+ third parties such as the Lumen Database (https://lumendatabase.org/).
+
+ urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
+ should not exceed 250 URLs. All URLs should have the same hostname. Each URL
+ should be unique. This field may be released by Cloudflare to third parties such
+ as the Lumen Database (https://lumendatabase.org/).
address1: Text not exceeding 100 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
@@ -2706,29 +2763,33 @@ async def create(
destination IPs should not exceed 30 IP addresses. Each one of the IP addresses
ought to be unique
- email: A valid email of the abuse reporter. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
- email2: Should match the value provided in `email`
+ host_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
justification: A detailed description of the infringement, including any necessary access
details and the exact steps needed to view the content, not exceeding 5000
characters
- name: Text not exceeding 255 characters. This field may be released by Cloudflare to
- third parties such as the Lumen Database (https://lumendatabase.org/).
-
ncmec_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
reports cannot be anonymous.
+ ncsei_subject_representation: If the submitter is the target of NCSEI in the URLs of the abuse report.
+
original_work: Text not exceeding 255 characters. This field may be released by Cloudflare to
third parties such as the Lumen Database (https://lumendatabase.org/).
+ owner_notification: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark
+ reports cannot be anonymous.
+
ports_protocols: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total
size of the field should not exceed 2000 characters. Each individual
port/protocol should not exceed 100 characters. The list should not have more
than 30 unique ports and protocols.
+ reported_country: Text containing 2 characters
+
+ reported_user_agent: Text not exceeding 255 characters
+
signature: Required for DMCA reports, should be same as Name. An affirmation that all
information in the report is true and accurate while agreeing to the policies of
Cloudflare's abuse reports
@@ -2751,11 +2812,6 @@ async def create(
trademark_symbol: Text not exceeding 1000 characters
- urls: A list of valid URLs separated by ‘ ’ (new line character). The list of the URLs
- should not exceed 250 URLs. All URLs should have the same hostname. Each URL
- should be unique. This field may be released by Cloudflare to third parties such
- as the Lumen Database (https://lumendatabase.org/).
-
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -2766,34 +2822,7 @@ async def create(
"""
...
- @required_args(
- [
- "account_id",
- "address1",
- "agent_name",
- "agree",
- "city",
- "country",
- "host_notification",
- "original_work",
- "owner_notification",
- "signature",
- "state",
- ],
- [
- "account_id",
- "host_notification",
- "justification",
- "owner_notification",
- "trademark_number",
- "trademark_office",
- "trademark_symbol",
- ],
- ["account_id", "host_notification", "justification", "owner_notification"],
- ["account_id", "host_notification", "justification", "ncmec_notification", "owner_notification"],
- ["account_id", "owner_notification"],
- ["account_id", "host_notification", "ncsei_subject_representation", "owner_notification"],
- )
+ @required_args(["account_id", "act", "email", "email2", "name", "urls"])
async def create(
self,
report_type: Literal[
@@ -2808,16 +2837,6 @@ async def create(
],
*,
account_id: str,
- address1: str | NotGiven = NOT_GIVEN,
- agent_name: str | NotGiven = NOT_GIVEN,
- agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
- city: str | NotGiven = NOT_GIVEN,
- country: str | NotGiven = NOT_GIVEN,
- host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
- original_work: str | NotGiven = NOT_GIVEN,
- owner_notification: Literal["send", "send-anon", "none"],
- signature: str | NotGiven = NOT_GIVEN,
- state: str | NotGiven = NOT_GIVEN,
act: Literal[
"abuse_dmca",
"abuse_trademark",
@@ -2827,25 +2846,36 @@ async def create(
"abuse_threat",
"abuse_registrar_whois",
"abuse_ncsei",
- ]
- | NotGiven = NOT_GIVEN,
+ ],
+ email: str,
+ email2: str,
+ name: str,
+ urls: str,
+ address1: str | NotGiven = NOT_GIVEN,
+ agent_name: str | NotGiven = NOT_GIVEN,
+ agree: Literal[0, 1] | NotGiven = NOT_GIVEN,
+ city: str | NotGiven = NOT_GIVEN,
comments: str | NotGiven = NOT_GIVEN,
company: str | NotGiven = NOT_GIVEN,
+ country: str | NotGiven = NOT_GIVEN,
destination_ips: str | NotGiven = NOT_GIVEN,
- email: str | NotGiven = NOT_GIVEN,
- email2: str | NotGiven = NOT_GIVEN,
+ host_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
justification: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
ncmec_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ncsei_subject_representation: bool | NotGiven = NOT_GIVEN,
+ original_work: str | NotGiven = NOT_GIVEN,
+ owner_notification: Literal["send", "send-anon", "none"] | NotGiven = NOT_GIVEN,
ports_protocols: str | NotGiven = NOT_GIVEN,
+ reported_country: str | NotGiven = NOT_GIVEN,
+ reported_user_agent: str | NotGiven = NOT_GIVEN,
+ signature: str | NotGiven = NOT_GIVEN,
source_ips: str | NotGiven = NOT_GIVEN,
+ state: str | NotGiven = NOT_GIVEN,
tele: str | NotGiven = NOT_GIVEN,
title: str | NotGiven = NOT_GIVEN,
trademark_number: str | NotGiven = NOT_GIVEN,
trademark_office: str | NotGiven = NOT_GIVEN,
trademark_symbol: str | NotGiven = NOT_GIVEN,
- urls: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -2861,34 +2891,36 @@ async def create(
f"/accounts/{account_id}/abuse-reports/{report_type}",
body=await async_maybe_transform(
{
+ "act": act,
+ "email": email,
+ "email2": email2,
+ "name": name,
+ "urls": urls,
"address1": address1,
"agent_name": agent_name,
"agree": agree,
"city": city,
- "country": country,
- "host_notification": host_notification,
- "original_work": original_work,
- "owner_notification": owner_notification,
- "signature": signature,
- "state": state,
- "act": act,
"comments": comments,
"company": company,
+ "country": country,
"destination_ips": destination_ips,
- "email": email,
- "email2": email2,
+ "host_notification": host_notification,
"justification": justification,
- "name": name,
"ncmec_notification": ncmec_notification,
"ncsei_subject_representation": ncsei_subject_representation,
+ "original_work": original_work,
+ "owner_notification": owner_notification,
"ports_protocols": ports_protocols,
+ "reported_country": reported_country,
+ "reported_user_agent": reported_user_agent,
+ "signature": signature,
"source_ips": source_ips,
+ "state": state,
"tele": tele,
"title": title,
"trademark_number": trademark_number,
"trademark_office": trademark_office,
"trademark_symbol": trademark_symbol,
- "urls": urls,
},
abuse_report_create_params.AbuseReportCreateParams,
),
diff --git a/src/cloudflare/resources/acm/total_tls.py b/src/cloudflare/resources/acm/total_tls.py
index 2d0e550ccf5..099e80199ba 100644
--- a/src/cloudflare/resources/acm/total_tls.py
+++ b/src/cloudflare/resources/acm/total_tls.py
@@ -66,7 +66,7 @@ def create(
Set Total TLS Settings or disable the feature for a Zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
enabled: If enabled, Total TLS will order a hostname specific TLS certificate for any
proxied A, AAAA, or CNAME record in your zone.
@@ -117,7 +117,7 @@ def get(
Get Total TLS Settings for a Zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -179,7 +179,7 @@ async def create(
Set Total TLS Settings or disable the feature for a Zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
enabled: If enabled, Total TLS will order a hostname specific TLS certificate for any
proxied A, AAAA, or CNAME record in your zone.
@@ -230,7 +230,7 @@ async def get(
Get Total TLS Settings for a Zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/addressing/prefixes/service_bindings.py b/src/cloudflare/resources/addressing/prefixes/service_bindings.py
index 053cdd351c4..cdcd528951e 100644
--- a/src/cloudflare/resources/addressing/prefixes/service_bindings.py
+++ b/src/cloudflare/resources/addressing/prefixes/service_bindings.py
@@ -66,8 +66,9 @@ def create(
"""
Creates a new Service Binding, routing traffic to IPs within the given CIDR to a
service running on Cloudflare's network. **Note:** This API may only be used on
- prefixes currently configured with a Magic Transit service binding, and only
- allows creating service bindings for the Cloudflare CDN or Cloudflare Spectrum.
+ prefixes currently configured with a Magic Transit/Cloudflare CDN/Cloudflare
+ Spectrum service binding, and only allows creating upgrade service bindings for
+ the Cloudflare CDN or Cloudflare Spectrum.
Args:
account_id: Identifier of a Cloudflare account.
@@ -289,8 +290,9 @@ async def create(
"""
Creates a new Service Binding, routing traffic to IPs within the given CIDR to a
service running on Cloudflare's network. **Note:** This API may only be used on
- prefixes currently configured with a Magic Transit service binding, and only
- allows creating service bindings for the Cloudflare CDN or Cloudflare Spectrum.
+ prefixes currently configured with a Magic Transit/Cloudflare CDN/Cloudflare
+ Spectrum service binding, and only allows creating upgrade service bindings for
+ the Cloudflare CDN or Cloudflare Spectrum.
Args:
account_id: Identifier of a Cloudflare account.
diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py b/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
index ed9b3b46be5..26ac137fd8f 100644
--- a/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
+++ b/src/cloudflare/resources/addressing/regional_hostnames/regional_hostnames.py
@@ -70,6 +70,7 @@ def create(
zone_id: str,
hostname: str,
region_key: str,
+ routing: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -85,13 +86,15 @@ def create(
[Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/).
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
region_key: Identifying key for the region
+ routing: Configure which routing method to use for the regional hostname
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -108,6 +111,7 @@ def create(
{
"hostname": hostname,
"region_key": region_key,
+ "routing": routing,
},
regional_hostname_create_params.RegionalHostnameCreateParams,
),
@@ -136,7 +140,7 @@ def list(
List all Regional Hostnames within a zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -173,7 +177,7 @@ def delete(
Delete the region configuration for a specific Regional Hostname.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
@@ -217,7 +221,7 @@ def edit(
of a hostname is mutable.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
@@ -265,7 +269,7 @@ def get(
Fetch the configuration for a specific Regional Hostname, within a zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
@@ -325,6 +329,7 @@ async def create(
zone_id: str,
hostname: str,
region_key: str,
+ routing: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -340,13 +345,15 @@ async def create(
[Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/).
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
region_key: Identifying key for the region
+ routing: Configure which routing method to use for the regional hostname
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -363,6 +370,7 @@ async def create(
{
"hostname": hostname,
"region_key": region_key,
+ "routing": routing,
},
regional_hostname_create_params.RegionalHostnameCreateParams,
),
@@ -391,7 +399,7 @@ def list(
List all Regional Hostnames within a zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -428,7 +436,7 @@ async def delete(
Delete the region configuration for a specific Regional Hostname.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
@@ -472,7 +480,7 @@ async def edit(
of a hostname is mutable.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
@@ -522,7 +530,7 @@ async def get(
Fetch the configuration for a specific Regional Hostname, within a zone.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hostname: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are
supported for one level, e.g `*.example.com`
diff --git a/src/cloudflare/resources/addressing/regional_hostnames/regions.py b/src/cloudflare/resources/addressing/regional_hostnames/regions.py
index f0c69f1b81f..77bd67a298d 100644
--- a/src/cloudflare/resources/addressing/regional_hostnames/regions.py
+++ b/src/cloudflare/resources/addressing/regional_hostnames/regions.py
@@ -55,7 +55,7 @@ def list(
List all Regional Services regions available for use by this account.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -112,7 +112,7 @@ def list(
List all Regional Services regions available for use by this account.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/ai/ai.py b/src/cloudflare/resources/ai/ai.py
index bbc218bb3ab..a69623d3eba 100644
--- a/src/cloudflare/resources/ai/ai.py
+++ b/src/cloudflare/resources/ai/ai.py
@@ -234,7 +234,7 @@ def run(
[Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
Args:
- prompt: A text description of the image you want to generate
+ prompt: A text description of the audio you want to generate
lang: The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en'
if not specified
@@ -501,6 +501,7 @@ def run(
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
+ raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.MessagesResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
@@ -536,11 +537,15 @@ def run(
presence_penalty: Increases the likelihood of the model introducing new topics.
+ raw: If true, a chat template is not applied and you must adhere to the specific
+ model's expected formatting.
+
repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
seed: Random seed for reproducibility of the generation.
- stream: If true, the response will be streamed back incrementally.
+ stream: If true, the response will be streamed back incrementally using SSE, Server Sent
+ Events.
temperature: Controls the randomness of the output; higher values produce more random
results.
@@ -551,7 +556,7 @@ def run(
responses more focused; higher values introduce more variety and potential
surprises.
- top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ top_p: Adjusts the creativity of the AI's responses by controlling how many possible
words it considers. Lower values make outputs more predictable; higher values
allow for more varied and creative responses.
@@ -726,6 +731,154 @@ def run(
"""
...
+ @overload
+ def run(
+ self,
+ model_name: str,
+ *,
+ account_id: str,
+ image: str,
+ prompt: str,
+ frequency_penalty: float | NotGiven = NOT_GIVEN,
+ ignore_eos: bool | NotGiven = NOT_GIVEN,
+ max_tokens: int | NotGiven = NOT_GIVEN,
+ presence_penalty: float | NotGiven = NOT_GIVEN,
+ repetition_penalty: float | NotGiven = NOT_GIVEN,
+ seed: float | NotGiven = NOT_GIVEN,
+ temperature: float | NotGiven = NOT_GIVEN,
+ top_k: float | NotGiven = NOT_GIVEN,
+ top_p: float | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> Optional[AIRunResponse]:
+ """
+ This endpoint provides users with the capability to run specific AI models
+ on-demand.
+
+ By submitting the required input data, users can receive real-time predictions
+ or results generated by the chosen AI model. The endpoint supports various AI
+ model types, ensuring flexibility and adaptability for diverse use cases.
+
+ Model specific inputs available in
+ [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
+
+ Args:
+ image: Image in base64 encoded format.
+
+ prompt: The input text prompt for the model to generate a response.
+
+ frequency_penalty: Decreases the likelihood of the model repeating the same lines verbatim.
+
+ ignore_eos: Whether to ignore the EOS token and continue generating tokens after the EOS
+ token is generated.
+
+ max_tokens: The maximum number of tokens to generate in the response.
+
+ presence_penalty: Increases the likelihood of the model introducing new topics.
+
+ repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
+
+ seed: Random seed for reproducibility of the generation.
+
+ temperature: Controls the randomness of the output; higher values produce more random
+ results.
+
+ top_k: Limits the AI to choose from the top 'k' most probable words. Lower values make
+ responses more focused; higher values introduce more variety and potential
+ surprises.
+
+ top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ words it considers. Lower values make outputs more predictable; higher values
+ allow for more varied and creative responses.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def run(
+ self,
+ model_name: str,
+ *,
+ account_id: str,
+ image: str,
+ messages: Iterable[ai_run_params.Variant13Message],
+ frequency_penalty: float | NotGiven = NOT_GIVEN,
+ ignore_eos: bool | NotGiven = NOT_GIVEN,
+ max_tokens: int | NotGiven = NOT_GIVEN,
+ presence_penalty: float | NotGiven = NOT_GIVEN,
+ repetition_penalty: float | NotGiven = NOT_GIVEN,
+ seed: float | NotGiven = NOT_GIVEN,
+ temperature: float | NotGiven = NOT_GIVEN,
+ top_k: float | NotGiven = NOT_GIVEN,
+ top_p: float | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> Optional[AIRunResponse]:
+ """
+ This endpoint provides users with the capability to run specific AI models
+ on-demand.
+
+ By submitting the required input data, users can receive real-time predictions
+ or results generated by the chosen AI model. The endpoint supports various AI
+ model types, ensuring flexibility and adaptability for diverse use cases.
+
+ Model specific inputs available in
+ [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
+
+ Args:
+ image: Image in base64 encoded format.
+
+ messages: An array of message objects representing the conversation history.
+
+ frequency_penalty: Decreases the likelihood of the model repeating the same lines verbatim.
+
+ ignore_eos: Whether to ignore the EOS token and continue generating tokens after the EOS
+ token is generated.
+
+ max_tokens: The maximum number of tokens to generate in the response.
+
+ presence_penalty: Increases the likelihood of the model introducing new topics.
+
+ repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
+
+ seed: Random seed for reproducibility of the generation.
+
+ temperature: Controls the randomness of the output; higher values produce more random
+ results.
+
+ top_k: Limits the AI to choose from the top 'k' most probable words. Lower values make
+ responses more focused; higher values introduce more variety and potential
+ surprises.
+
+ top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ words it considers. Lower values make outputs more predictable; higher values
+ allow for more varied and creative responses.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
@required_args(
["account_id", "text"],
["account_id", "prompt"],
@@ -735,6 +888,8 @@ def run(
["account_id", "messages"],
["account_id", "target_lang", "text"],
["account_id", "input_text"],
+ ["account_id", "image", "prompt"],
+ ["account_id", "image", "messages"],
)
def run(
self,
@@ -745,7 +900,7 @@ def run(
prompt: str | NotGiven = NOT_GIVEN,
guidance: float | NotGiven = NOT_GIVEN,
height: int | NotGiven = NOT_GIVEN,
- image: Iterable[float] | NotGiven = NOT_GIVEN,
+ image: Iterable[float] | str | NotGiven = NOT_GIVEN,
image_b64: str | NotGiven = NOT_GIVEN,
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
@@ -773,6 +928,7 @@ def run(
tools: Iterable[ai_run_params.MessagesTool] | NotGiven = NOT_GIVEN,
input_text: str | NotGiven = NOT_GIVEN,
max_length: int | NotGiven = NOT_GIVEN,
+ ignore_eos: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -822,6 +978,7 @@ def run(
"tools": tools,
"input_text": input_text,
"max_length": max_length,
+ "ignore_eos": ignore_eos,
},
ai_run_params.AIRunParams,
),
@@ -1012,7 +1169,7 @@ async def run(
[Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
Args:
- prompt: A text description of the image you want to generate
+ prompt: A text description of the audio you want to generate
lang: The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en'
if not specified
@@ -1279,6 +1436,7 @@ async def run(
functions: Iterable[ai_run_params.MessagesFunction] | NotGiven = NOT_GIVEN,
max_tokens: int | NotGiven = NOT_GIVEN,
presence_penalty: float | NotGiven = NOT_GIVEN,
+ raw: bool | NotGiven = NOT_GIVEN,
repetition_penalty: float | NotGiven = NOT_GIVEN,
response_format: ai_run_params.MessagesResponseFormat | NotGiven = NOT_GIVEN,
seed: int | NotGiven = NOT_GIVEN,
@@ -1314,11 +1472,15 @@ async def run(
presence_penalty: Increases the likelihood of the model introducing new topics.
+ raw: If true, a chat template is not applied and you must adhere to the specific
+ model's expected formatting.
+
repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
seed: Random seed for reproducibility of the generation.
- stream: If true, the response will be streamed back incrementally.
+ stream: If true, the response will be streamed back incrementally using SSE, Server Sent
+ Events.
temperature: Controls the randomness of the output; higher values produce more random
results.
@@ -1329,7 +1491,7 @@ async def run(
responses more focused; higher values introduce more variety and potential
surprises.
- top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ top_p: Adjusts the creativity of the AI's responses by controlling how many possible
words it considers. Lower values make outputs more predictable; higher values
allow for more varied and creative responses.
@@ -1504,6 +1666,154 @@ async def run(
"""
...
+ @overload
+ async def run(
+ self,
+ model_name: str,
+ *,
+ account_id: str,
+ image: str,
+ prompt: str,
+ frequency_penalty: float | NotGiven = NOT_GIVEN,
+ ignore_eos: bool | NotGiven = NOT_GIVEN,
+ max_tokens: int | NotGiven = NOT_GIVEN,
+ presence_penalty: float | NotGiven = NOT_GIVEN,
+ repetition_penalty: float | NotGiven = NOT_GIVEN,
+ seed: float | NotGiven = NOT_GIVEN,
+ temperature: float | NotGiven = NOT_GIVEN,
+ top_k: float | NotGiven = NOT_GIVEN,
+ top_p: float | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> Optional[AIRunResponse]:
+ """
+ This endpoint provides users with the capability to run specific AI models
+ on-demand.
+
+ By submitting the required input data, users can receive real-time predictions
+ or results generated by the chosen AI model. The endpoint supports various AI
+ model types, ensuring flexibility and adaptability for diverse use cases.
+
+ Model specific inputs available in
+ [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
+
+ Args:
+ image: Image in base64 encoded format.
+
+ prompt: The input text prompt for the model to generate a response.
+
+ frequency_penalty: Decreases the likelihood of the model repeating the same lines verbatim.
+
+ ignore_eos: Whether to ignore the EOS token and continue generating tokens after the EOS
+ token is generated.
+
+ max_tokens: The maximum number of tokens to generate in the response.
+
+ presence_penalty: Increases the likelihood of the model introducing new topics.
+
+ repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
+
+ seed: Random seed for reproducibility of the generation.
+
+ temperature: Controls the randomness of the output; higher values produce more random
+ results.
+
+ top_k: Limits the AI to choose from the top 'k' most probable words. Lower values make
+ responses more focused; higher values introduce more variety and potential
+ surprises.
+
+ top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ words it considers. Lower values make outputs more predictable; higher values
+ allow for more varied and creative responses.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def run(
+ self,
+ model_name: str,
+ *,
+ account_id: str,
+ image: str,
+ messages: Iterable[ai_run_params.Variant13Message],
+ frequency_penalty: float | NotGiven = NOT_GIVEN,
+ ignore_eos: bool | NotGiven = NOT_GIVEN,
+ max_tokens: int | NotGiven = NOT_GIVEN,
+ presence_penalty: float | NotGiven = NOT_GIVEN,
+ repetition_penalty: float | NotGiven = NOT_GIVEN,
+ seed: float | NotGiven = NOT_GIVEN,
+ temperature: float | NotGiven = NOT_GIVEN,
+ top_k: float | NotGiven = NOT_GIVEN,
+ top_p: float | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> Optional[AIRunResponse]:
+ """
+ This endpoint provides users with the capability to run specific AI models
+ on-demand.
+
+ By submitting the required input data, users can receive real-time predictions
+ or results generated by the chosen AI model. The endpoint supports various AI
+ model types, ensuring flexibility and adaptability for diverse use cases.
+
+ Model specific inputs available in
+ [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).
+
+ Args:
+ image: Image in base64 encoded format.
+
+ messages: An array of message objects representing the conversation history.
+
+ frequency_penalty: Decreases the likelihood of the model repeating the same lines verbatim.
+
+ ignore_eos: Whether to ignore the EOS token and continue generating tokens after the EOS
+ token is generated.
+
+ max_tokens: The maximum number of tokens to generate in the response.
+
+ presence_penalty: Increases the likelihood of the model introducing new topics.
+
+ repetition_penalty: Penalty for repeated tokens; higher values discourage repetition.
+
+ seed: Random seed for reproducibility of the generation.
+
+ temperature: Controls the randomness of the output; higher values produce more random
+ results.
+
+ top_k: Limits the AI to choose from the top 'k' most probable words. Lower values make
+ responses more focused; higher values introduce more variety and potential
+ surprises.
+
+ top_p: Controls the creativity of the AI's responses by adjusting how many possible
+ words it considers. Lower values make outputs more predictable; higher values
+ allow for more varied and creative responses.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
@required_args(
["account_id", "text"],
["account_id", "prompt"],
@@ -1513,6 +1823,8 @@ async def run(
["account_id", "messages"],
["account_id", "target_lang", "text"],
["account_id", "input_text"],
+ ["account_id", "image", "prompt"],
+ ["account_id", "image", "messages"],
)
async def run(
self,
@@ -1523,7 +1835,7 @@ async def run(
prompt: str | NotGiven = NOT_GIVEN,
guidance: float | NotGiven = NOT_GIVEN,
height: int | NotGiven = NOT_GIVEN,
- image: Iterable[float] | NotGiven = NOT_GIVEN,
+ image: Iterable[float] | str | NotGiven = NOT_GIVEN,
image_b64: str | NotGiven = NOT_GIVEN,
mask: Iterable[float] | NotGiven = NOT_GIVEN,
negative_prompt: str | NotGiven = NOT_GIVEN,
@@ -1551,6 +1863,7 @@ async def run(
tools: Iterable[ai_run_params.MessagesTool] | NotGiven = NOT_GIVEN,
input_text: str | NotGiven = NOT_GIVEN,
max_length: int | NotGiven = NOT_GIVEN,
+ ignore_eos: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -1600,6 +1913,7 @@ async def run(
"tools": tools,
"input_text": input_text,
"max_length": max_length,
+ "ignore_eos": ignore_eos,
},
ai_run_params.AIRunParams,
),
diff --git a/src/cloudflare/resources/api_gateway/configurations.py b/src/cloudflare/resources/api_gateway/configurations.py
index 450f5205f0d..ef3de564751 100644
--- a/src/cloudflare/resources/api_gateway/configurations.py
+++ b/src/cloudflare/resources/api_gateway/configurations.py
@@ -65,7 +65,7 @@ def update(
Set configuration properties
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -105,7 +105,7 @@ def get(
Retrieve information about specific configuration properties
Args:
- zone_id: Identifier
+ zone_id: Identifier.
properties: Requests information about certain properties.
@@ -169,7 +169,7 @@ async def update(
Set configuration properties
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -209,7 +209,7 @@ async def get(
Retrieve information about specific configuration properties
Args:
- zone_id: Identifier
+ zone_id: Identifier.
properties: Requests information about certain properties.
diff --git a/src/cloudflare/resources/api_gateway/discovery/discovery.py b/src/cloudflare/resources/api_gateway/discovery/discovery.py
index 9c3152dd49b..a55f40cb832 100644
--- a/src/cloudflare/resources/api_gateway/discovery/discovery.py
+++ b/src/cloudflare/resources/api_gateway/discovery/discovery.py
@@ -70,7 +70,7 @@ def get(
schemas
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -135,7 +135,7 @@ async def get(
schemas
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/api_gateway/discovery/operations.py b/src/cloudflare/resources/api_gateway/discovery/operations.py
index f7a8556479a..275900fdb6b 100644
--- a/src/cloudflare/resources/api_gateway/discovery/operations.py
+++ b/src/cloudflare/resources/api_gateway/discovery/operations.py
@@ -62,7 +62,7 @@ def list(
method: List[str] | NotGiven = NOT_GIVEN,
order: Literal["host", "method", "endpoint", "traffic_stats.requests", "traffic_stats.last_updated"]
| NotGiven = NOT_GIVEN,
- origin: Literal["ML", "SessionIdentifier"] | NotGiven = NOT_GIVEN,
+ origin: Literal["ML", "SessionIdentifier", "LabelDiscovery"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
state: Literal["review", "saved", "ignored"] | NotGiven = NOT_GIVEN,
@@ -77,7 +77,7 @@ def list(
Retrieve the most up to date view of discovered operations
Args:
- zone_id: Identifier
+ zone_id: Identifier.
diff: When `true`, only return API Discovery results that are not saved into API
Shield Endpoint Management
@@ -165,7 +165,7 @@ def bulk_edit(
Update the `state` on one or more discovered operations
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -207,9 +207,9 @@ def edit(
Update the `state` on a discovered operation
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
state: Mark state of operation in API Discovery
@@ -273,7 +273,7 @@ def list(
method: List[str] | NotGiven = NOT_GIVEN,
order: Literal["host", "method", "endpoint", "traffic_stats.requests", "traffic_stats.last_updated"]
| NotGiven = NOT_GIVEN,
- origin: Literal["ML", "SessionIdentifier"] | NotGiven = NOT_GIVEN,
+ origin: Literal["ML", "SessionIdentifier", "LabelDiscovery"] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
state: Literal["review", "saved", "ignored"] | NotGiven = NOT_GIVEN,
@@ -288,7 +288,7 @@ def list(
Retrieve the most up to date view of discovered operations
Args:
- zone_id: Identifier
+ zone_id: Identifier.
diff: When `true`, only return API Discovery results that are not saved into API
Shield Endpoint Management
@@ -376,7 +376,7 @@ async def bulk_edit(
Update the `state` on one or more discovered operations
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -418,9 +418,9 @@ async def edit(
Update the `state` on a discovered operation
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
state: Mark state of operation in API Discovery
diff --git a/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py b/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py
index 1cb60fb64c1..10a1086db14 100644
--- a/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py
+++ b/src/cloudflare/resources/api_gateway/expression_template/fallthrough.py
@@ -63,7 +63,7 @@ def create(
Generate fallthrough WAF expression template from a set of API hosts
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hosts: List of hosts to be targeted in the expression
@@ -127,7 +127,7 @@ async def create(
Generate fallthrough WAF expression template from a set of API hosts
Args:
- zone_id: Identifier
+ zone_id: Identifier.
hosts: List of hosts to be targeted in the expression
diff --git a/src/cloudflare/resources/api_gateway/operations/operations.py b/src/cloudflare/resources/api_gateway/operations/operations.py
index eae381497ff..bfd39dfb498 100644
--- a/src/cloudflare/resources/api_gateway/operations/operations.py
+++ b/src/cloudflare/resources/api_gateway/operations/operations.py
@@ -94,7 +94,7 @@ def create(
last_updated date.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
endpoint: The endpoint which can contain path parameter templates in curly braces, each
will be replaced from left to right with {varN}, starting with {var1}, during
@@ -158,7 +158,7 @@ def list(
Retrieve information about all operations on a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
direction: Direction to order results.
@@ -230,9 +230,9 @@ def delete(
Delete an operation
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
extra_headers: Send extra headers
@@ -275,7 +275,7 @@ def bulk_create(
its last_updated date.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -313,7 +313,7 @@ def bulk_delete(
Delete multiple operations
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -350,9 +350,9 @@ def get(
Retrieve information about an operation
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
feature: Add feature(s) to the results. The feature name that is given here corresponds
to the resulting feature object. Have a look at the top-level object description
@@ -431,7 +431,7 @@ async def create(
last_updated date.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
endpoint: The endpoint which can contain path parameter templates in curly braces, each
will be replaced from left to right with {varN}, starting with {var1}, during
@@ -495,7 +495,7 @@ def list(
Retrieve information about all operations on a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
direction: Direction to order results.
@@ -567,9 +567,9 @@ async def delete(
Delete an operation
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
extra_headers: Send extra headers
@@ -612,7 +612,7 @@ def bulk_create(
its last_updated date.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -650,7 +650,7 @@ async def bulk_delete(
Delete multiple operations
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -687,9 +687,9 @@ async def get(
Retrieve information about an operation
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
feature: Add feature(s) to the results. The feature name that is given here corresponds
to the resulting feature object. Have a look at the top-level object description
diff --git a/src/cloudflare/resources/api_gateway/operations/schema_validation.py b/src/cloudflare/resources/api_gateway/operations/schema_validation.py
index d08ebba4175..bf5719e03c2 100644
--- a/src/cloudflare/resources/api_gateway/operations/schema_validation.py
+++ b/src/cloudflare/resources/api_gateway/operations/schema_validation.py
@@ -72,9 +72,9 @@ def update(
Updates operation-level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
mitigation_action: When set, this applies a mitigation action to this operation
@@ -124,7 +124,7 @@ def edit(
Updates multiple operation-level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -165,9 +165,9 @@ def get(
Retrieves operation-level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
extra_headers: Send extra headers
@@ -227,9 +227,9 @@ async def update(
Updates operation-level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
mitigation_action: When set, this applies a mitigation action to this operation
@@ -279,7 +279,7 @@ async def edit(
Updates multiple operation-level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -322,9 +322,9 @@ async def get(
Retrieves operation-level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
- operation_id: UUID
+ operation_id: UUID.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/api_gateway/schemas.py b/src/cloudflare/resources/api_gateway/schemas.py
index 79611e37e5d..a7948ca67f9 100644
--- a/src/cloudflare/resources/api_gateway/schemas.py
+++ b/src/cloudflare/resources/api_gateway/schemas.py
@@ -65,7 +65,7 @@ def list(
Retrieve operations and features as OpenAPI schemas
Args:
- zone_id: Identifier
+ zone_id: Identifier.
feature: Add feature(s) to the results. The feature name that is given here corresponds
to the resulting feature object. Have a look at the top-level object description
@@ -140,7 +140,7 @@ async def list(
Retrieve operations and features as OpenAPI schemas
Args:
- zone_id: Identifier
+ zone_id: Identifier.
feature: Add feature(s) to the results. The feature name that is given here corresponds
to the resulting feature object. Have a look at the top-level object description
diff --git a/src/cloudflare/resources/api_gateway/settings/schema_validation.py b/src/cloudflare/resources/api_gateway/settings/schema_validation.py
index ccb54128e03..716cf25e34b 100644
--- a/src/cloudflare/resources/api_gateway/settings/schema_validation.py
+++ b/src/cloudflare/resources/api_gateway/settings/schema_validation.py
@@ -64,7 +64,7 @@ def update(
Updates zone level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on
the operation
@@ -126,7 +126,7 @@ def edit(
Updates zone level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on
the operation Mitigation actions are as follows:
@@ -187,7 +187,7 @@ def get(
Retrieves zone level schema validation settings currently set on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -245,7 +245,7 @@ async def update(
Updates zone level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on
the operation
@@ -307,7 +307,7 @@ async def edit(
Updates zone level schema validation settings on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
validation_default_mitigation_action: The default mitigation action used when there is no mitigation action defined on
the operation Mitigation actions are as follows:
@@ -368,7 +368,7 @@ async def get(
Retrieves zone level schema validation settings currently set on the zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
index aa9fcadb55f..eba45a77d93 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/hosts.py
@@ -59,7 +59,7 @@ def list(
Retrieve schema hosts in a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
page: Page number of paginated results.
@@ -132,7 +132,7 @@ def list(
Retrieve schema hosts in a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
page: Page number of paginated results.
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/operations.py b/src/cloudflare/resources/api_gateway/user_schemas/operations.py
index 5a9c28fa03d..a75cd28dbfb 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/operations.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/operations.py
@@ -70,7 +70,7 @@ def list(
Shield Endpoint Management will be returned as full operations.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
endpoint: Filter results to only include endpoints containing this pattern.
@@ -173,7 +173,7 @@ def list(
Shield Endpoint Management will be returned as full operations.
Args:
- zone_id: Identifier
+ zone_id: Identifier.
endpoint: Filter results to only include endpoints containing this pattern.
diff --git a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
index 35c37f69fb6..4d7d7176063 100644
--- a/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
+++ b/src/cloudflare/resources/api_gateway/user_schemas/user_schemas.py
@@ -101,7 +101,7 @@ def create(
Upload a schema to a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
file: Schema file bytes
@@ -167,7 +167,7 @@ def list(
Retrieve information about all schemas on a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
omit_source: Omit the source-files of schemas and only retrieve their meta-data.
@@ -224,7 +224,7 @@ def delete(
Delete a schema
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -263,7 +263,7 @@ def edit(
Enable validation for a schema
Args:
- zone_id: Identifier
+ zone_id: Identifier.
validation_enabled: Flag whether schema is enabled for validation.
@@ -311,7 +311,7 @@ def get(
Retrieve information about a specific schema on a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
omit_source: Omit the source-files of schemas and only retrieve their meta-data.
@@ -388,7 +388,7 @@ async def create(
Upload a schema to a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
file: Schema file bytes
@@ -454,7 +454,7 @@ def list(
Retrieve information about all schemas on a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
omit_source: Omit the source-files of schemas and only retrieve their meta-data.
@@ -511,7 +511,7 @@ async def delete(
Delete a schema
Args:
- zone_id: Identifier
+ zone_id: Identifier.
extra_headers: Send extra headers
@@ -550,7 +550,7 @@ async def edit(
Enable validation for a schema
Args:
- zone_id: Identifier
+ zone_id: Identifier.
validation_enabled: Flag whether schema is enabled for validation.
@@ -598,7 +598,7 @@ async def get(
Retrieve information about a specific schema on a zone
Args:
- zone_id: Identifier
+ zone_id: Identifier.
omit_source: Omit the source-files of schemas and only retrieve their meta-data.
diff --git a/src/cloudflare/resources/bot_management.py b/src/cloudflare/resources/bot_management.py
index f9875019fe6..afb17b3d06b 100644
--- a/src/cloudflare/resources/bot_management.py
+++ b/src/cloudflare/resources/bot_management.py
@@ -56,6 +56,7 @@ def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -133,6 +134,8 @@ def update(
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -154,6 +157,7 @@ def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
@@ -234,6 +238,8 @@ def update(
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -263,6 +269,7 @@ def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
@@ -344,6 +351,8 @@ def update(
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -376,6 +385,7 @@ def update(
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
suppress_session_score: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -457,6 +467,8 @@ def update(
they are released.
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -479,6 +491,7 @@ def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
@@ -504,6 +517,7 @@ def update(
body=maybe_transform(
{
"ai_bots_protection": ai_bots_protection,
+ "crawler_protection": crawler_protection,
"enable_js": enable_js,
"fight_mode": fight_mode,
"optimize_wordpress": optimize_wordpress,
@@ -600,6 +614,7 @@ async def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -677,6 +692,8 @@ async def update(
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -698,6 +715,7 @@ async def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
@@ -778,6 +796,8 @@ async def update(
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -807,6 +827,7 @@ async def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
sbfm_definitely_automated: Literal["allow", "block", "managed_challenge"] | NotGiven = NOT_GIVEN,
@@ -888,6 +909,8 @@ async def update(
ai_bots_protection: Enable rule to block AI Scrapers and Crawlers.
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -920,6 +943,7 @@ async def update(
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
auto_update_model: bool | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
suppress_session_score: bool | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1001,6 +1025,8 @@ async def update(
they are released.
[Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)
+ crawler_protection: Enable rule to punish AI Scrapers and Crawlers via a link maze.
+
enable_js: Use lightweight, invisible JavaScript detections to improve Bot Management.
[Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).
@@ -1023,6 +1049,7 @@ async def update(
*,
zone_id: str,
ai_bots_protection: Literal["block", "disabled"] | NotGiven = NOT_GIVEN,
+ crawler_protection: Literal["enabled", "disabled"] | NotGiven = NOT_GIVEN,
enable_js: bool | NotGiven = NOT_GIVEN,
fight_mode: bool | NotGiven = NOT_GIVEN,
optimize_wordpress: bool | NotGiven = NOT_GIVEN,
@@ -1048,6 +1075,7 @@ async def update(
body=await async_maybe_transform(
{
"ai_bots_protection": ai_bots_protection,
+ "crawler_protection": crawler_protection,
"enable_js": enable_js,
"fight_mode": fight_mode,
"optimize_wordpress": optimize_wordpress,
diff --git a/src/cloudflare/resources/botnet_feed/asn.py b/src/cloudflare/resources/botnet_feed/asn.py
index 15e06d69a8c..0494aa7320b 100755
--- a/src/cloudflare/resources/botnet_feed/asn.py
+++ b/src/cloudflare/resources/botnet_feed/asn.py
@@ -68,7 +68,7 @@ def day_report(
previous day.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -110,7 +110,7 @@ def full_report(
registered to user account.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -174,7 +174,7 @@ async def day_report(
previous day.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -216,7 +216,7 @@ async def full_report(
registered to user account.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/botnet_feed/configs/asn.py b/src/cloudflare/resources/botnet_feed/configs/asn.py
index e2f27d024b6..db2b4a80978 100755
--- a/src/cloudflare/resources/botnet_feed/configs/asn.py
+++ b/src/cloudflare/resources/botnet_feed/configs/asn.py
@@ -59,7 +59,7 @@ def delete(
Delete an ASN from botnet threat feed for a given user.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -98,7 +98,7 @@ def get(
Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -159,7 +159,7 @@ async def delete(
Delete an ASN from botnet threat feed for a given user.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
@@ -198,7 +198,7 @@ async def get(
Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API.
Args:
- account_id: Identifier
+ account_id: Identifier.
extra_headers: Send extra headers
diff --git a/src/cloudflare/resources/browser_rendering/__init__.py b/src/cloudflare/resources/browser_rendering/__init__.py
index d42a51797d4..ca6102ced41 100644
--- a/src/cloudflare/resources/browser_rendering/__init__.py
+++ b/src/cloudflare/resources/browser_rendering/__init__.py
@@ -8,6 +8,22 @@
PDFResourceWithStreamingResponse,
AsyncPDFResourceWithStreamingResponse,
)
+from .json import (
+ JsonResource,
+ AsyncJsonResource,
+ JsonResourceWithRawResponse,
+ AsyncJsonResourceWithRawResponse,
+ JsonResourceWithStreamingResponse,
+ AsyncJsonResourceWithStreamingResponse,
+)
+from .links import (
+ LinksResource,
+ AsyncLinksResource,
+ LinksResourceWithRawResponse,
+ AsyncLinksResourceWithRawResponse,
+ LinksResourceWithStreamingResponse,
+ AsyncLinksResourceWithStreamingResponse,
+)
from .scrape import (
ScrapeResource,
AsyncScrapeResource,
@@ -24,6 +40,14 @@
ContentResourceWithStreamingResponse,
AsyncContentResourceWithStreamingResponse,
)
+from .markdown import (
+ MarkdownResource,
+ AsyncMarkdownResource,
+ MarkdownResourceWithRawResponse,
+ AsyncMarkdownResourceWithRawResponse,
+ MarkdownResourceWithStreamingResponse,
+ AsyncMarkdownResourceWithStreamingResponse,
+)
from .snapshot import (
SnapshotResource,
AsyncSnapshotResource,
@@ -80,6 +104,24 @@
"AsyncSnapshotResourceWithRawResponse",
"SnapshotResourceWithStreamingResponse",
"AsyncSnapshotResourceWithStreamingResponse",
+ "JsonResource",
+ "AsyncJsonResource",
+ "JsonResourceWithRawResponse",
+ "AsyncJsonResourceWithRawResponse",
+ "JsonResourceWithStreamingResponse",
+ "AsyncJsonResourceWithStreamingResponse",
+ "LinksResource",
+ "AsyncLinksResource",
+ "LinksResourceWithRawResponse",
+ "AsyncLinksResourceWithRawResponse",
+ "LinksResourceWithStreamingResponse",
+ "AsyncLinksResourceWithStreamingResponse",
+ "MarkdownResource",
+ "AsyncMarkdownResource",
+ "MarkdownResourceWithRawResponse",
+ "AsyncMarkdownResourceWithRawResponse",
+ "MarkdownResourceWithStreamingResponse",
+ "AsyncMarkdownResourceWithStreamingResponse",
"BrowserRenderingResource",
"AsyncBrowserRenderingResource",
"BrowserRenderingResourceWithRawResponse",
diff --git a/src/cloudflare/resources/browser_rendering/browser_rendering.py b/src/cloudflare/resources/browser_rendering/browser_rendering.py
index b597be3813f..bee931f57df 100644
--- a/src/cloudflare/resources/browser_rendering/browser_rendering.py
+++ b/src/cloudflare/resources/browser_rendering/browser_rendering.py
@@ -10,6 +10,22 @@
PDFResourceWithStreamingResponse,
AsyncPDFResourceWithStreamingResponse,
)
+from .json import (
+ JsonResource,
+ AsyncJsonResource,
+ JsonResourceWithRawResponse,
+ AsyncJsonResourceWithRawResponse,
+ JsonResourceWithStreamingResponse,
+ AsyncJsonResourceWithStreamingResponse,
+)
+from .links import (
+ LinksResource,
+ AsyncLinksResource,
+ LinksResourceWithRawResponse,
+ AsyncLinksResourceWithRawResponse,
+ LinksResourceWithStreamingResponse,
+ AsyncLinksResourceWithStreamingResponse,
+)
from .scrape import (
ScrapeResource,
AsyncScrapeResource,
@@ -26,6 +42,14 @@
ContentResourceWithStreamingResponse,
AsyncContentResourceWithStreamingResponse,
)
+from .markdown import (
+ MarkdownResource,
+ AsyncMarkdownResource,
+ MarkdownResourceWithRawResponse,
+ AsyncMarkdownResourceWithRawResponse,
+ MarkdownResourceWithStreamingResponse,
+ AsyncMarkdownResourceWithStreamingResponse,
+)
from .snapshot import (
SnapshotResource,
AsyncSnapshotResource,
@@ -69,6 +93,18 @@ def screenshot(self) -> ScreenshotResource:
def snapshot(self) -> SnapshotResource:
return SnapshotResource(self._client)
+ @cached_property
+ def json(self) -> JsonResource:
+ return JsonResource(self._client)
+
+ @cached_property
+ def links(self) -> LinksResource:
+ return LinksResource(self._client)
+
+ @cached_property
+ def markdown(self) -> MarkdownResource:
+ return MarkdownResource(self._client)
+
@cached_property
def with_raw_response(self) -> BrowserRenderingResourceWithRawResponse:
"""
@@ -110,6 +146,18 @@ def screenshot(self) -> AsyncScreenshotResource:
def snapshot(self) -> AsyncSnapshotResource:
return AsyncSnapshotResource(self._client)
+ @cached_property
+ def json(self) -> AsyncJsonResource:
+ return AsyncJsonResource(self._client)
+
+ @cached_property
+ def links(self) -> AsyncLinksResource:
+ return AsyncLinksResource(self._client)
+
+ @cached_property
+ def markdown(self) -> AsyncMarkdownResource:
+ return AsyncMarkdownResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncBrowserRenderingResourceWithRawResponse:
"""
@@ -154,6 +202,18 @@ def screenshot(self) -> ScreenshotResourceWithRawResponse:
def snapshot(self) -> SnapshotResourceWithRawResponse:
return SnapshotResourceWithRawResponse(self._browser_rendering.snapshot)
+ @cached_property
+ def json(self) -> JsonResourceWithRawResponse:
+ return JsonResourceWithRawResponse(self._browser_rendering.json)
+
+ @cached_property
+ def links(self) -> LinksResourceWithRawResponse:
+ return LinksResourceWithRawResponse(self._browser_rendering.links)
+
+ @cached_property
+ def markdown(self) -> MarkdownResourceWithRawResponse:
+ return MarkdownResourceWithRawResponse(self._browser_rendering.markdown)
+
class AsyncBrowserRenderingResourceWithRawResponse:
def __init__(self, browser_rendering: AsyncBrowserRenderingResource) -> None:
@@ -179,6 +239,18 @@ def screenshot(self) -> AsyncScreenshotResourceWithRawResponse:
def snapshot(self) -> AsyncSnapshotResourceWithRawResponse:
return AsyncSnapshotResourceWithRawResponse(self._browser_rendering.snapshot)
+ @cached_property
+ def json(self) -> AsyncJsonResourceWithRawResponse:
+ return AsyncJsonResourceWithRawResponse(self._browser_rendering.json)
+
+ @cached_property
+ def links(self) -> AsyncLinksResourceWithRawResponse:
+ return AsyncLinksResourceWithRawResponse(self._browser_rendering.links)
+
+ @cached_property
+ def markdown(self) -> AsyncMarkdownResourceWithRawResponse:
+ return AsyncMarkdownResourceWithRawResponse(self._browser_rendering.markdown)
+
class BrowserRenderingResourceWithStreamingResponse:
def __init__(self, browser_rendering: BrowserRenderingResource) -> None:
@@ -204,6 +276,18 @@ def screenshot(self) -> ScreenshotResourceWithStreamingResponse:
def snapshot(self) -> SnapshotResourceWithStreamingResponse:
return SnapshotResourceWithStreamingResponse(self._browser_rendering.snapshot)
+ @cached_property
+ def json(self) -> JsonResourceWithStreamingResponse:
+ return JsonResourceWithStreamingResponse(self._browser_rendering.json)
+
+ @cached_property
+ def links(self) -> LinksResourceWithStreamingResponse:
+ return LinksResourceWithStreamingResponse(self._browser_rendering.links)
+
+ @cached_property
+ def markdown(self) -> MarkdownResourceWithStreamingResponse:
+ return MarkdownResourceWithStreamingResponse(self._browser_rendering.markdown)
+
class AsyncBrowserRenderingResourceWithStreamingResponse:
def __init__(self, browser_rendering: AsyncBrowserRenderingResource) -> None:
@@ -228,3 +312,15 @@ def screenshot(self) -> AsyncScreenshotResourceWithStreamingResponse:
@cached_property
def snapshot(self) -> AsyncSnapshotResourceWithStreamingResponse:
return AsyncSnapshotResourceWithStreamingResponse(self._browser_rendering.snapshot)
+
+ @cached_property
+ def json(self) -> AsyncJsonResourceWithStreamingResponse:
+ return AsyncJsonResourceWithStreamingResponse(self._browser_rendering.json)
+
+ @cached_property
+ def links(self) -> AsyncLinksResourceWithStreamingResponse:
+ return AsyncLinksResourceWithStreamingResponse(self._browser_rendering.links)
+
+ @cached_property
+ def markdown(self) -> AsyncMarkdownResourceWithStreamingResponse:
+ return AsyncMarkdownResourceWithStreamingResponse(self._browser_rendering.markdown)
diff --git a/src/cloudflare/resources/browser_rendering/json.py b/src/cloudflare/resources/browser_rendering/json.py
new file mode 100644
index 00000000000..270a5479323
--- /dev/null
+++ b/src/cloudflare/resources/browser_rendering/json.py
@@ -0,0 +1,450 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, List, Type, Iterable, cast
+from typing_extensions import Literal
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._utils import (
+ maybe_transform,
+ async_maybe_transform,
+)
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._wrappers import ResultWrapper
+from ..._base_client import make_request_options
+from ...types.browser_rendering import json_create_params
+from ...types.browser_rendering.json_create_response import JsonCreateResponse
+
+__all__ = ["JsonResource", "AsyncJsonResource"]
+
+
+class JsonResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> JsonResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
+ """
+ return JsonResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> JsonResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
+ """
+ return JsonResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ account_id: str,
+ cache_ttl: float | NotGiven = NOT_GIVEN,
+ add_script_tag: Iterable[json_create_params.AddScriptTag] | NotGiven = NOT_GIVEN,
+ add_style_tag: Iterable[json_create_params.AddStyleTag] | NotGiven = NOT_GIVEN,
+ allow_request_pattern: List[str] | NotGiven = NOT_GIVEN,
+ allow_resource_types: List[
+ Literal[
+ "document",
+ "stylesheet",
+ "image",
+ "media",
+ "font",
+ "script",
+ "texttrack",
+ "xhr",
+ "fetch",
+ "prefetch",
+ "eventsource",
+ "websocket",
+ "manifest",
+ "signedexchange",
+ "ping",
+ "cspviolationreport",
+ "preflight",
+ "other",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ authenticate: json_create_params.Authenticate | NotGiven = NOT_GIVEN,
+ best_attempt: bool | NotGiven = NOT_GIVEN,
+ cookies: Iterable[json_create_params.Cookie] | NotGiven = NOT_GIVEN,
+ emulate_media_type: str | NotGiven = NOT_GIVEN,
+ goto_options: json_create_params.GotoOptions | NotGiven = NOT_GIVEN,
+ html: str | NotGiven = NOT_GIVEN,
+ prompt: str | NotGiven = NOT_GIVEN,
+ reject_request_pattern: List[str] | NotGiven = NOT_GIVEN,
+ reject_resource_types: List[
+ Literal[
+ "document",
+ "stylesheet",
+ "image",
+ "media",
+ "font",
+ "script",
+ "texttrack",
+ "xhr",
+ "fetch",
+ "prefetch",
+ "eventsource",
+ "websocket",
+ "manifest",
+ "signedexchange",
+ "ping",
+ "cspviolationreport",
+ "preflight",
+ "other",
+ ]
+ ]
+ | NotGiven = NOT_GIVEN,
+ response_format: json_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
+ set_extra_http_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
+ set_java_script_enabled: bool | NotGiven = NOT_GIVEN,
+ url: str | NotGiven = NOT_GIVEN,
+ user_agent: str | NotGiven = NOT_GIVEN,
+ viewport: json_create_params.Viewport | NotGiven = NOT_GIVEN,
+ wait_for_selector: json_create_params.WaitForSelector | NotGiven = NOT_GIVEN,
+ wait_for_timeout: float | NotGiven = NOT_GIVEN,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> JsonCreateResponse:
+ """Gets json from a webpage from a provided URL or HTML.
+
+ Pass `prompt` or `schema`
+ in the body. Control page loading with `gotoOptions` and `waitFor*` options.
+
+ Args:
+ account_id: Account ID.
+
+ cache_ttl: Cache TTL default is 5s. Set to 0 to disable.
+
+ add_script_tag: Adds a `