diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0b8bb94ba..8fdba39ee8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,6 @@ jobs: name: lint runs-on: ubuntu-latest timeout-minutes: 5 - steps: - uses: actions/checkout@v4 @@ -35,8 +34,9 @@ jobs: build: name: build runs-on: ubuntu-latest - - + permissions: + contents: read + id-token: write steps: - uses: actions/checkout@v4 @@ -50,11 +50,25 @@ jobs: - name: Check build run: ./scripts/build + + - name: Get GitHub OIDC Token + if: github.repository == 'stainless-sdks/cloudflare-node' + id: github-oidc + uses: actions/github-script@v6 + with: + script: core.setOutput('github_token', await core.getIDToken()); + + - name: Upload tarball + if: github.repository == 'stainless-sdks/cloudflare-node' + env: + URL: https://pkg.stainless.com/s + AUTH: ${{ steps.github-oidc.outputs.github_token }} + SHA: ${{ github.sha }} + run: ./scripts/utils/upload-artifact.sh test: name: test runs-on: ubuntu-latest timeout-minutes: 10 - steps: - uses: actions/checkout@v4 @@ -71,6 +85,7 @@ jobs: examples: name: examples runs-on: ubuntu-latest + if: github.repository == 'cloudflare/cloudflare-typescript' timeout-minutes: 5 steps: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 34a3350a9a..83f9eb8041 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.2.0" + ".": "4.3.0" } diff --git a/.stats.yml b/.stats.yml index 025f3a2867..760dac5bd9 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 4d9a93117b..a5a637e071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,229 @@ # Changelog +## 4.3.0 (2025-04-15) + +Full Changelog: [v4.2.0...v4.3.0](https://github.com/cloudflare/cloudflare-typescript/compare/v4.2.0...v4.3.0) + +### Features + +* **api:** Add workers telemetry routes ([#2602](https://github.com/cloudflare/cloudflare-typescript/issues/2602)) ([2f213a8](https://github.com/cloudflare/cloudflare-typescript/commit/2f213a838f356e74fb052f1b620e1cfa559f4f82)) +* **api:** api update ([d5ea2ed](https://github.com/cloudflare/cloudflare-typescript/commit/d5ea2eda6b0a1ab402902ce731422ee90d126e92)) +* **api:** api update ([1d86ec6](https://github.com/cloudflare/cloudflare-typescript/commit/1d86ec6142eab6f43a666965f36764a5b223f3fe)) +* **api:** api update ([66b08aa](https://github.com/cloudflare/cloudflare-typescript/commit/66b08aa5d0e97e7ba095527aed86dd8b54cfef5b)) +* **api:** api update ([34cdfd5](https://github.com/cloudflare/cloudflare-typescript/commit/34cdfd5e5f2afa035992b9c000a23a0dd1448d12)) +* **api:** api update ([833792a](https://github.com/cloudflare/cloudflare-typescript/commit/833792a0289632895dbcb42f12a1a3961287f864)) +* **api:** api update ([1b63a12](https://github.com/cloudflare/cloudflare-typescript/commit/1b63a12248a40fb84b297b0715602032a6bc77de)) +* **api:** api update ([4864aee](https://github.com/cloudflare/cloudflare-typescript/commit/4864aee77db1f9046b969c8c92f332cd7d753216)) +* **api:** api update ([450aef4](https://github.com/cloudflare/cloudflare-typescript/commit/450aef487a380b57b8fddcdf5ba5c9c98cd893be)) +* **api:** api update ([1c9e305](https://github.com/cloudflare/cloudflare-typescript/commit/1c9e3057a4a047a8c7719fb1c45ae63c656201b2)) +* **api:** api update ([c4dec12](https://github.com/cloudflare/cloudflare-typescript/commit/c4dec12267198eff76d4956b03b89f41e3ddc7b7)) +* **api:** api update ([185b9d4](https://github.com/cloudflare/cloudflare-typescript/commit/185b9d4894cc297001b3c2c4afae9e876c718ae8)) +* **api:** api update ([bd539e2](https://github.com/cloudflare/cloudflare-typescript/commit/bd539e2bf81938971c529aad6961470344408eeb)) +* **api:** api update ([56cf9b8](https://github.com/cloudflare/cloudflare-typescript/commit/56cf9b89053712af82f2acf055f313d356411faa)) +* **api:** api update ([c44cc9a](https://github.com/cloudflare/cloudflare-typescript/commit/c44cc9a50dc89773f6bd302927d20aa38f4c6653)) +* **api:** api update ([0c66d79](https://github.com/cloudflare/cloudflare-typescript/commit/0c66d793bc360d3cc6c44f3ecd56ecec6d2759b7)) +* **api:** api update ([bb7a90b](https://github.com/cloudflare/cloudflare-typescript/commit/bb7a90bebec83c44be3f092097aba99dd1a1e69a)) +* **api:** api update ([7b09df9](https://github.com/cloudflare/cloudflare-typescript/commit/7b09df944a9d8dd4fcd5d2bf9dd4af3156f5b1fc)) +* **api:** api update ([81ee8d6](https://github.com/cloudflare/cloudflare-typescript/commit/81ee8d6cfcd93d8c5dd6bfd169cfce452b313cc5)) +* **api:** api update ([833b533](https://github.com/cloudflare/cloudflare-typescript/commit/833b53340eb6381d43790ebfb90f644277c09435)) +* **api:** api update ([8faaa75](https://github.com/cloudflare/cloudflare-typescript/commit/8faaa754f6b6aa1566e3d8f68f7d3c29168f28a9)) +* **api:** api update ([6e64a75](https://github.com/cloudflare/cloudflare-typescript/commit/6e64a75a48aab961495164a34d9c926e48feccd7)) +* **api:** api update ([90c3414](https://github.com/cloudflare/cloudflare-typescript/commit/90c341426574d75f7667f4e5b8e552b739b107c8)) +* **api:** api update ([690bd57](https://github.com/cloudflare/cloudflare-typescript/commit/690bd57d9504e754b734e01dd94da4258355fd0a)) +* **api:** api update ([11b0714](https://github.com/cloudflare/cloudflare-typescript/commit/11b0714e00756c532f217183c9119aba9f5b784e)) +* **api:** api update ([5a0576d](https://github.com/cloudflare/cloudflare-typescript/commit/5a0576db99db737db8ae7301b5f3eeffd216a632)) +* **api:** api update ([8c14592](https://github.com/cloudflare/cloudflare-typescript/commit/8c145921da8021304479409be51016a0dc44f03f)) +* **api:** api update ([6693b16](https://github.com/cloudflare/cloudflare-typescript/commit/6693b160f397061c8b8ae4109f7771b0f77f5f4f)) +* **api:** api update ([fbe392d](https://github.com/cloudflare/cloudflare-typescript/commit/fbe392d3fdc2aa2fdcbfba938c01105b3827883f)) +* **api:** api update ([73f18ae](https://github.com/cloudflare/cloudflare-typescript/commit/73f18aecd5b343090aecd3e09f4c9ef5eeef4cc5)) +* **api:** api update ([2d2492e](https://github.com/cloudflare/cloudflare-typescript/commit/2d2492e92c5ad244bef36a37825c1bf9af96d498)) +* **api:** api update ([7514b02](https://github.com/cloudflare/cloudflare-typescript/commit/7514b02894a47c8b819e6e8742c6994514c6df82)) +* **api:** api update ([8aa6a4b](https://github.com/cloudflare/cloudflare-typescript/commit/8aa6a4b7a6eda16814ac6dc1d9ec06e96537fd8f)) +* **api:** api update ([5c4d68e](https://github.com/cloudflare/cloudflare-typescript/commit/5c4d68e2f6385dae854fc6014373232af082f515)) +* **api:** api update ([c8faaca](https://github.com/cloudflare/cloudflare-typescript/commit/c8faacaf91ef1d85e571ac64f1a55a2eb8dc4a18)) +* **api:** api update ([5c259ac](https://github.com/cloudflare/cloudflare-typescript/commit/5c259ac35c7aae3793aabf2fd5684aa381a24a1c)) +* **api:** api update ([e17d42b](https://github.com/cloudflare/cloudflare-typescript/commit/e17d42be299d39bdb5842dc66a106b33ef9bba0f)) +* **api:** api update ([839b65c](https://github.com/cloudflare/cloudflare-typescript/commit/839b65c6bb7b17696833f7ea82b04678f62ebd37)) +* **api:** api update ([59233d2](https://github.com/cloudflare/cloudflare-typescript/commit/59233d23e1e9fb6df4da9c5a748e8487113a4f0e)) +* **api:** api update ([41e8b96](https://github.com/cloudflare/cloudflare-typescript/commit/41e8b96ea8e2f52ad0210dd0e89d70b3b55dc61f)) +* **api:** api update ([bbab4f0](https://github.com/cloudflare/cloudflare-typescript/commit/bbab4f0f2a76577e111285357bc56a1d2cae0e05)) +* **api:** api update ([366d5c4](https://github.com/cloudflare/cloudflare-typescript/commit/366d5c40b991bfb314cd3d10bb94b726a0bcf4f7)) +* **api:** api update ([b9a7d44](https://github.com/cloudflare/cloudflare-typescript/commit/b9a7d44b6d31cb572a57de6597319b916aebb7a4)) +* **api:** api update ([d7c02fb](https://github.com/cloudflare/cloudflare-typescript/commit/d7c02fbc75bb22513ff0608058fd626da0f8a838)) +* **api:** api update ([745797a](https://github.com/cloudflare/cloudflare-typescript/commit/745797a1323dc5bc6dc7533f1edd528e081115b2)) +* **api:** api update ([a48d434](https://github.com/cloudflare/cloudflare-typescript/commit/a48d4341a85ccfe151c651cef578502a2028bce0)) +* **api:** api update ([1160378](https://github.com/cloudflare/cloudflare-typescript/commit/1160378dfa9ecd006ee306a588c4890161596638)) +* **api:** api update ([983c058](https://github.com/cloudflare/cloudflare-typescript/commit/983c0585ff3824d2656b92399d715cb4581bf19f)) +* **api:** api update ([7549ad3](https://github.com/cloudflare/cloudflare-typescript/commit/7549ad3e39fcb1de81646327aed061501ca8fcbf)) +* **api:** api update ([8489997](https://github.com/cloudflare/cloudflare-typescript/commit/8489997343d1acb86e16d84dc968cbc292d5f8cb)) +* **api:** api update ([3770814](https://github.com/cloudflare/cloudflare-typescript/commit/37708146640f20313ba5a81010b2bc10e984a212)) +* **api:** api update ([b4e105f](https://github.com/cloudflare/cloudflare-typescript/commit/b4e105fcbb0b14d7621eb7ccd61c470a089cfb59)) +* **api:** api update ([0a30c66](https://github.com/cloudflare/cloudflare-typescript/commit/0a30c6686a46311866e69fb19e0f74bf006baade)) +* **api:** api update ([43b5fd4](https://github.com/cloudflare/cloudflare-typescript/commit/43b5fd461de2369191c190d76c6aadd624677477)) +* **api:** api update ([4292760](https://github.com/cloudflare/cloudflare-typescript/commit/4292760f31a7c96a131712b36b0effa0deb372ac)) +* **api:** api update ([cd24483](https://github.com/cloudflare/cloudflare-typescript/commit/cd24483f54abef18bafcc806776d2b1cf7f08f6f)) +* **api:** api update ([10728de](https://github.com/cloudflare/cloudflare-typescript/commit/10728dede194a9734cd1c00dde341da76cae1c65)) +* **api:** api update ([6976246](https://github.com/cloudflare/cloudflare-typescript/commit/6976246c8ae21559dc1e61f0486d020c71f6511b)) +* **api:** api update ([b8255a7](https://github.com/cloudflare/cloudflare-typescript/commit/b8255a784579b2e3e5d5c4f222106097fdf9c5d5)) +* **api:** api update ([4801125](https://github.com/cloudflare/cloudflare-typescript/commit/480112537ac6d01fa93d5cc0f67f58d2f931904b)) +* **api:** api update ([33e30ae](https://github.com/cloudflare/cloudflare-typescript/commit/33e30ae3143dc196eaf0535725593d87b859f298)) +* **api:** api update ([4dba940](https://github.com/cloudflare/cloudflare-typescript/commit/4dba940aaee130b3f0270c7d68088168ce07b43c)) +* **api:** api update ([2187feb](https://github.com/cloudflare/cloudflare-typescript/commit/2187feb457a4d4a4abe72246eb468618d9e3c848)) +* **api:** api update ([a5e1858](https://github.com/cloudflare/cloudflare-typescript/commit/a5e185858230c2628159e6199305b6ed929bf355)) +* **api:** api update ([8d62492](https://github.com/cloudflare/cloudflare-typescript/commit/8d62492fa7820e2f9e47a6a885b71c9217810d6b)) +* **api:** api update ([7ffc47f](https://github.com/cloudflare/cloudflare-typescript/commit/7ffc47fc8ee6349f1cb8479256f605fe2af95b70)) +* **api:** api update ([4224237](https://github.com/cloudflare/cloudflare-typescript/commit/42242379f1ac0a91a3ced0c930e9f903387b5ca1)) +* **api:** api update ([d47842a](https://github.com/cloudflare/cloudflare-typescript/commit/d47842a8469f39d322055bbffe40d0881a08ecea)) +* **api:** api update ([62a979e](https://github.com/cloudflare/cloudflare-typescript/commit/62a979ef812db917b3607686f7c9e7524e6b836c)) +* **api:** api update ([3d4d7cd](https://github.com/cloudflare/cloudflare-typescript/commit/3d4d7cd6279f43628210df1d373d6a634dc58716)) +* **api:** api update ([f04946e](https://github.com/cloudflare/cloudflare-typescript/commit/f04946efb6d0e78407a189302864b1ef557216f4)) +* **api:** api update ([38f474a](https://github.com/cloudflare/cloudflare-typescript/commit/38f474a6658fe1f012cd7c71438543de42f02bae)) +* **api:** api update ([f1a815c](https://github.com/cloudflare/cloudflare-typescript/commit/f1a815cf047529e84455dc72a562b264ba454426)) +* **api:** api update ([bd73469](https://github.com/cloudflare/cloudflare-typescript/commit/bd73469cd822b2e56964f9030849f73f71b56925)) +* **api:** api update ([acd8e39](https://github.com/cloudflare/cloudflare-typescript/commit/acd8e394f40f5810aea8e15988e3f1ef317fb76d)) +* **api:** api update ([bd466c7](https://github.com/cloudflare/cloudflare-typescript/commit/bd466c78e7296aa70320cde97913ae536baefbcc)) +* **api:** api update ([f4676e3](https://github.com/cloudflare/cloudflare-typescript/commit/f4676e35ac05390090dce97023d1d00e52778364)) +* **api:** api update ([4efa760](https://github.com/cloudflare/cloudflare-typescript/commit/4efa76084c227f04c0339bcbcafecb8080ce428d)) +* **api:** api update ([9de0862](https://github.com/cloudflare/cloudflare-typescript/commit/9de0862368ddbc7b309b1f893ef3c7db4f737a2f)) +* **api:** api update ([00a7ba9](https://github.com/cloudflare/cloudflare-typescript/commit/00a7ba9ab1a61ecc14f28e938fe02b40079ff5a1)) +* **api:** api update ([f209201](https://github.com/cloudflare/cloudflare-typescript/commit/f209201d57c0513adb0e5e310baa23e867d763ba)) +* **api:** api update ([47d7bc4](https://github.com/cloudflare/cloudflare-typescript/commit/47d7bc4e0fe85c19e56363b610da2c959443791e)) +* **api:** api update ([a99dd71](https://github.com/cloudflare/cloudflare-typescript/commit/a99dd71fd7bba62381eb5b9d3b60b3aa7504520f)) +* **api:** api update ([136c709](https://github.com/cloudflare/cloudflare-typescript/commit/136c70903cc6245ae1d3987c2e46232e0bf512a7)) +* **api:** api update ([a859f2e](https://github.com/cloudflare/cloudflare-typescript/commit/a859f2e6b4c7fb64e2139aca520417c581590444)) +* **api:** api update ([f4d5c47](https://github.com/cloudflare/cloudflare-typescript/commit/f4d5c475d2a4e94213896bb5eaf5df2ec5f46952)) +* **api:** api update ([840a396](https://github.com/cloudflare/cloudflare-typescript/commit/840a396dc359e25b079e3138ad017d3b11a70450)) +* **api:** api update ([4cd3d4f](https://github.com/cloudflare/cloudflare-typescript/commit/4cd3d4fd4200c68135988f51ce5f9a738ca763e1)) +* **api:** api update ([be45c73](https://github.com/cloudflare/cloudflare-typescript/commit/be45c73b3989b27009225c18d68c4d8aa6ebe479)) +* **api:** api update ([bfd1cef](https://github.com/cloudflare/cloudflare-typescript/commit/bfd1cef477361933bfecd24dc6831695af0cb75d)) +* **api:** api update ([446c8bf](https://github.com/cloudflare/cloudflare-typescript/commit/446c8bfe2f16911f1f8739638dff5d866556e35d)) +* **api:** api update ([4912bd7](https://github.com/cloudflare/cloudflare-typescript/commit/4912bd7f33d0f9053f1909042b07a65bcaa129cf)) +* **api:** api update ([ef453a2](https://github.com/cloudflare/cloudflare-typescript/commit/ef453a230976ddefc84d6e255084c17ecc6a9ecf)) +* **api:** api update ([d134f30](https://github.com/cloudflare/cloudflare-typescript/commit/d134f3097f590bc613f88b765c590edae686d44e)) +* **api:** api update ([fffcedd](https://github.com/cloudflare/cloudflare-typescript/commit/fffcedda3b65897f4416a9680ba8b5d4038cdc31)) +* **api:** api update ([0c9dd1c](https://github.com/cloudflare/cloudflare-typescript/commit/0c9dd1c777d2c704161ca467ea0bd25f1647fafd)) +* **api:** api update ([24237ec](https://github.com/cloudflare/cloudflare-typescript/commit/24237ec0cc26e772d4729b422b03752a2345c893)) +* **api:** api update ([9428193](https://github.com/cloudflare/cloudflare-typescript/commit/942819321ecd535f003bcbc2e62558bdf5311f94)) +* **api:** api update ([b6df43c](https://github.com/cloudflare/cloudflare-typescript/commit/b6df43cf8adfbb499316fcacef5835ff9f2582d2)) +* **api:** api update ([15df56f](https://github.com/cloudflare/cloudflare-typescript/commit/15df56f964aff1b97ce97c42e5b42d188c72ca78)) +* **api:** api update ([37d15c6](https://github.com/cloudflare/cloudflare-typescript/commit/37d15c62672a51ab32a7a8435eb86cd2174dbe46)) +* **api:** api update ([80a19e7](https://github.com/cloudflare/cloudflare-typescript/commit/80a19e7ab32878c3a84346cd3e18819c52a25c8c)) +* **api:** api update ([c694cdd](https://github.com/cloudflare/cloudflare-typescript/commit/c694cdd52b2cabba1547d6e30303aa36103f7405)) +* **api:** api update ([8f922b8](https://github.com/cloudflare/cloudflare-typescript/commit/8f922b8f66e940413c2432c312490e8ab030a032)) +* **api:** api update ([d74f2c7](https://github.com/cloudflare/cloudflare-typescript/commit/d74f2c775a1483a52eea25c47a2f1cf77d2efd35)) +* **api:** api update ([9b7728c](https://github.com/cloudflare/cloudflare-typescript/commit/9b7728c6024b37e593ee22bbb3f50700fc1e90d6)) +* **api:** api update ([1dce00c](https://github.com/cloudflare/cloudflare-typescript/commit/1dce00c57efd0b5bdec71aaf0170c3c7f461334a)) +* **api:** api update ([c97cddd](https://github.com/cloudflare/cloudflare-typescript/commit/c97cddd1000ac8c7fecd1ff49e08216a90e54b5c)) +* **api:** api update ([e903f2b](https://github.com/cloudflare/cloudflare-typescript/commit/e903f2bd5a3ed74f22b0f67cbd6aeaa0daa82f9c)) +* **api:** api update ([69dfc35](https://github.com/cloudflare/cloudflare-typescript/commit/69dfc35755790a21244db8d874c6601ad905de26)) +* **api:** api update ([0628ce1](https://github.com/cloudflare/cloudflare-typescript/commit/0628ce189c5dc7d661c86f6c4d19c68f860eb9bb)) +* **api:** api update ([6f37358](https://github.com/cloudflare/cloudflare-typescript/commit/6f373586cc80c66207ce423eed1deb465ab3c118)) +* **api:** api update ([a487087](https://github.com/cloudflare/cloudflare-typescript/commit/a4870871f77c93a3c1bd2a60c9700f086a627195)) +* **api:** api update ([13aa6f9](https://github.com/cloudflare/cloudflare-typescript/commit/13aa6f9cd9d5cecf1cfb72dae92475440a1b81cd)) +* **api:** api update ([c7fbb93](https://github.com/cloudflare/cloudflare-typescript/commit/c7fbb936f8f80140ac59a73b99a4ee79f4a71b74)) +* **api:** api update ([1316668](https://github.com/cloudflare/cloudflare-typescript/commit/1316668d1d480cf74198332e26c127b42b5e4569)) +* **api:** api update ([5ebce93](https://github.com/cloudflare/cloudflare-typescript/commit/5ebce9334ce1e0e955abc2c4938aa94d81395044)) +* **api:** api update ([ba8bd8a](https://github.com/cloudflare/cloudflare-typescript/commit/ba8bd8aab4453cfb9996ada8c31cc1958cb8d6fc)) +* **api:** api update ([c68d67e](https://github.com/cloudflare/cloudflare-typescript/commit/c68d67e4e40464d051d0c68b06dde180b58136ba)) +* **api:** api update ([0074b30](https://github.com/cloudflare/cloudflare-typescript/commit/0074b3015f511a76166ff5164dc6ab115d827afc)) +* **api:** api update ([906c862](https://github.com/cloudflare/cloudflare-typescript/commit/906c8622f7b7dd2630090830b0471696ef8cf0da)) +* **api:** api update ([daba569](https://github.com/cloudflare/cloudflare-typescript/commit/daba569db295d26447f9891945ad6e29c5baab4b)) +* **api:** api update ([cb11123](https://github.com/cloudflare/cloudflare-typescript/commit/cb111237297f4b3339f3803beb29e5aa91992dce)) +* **api:** api update ([a9cfa77](https://github.com/cloudflare/cloudflare-typescript/commit/a9cfa77df67e8ecf4fb4c33218a362df350ff054)) +* **api:** api update ([abce587](https://github.com/cloudflare/cloudflare-typescript/commit/abce5876b1b9f7d7a345ef45f29f118f1fa3ca51)) +* **api:** api update ([60d8a4f](https://github.com/cloudflare/cloudflare-typescript/commit/60d8a4fb1e5c860c61d1fb3c15778cb24cef449d)) +* **api:** api update ([20a65d9](https://github.com/cloudflare/cloudflare-typescript/commit/20a65d90f0db9f91cc073856496705c3c75bb30b)) +* **api:** api update ([9efb930](https://github.com/cloudflare/cloudflare-typescript/commit/9efb93002dd8606cec533d2c116c3254cbf99651)) +* **api:** api update ([75af6a1](https://github.com/cloudflare/cloudflare-typescript/commit/75af6a1d00e16d9991a41e7c6343f2f185c30baf)) +* **api:** api update ([40d4b15](https://github.com/cloudflare/cloudflare-typescript/commit/40d4b153934c04e02ccb8f7462216cbdf3043adf)) +* **api:** api update ([f24deaa](https://github.com/cloudflare/cloudflare-typescript/commit/f24deaaa84685aa539cc744de4f2ae7777d2b99b)) +* **api:** api update ([#2566](https://github.com/cloudflare/cloudflare-typescript/issues/2566)) ([e5c0bbb](https://github.com/cloudflare/cloudflare-typescript/commit/e5c0bbb09457293c94359e13d566c3a2c42ce5ad)) +* **api:** api update ([#2568](https://github.com/cloudflare/cloudflare-typescript/issues/2568)) ([5f3a7d7](https://github.com/cloudflare/cloudflare-typescript/commit/5f3a7d7dce2db27a8ba983a6c6a552ed57bfbd7e)) +* **api:** api update ([#2571](https://github.com/cloudflare/cloudflare-typescript/issues/2571)) ([896ec91](https://github.com/cloudflare/cloudflare-typescript/commit/896ec912b623410a8d4141673d72d1c57d1e79de)) +* **api:** api update ([#2573](https://github.com/cloudflare/cloudflare-typescript/issues/2573)) ([c1581de](https://github.com/cloudflare/cloudflare-typescript/commit/c1581dea5b4c6b39adc23e59ce223711311e89b1)) +* **api:** api update ([#2576](https://github.com/cloudflare/cloudflare-typescript/issues/2576)) ([3c3f5be](https://github.com/cloudflare/cloudflare-typescript/commit/3c3f5beeda412f39f7c43dbe55021c45e89f7a2a)) +* **api:** api update ([#2578](https://github.com/cloudflare/cloudflare-typescript/issues/2578)) ([2f090eb](https://github.com/cloudflare/cloudflare-typescript/commit/2f090eb996c989ceead72744c94e8af771b20146)) +* **api:** api update ([#2580](https://github.com/cloudflare/cloudflare-typescript/issues/2580)) ([eac9b3c](https://github.com/cloudflare/cloudflare-typescript/commit/eac9b3cea028c67c6f8c599c5614341754a3b810)) +* **api:** api update ([#2584](https://github.com/cloudflare/cloudflare-typescript/issues/2584)) ([31843fe](https://github.com/cloudflare/cloudflare-typescript/commit/31843fe716d8caf94c9c26e390404497ff6ac18b)) +* **api:** api update ([#2585](https://github.com/cloudflare/cloudflare-typescript/issues/2585)) ([012fa88](https://github.com/cloudflare/cloudflare-typescript/commit/012fa88ffbd3227ecf8baf09aafd0b1b849b2750)) +* **api:** api update ([#2586](https://github.com/cloudflare/cloudflare-typescript/issues/2586)) ([c08b740](https://github.com/cloudflare/cloudflare-typescript/commit/c08b740c3e50e63147c029f49c651cf83b601943)) +* **api:** api update ([#2588](https://github.com/cloudflare/cloudflare-typescript/issues/2588)) ([b1b0fbd](https://github.com/cloudflare/cloudflare-typescript/commit/b1b0fbdb151075478086e8f01dc2b4dad7db2eb3)) +* **api:** api update ([#2590](https://github.com/cloudflare/cloudflare-typescript/issues/2590)) ([f497123](https://github.com/cloudflare/cloudflare-typescript/commit/f49712383731290bbcabd2bc66da3820b69d5cdf)) +* **api:** api update ([#2594](https://github.com/cloudflare/cloudflare-typescript/issues/2594)) ([9dbc988](https://github.com/cloudflare/cloudflare-typescript/commit/9dbc9880be6130ec3e2ba4d400c2d40e2d79fd18)) +* **api:** api update ([#2595](https://github.com/cloudflare/cloudflare-typescript/issues/2595)) ([5c31c8d](https://github.com/cloudflare/cloudflare-typescript/commit/5c31c8d0d0f5ab8acef0e3da5d144950c03259e9)) +* **api:** api update ([#2596](https://github.com/cloudflare/cloudflare-typescript/issues/2596)) ([5b7ff2e](https://github.com/cloudflare/cloudflare-typescript/commit/5b7ff2eebc222ca71d16c44a6b7d0b84d0c93756)) +* **api:** api update ([#2598](https://github.com/cloudflare/cloudflare-typescript/issues/2598)) ([b7d4e21](https://github.com/cloudflare/cloudflare-typescript/commit/b7d4e216a90ce2570fc8c31180ab7fe176da0fd4)) +* **api:** api update ([#2599](https://github.com/cloudflare/cloudflare-typescript/issues/2599)) ([d8ae028](https://github.com/cloudflare/cloudflare-typescript/commit/d8ae028b146bc1551f12a35472974e08b1e42ed1)) +* **api:** api update ([#2601](https://github.com/cloudflare/cloudflare-typescript/issues/2601)) ([b786656](https://github.com/cloudflare/cloudflare-typescript/commit/b7866566a0851d15aed5268f1c5b1d562c624af3)) +* **api:** api update ([#2603](https://github.com/cloudflare/cloudflare-typescript/issues/2603)) ([893533f](https://github.com/cloudflare/cloudflare-typescript/commit/893533ff3ac16d352cf27bbe617fce88ee44aa3e)) +* **api:** api update ([#2604](https://github.com/cloudflare/cloudflare-typescript/issues/2604)) ([e521813](https://github.com/cloudflare/cloudflare-typescript/commit/e5218136edabc5825916c798ce34627c15c24b74)) +* **api:** api update ([#2605](https://github.com/cloudflare/cloudflare-typescript/issues/2605)) ([b5f2e7f](https://github.com/cloudflare/cloudflare-typescript/commit/b5f2e7f6a752297a067ee8713bc55c99a676fecf)) +* **api:** api update ([#2606](https://github.com/cloudflare/cloudflare-typescript/issues/2606)) ([cec0ed7](https://github.com/cloudflare/cloudflare-typescript/commit/cec0ed744aea5f9ca0a4ba84d992f804dfda6297)) +* **api:** api update ([#2612](https://github.com/cloudflare/cloudflare-typescript/issues/2612)) ([d7336eb](https://github.com/cloudflare/cloudflare-typescript/commit/d7336ebe67aed43dd48aaf00b4b821460cbc7caa)) +* **api:** api update ([#2614](https://github.com/cloudflare/cloudflare-typescript/issues/2614)) ([fa86152](https://github.com/cloudflare/cloudflare-typescript/commit/fa861529df29b35b54803abab9cecf3c10f62357)) +* **api:** api update ([#2615](https://github.com/cloudflare/cloudflare-typescript/issues/2615)) ([5336ff7](https://github.com/cloudflare/cloudflare-typescript/commit/5336ff7d3740ffbe4767f422781adadf65a7d1b8)) +* **api:** api update ([#2616](https://github.com/cloudflare/cloudflare-typescript/issues/2616)) ([d7d30a0](https://github.com/cloudflare/cloudflare-typescript/commit/d7d30a088ab4611f12e52bac7eaa8d9afe18ac8a)) +* **api:** api update ([#2617](https://github.com/cloudflare/cloudflare-typescript/issues/2617)) ([875e4d1](https://github.com/cloudflare/cloudflare-typescript/commit/875e4d158653a43f349791e9bc45c1113b34737c)) +* **api:** api update ([#2618](https://github.com/cloudflare/cloudflare-typescript/issues/2618)) ([478fa7a](https://github.com/cloudflare/cloudflare-typescript/commit/478fa7a4a99244600d1dd34ff412a395fb6f30ed)) +* **api:** api update ([#2619](https://github.com/cloudflare/cloudflare-typescript/issues/2619)) ([629e513](https://github.com/cloudflare/cloudflare-typescript/commit/629e513a6840a26d9025ebbf25dea8728aa74d9e)) +* **api:** api update ([#2622](https://github.com/cloudflare/cloudflare-typescript/issues/2622)) ([289adb2](https://github.com/cloudflare/cloudflare-typescript/commit/289adb2e3a7c70d9aa3be5000375db1ee40e8cd4)) +* **api:** api update ([#2623](https://github.com/cloudflare/cloudflare-typescript/issues/2623)) ([c9a6af2](https://github.com/cloudflare/cloudflare-typescript/commit/c9a6af2f109d210f001c61db5ad9682fa1a43532)) +* **api:** api update ([#2624](https://github.com/cloudflare/cloudflare-typescript/issues/2624)) ([2de3479](https://github.com/cloudflare/cloudflare-typescript/commit/2de3479a1bb690fa592faef8fa78accd5ef5296a)) +* **api:** api update ([#2625](https://github.com/cloudflare/cloudflare-typescript/issues/2625)) ([85ffe86](https://github.com/cloudflare/cloudflare-typescript/commit/85ffe866bdb72029af6d57095d016f7cfeb22985)) +* **api:** api update ([#2626](https://github.com/cloudflare/cloudflare-typescript/issues/2626)) ([80a754b](https://github.com/cloudflare/cloudflare-typescript/commit/80a754bc0af41730d36cbc7c2d23e5e6db61c013)) +* **api:** api update ([#2628](https://github.com/cloudflare/cloudflare-typescript/issues/2628)) ([fc993db](https://github.com/cloudflare/cloudflare-typescript/commit/fc993dbdb379d451a65a99d3450518481175e208)) +* **api:** manual updates ([f30d5a5](https://github.com/cloudflare/cloudflare-typescript/commit/f30d5a528d52c8eb66d5f97c1be1a24590783b33)) +* **api:** manual updates ([bdf1162](https://github.com/cloudflare/cloudflare-typescript/commit/bdf11621246ba5b378cd7cc942a17f09d807a4e6)) +* **api:** manual updates ([edbf17b](https://github.com/cloudflare/cloudflare-typescript/commit/edbf17b90e551d99e4f1dbb846f0efe0968af74c)) +* **api:** manual updates ([d7c2322](https://github.com/cloudflare/cloudflare-typescript/commit/d7c2322c76739d98576a810293171b75504b79b8)) +* **api:** manual updates ([651a833](https://github.com/cloudflare/cloudflare-typescript/commit/651a83308da8d6a842f792e889a586faa125fc4c)) +* **api:** manual updates ([#2574](https://github.com/cloudflare/cloudflare-typescript/issues/2574)) ([b40f3d4](https://github.com/cloudflare/cloudflare-typescript/commit/b40f3d4c5ad988af76fafb7dcb8f71c44a2346a5)) +* **api:** manual updates ([#2610](https://github.com/cloudflare/cloudflare-typescript/issues/2610)) ([e1fcf61](https://github.com/cloudflare/cloudflare-typescript/commit/e1fcf6128b906979c5024a15d1ed2e4cc5ba3562)) +* **api:** manual updates ([#2611](https://github.com/cloudflare/cloudflare-typescript/issues/2611)) ([0a6b93b](https://github.com/cloudflare/cloudflare-typescript/commit/0a6b93bb20785cbc9f40d0e2321510aed63cfcb2)) +* **api:** patch and put endpoints for d1 database ([371a714](https://github.com/cloudflare/cloudflare-typescript/commit/371a71400fbe6cd6f70535ce5cea94b29a66221e)) +* **api:** Update workers telemetry route methods ([#2620](https://github.com/cloudflare/cloudflare-typescript/issues/2620)) ([9ed5f60](https://github.com/cloudflare/cloudflare-typescript/commit/9ed5f60e38f82a9bb1944c76eec8a0a5de455e7d)) +* **browser_rendering:** add json, links and markdown support ([#2570](https://github.com/cloudflare/cloudflare-typescript/issues/2570)) ([182b573](https://github.com/cloudflare/cloudflare-typescript/commit/182b573fff116d49f06240ccbdccacec61c3dcf2)) +* **devices:** add next generation under devices ([aa20454](https://github.com/cloudflare/cloudflare-typescript/commit/aa2045473f8e3e1299d322b0dfbd148f32419bb9)) +* **devices:** add registrations support ([#2607](https://github.com/cloudflare/cloudflare-typescript/issues/2607)) ([b88e5d8](https://github.com/cloudflare/cloudflare-typescript/commit/b88e5d823d5b4de718388466c68899b114afe957)) +* **docs:** add secrets store to navigation ([250295c](https://github.com/cloudflare/cloudflare-typescript/commit/250295c5bcbe86e67bfa1ed160dd9f40345d0cee)) +* **pipelines:** add support ([#2621](https://github.com/cloudflare/cloudflare-typescript/issues/2621)) ([d23a98e](https://github.com/cloudflare/cloudflare-typescript/commit/d23a98ea966b0435e2f8188d0a46c5d84c61815f)) +* **pipelines:** add terraform resource ([93dc3e1](https://github.com/cloudflare/cloudflare-typescript/commit/93dc3e1f6f1e491bf4f2531c9f11a91c5833f935)) +* **r2:** add super_slurper endpoints ([#2569](https://github.com/cloudflare/cloudflare-typescript/issues/2569)) ([c113def](https://github.com/cloudflare/cloudflare-typescript/commit/c113defd3aa2ad6aac3186170b3b23e0f29c2680)) +* **secret_store:** add support ([#2608](https://github.com/cloudflare/cloudflare-typescript/issues/2608)) ([e1da551](https://github.com/cloudflare/cloudflare-typescript/commit/e1da55187daa90f004fa7d530d0dfccb30aa71fe)) +* **secrets_store:** remove incorrect bulk edit endpoint ([#2609](https://github.com/cloudflare/cloudflare-typescript/issues/2609)) ([1be04c6](https://github.com/cloudflare/cloudflare-typescript/commit/1be04c6e8a5d99134494215b296446abb3d34af1)) +* support API versioning ([ee079a4](https://github.com/cloudflare/cloudflare-typescript/commit/ee079a480cd6e81b10e96969ef86da644c6555a5)) +* **workers:** add script_and_version_settings methods ([#2572](https://github.com/cloudflare/cloudflare-typescript/issues/2572)) ([b81cd29](https://github.com/cloudflare/cloudflare-typescript/commit/b81cd2903524d87fa461724834a3be8b8a791bee)) +* **workflows:** add events ([#2582](https://github.com/cloudflare/cloudflare-typescript/issues/2582)) ([941c088](https://github.com/cloudflare/cloudflare-typescript/commit/941c0885470635d5d72bf0de94c90595f74cc960)) + + +### Bug Fixes + +* **api:** improve type resolution when importing as a package ([#2579](https://github.com/cloudflare/cloudflare-typescript/issues/2579)) ([3700e03](https://github.com/cloudflare/cloudflare-typescript/commit/3700e03f5de939498c08c1f5e7efedda6c2b2569)) +* **client:** send all configured auth headers ([#2597](https://github.com/cloudflare/cloudflare-typescript/issues/2597)) ([6c4b093](https://github.com/cloudflare/cloudflare-typescript/commit/6c4b093aa5abaf6b1643248826086956bdaa1e4e)) +* correct workers upload types ([ee69ba2](https://github.com/cloudflare/cloudflare-typescript/commit/ee69ba2f94f2601a6bbaf1cdb44723244468f161)) +* **mcp:** remove unused tools.ts ([#2592](https://github.com/cloudflare/cloudflare-typescript/issues/2592)) ([322aff7](https://github.com/cloudflare/cloudflare-typescript/commit/322aff730db7fc2ea27c8cdc98ffa7166e3726a6)) + + +### Chores + +* **client:** minor internal fixes ([2b5f646](https://github.com/cloudflare/cloudflare-typescript/commit/2b5f646e3d8efe53a03d07266a30b7ba33da3be4)) +* configure new SDK language ([44ebe25](https://github.com/cloudflare/cloudflare-typescript/commit/44ebe25fa2ed1cf9fd409f3c7af83ca302fcd635)) +* **internal:** add aliases for Record and Array ([#2577](https://github.com/cloudflare/cloudflare-typescript/issues/2577)) ([6a067f2](https://github.com/cloudflare/cloudflare-typescript/commit/6a067f25fe5ae77728b930f3a928f78205bfcc7b)) +* **internal:** codegen related update ([e5bbc06](https://github.com/cloudflare/cloudflare-typescript/commit/e5bbc0658a4ae453003466fb5f2da395f93c32f6)) +* **internal:** codegen related update ([#2567](https://github.com/cloudflare/cloudflare-typescript/issues/2567)) ([ac6be0f](https://github.com/cloudflare/cloudflare-typescript/commit/ac6be0f0d74b5f161e22ef26009c8cad366423a3)) +* **internal:** codegen related update ([#2591](https://github.com/cloudflare/cloudflare-typescript/issues/2591)) ([932dca9](https://github.com/cloudflare/cloudflare-typescript/commit/932dca98aac734b39ea7340de05564229c4fe05a)) +* **internal:** force response_info model generation ([#2583](https://github.com/cloudflare/cloudflare-typescript/issues/2583)) ([4e2f355](https://github.com/cloudflare/cloudflare-typescript/commit/4e2f355a582692a5d9e3f7beb6b57bb790cd68fc)) +* **internal:** improve index signature formatting ([#2589](https://github.com/cloudflare/cloudflare-typescript/issues/2589)) ([0176802](https://github.com/cloudflare/cloudflare-typescript/commit/01768025564caa996d26d1373c6424575bfb8935)) +* **internal:** only run examples workflow in main repo ([#2600](https://github.com/cloudflare/cloudflare-typescript/issues/2600)) ([0e1c619](https://github.com/cloudflare/cloudflare-typescript/commit/0e1c61923cce644ce2e13eda95a3c471d7799566)) +* **internal:** reduce CI branch coverage ([b547033](https://github.com/cloudflare/cloudflare-typescript/commit/b5470336d4ab29850a10c21e4205316da4e1b5ed)) +* **internal:** update response_info ([#2581](https://github.com/cloudflare/cloudflare-typescript/issues/2581)) ([6122281](https://github.com/cloudflare/cloudflare-typescript/commit/61222819b451b1f9abfed902b4e45e1e8fd9c3eb)) +* **internal:** update shared response info for optional fields ([df4e35d](https://github.com/cloudflare/cloudflare-typescript/commit/df4e35d0c5ac21302137ca5a9f92f0e923befd86)) +* **internal:** upload builds and expand CI branch coverage ([#2627](https://github.com/cloudflare/cloudflare-typescript/issues/2627)) ([0ee3262](https://github.com/cloudflare/cloudflare-typescript/commit/0ee32622d3dfc6d6d8eba796442e422cc0a57279)) +* more workers fixes ([994f114](https://github.com/cloudflare/cloudflare-typescript/commit/994f114f6a89c75579065e234c91189d13f18e1c)) +* **pipelines:** move pipeline nav hierarchy ([ecddaea](https://github.com/cloudflare/cloudflare-typescript/commit/ecddaeace63824f6b5761d96767471a375811856)) +* revert auth handling ([f59cde4](https://github.com/cloudflare/cloudflare-typescript/commit/f59cde40ac01888d5c3a37e2fb1d9fdd45d047e9)) +* **tests:** improve enum examples ([#2613](https://github.com/cloudflare/cloudflare-typescript/issues/2613)) ([fa0c24e](https://github.com/cloudflare/cloudflare-typescript/commit/fa0c24eebf34283070b14ce6ddec49222004f2b3)) + ## 4.2.0 (2025-03-18) Full Changelog: [v4.1.0...v4.2.0](https://github.com/cloudflare/cloudflare-typescript/compare/v4.1.0...v4.2.0) diff --git a/api.md b/api.md index f45e2c74fc..c507c8598d 100644 --- a/api.md +++ b/api.md @@ -136,7 +136,7 @@ Types: Methods: - client.originCACertificates.create({ ...params }) -> OriginCACertificate -- client.originCACertificates.list({ ...params }) -> OriginCACertificatesSinglePage +- client.originCACertificates.list({ ...params }) -> OriginCACertificatesV4PagePaginationArray - client.originCACertificates.delete(certificateId) -> OriginCACertificateDeleteResponse - client.originCACertificates.get(certificateId) -> OriginCACertificate @@ -868,13 +868,11 @@ Types: - CustomNameserver - CustomNameserverDeleteResponse -- CustomNameserverAvailabiltyResponse Methods: - client.customNameservers.create({ ...params }) -> CustomNameserver - client.customNameservers.delete(customNSId, { ...params }) -> CustomNameserverDeleteResponsesSinglePage -- client.customNameservers.availabilty({ ...params }) -> CustomNameserverAvailabiltyResponsesSinglePage - client.customNameservers.get({ ...params }) -> CustomNameserversSinglePage # DNSFirewall @@ -1849,7 +1847,6 @@ Methods: Types: - Action -- Methods - RateLimit - RateLimitDeleteResponse @@ -2167,6 +2164,18 @@ Methods: - client.workers.scripts.secrets.delete(scriptName, secretName, { ...params }) -> SecretDeleteResponse | null - client.workers.scripts.secrets.get(scriptName, secretName, { ...params }) -> SecretGetResponse +### ScriptAndVersionSettings + +Types: + +- ScriptAndVersionSettingEditResponse +- ScriptAndVersionSettingGetResponse + +Methods: + +- client.workers.scripts.scriptAndVersionSettings.edit(scriptName, { ...params }) -> ScriptAndVersionSettingEditResponse +- client.workers.scripts.scriptAndVersionSettings.get(scriptName, { ...params }) -> ScriptAndVersionSettingGetResponse + ## AccountSettings Types: @@ -2204,6 +2213,22 @@ Methods: - client.workers.subdomains.update({ ...params }) -> SubdomainUpdateResponse - client.workers.subdomains.get({ ...params }) -> SubdomainGetResponse +## Observability + +### Telemetry + +Types: + +- TelemetryKeysResponse +- TelemetryQueryResponse +- TelemetryValuesResponse + +Methods: + +- client.workers.observability.telemetry.keys({ ...params }) -> TelemetryKeysResponsesSinglePage +- client.workers.observability.telemetry.query({ ...params }) -> TelemetryQueryResponse +- client.workers.observability.telemetry.values({ ...params }) -> TelemetryValuesResponsesSinglePage + # KV ## Namespaces @@ -2213,8 +2238,6 @@ Types: - Namespace - NamespaceUpdateResponse - NamespaceDeleteResponse -- NamespaceBulkDeleteResponse -- NamespaceBulkUpdateResponse Methods: @@ -2222,31 +2245,23 @@ Methods: - client.kv.namespaces.update(namespaceId, { ...params }) -> NamespaceUpdateResponse | null - client.kv.namespaces.list({ ...params }) -> NamespacesV4PagePaginationArray - client.kv.namespaces.delete(namespaceId, { ...params }) -> NamespaceDeleteResponse | null -- client.kv.namespaces.bulkDelete(namespaceId, [ ...body ]) -> NamespaceBulkDeleteResponse | null -- client.kv.namespaces.bulkUpdate(namespaceId, [ ...body ]) -> NamespaceBulkUpdateResponse | null - client.kv.namespaces.get(namespaceId, { ...params }) -> Namespace -### Analytics - -Types: - -- Components -- Schema - -Methods: - -- client.kv.namespaces.analytics.list({ ...params }) -> Schema -- client.kv.namespaces.analytics.stored({ ...params }) -> Components - ### Keys Types: - Key +- KeyBulkDeleteResponse +- KeyBulkGetResponse +- KeyBulkUpdateResponse Methods: - client.kv.namespaces.keys.list(namespaceId, { ...params }) -> KeysCursorLimitPagination +- client.kv.namespaces.keys.bulkDelete(namespaceId, [ ...body ]) -> KeyBulkDeleteResponse | null +- client.kv.namespaces.keys.bulkGet(namespaceId, { ...params }) -> KeyBulkGetResponse | null +- client.kv.namespaces.keys.bulkUpdate(namespaceId, [ ...body ]) -> KeyBulkUpdateResponse | null ### Metadata @@ -2306,6 +2321,7 @@ Methods: - client.queues.update(queueId, { ...params }) -> Queue - client.queues.list({ ...params }) -> QueuesSinglePage - client.queues.delete(queueId, { ...params }) -> QueueDeleteResponse +- client.queues.edit(queueId, { ...params }) -> Queue - client.queues.get(queueId, { ...params }) -> Queue ## Consumers @@ -2334,6 +2350,17 @@ Methods: - client.queues.messages.ack(queueId, { ...params }) -> MessageAckResponse - client.queues.messages.pull(queueId, { ...params }) -> MessagePullResponsesSinglePage +## Purge + +Types: + +- PurgeStatusResponse + +Methods: + +- client.queues.purge.start(queueId, { ...params }) -> Queue +- client.queues.purge.status(queueId, { ...params }) -> PurgeStatusResponse + # APIGateway ## Configurations @@ -4190,8 +4217,10 @@ Types: Methods: - client.d1.database.create({ ...params }) -> D1 +- client.d1.database.update(databaseId, { ...params }) -> D1 - client.d1.database.list({ ...params }) -> DatabaseListResponsesV4PagePaginationArray - client.d1.database.delete(databaseId, { ...params }) -> DatabaseDeleteResponse | null +- client.d1.database.edit(databaseId, { ...params }) -> D1 - client.d1.database.export(databaseId, { ...params }) -> DatabaseExportResponse - client.d1.database.get(databaseId, { ...params }) -> D1 - client.d1.database.import(databaseId, { ...params }) -> DatabaseImportResponse @@ -4334,6 +4363,54 @@ Methods: - client.r2.temporaryCredentials.create({ ...params }) -> TemporaryCredentialCreateResponse +## SuperSlurper + +### Jobs + +Types: + +- JobCreateResponse +- JobListResponse +- JobAbortResponse +- JobAbortAllResponse +- JobGetResponse +- JobPauseResponse +- JobProgressResponse +- JobResumeResponse + +Methods: + +- client.r2.superSlurper.jobs.create({ ...params }) -> JobCreateResponse +- client.r2.superSlurper.jobs.list({ ...params }) -> JobListResponsesSinglePage +- client.r2.superSlurper.jobs.abort(jobId, { ...params }) -> JobAbortResponse +- client.r2.superSlurper.jobs.abortAll({ ...params }) -> JobAbortAllResponse +- client.r2.superSlurper.jobs.get(jobId, { ...params }) -> JobGetResponse +- client.r2.superSlurper.jobs.pause(jobId, { ...params }) -> JobPauseResponse +- client.r2.superSlurper.jobs.progress(jobId, { ...params }) -> JobProgressResponse +- client.r2.superSlurper.jobs.resume(jobId, { ...params }) -> JobResumeResponse + +#### Logs + +Types: + +- LogListResponse + +Methods: + +- client.r2.superSlurper.jobs.logs.list(jobId, { ...params }) -> LogListResponsesSinglePage + +### ConnectivityPrecheck + +Types: + +- ConnectivityPrecheckSourceResponse +- ConnectivityPrecheckTargetResponse + +Methods: + +- client.r2.superSlurper.connectivityPrecheck.source({ ...params }) -> ConnectivityPrecheckSourceResponse +- client.r2.superSlurper.connectivityPrecheck.target({ ...params }) -> ConnectivityPrecheckTargetResponse + # WorkersForPlatforms ## Dispatch @@ -4450,6 +4527,56 @@ Methods: - client.zeroTrust.devices.list({ ...params }) -> DevicesSinglePage - client.zeroTrust.devices.get(deviceId, { ...params }) -> DeviceGetResponse | null +### Devices + +Types: + +- DeviceListResponse +- DeviceDeleteResponse +- DeviceGetResponse +- DeviceRevokeResponse + +Methods: + +- client.zeroTrust.devices.devices.list({ ...params }) -> DeviceListResponsesCursorPagination +- client.zeroTrust.devices.devices.delete(deviceId, { ...params }) -> DeviceDeleteResponse | null +- client.zeroTrust.devices.devices.get(deviceId, { ...params }) -> DeviceGetResponse +- client.zeroTrust.devices.devices.revoke(deviceId, { ...params }) -> DeviceRevokeResponse | null + +### Resilience + +#### GlobalWARPOverride + +Types: + +- GlobalWARPOverrideCreateResponse +- GlobalWARPOverrideGetResponse + +Methods: + +- client.zeroTrust.devices.resilience.globalWARPOverride.create({ ...params }) -> GlobalWARPOverrideCreateResponse | null +- client.zeroTrust.devices.resilience.globalWARPOverride.get({ ...params }) -> GlobalWARPOverrideGetResponse | null + +### Registrations + +Types: + +- RegistrationListResponse +- RegistrationDeleteResponse +- RegistrationBulkDeleteResponse +- RegistrationGetResponse +- RegistrationRevokeResponse +- RegistrationUnrevokeResponse + +Methods: + +- client.zeroTrust.devices.registrations.list({ ...params }) -> RegistrationListResponsesCursorPagination +- client.zeroTrust.devices.registrations.delete(registrationId, { ...params }) -> RegistrationDeleteResponse | null +- client.zeroTrust.devices.registrations.bulkDelete({ ...params }) -> RegistrationBulkDeleteResponse | null +- client.zeroTrust.devices.registrations.get(registrationId, { ...params }) -> RegistrationGetResponse +- client.zeroTrust.devices.registrations.revoke({ ...params }) -> RegistrationRevokeResponse | null +- client.zeroTrust.devices.registrations.unrevoke({ ...params }) -> RegistrationUnrevokeResponse | null + ### DEXTests Types: @@ -4662,10 +4789,12 @@ Methods: Types: - OverrideCodeListResponse +- OverrideCodeGetResponse Methods: - client.zeroTrust.devices.overrideCodes.list(deviceId, { ...params }) -> OverrideCodeListResponse | null +- client.zeroTrust.devices.overrideCodes.get(registrationId, { ...params }) -> OverrideCodeGetResponse ## IdentityProviders @@ -4898,7 +5027,7 @@ Types: Methods: -- client.zeroTrust.access.applications.policyTests.users.list(policyTestId, { ...params }) -> UserListResponsesSinglePage +- client.zeroTrust.access.applications.policyTests.users.list(policyTestId, { ...params }) -> UserListResponsesV4PagePaginationArray ### Certificates @@ -6039,6 +6168,8 @@ Methods: ## AI +### ToMarkdown + ### Inference #### Summary @@ -6174,6 +6305,7 @@ Types: - RouteAsesResponse - RouteMoasResponse - RoutePfx2asResponse +- RouteRealtimeResponse - RouteStatsResponse Methods: @@ -6181,6 +6313,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 @@ -6562,17 +6695,21 @@ Types: - SummaryBitrateResponse - SummaryDurationResponse +- SummaryIndustryResponse - SummaryIPVersionResponse - SummaryProtocolResponse - SummaryVectorResponse +- SummaryVerticalResponse 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.ipVersion({ ...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 @@ -6638,17 +6775,21 @@ Types: - SummaryHTTPMethodResponse - SummaryHTTPVersionResponse +- SummaryIndustryResponse - SummaryIPVersionResponse - SummaryManagedRulesResponse - SummaryMitigationProductResponse +- SummaryVerticalResponse Methods: - client.radar.attacks.layer7.summary.httpMethod({ ...params }) -> SummaryHTTPMethodResponse - client.radar.attacks.layer7.summary.httpVersion({ ...params }) -> SummaryHTTPVersionResponse +- client.radar.attacks.layer7.summary.industry({ ...params }) -> SummaryIndustryResponse - client.radar.attacks.layer7.summary.ipVersion({ ...params }) -> SummaryIPVersionResponse - client.radar.attacks.layer7.summary.managedRules({ ...params }) -> SummaryManagedRulesResponse - client.radar.attacks.layer7.summary.mitigationProduct({ ...params }) -> SummaryMitigationProductResponse +- client.radar.attacks.layer7.summary.vertical({ ...params }) -> SummaryVerticalResponse #### TimeseriesGroups @@ -7902,6 +8043,16 @@ Methods: - client.workflows.instances.status.edit(workflowName, instanceId, { ...params }) -> StatusEditResponse +### Events + +Types: + +- EventCreateResponse + +Methods: + +- client.workflows.instances.events.create(workflowName, instanceId, eventType, { ...params }) -> EventCreateResponse + ## Versions Types: @@ -8214,6 +8365,36 @@ Methods: - client.browserRendering.snapshot.create({ ...params }) -> SnapshotCreateResponse +## Json + +Types: + +- JsonCreateResponse + +Methods: + +- client.browserRendering.json.create({ ...params }) -> JsonCreateResponse + +## Links + +Types: + +- LinkCreateResponse + +Methods: + +- client.browserRendering.links.create({ ...params }) -> LinkCreateResponse + +## Markdown + +Types: + +- MarkdownCreateResponse + +Methods: + +- client.browserRendering.markdown.create({ ...params }) -> MarkdownCreateResponse + # CustomPages Types: @@ -8227,3 +8408,66 @@ Methods: - client.customPages.update(identifier, { ...params }) -> CustomPageUpdateResponse | null - client.customPages.list({ ...params }) -> CustomPageListResponsesSinglePage - client.customPages.get(identifier, { ...params }) -> CustomPageGetResponse | null + +# SecretsStore + +## Stores + +Types: + +- StoreCreateResponse +- StoreListResponse +- StoreDeleteResponse + +Methods: + +- client.secretsStore.stores.create([ ...body ]) -> StoreCreateResponsesSinglePage +- client.secretsStore.stores.list({ ...params }) -> StoreListResponsesV4PagePaginationArray +- client.secretsStore.stores.delete(storeId, { ...params }) -> StoreDeleteResponse + +### Secrets + +Types: + +- SecretCreateResponse +- SecretListResponse +- SecretDeleteResponse +- SecretBulkDeleteResponse +- SecretEditResponse +- SecretGetResponse + +Methods: + +- client.secretsStore.stores.secrets.create(storeId, [ ...body ]) -> SecretCreateResponsesSinglePage +- client.secretsStore.stores.secrets.list(storeId, { ...params }) -> SecretListResponsesV4PagePaginationArray +- client.secretsStore.stores.secrets.delete(storeId, secretId, { ...params }) -> SecretDeleteResponse +- client.secretsStore.stores.secrets.bulkDelete(storeId, { ...params }) -> SecretBulkDeleteResponsesSinglePage +- client.secretsStore.stores.secrets.edit(storeId, secretId, { ...params }) -> SecretEditResponse +- client.secretsStore.stores.secrets.get(storeId, secretId, { ...params }) -> SecretGetResponse + +## Quota + +Types: + +- QuotaGetResponse + +Methods: + +- client.secretsStore.quota.get({ ...params }) -> QuotaGetResponse + +# Pipelines + +Types: + +- PipelineCreateResponse +- PipelineUpdateResponse +- PipelineListResponse +- PipelineGetResponse + +Methods: + +- client.pipelines.create({ ...params }) -> PipelineCreateResponse +- client.pipelines.update(pipelineName, { ...params }) -> PipelineUpdateResponse +- client.pipelines.list({ ...params }) -> PipelineListResponse +- client.pipelines.delete(pipelineName, { ...params }) -> void +- client.pipelines.get(pipelineName, { ...params }) -> PipelineGetResponse diff --git a/examples/workers/script-upload.ts b/examples/workers/script-upload.ts new file mode 100644 index 0000000000..ffc54e123d --- /dev/null +++ b/examples/workers/script-upload.ts @@ -0,0 +1,69 @@ +#!/usr/bin/env -S npm run tsn -T + +/* + * Generate an API token: https://developers.cloudflare.com/fundamentals/api/get-started/create-token/ + * (Not Global API Key!) + * + * Find your account id: https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/ + * + * Set these environment variables: + * - CLOUDFLARE_API_TOKEN + * - CLOUDFLARE_ACCOUNT_ID + */ + +import Cloudflare from 'cloudflare'; + +const client = new Cloudflare({ + apiToken: process.env['CLOUDFLARE_API_TOKEN'] ?? '', +}); +const accountID = process.env['CLOUDFLARE_ACCOUNT_ID'] ?? ''; + +async function main() { + const scriptName = 'my-hello-world-script'; + const scriptFileName = `${scriptName}.mjs`; + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response(env.MESSAGE, { status: 200 }); + } + }; + `; + + const script: Cloudflare.Workers.Scripts.ScriptUpdateResponse = await client.workers.scripts.update( + scriptName, + { + account_id: accountID, + /* + * Add script content keyed by the filename + */ + // @ts-ignore + [scriptFileName]: new File([scriptContent], scriptFileName, { + type: 'application/javascript+module', + }), + // @ts-ignore + metadata: new File( + [ + JSON.stringify({ + // https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/ + bindings: [ + { + type: 'plain_text', + name: 'MESSAGE', + text: 'Hello World!', + }, + ], + main_module: scriptFileName, + }), + ], + 'metadata.json', + { + type: 'application/json', + }, + ), + }, + ); + + console.log(script.id); +} + +main(); diff --git a/package.json b/package.json index 5832e6b581..2225f1d944 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudflare", - "version": "4.2.0", + "version": "4.3.0", "description": "The official TypeScript library for the Cloudflare API", "author": "Cloudflare ", "types": "dist/index.d.ts", @@ -107,17 +107,17 @@ "default": "./dist/index.mjs" }, "./*.mjs": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "default": ["./dist/*.mjs", "./dist/*/index.mjs"] + "types": "./dist/*.d.ts", + "default": "./dist/*.mjs" }, "./*.js": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "default": ["./dist/*.js", "./dist/*/index.js"] + "types": "./dist/*.d.ts", + "default": "./dist/*.js" }, "./*": { - "types": ["./dist/*.d.ts", "./dist/*/index.d.ts"], - "require": ["./dist/*.js", "./dist/*/index.js"], - "default": ["./dist/*.mjs", "./dist/*/index.mjs"] + "types": "./dist/*.d.ts", + "require": "./dist/*.js", + "default": "./dist/*.mjs" } } } diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh new file mode 100755 index 0000000000..96427f53d3 --- /dev/null +++ b/scripts/utils/upload-artifact.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -exuo pipefail + +RESPONSE=$(curl -X POST "$URL" \ + -H "Authorization: Bearer $AUTH" \ + -H "Content-Type: application/json") + +SIGNED_URL=$(echo "$RESPONSE" | jq -r '.url') + +if [[ "$SIGNED_URL" == "null" ]]; then + echo -e "\033[31mFailed to get signed URL.\033[0m" + exit 1 +fi + +UPLOAD_RESPONSE=$(tar -cz dist | curl -v -X PUT \ + -H "Content-Type: application/gzip" \ + --data-binary @- "$SIGNED_URL" 2>&1) + +if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then + echo -e "\033[32mUploaded build to Stainless storage.\033[0m" + echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/cloudflare-node/$SHA'\033[0m" +else + echo -e "\033[31mFailed to upload artifact.\033[0m" + exit 1 +fi diff --git a/src/_shims/index-deno.ts b/src/_shims/index-deno.ts index bb3c002433..30d6bd1631 100644 --- a/src/_shims/index-deno.ts +++ b/src/_shims/index-deno.ts @@ -108,3 +108,5 @@ export declare class FsReadStream extends Readable { const _ReadableStream = ReadableStream; type _ReadableStream = ReadableStream; export { _ReadableStream as ReadableStream }; + +export const init = () => {}; diff --git a/src/_shims/index.d.ts b/src/_shims/index.d.ts index a2107f4120..86f9ce6687 100644 --- a/src/_shims/index.d.ts +++ b/src/_shims/index.d.ts @@ -79,3 +79,5 @@ export function fileFromPath(path: string, options?: FileFromPathOptions): Promi export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise; export function isFsReadStream(value: any): value is FsReadStream; + +export const init: () => void; diff --git a/src/_shims/index.js b/src/_shims/index.js index 1704568bcd..aa84d90a98 100644 --- a/src/_shims/index.js +++ b/src/_shims/index.js @@ -3,7 +3,9 @@ */ const shims = require('./registry'); const auto = require('cloudflare/_shims/auto/runtime'); -if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +exports.init = () => { + if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +}; for (const property of Object.keys(shims)) { Object.defineProperty(exports, property, { get() { @@ -11,3 +13,5 @@ for (const property of Object.keys(shims)) { }, }); } + +exports.init(); diff --git a/src/_shims/index.mjs b/src/_shims/index.mjs index 1fdfc626bf..792ace2a55 100644 --- a/src/_shims/index.mjs +++ b/src/_shims/index.mjs @@ -3,5 +3,9 @@ */ import * as shims from './registry.mjs'; import * as auto from 'cloudflare/_shims/auto/runtime'; -if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +export const init = () => { + if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true }); +}; export * from './registry.mjs'; + +init(); diff --git a/src/core.ts b/src/core.ts index c36859eb9b..c06ae55330 100644 --- a/src/core.ts +++ b/src/core.ts @@ -16,7 +16,12 @@ import { type RequestInit, type Response, type HeadersInit, + init, } from './_shims/index'; + +// try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881 +init(); + export { type Response }; import { BlobLike, isBlobLike, isMultipartBody } from './uploads'; export { @@ -28,6 +33,20 @@ export { export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise; +/** + * An alias to the builtin `Array` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Array = Array; + +/** + * An alias to the builtin `Record` type so we can + * easily alias it in import statements if there are name clashes. + */ +type _Record = Record; + +export type { _Array as Array, _Record as Record }; + type PromiseOrValue = T | Promise; type APIResponseProps = { @@ -151,6 +170,7 @@ export class APIPromise extends Promise { export abstract class APIClient { baseURL: string; + apiVersion: string; maxRetries: number; timeout: number; httpAgent: Agent | undefined; @@ -160,18 +180,21 @@ export abstract class APIClient { constructor({ baseURL, + apiVersion, maxRetries = 2, timeout = 60000, // 1 minute httpAgent, fetch: overriddenFetch, }: { baseURL: string; + apiVersion: string; maxRetries?: number | undefined; timeout: number | undefined; httpAgent: Agent | undefined; fetch: Fetch | undefined; }) { this.baseURL = baseURL; + this.apiVersion = apiVersion; this.maxRetries = validatePositiveInteger('maxRetries', maxRetries); this.timeout = validatePositiveInteger('timeout', timeout); this.httpAgent = httpAgent; @@ -196,6 +219,7 @@ export abstract class APIClient { Accept: 'application/json', 'Content-Type': 'application/json', 'User-Agent': this.getUserAgent(), + 'api-version': this.getAPIVerson(), ...getPlatformHeaders(), ...this.authHeaders(opts), }; @@ -206,7 +230,7 @@ export abstract class APIClient { /** * Override this to add your own headers validation: */ - protected validateHeaders(headers: Headers, customHeaders: Headers) {} + protected validateHeaders(headers: Headers, customHeaders: Headers) { } protected defaultIdempotencyKey(): string { return `stainless-node-retry-${uuid4()}`; @@ -241,10 +265,10 @@ export abstract class APIClient { Promise.resolve(opts).then(async (opts) => { const body = opts && isBlobLike(opts?.body) ? new DataView(await opts.body.arrayBuffer()) - : opts?.body instanceof DataView ? opts.body - : opts?.body instanceof ArrayBuffer ? new DataView(opts.body) - : opts && ArrayBuffer.isView(opts?.body) ? new DataView(opts.body.buffer) - : opts?.body; + : opts?.body instanceof DataView ? opts.body + : opts?.body instanceof ArrayBuffer ? new DataView(opts.body) + : opts && ArrayBuffer.isView(opts?.body) ? new DataView(opts.body.buffer) + : opts?.body; return { method, path, ...opts, body }; }), ); @@ -277,18 +301,18 @@ export abstract class APIClient { } buildRequest( - options: FinalRequestOptions, + inputOptions: FinalRequestOptions, { retryCount = 0 }: { retryCount?: number } = {}, ): { req: RequestInit; url: string; timeout: number } { - options = { ...options }; + const options = { ...inputOptions }; const { method, path, query, headers: headers = {} } = options; const body = ArrayBuffer.isView(options.body) || (options.__binaryRequest && typeof options.body === 'string') ? options.body - : isMultipartBody(options.body) ? options.body.body - : options.body ? JSON.stringify(options.body, null, 2) - : null; + : isMultipartBody(options.body) ? options.body.body + : options.body ? JSON.stringify(options.body, null, 2) + : null; const contentLength = this.calculateContentLength(body); const url = this.buildURL(path!, query); @@ -308,8 +332,8 @@ export abstract class APIClient { } if (this.idempotencyHeader && method !== 'get') { - if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey(); - headers[this.idempotencyHeader] = options.idempotencyKey; + if (!inputOptions.idempotencyKey) inputOptions.idempotencyKey = this.defaultIdempotencyKey(); + headers[this.idempotencyHeader] = inputOptions.idempotencyKey; } const reqHeaders = this.buildHeaders({ options, headers, contentLength, retryCount }); @@ -377,7 +401,7 @@ export abstract class APIClient { /** * Used as a callback for mutating the given `FinalRequestOptions` object. */ - protected async prepareOptions(options: FinalRequestOptions): Promise {} + protected async prepareOptions(options: FinalRequestOptions): Promise { } /** * Used as a callback for mutating the given `RequestInit` object. @@ -388,14 +412,14 @@ export abstract class APIClient { protected async prepareRequest( request: RequestInit, { url, options }: { url: string; options: FinalRequestOptions }, - ): Promise {} + ): Promise { } protected parseHeaders(headers: HeadersInit | null | undefined): Record { return ( !headers ? {} - : Symbol.iterator in headers ? - Object.fromEntries(Array.from(headers as Iterable).map((header) => [...header])) - : { ...headers } + : Symbol.iterator in headers ? + Object.fromEntries(Array.from(headers as Iterable).map((header) => [...header])) + : { ...(headers as any as Record) } ); } @@ -488,7 +512,7 @@ export abstract class APIClient { const url = isAbsoluteURL(path) ? new URL(path) - : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); + : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); const defaultQuery = this.defaultQuery(); if (!isEmptyObj(defaultQuery)) { @@ -627,6 +651,10 @@ export abstract class APIClient { private getUserAgent(): string { return `${this.constructor.name}/JS ${VERSION}`; } + + private getAPIVerson(): string { + return this.apiVersion; + } } export type PageInfo = { url: URL } | { params: Record | null }; @@ -709,9 +737,9 @@ export abstract class AbstractPage implements AsyncIterable { * } */ export class PagePromise< - PageClass extends AbstractPage, - Item = ReturnType[number], - > + PageClass extends AbstractPage, + Item = ReturnType[number], +> extends APIPromise implements AsyncIterable { @@ -1011,7 +1039,7 @@ export const castToError = (err: any): Error => { if (typeof err === 'object' && err !== null) { try { return new Error(JSON.stringify(err)); - } catch {} + } catch { } } return new Error(err); }; diff --git a/src/index.ts b/src/index.ts index 90e280165c..884977fd61 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,6 +34,7 @@ import { Memberships } from './resources/memberships'; import { OriginCACertificates } from './resources/origin-ca-certificates'; import { OriginPostQuantumEncryption } from './resources/origin-post-quantum-encryption'; import { PageRules } from './resources/page-rules'; +import { Pipelines } from './resources/pipelines'; import { RateLimits } from './resources/rate-limits'; import { SecurityTXT } from './resources/security-txt'; import { URLNormalization } from './resources/url-normalization'; @@ -92,6 +93,7 @@ import { ResourceSharing } from './resources/resource-sharing/resource-sharing'; import { Rules } from './resources/rules/rules'; import { Rulesets } from './resources/rulesets/rulesets'; import { RUM } from './resources/rum/rum'; +import { SecretsStore } from './resources/secrets-store/secrets-store'; import { SecurityCenter } from './resources/security-center/security-center'; import { Snippets } from './resources/snippets/snippets'; import { Spectrum } from './resources/spectrum/spectrum'; @@ -139,6 +141,11 @@ export interface ClientOptions { */ baseURL?: string | null | undefined; + /** + * Define the API version to target for the requests, e.g., "2025-01-01" + */ + apiVersion?: string | null; + /** * The maximum amount of time (in milliseconds) that the client should wait for a response * from the server before timing out a single request. @@ -208,6 +215,7 @@ export class Cloudflare extends Core.APIClient { * @param {string | null | undefined} [opts.apiEmail=process.env['CLOUDFLARE_EMAIL'] ?? null] * @param {string | null | undefined} [opts.userServiceKey=process.env['CLOUDFLARE_API_USER_SERVICE_KEY'] ?? null] * @param {string} [opts.baseURL=process.env['CLOUDFLARE_BASE_URL'] ?? https://api.cloudflare.com/client/v4] - Override the default base URL for the API. + * @param {string | null} [opts.apiVersion] - Define the version to target for the API. * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections. * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation. @@ -217,6 +225,7 @@ export class Cloudflare extends Core.APIClient { */ constructor({ baseURL = Core.readEnv('CLOUDFLARE_BASE_URL'), + apiVersion = null, apiToken = Core.readEnv('CLOUDFLARE_API_TOKEN') ?? null, apiKey = Core.readEnv('CLOUDFLARE_API_KEY') ?? null, apiEmail = Core.readEnv('CLOUDFLARE_EMAIL') ?? null, @@ -230,10 +239,12 @@ export class Cloudflare extends Core.APIClient { userServiceKey, ...opts, baseURL: baseURL || `https://api.cloudflare.com/client/v4`, + apiVersion: apiVersion || new Date().toISOString().slice(0, 10), }; super({ baseURL: options.baseURL!, + apiVersion: options.apiVersion!, timeout: options.timeout ?? 60000 /* 1 minute */, httpAgent: options.httpAgent, maxRetries: options.maxRetries, @@ -340,6 +351,8 @@ export class Cloudflare extends Core.APIClient { securityCenter: API.SecurityCenter = new API.SecurityCenter(this); browserRendering: API.BrowserRendering = new API.BrowserRendering(this); customPages: API.CustomPages = new API.CustomPages(this); + secretsStore: API.SecretsStore = new API.SecretsStore(this); + pipelines: API.Pipelines = new API.Pipelines(this); protected override defaultQuery(): Core.DefaultQuery | undefined { return this._options.defaultQuery; @@ -558,6 +571,8 @@ Cloudflare.AI = AI; Cloudflare.SecurityCenter = SecurityCenter; Cloudflare.BrowserRendering = BrowserRendering; Cloudflare.CustomPages = CustomPages; +Cloudflare.SecretsStore = SecretsStore; +Cloudflare.Pipelines = Pipelines; export declare namespace Cloudflare { export type RequestOptions = Core.RequestOptions; @@ -772,6 +787,10 @@ export declare namespace Cloudflare { export { CustomPages as CustomPages }; + export { SecretsStore as SecretsStore }; + + export { Pipelines as Pipelines }; + export type ASN = API.ASN; export type AuditLog = API.AuditLog; export type CertificateCA = API.CertificateCA; diff --git a/src/resources.ts b/src/resources.ts new file mode 100644 index 0000000000..b283d5781d --- /dev/null +++ b/src/resources.ts @@ -0,0 +1 @@ +export * from './resources/index'; diff --git a/src/resources/abuse-reports.ts b/src/resources/abuse-reports.ts index 2ead570f74..4fda744212 100644 --- a/src/resources/abuse-reports.ts +++ b/src/resources/abuse-reports.ts @@ -53,84 +53,71 @@ export declare namespace AbuseReportCreateParams { account_id: string; /** - * Body param: Text not exceeding 100 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - address1: string; - - /** - * Body param: 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/). + * Body param: The abuse report type */ - agent_name: string; + act: + | 'abuse_dmca' + | 'abuse_trademark' + | 'abuse_general' + | 'abuse_phishing' + | 'abuse_children' + | 'abuse_threat' + | 'abuse_registrar_whois' + | 'abuse_ncsei'; /** - * Body param: Can be `0` for false or `1` for true. Must be value: 1 for DMCA - * reports + * Body param: 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/). */ - agree: 0 | 1; + email: string; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: Should match the value provided in `email` */ - city: string; + email2: string; /** * Body param: Text not exceeding 255 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database * (https://lumendatabase.org/). */ - country: string; + name: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: 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/). */ - host_notification: 'send' | 'send-anon' | 'none'; + urls: string; /** - * Body param: Text not exceeding 255 characters. This field may be released by + * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database * (https://lumendatabase.org/). */ - original_work: string; + address1?: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: 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/). */ - owner_notification: 'send' | 'send-anon' | 'none'; + agent_name?: string; /** - * Body param: 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 + * Body param: Can be `0` for false or `1` for true. Must be value: 1 for DMCA + * reports */ - signature: string; + agree?: 0 | 1; /** * Body param: Text not exceeding 255 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database * (https://lumendatabase.org/). */ - state: string; - - /** - * Body param: The abuse report type - */ - act?: - | 'abuse_dmca' - | 'abuse_trademark' - | 'abuse_general' - | 'abuse_phishing' - | 'abuse_children' - | 'abuse_threat' - | 'abuse_registrar_whois' - | 'abuse_ncsei'; + city?: string; /** * Body param: Any additional comments about the infringement not exceeding 2000 @@ -145,6 +132,13 @@ export declare namespace AbuseReportCreateParams { */ company?: string; + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + country?: string; + /** * Body param: 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 @@ -153,16 +147,10 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** * Body param: A detailed description of the infringement, including any necessary @@ -171,13 +159,6 @@ export declare namespace AbuseReportCreateParams { */ justification?: string; - /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - name?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. @@ -190,6 +171,19 @@ export declare namespace AbuseReportCreateParams { */ ncsei_subject_representation?: boolean; + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + original_work?: string; + + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -198,6 +192,23 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + + /** + * Body param: 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 + */ + signature?: string; + /** * Body param: 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 @@ -205,6 +216,13 @@ export declare namespace AbuseReportCreateParams { */ source_ips?: string; + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + state?: string; + /** * Body param: Text not exceeding 20 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -231,14 +249,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsTrademarkReport { @@ -248,51 +258,44 @@ export declare namespace AbuseReportCreateParams { account_id: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters - */ - justification: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: The abuse report type */ - owner_notification: 'send' | 'send-anon' | 'none'; + act: + | 'abuse_dmca' + | 'abuse_trademark' + | 'abuse_general' + | 'abuse_phishing' + | 'abuse_children' + | 'abuse_threat' + | 'abuse_registrar_whois' + | 'abuse_ncsei'; /** - * Body param: Text not exceeding 1000 characters + * Body param: 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_number: string; + email: string; /** - * Body param: Text not exceeding 1000 characters + * Body param: Should match the value provided in `email` */ - trademark_office: string; + email2: string; /** - * Body param: Text not exceeding 1000 characters + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). */ - trademark_symbol: string; + name: string; /** - * Body param: The abuse report type + * Body param: 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/). */ - act?: - | 'abuse_dmca' - | 'abuse_trademark' - | 'abuse_general' - | 'abuse_phishing' - | 'abuse_children' - | 'abuse_threat' - | 'abuse_registrar_whois' - | 'abuse_ncsei'; + urls: string; /** * Body param: Text not exceeding 100 characters. This field may be released by @@ -349,23 +352,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -386,6 +383,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -394,6 +397,16 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + /** * Body param: 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 @@ -428,43 +441,31 @@ export declare namespace AbuseReportCreateParams { title?: string; /** - * Body param: 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/). - */ - urls?: string; - } - - export interface AbuseReportsGeneralReport { - /** - * Path param: The account ID of the submitter. + * Body param: Text not exceeding 1000 characters */ - account_id: string; + trademark_number?: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: Text not exceeding 1000 characters */ - host_notification: 'send' | 'send-anon' | 'none'; + trademark_office?: string; /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters + * Body param: Text not exceeding 1000 characters */ - justification: string; + trademark_symbol?: string; + } + export interface AbuseReportsGeneralReport { /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Path param: The account ID of the submitter. */ - owner_notification: 'send' | 'send-anon' | 'none'; + account_id: string; /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -474,6 +475,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -529,23 +557,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -566,6 +588,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -574,6 +602,16 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + /** * Body param: 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 @@ -621,14 +659,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsPhishingReport { @@ -637,29 +667,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters - */ - justification: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -669,6 +680,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -724,23 +762,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -761,6 +793,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -769,6 +807,16 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + /** * Body param: 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 @@ -816,14 +864,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsChildrenAbuseReport { @@ -833,42 +873,44 @@ export declare namespace AbuseReportCreateParams { account_id: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: The abuse report type */ - host_notification: 'send' | 'send-anon' | 'none'; + act: + | 'abuse_dmca' + | 'abuse_trademark' + | 'abuse_general' + | 'abuse_phishing' + | 'abuse_children' + | 'abuse_threat' + | 'abuse_registrar_whois' + | 'abuse_ncsei'; /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters + * Body param: 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/). */ - justification: string; + email: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: Should match the value provided in `email` */ - ncmec_notification: 'send' | 'send-anon' | 'none'; + email2: string; /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. + * Body param: 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: 'send' | 'send-anon' | 'none'; + name: string; /** - * Body param: The abuse report type - */ - act?: - | 'abuse_dmca' - | 'abuse_trademark' - | 'abuse_general' - | 'abuse_phishing' - | 'abuse_children' - | 'abuse_threat' - | 'abuse_registrar_whois' - | 'abuse_ncsei'; + * Body param: 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/). + */ + urls: string; /** * Body param: Text not exceeding 100 characters. This field may be released by @@ -925,23 +967,23 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Should match the value provided in `email` + * Body param: A detailed description of the infringement, including any necessary + * access details and the exact steps needed to view the content, not exceeding + * 5000 characters */ - email2?: string; + justification?: string; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - name?: string; + ncmec_notification?: 'send' | 'send-anon' | 'none'; /** * Body param: If the submitter is the target of NCSEI in the URLs of the abuse @@ -956,6 +998,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -964,6 +1012,16 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + /** * Body param: 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 @@ -1011,14 +1069,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsThreatReport { @@ -1027,29 +1077,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: A detailed description of the infringement, including any necessary - * access details and the exact steps needed to view the content, not exceeding - * 5000 characters - */ - justification: string; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -1059,6 +1090,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1114,23 +1172,17 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). + * Body param: 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?: string; + justification?: string; /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) @@ -1151,6 +1203,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -1159,6 +1217,16 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + /** * Body param: 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 @@ -1206,14 +1274,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsRegistrarWhoisReport { @@ -1222,16 +1282,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -1241,6 +1295,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1295,18 +1376,6 @@ export declare namespace AbuseReportCreateParams { */ destination_ips?: string; - /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` - */ - email2?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. @@ -1320,13 +1389,6 @@ export declare namespace AbuseReportCreateParams { */ justification?: string; - /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - name?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. @@ -1346,6 +1408,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -1354,6 +1422,16 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + /** * Body param: 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 @@ -1401,14 +1479,6 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } export interface AbuseReportsNcseiReport { @@ -1417,28 +1487,10 @@ export declare namespace AbuseReportCreateParams { */ account_id: string; - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - host_notification: 'send' | 'send-anon' | 'none'; - - /** - * Body param: If the submitter is the target of NCSEI in the URLs of the abuse - * report. - */ - ncsei_subject_representation: boolean; - - /** - * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) - * and Trademark reports cannot be anonymous. - */ - owner_notification: 'send' | 'send-anon' | 'none'; - /** * Body param: The abuse report type */ - act?: + act: | 'abuse_dmca' | 'abuse_trademark' | 'abuse_general' @@ -1448,6 +1500,33 @@ export declare namespace AbuseReportCreateParams { | 'abuse_registrar_whois' | 'abuse_ncsei'; + /** + * Body param: 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/). + */ + email: string; + + /** + * Body param: Should match the value provided in `email` + */ + email2: string; + + /** + * Body param: Text not exceeding 255 characters. This field may be released by + * Cloudflare to third parties such as the Lumen Database + * (https://lumendatabase.org/). + */ + name: string; + + /** + * Body param: 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/). + */ + urls: string; + /** * Body param: Text not exceeding 100 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1503,16 +1582,10 @@ export declare namespace AbuseReportCreateParams { destination_ips?: string; /** - * Body param: 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/). - */ - email?: string; - - /** - * Body param: Should match the value provided in `email` + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. */ - email2?: string; + host_notification?: 'send' | 'send-anon' | 'none'; /** * Body param: A detailed description of the infringement, including any necessary @@ -1521,19 +1594,18 @@ export declare namespace AbuseReportCreateParams { */ justification?: string; - /** - * Body param: Text not exceeding 255 characters. This field may be released by - * Cloudflare to third parties such as the Lumen Database - * (https://lumendatabase.org/). - */ - name?: string; - /** * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) * and Trademark reports cannot be anonymous. */ ncmec_notification?: 'send' | 'send-anon' | 'none'; + /** + * Body param: If the submitter is the target of NCSEI in the URLs of the abuse + * report. + */ + ncsei_subject_representation?: boolean; + /** * Body param: Text not exceeding 255 characters. This field may be released by * Cloudflare to third parties such as the Lumen Database @@ -1541,6 +1613,12 @@ export declare namespace AbuseReportCreateParams { */ original_work?: string; + /** + * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) + * and Trademark reports cannot be anonymous. + */ + owner_notification?: 'send' | 'send-anon' | 'none'; + /** * Body param: 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 @@ -1549,6 +1627,16 @@ export declare namespace AbuseReportCreateParams { */ ports_protocols?: string; + /** + * Body param: Text containing 2 characters + */ + reported_country?: string; + + /** + * Body param: Text not exceeding 255 characters + */ + reported_user_agent?: string; + /** * Body param: 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 @@ -1596,13 +1684,12 @@ export declare namespace AbuseReportCreateParams { * Body param: Text not exceeding 1000 characters */ trademark_symbol?: string; - - /** - * Body param: 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/). - */ - urls?: string; } } + +export declare namespace AbuseReports { + export { + type AbuseReportCreateResponse as AbuseReportCreateResponse, + type AbuseReportCreateParams as AbuseReportCreateParams, + }; +} diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts index 2789317b3d..c67244b220 100644 --- a/src/resources/accounts/accounts.ts +++ b/src/resources/accounts/accounts.ts @@ -314,6 +314,7 @@ export interface AccountGetParams { account_id: string; } +Accounts.AccountsV4PagePaginationArray = AccountsV4PagePaginationArray; Accounts.Members = Members; Accounts.Roles = Roles; Accounts.Subscriptions = Subscriptions; @@ -321,6 +322,17 @@ Accounts.Tokens = Tokens; Accounts.Logs = Logs; export declare namespace Accounts { + export { + type Account as Account, + type AccountDeleteResponse as AccountDeleteResponse, + AccountsV4PagePaginationArray as AccountsV4PagePaginationArray, + type AccountCreateParams as AccountCreateParams, + type AccountUpdateParams as AccountUpdateParams, + type AccountListParams as AccountListParams, + type AccountDeleteParams as AccountDeleteParams, + type AccountGetParams as AccountGetParams, + }; + export { Members as Members, type Status as Status, diff --git a/src/resources/accounts/logs/audit.ts b/src/resources/accounts/logs/audit.ts index b396a10369..a401c9a6d6 100644 --- a/src/resources/accounts/logs/audit.ts +++ b/src/resources/accounts/logs/audit.ts @@ -140,7 +140,7 @@ export namespace AuditListResponse { /** * The type of actor. */ - type?: 'user' | 'account' | 'cloudflare-admin'; + type?: 'account' | 'cloudflare_admin' | 'system' | 'user'; } /** diff --git a/src/resources/acm/total-tls.ts b/src/resources/acm/total-tls.ts index 07d170f690..9dd8dc2b5a 100644 --- a/src/resources/acm/total-tls.ts +++ b/src/resources/acm/total-tls.ts @@ -80,7 +80,7 @@ export interface TotalTLSGetResponse { export interface TotalTLSCreateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -99,7 +99,7 @@ export interface TotalTLSCreateParams { export interface TotalTLSGetParams { /** - * Identifier + * Identifier. */ zone_id: string; } diff --git a/src/resources/addressing/prefixes/service-bindings.ts b/src/resources/addressing/prefixes/service-bindings.ts index 763fe5c7ff..74a046d4e9 100644 --- a/src/resources/addressing/prefixes/service-bindings.ts +++ b/src/resources/addressing/prefixes/service-bindings.ts @@ -9,8 +9,9 @@ export class ServiceBindings extends APIResource { /** * 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. */ create( prefixId: string, diff --git a/src/resources/addressing/regional-hostnames/regional-hostnames.ts b/src/resources/addressing/regional-hostnames/regional-hostnames.ts index 3c3b0c2162..20fd8c2ac0 100644 --- a/src/resources/addressing/regional-hostnames/regional-hostnames.ts +++ b/src/resources/addressing/regional-hostnames/regional-hostnames.ts @@ -2,7 +2,6 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; -import * as Shared from '../../shared'; import * as RegionsAPI from './regions'; import { RegionListParams, RegionListResponse, RegionListResponsesSinglePage, Regions } from './regions'; import { SinglePage } from '../../../pagination'; @@ -110,6 +109,11 @@ export interface RegionalHostnameCreateResponse { * Identifying key for the region */ region_key: string; + + /** + * Configure which routing method to use for the regional hostname + */ + routing?: string; } export interface RegionalHostnameListResponse { @@ -128,19 +132,58 @@ export interface RegionalHostnameListResponse { * Identifying key for the region */ region_key: string; + + /** + * Configure which routing method to use for the regional hostname + */ + routing?: string; } export interface RegionalHostnameDeleteResponse { - errors: Array; + errors: Array; - messages: Array; + messages: Array; /** - * Whether the API call was successful + * Whether the API call was successful. */ success: true; } +export namespace RegionalHostnameDeleteResponse { + export interface Error { + code: number; + + message: string; + + documentation_url?: string; + + source?: Error.Source; + } + + export namespace Error { + export interface Source { + pointer?: string; + } + } + + export interface Message { + code: number; + + message: string; + + documentation_url?: string; + + source?: Message.Source; + } + + export namespace Message { + export interface Source { + pointer?: string; + } + } +} + export interface RegionalHostnameEditResponse { /** * When the regional hostname was created @@ -157,6 +200,11 @@ export interface RegionalHostnameEditResponse { * Identifying key for the region */ region_key: string; + + /** + * Configure which routing method to use for the regional hostname + */ + routing?: string; } export interface RegionalHostnameGetResponse { @@ -175,11 +223,16 @@ export interface RegionalHostnameGetResponse { * Identifying key for the region */ region_key: string; + + /** + * Configure which routing method to use for the regional hostname + */ + routing?: string; } export interface RegionalHostnameCreateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -193,25 +246,30 @@ export interface RegionalHostnameCreateParams { * Body param: Identifying key for the region */ region_key: string; + + /** + * Body param: Configure which routing method to use for the regional hostname + */ + routing?: string; } export interface RegionalHostnameListParams { /** - * Identifier + * Identifier. */ zone_id: string; } export interface RegionalHostnameDeleteParams { /** - * Identifier + * Identifier. */ zone_id: string; } export interface RegionalHostnameEditParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -223,7 +281,7 @@ export interface RegionalHostnameEditParams { export interface RegionalHostnameGetParams { /** - * Identifier + * Identifier. */ zone_id: string; } diff --git a/src/resources/addressing/regional-hostnames/regions.ts b/src/resources/addressing/regional-hostnames/regions.ts index db005d7338..b0fb278d15 100644 --- a/src/resources/addressing/regional-hostnames/regions.ts +++ b/src/resources/addressing/regional-hostnames/regions.ts @@ -37,7 +37,7 @@ export interface RegionListResponse { export interface RegionListParams { /** - * Identifier + * Identifier. */ account_id: string; } diff --git a/src/resources/ai-gateway/ai-gateway.ts b/src/resources/ai-gateway/ai-gateway.ts index 86aad037e5..162d373654 100644 --- a/src/resources/ai-gateway/ai-gateway.ts +++ b/src/resources/ai-gateway/ai-gateway.ts @@ -492,6 +492,7 @@ export interface AIGatewayGetParams { account_id: string; } +AIGateway.AIGatewayListResponsesV4PagePaginationArray = AIGatewayListResponsesV4PagePaginationArray; AIGateway.EvaluationTypes = EvaluationTypes; AIGateway.EvaluationTypeListResponsesV4PagePaginationArray = EvaluationTypeListResponsesV4PagePaginationArray; AIGateway.Logs = Logs; @@ -503,6 +504,20 @@ AIGateway.EvaluationListResponsesV4PagePaginationArray = EvaluationListResponses AIGateway.URLs = URLs; export declare namespace AIGateway { + export { + type AIGatewayCreateResponse as AIGatewayCreateResponse, + type AIGatewayUpdateResponse as AIGatewayUpdateResponse, + type AIGatewayListResponse as AIGatewayListResponse, + type AIGatewayDeleteResponse as AIGatewayDeleteResponse, + type AIGatewayGetResponse as AIGatewayGetResponse, + AIGatewayListResponsesV4PagePaginationArray as AIGatewayListResponsesV4PagePaginationArray, + type AIGatewayCreateParams as AIGatewayCreateParams, + type AIGatewayUpdateParams as AIGatewayUpdateParams, + type AIGatewayListParams as AIGatewayListParams, + type AIGatewayDeleteParams as AIGatewayDeleteParams, + type AIGatewayGetParams as AIGatewayGetParams, + }; + export { EvaluationTypes as EvaluationTypes, type EvaluationTypeListResponse as EvaluationTypeListResponse, diff --git a/src/resources/ai/ai.ts b/src/resources/ai/ai.ts index 22abfb0a7d..e78906193f 100644 --- a/src/resources/ai/ai.ts +++ b/src/resources/ai/ai.ts @@ -64,7 +64,8 @@ export type AIRunResponse = | AIRunResponse.UnionMember7 | AIRunResponse.Translation | AIRunResponse.Summarization - | AIRunResponse.ImageToText; + | AIRunResponse.ImageToText + | AIRunResponse.ImageTextToText; export namespace AIRunResponse { export interface TextClassification { @@ -186,7 +187,7 @@ export namespace AIRunResponse { /** * The generated text response from the model */ - response?: string; + response: string; /** * An array of tool calls requests made during the response generation @@ -250,6 +251,10 @@ export namespace AIRunResponse { export interface ImageToText { description?: string; } + + export interface ImageTextToText { + description?: string; + } } export type AIRunParams = @@ -264,7 +269,9 @@ export type AIRunParams = | AIRunParams.Messages | AIRunParams.Translation | AIRunParams.Summarization - | AIRunParams.ImageToText; + | AIRunParams.ImageToText + | AIRunParams.Variant12 + | AIRunParams.Variant13; export declare namespace AIRunParams { export interface TextClassification { @@ -355,7 +362,7 @@ export declare namespace AIRunParams { account_id: string; /** - * Body param: A text description of the image you want to generate + * Body param: A text description of the audio you want to generate */ prompt: string; @@ -549,6 +556,12 @@ export declare namespace AIRunParams { */ presence_penalty?: number; + /** + * Body param: If true, a chat template is not applied and you must adhere to the + * specific model's expected formatting. + */ + raw?: boolean; + /** * Body param: Penalty for repeated tokens; higher values discourage repetition. */ @@ -565,7 +578,8 @@ export declare namespace AIRunParams { seed?: number; /** - * Body param: If true, the response will be streamed back incrementally. + * Body param: If true, the response will be streamed back incrementally using SSE, + * Server Sent Events. */ stream?: boolean; @@ -588,7 +602,7 @@ export declare namespace AIRunParams { top_k?: number; /** - * Body param: Controls the creativity of the AI's responses by adjusting how many + * Body param: 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. */ @@ -854,6 +868,158 @@ export declare namespace AIRunParams { */ top_p?: number; } + + export interface Variant12 { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: Image in base64 encoded format. + */ + image: string; + + /** + * Body param: The input text prompt for the model to generate a response. + */ + prompt: string; + + /** + * Body param: Decreases the likelihood of the model repeating the same lines + * verbatim. + */ + frequency_penalty?: number; + + /** + * Body param: Whether to ignore the EOS token and continue generating tokens after + * the EOS token is generated. + */ + ignore_eos?: boolean; + + /** + * Body param: The maximum number of tokens to generate in the response. + */ + max_tokens?: number; + + /** + * Body param: Increases the likelihood of the model introducing new topics. + */ + presence_penalty?: number; + + /** + * Body param: Penalty for repeated tokens; higher values discourage repetition. + */ + repetition_penalty?: number; + + /** + * Body param: Random seed for reproducibility of the generation. + */ + seed?: number; + + /** + * Body param: Controls the randomness of the output; higher values produce more + * random results. + */ + temperature?: number; + + /** + * Body param: 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_k?: number; + + /** + * Body param: 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. + */ + top_p?: number; + } + + export interface Variant13 { + /** + * Path param: + */ + account_id: string; + + /** + * Body param: Image in base64 encoded format. + */ + image: string; + + /** + * Body param: An array of message objects representing the conversation history. + */ + messages: Array; + + /** + * Body param: Decreases the likelihood of the model repeating the same lines + * verbatim. + */ + frequency_penalty?: number; + + /** + * Body param: Whether to ignore the EOS token and continue generating tokens after + * the EOS token is generated. + */ + ignore_eos?: boolean; + + /** + * Body param: The maximum number of tokens to generate in the response. + */ + max_tokens?: number; + + /** + * Body param: Increases the likelihood of the model introducing new topics. + */ + presence_penalty?: number; + + /** + * Body param: Penalty for repeated tokens; higher values discourage repetition. + */ + repetition_penalty?: number; + + /** + * Body param: Random seed for reproducibility of the generation. + */ + seed?: number; + + /** + * Body param: Controls the randomness of the output; higher values produce more + * random results. + */ + temperature?: number; + + /** + * Body param: 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_k?: number; + + /** + * Body param: 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. + */ + top_p?: number; + } + + export namespace Variant13 { + export interface Message { + /** + * The content of the message as a string. + */ + content: string; + + /** + * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). + */ + role: string; + } + } } AI.Finetunes = Finetunes; @@ -865,6 +1031,8 @@ AI.Models = Models; AI.ModelListResponsesV4PagePaginationArray = ModelListResponsesV4PagePaginationArray; export declare namespace AI { + export { type AIRunResponse as AIRunResponse, type AIRunParams as AIRunParams }; + export { Finetunes as Finetunes, type FinetuneCreateResponse as FinetuneCreateResponse, diff --git a/src/resources/alerting/policies.ts b/src/resources/alerting/policies.ts index f177815c6c..e209fcaad1 100644 --- a/src/resources/alerting/policies.ts +++ b/src/resources/alerting/policies.ts @@ -134,9 +134,19 @@ export namespace MechanismParam { id?: string; } - export interface Pagerduty {} + export interface Pagerduty { + /** + * UUID + */ + id?: string; + } - export interface Webhook {} + export interface Webhook { + /** + * UUID + */ + id?: string; + } } export interface Policy { diff --git a/src/resources/api-gateway/configurations.ts b/src/resources/api-gateway/configurations.ts index 5d7bffa1d2..c415b3e60b 100644 --- a/src/resources/api-gateway/configurations.ts +++ b/src/resources/api-gateway/configurations.ts @@ -80,14 +80,14 @@ export interface ConfigurationUpdateResponse { messages: UserSchemasAPI.Message; /** - * Whether the API call was successful + * Whether the API call was successful. */ success: true; } export interface ConfigurationUpdateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -140,7 +140,7 @@ export namespace ConfigurationUpdateParams { export interface ConfigurationGetParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; diff --git a/src/resources/api-gateway/discovery/discovery.ts b/src/resources/api-gateway/discovery/discovery.ts index e0ec7b04b4..9c8ee74f44 100644 --- a/src/resources/api-gateway/discovery/discovery.ts +++ b/src/resources/api-gateway/discovery/discovery.ts @@ -34,7 +34,7 @@ export class DiscoveryOperationsV4PagePaginationArray extends V4PagePaginationAr export interface DiscoveryOperation { /** - * UUID + * UUID. */ id: string; @@ -61,7 +61,7 @@ export interface DiscoveryOperation { /** * API discovery engine(s) that discovered this operation */ - origin: Array<'ML' | 'SessionIdentifier'>; + origin: Array<'ML' | 'SessionIdentifier' | 'LabelDiscovery'>; /** * State of operation in API Discovery @@ -105,7 +105,7 @@ export interface DiscoveryGetResponse { export interface DiscoveryGetParams { /** - * Identifier + * Identifier. */ zone_id: string; } diff --git a/src/resources/api-gateway/discovery/operations.ts b/src/resources/api-gateway/discovery/operations.ts index bc92f8b5fe..715b258e6c 100644 --- a/src/resources/api-gateway/discovery/operations.ts +++ b/src/resources/api-gateway/discovery/operations.ts @@ -86,7 +86,7 @@ export interface OperationEditResponse { export interface OperationListParams extends V4PagePaginationArrayParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -129,7 +129,7 @@ export interface OperationListParams extends V4PagePaginationArrayParams { * - `SessionIdentifier` - Discovered operations that were sourced using Session * Identifier API Discovery */ - origin?: 'ML' | 'SessionIdentifier'; + origin?: 'ML' | 'SessionIdentifier' | 'LabelDiscovery'; /** * Query param: Filter results to only include discovery results in a particular @@ -146,7 +146,7 @@ export interface OperationListParams extends V4PagePaginationArrayParams { export interface OperationBulkEditParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -173,7 +173,7 @@ export namespace OperationBulkEditParams { export interface OperationEditParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; diff --git a/src/resources/api-gateway/expression-template/fallthrough.ts b/src/resources/api-gateway/expression-template/fallthrough.ts index fde934fa74..d6b4250763 100644 --- a/src/resources/api-gateway/expression-template/fallthrough.ts +++ b/src/resources/api-gateway/expression-template/fallthrough.ts @@ -35,7 +35,7 @@ export interface FallthroughCreateResponse { export interface FallthroughCreateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; diff --git a/src/resources/api-gateway/operations/operations.ts b/src/resources/api-gateway/operations/operations.ts index 88c6bb0ed3..80056f1ff0 100644 --- a/src/resources/api-gateway/operations/operations.ts +++ b/src/resources/api-gateway/operations/operations.ts @@ -141,7 +141,7 @@ export interface APIShield { method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** - * UUID + * UUID. */ operation_id: string; } @@ -168,7 +168,7 @@ export interface OperationCreateResponse { method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** - * UUID + * UUID. */ operation_id: string; @@ -402,7 +402,7 @@ export namespace OperationCreateResponse { */ export interface ActiveSchema { /** - * UUID + * UUID. */ id?: string; @@ -444,7 +444,7 @@ export interface OperationListResponse { method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** - * UUID + * UUID. */ operation_id: string; @@ -678,7 +678,7 @@ export namespace OperationListResponse { */ export interface ActiveSchema { /** - * UUID + * UUID. */ id?: string; @@ -704,7 +704,7 @@ export interface OperationDeleteResponse { messages: UserSchemasAPI.Message; /** - * Whether the API call was successful + * Whether the API call was successful. */ success: true; } @@ -731,7 +731,7 @@ export interface OperationBulkCreateResponse { method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** - * UUID + * UUID. */ operation_id: string; @@ -965,7 +965,7 @@ export namespace OperationBulkCreateResponse { */ export interface ActiveSchema { /** - * UUID + * UUID. */ id?: string; @@ -991,7 +991,7 @@ export interface OperationBulkDeleteResponse { messages: UserSchemasAPI.Message; /** - * Whether the API call was successful + * Whether the API call was successful. */ success: true; } @@ -1018,7 +1018,7 @@ export interface OperationGetResponse { method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** - * UUID + * UUID. */ operation_id: string; @@ -1252,7 +1252,7 @@ export namespace OperationGetResponse { */ export interface ActiveSchema { /** - * UUID + * UUID. */ id?: string; @@ -1274,7 +1274,7 @@ export namespace OperationGetResponse { export interface OperationCreateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -1300,7 +1300,7 @@ export interface OperationCreateParams { export interface OperationListParams extends V4PagePaginationArrayParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -1340,14 +1340,14 @@ export interface OperationListParams extends V4PagePaginationArrayParams { export interface OperationDeleteParams { /** - * Identifier + * Identifier. */ zone_id: string; } export interface OperationBulkCreateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -1381,14 +1381,14 @@ export namespace OperationBulkCreateParams { export interface OperationBulkDeleteParams { /** - * Identifier + * Identifier. */ zone_id: string; } export interface OperationGetParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; diff --git a/src/resources/api-gateway/operations/schema-validation.ts b/src/resources/api-gateway/operations/schema-validation.ts index 294137164f..54647194ba 100644 --- a/src/resources/api-gateway/operations/schema-validation.ts +++ b/src/resources/api-gateway/operations/schema-validation.ts @@ -123,7 +123,7 @@ export interface SchemaValidationGetResponse { export interface SchemaValidationUpdateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -142,7 +142,7 @@ export interface SchemaValidationUpdateParams { export interface SchemaValidationEditParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -154,7 +154,7 @@ export interface SchemaValidationEditParams { export interface SchemaValidationGetParams { /** - * Identifier + * Identifier. */ zone_id: string; } diff --git a/src/resources/api-gateway/schemas.ts b/src/resources/api-gateway/schemas.ts index 78078da8d1..976a1e4e87 100644 --- a/src/resources/api-gateway/schemas.ts +++ b/src/resources/api-gateway/schemas.ts @@ -25,7 +25,7 @@ export interface SchemaListResponse { export interface SchemaListParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; diff --git a/src/resources/api-gateway/settings/schema-validation.ts b/src/resources/api-gateway/settings/schema-validation.ts index ede2c08181..9adac2b3f4 100644 --- a/src/resources/api-gateway/settings/schema-validation.ts +++ b/src/resources/api-gateway/settings/schema-validation.ts @@ -44,7 +44,7 @@ export class SchemaValidation extends APIResource { export interface SchemaValidationUpdateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -76,7 +76,7 @@ export interface SchemaValidationUpdateParams { export interface SchemaValidationEditParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -109,7 +109,7 @@ export interface SchemaValidationEditParams { export interface SchemaValidationGetParams { /** - * Identifier + * Identifier. */ zone_id: string; } diff --git a/src/resources/api-gateway/user-schemas/hosts.ts b/src/resources/api-gateway/user-schemas/hosts.ts index 01d02af1ef..9608a317c1 100644 --- a/src/resources/api-gateway/user-schemas/hosts.ts +++ b/src/resources/api-gateway/user-schemas/hosts.ts @@ -37,14 +37,14 @@ export interface HostListResponse { name: string; /** - * UUID + * UUID. */ schema_id: string; } export interface HostListParams extends V4PagePaginationArrayParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; } diff --git a/src/resources/api-gateway/user-schemas/operations.ts b/src/resources/api-gateway/user-schemas/operations.ts index 7f6ddd5f8e..14d921d9ad 100644 --- a/src/resources/api-gateway/user-schemas/operations.ts +++ b/src/resources/api-gateway/user-schemas/operations.ts @@ -52,7 +52,7 @@ export namespace OperationListResponse { method: 'GET' | 'POST' | 'HEAD' | 'OPTIONS' | 'PUT' | 'DELETE' | 'CONNECT' | 'PATCH' | 'TRACE'; /** - * UUID + * UUID. */ operation_id: string; @@ -286,7 +286,7 @@ export namespace OperationListResponse { */ export interface ActiveSchema { /** - * UUID + * UUID. */ id?: string; @@ -329,7 +329,7 @@ export namespace OperationListResponse { export interface OperationListParams extends V4PagePaginationArrayParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; diff --git a/src/resources/api-gateway/user-schemas/user-schemas.ts b/src/resources/api-gateway/user-schemas/user-schemas.ts index efec1bd24d..510499b7d2 100644 --- a/src/resources/api-gateway/user-schemas/user-schemas.ts +++ b/src/resources/api-gateway/user-schemas/user-schemas.ts @@ -2,7 +2,6 @@ import { APIResource } from '../../../resource'; import * as Core from '../../../core'; -import * as Shared from '../../shared'; import * as HostsAPI from './hosts'; import { HostListParams, HostListResponse, HostListResponsesV4PagePaginationArray, Hosts } from './hosts'; import * as OperationsAPI from './operations'; @@ -95,7 +94,25 @@ export class UserSchemas extends APIResource { export class PublicSchemasV4PagePaginationArray extends V4PagePaginationArray {} -export type Message = Array; +export type Message = Array; + +export namespace Message { + export interface MessageItem { + code: number; + + message: string; + + documentation_url?: string; + + source?: MessageItem.Source; + } + + export namespace MessageItem { + export interface Source { + pointer?: string; + } + } +} export interface PublicSchema { created_at: string; @@ -111,7 +128,7 @@ export interface PublicSchema { name: string; /** - * UUID + * UUID. */ schema_id: string; @@ -169,14 +186,14 @@ export interface UserSchemaDeleteResponse { messages: Message; /** - * Whether the API call was successful + * Whether the API call was successful. */ success: true; } export interface UserSchemaCreateParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -203,7 +220,7 @@ export interface UserSchemaCreateParams { export interface UserSchemaListParams extends V4PagePaginationArrayParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -220,14 +237,14 @@ export interface UserSchemaListParams extends V4PagePaginationArrayParams { export interface UserSchemaDeleteParams { /** - * Identifier + * Identifier. */ zone_id: string; } export interface UserSchemaEditParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; @@ -239,7 +256,7 @@ export interface UserSchemaEditParams { export interface UserSchemaGetParams { /** - * Path param: Identifier + * Path param: Identifier. */ zone_id: string; diff --git a/src/resources/audit-logs.ts b/src/resources/audit-logs.ts index 51701db2d8..bb07e279be 100644 --- a/src/resources/audit-logs.ts +++ b/src/resources/audit-logs.ts @@ -106,4 +106,8 @@ export namespace AuditLogListParams { } } +export declare namespace AuditLogs { + export { type AuditLogListParams as AuditLogListParams }; +} + export { AuditLogsV4PagePaginationArray }; diff --git a/src/resources/bot-management.ts b/src/resources/bot-management.ts index 7a6976dd47..66153927d7 100644 --- a/src/resources/bot-management.ts +++ b/src/resources/bot-management.ts @@ -101,6 +101,11 @@ export interface BotFightModeConfiguration { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -171,6 +176,11 @@ export interface BotFightModeConfigurationParam { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -196,6 +206,11 @@ export interface SubscriptionConfiguration { */ auto_update_model?: boolean; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -274,6 +289,11 @@ export interface SubscriptionConfigurationParam { */ auto_update_model?: boolean; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -293,6 +313,11 @@ export interface SuperBotFightModeDefinitelyConfiguration { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -359,6 +384,11 @@ export interface SuperBotFightModeDefinitelyConfigurationParam { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -394,6 +424,11 @@ export interface SuperBotFightModeLikelyConfiguration { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -459,6 +494,11 @@ export interface SuperBotFightModeLikelyConfigurationParam { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Use lightweight, invisible JavaScript detections to improve Bot Management. * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). @@ -523,6 +563,11 @@ export declare namespace BotManagementUpdateParams { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Body param: Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Body param: Use lightweight, invisible JavaScript detections to improve Bot * Management. @@ -547,6 +592,11 @@ export declare namespace BotManagementUpdateParams { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Body param: Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Body param: Use lightweight, invisible JavaScript detections to improve Bot * Management. @@ -590,6 +640,11 @@ export declare namespace BotManagementUpdateParams { */ ai_bots_protection?: 'block' | 'disabled'; + /** + * Body param: Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Body param: Use lightweight, invisible JavaScript detections to improve Bot * Management. @@ -646,6 +701,11 @@ export declare namespace BotManagementUpdateParams { */ auto_update_model?: boolean; + /** + * Body param: Enable rule to punish AI Scrapers and Crawlers via a link maze. + */ + crawler_protection?: 'enabled' | 'disabled'; + /** * Body param: Use lightweight, invisible JavaScript detections to improve Bot * Management. @@ -667,3 +727,16 @@ export interface BotManagementGetParams { */ zone_id: string; } + +export declare namespace BotManagement { + export { + type BotFightModeConfiguration as BotFightModeConfiguration, + type SubscriptionConfiguration as SubscriptionConfiguration, + type SuperBotFightModeDefinitelyConfiguration as SuperBotFightModeDefinitelyConfiguration, + type SuperBotFightModeLikelyConfiguration as SuperBotFightModeLikelyConfiguration, + type BotManagementUpdateResponse as BotManagementUpdateResponse, + type BotManagementGetResponse as BotManagementGetResponse, + type BotManagementUpdateParams as BotManagementUpdateParams, + type BotManagementGetParams as BotManagementGetParams, + }; +} diff --git a/src/resources/botnet-feed/asn.ts b/src/resources/botnet-feed/asn.ts index a34bca3c98..d15791e65e 100755 --- a/src/resources/botnet-feed/asn.ts +++ b/src/resources/botnet-feed/asn.ts @@ -60,7 +60,7 @@ export interface ASNFullReportResponse { export interface ASNDayReportParams { /** - * Path param: Identifier + * Path param: Identifier. */ account_id: string; @@ -72,7 +72,7 @@ export interface ASNDayReportParams { export interface ASNFullReportParams { /** - * Identifier + * Identifier. */ account_id: string; } diff --git a/src/resources/botnet-feed/configs/asn.ts b/src/resources/botnet-feed/configs/asn.ts index 9b1d42013d..6808129973 100755 --- a/src/resources/botnet-feed/configs/asn.ts +++ b/src/resources/botnet-feed/configs/asn.ts @@ -44,14 +44,14 @@ export interface ASNGetResponse { export interface ASNDeleteParams { /** - * Identifier + * Identifier. */ account_id: string; } export interface ASNGetParams { /** - * Identifier + * Identifier. */ account_id: string; } diff --git a/src/resources/brand-protection.ts b/src/resources/brand-protection.ts index c636eabe86..f17e5b194e 100644 --- a/src/resources/brand-protection.ts +++ b/src/resources/brand-protection.ts @@ -221,3 +221,15 @@ export interface BrandProtectionURLInfoParams { */ url_id?: Array; } + +export declare namespace BrandProtection { + export { + type Info as Info, + type RuleMatch as RuleMatch, + type ScanStatus as ScanStatus, + type Submit as Submit, + type URLInfoModelResults as URLInfoModelResults, + type BrandProtectionSubmitParams as BrandProtectionSubmitParams, + type BrandProtectionURLInfoParams as BrandProtectionURLInfoParams, + }; +} diff --git a/src/resources/browser-rendering/browser-rendering.ts b/src/resources/browser-rendering/browser-rendering.ts index fceb64045a..4bc9dab9bd 100644 --- a/src/resources/browser-rendering/browser-rendering.ts +++ b/src/resources/browser-rendering/browser-rendering.ts @@ -3,6 +3,12 @@ import { APIResource } from '../../resource'; import * as ContentAPI from './content'; import { Content, ContentCreateParams, ContentCreateResponse } from './content'; +import * as JsonAPI from './json'; +import { Json, JsonCreateParams, JsonCreateResponse } from './json'; +import * as LinksAPI from './links'; +import { LinkCreateParams, LinkCreateResponse, Links } from './links'; +import * as MarkdownAPI from './markdown'; +import { Markdown, MarkdownCreateParams, MarkdownCreateResponse } from './markdown'; import * as PDFAPI from './pdf'; import { PDF, PDFCreateParams } from './pdf'; import * as ScrapeAPI from './scrape'; @@ -18,6 +24,9 @@ export class BrowserRendering extends APIResource { scrape: ScrapeAPI.Scrape = new ScrapeAPI.Scrape(this._client); screenshot: ScreenshotAPI.Screenshot = new ScreenshotAPI.Screenshot(this._client); snapshot: SnapshotAPI.Snapshot = new SnapshotAPI.Snapshot(this._client); + json: JsonAPI.Json = new JsonAPI.Json(this._client); + links: LinksAPI.Links = new LinksAPI.Links(this._client); + markdown: MarkdownAPI.Markdown = new MarkdownAPI.Markdown(this._client); } BrowserRendering.Content = Content; @@ -25,6 +34,9 @@ BrowserRendering.PDF = PDF; BrowserRendering.Scrape = Scrape; BrowserRendering.Screenshot = Screenshot; BrowserRendering.Snapshot = Snapshot; +BrowserRendering.Json = Json; +BrowserRendering.Links = Links; +BrowserRendering.Markdown = Markdown; export declare namespace BrowserRendering { export { @@ -52,4 +64,22 @@ export declare namespace BrowserRendering { type SnapshotCreateResponse as SnapshotCreateResponse, type SnapshotCreateParams as SnapshotCreateParams, }; + + export { + Json as Json, + type JsonCreateResponse as JsonCreateResponse, + type JsonCreateParams as JsonCreateParams, + }; + + export { + Links as Links, + type LinkCreateResponse as LinkCreateResponse, + type LinkCreateParams as LinkCreateParams, + }; + + export { + Markdown as Markdown, + type MarkdownCreateResponse as MarkdownCreateResponse, + type MarkdownCreateParams as MarkdownCreateParams, + }; } diff --git a/src/resources/browser-rendering/index.ts b/src/resources/browser-rendering/index.ts index 3ff6884cfa..1602f26449 100644 --- a/src/resources/browser-rendering/index.ts +++ b/src/resources/browser-rendering/index.ts @@ -2,6 +2,9 @@ export { BrowserRendering } from './browser-rendering'; export { Content, type ContentCreateResponse, type ContentCreateParams } from './content'; +export { Json, type JsonCreateResponse, type JsonCreateParams } from './json'; +export { Links, type LinkCreateResponse, type LinkCreateParams } from './links'; +export { Markdown, type MarkdownCreateResponse, type MarkdownCreateParams } from './markdown'; export { PDF, type PDFCreateParams } from './pdf'; export { Scrape, type ScrapeCreateResponse, type ScrapeCreateParams } from './scrape'; export { Screenshot, type ScreenshotCreateResponse, type ScreenshotCreateParams } from './screenshot'; diff --git a/src/resources/browser-rendering/json.ts b/src/resources/browser-rendering/json.ts new file mode 100644 index 0000000000..e25cc79245 --- /dev/null +++ b/src/resources/browser-rendering/json.ts @@ -0,0 +1,305 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; + +export class Json extends APIResource { + /** + * 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. + */ + create(params: JsonCreateParams, options?: Core.RequestOptions): Core.APIPromise { + const { account_id, cacheTTL, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/browser-rendering/json`, { + query: { cacheTTL }, + body, + ...options, + }) as Core.APIPromise<{ result: JsonCreateResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export type JsonCreateResponse = Record; + +export interface JsonCreateParams { + /** + * Path param: Account ID. + */ + account_id: string; + + /** + * Query param: Cache TTL default is 5s. Set to 0 to disable. + */ + cacheTTL?: number; + + /** + * Body param: Adds a `