diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 43fd5a73f8..763462fada 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,7 +9,9 @@ "postCreateCommand": "yarn install", "customizations": { "vscode": { - "extensions": ["esbenp.prettier-vscode"] + "extensions": [ + "esbenp.prettier-vscode" + ] } } } diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a7b23ca1de..f416559983 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,10 +5,10 @@ body: - type: checkboxes id: non_api attributes: - label: Confirm this is a Typescript library issue and not an underlying Cloudflare API issue + label: Confirm this is a TypeScript library issue and not an underlying Cloudflare API issue description: Issues with the underlying Cloudflare API should be reported via [Cloudflare Support](https://developers.cloudflare.com/support/contacting-cloudflare-support) options: - - label: This is an issue with the Typescript library + - label: This is an issue with the TypeScript library required: true - type: textarea id: what-happened @@ -34,7 +34,7 @@ body: attributes: label: Code snippets description: If applicable, add code snippets to help explain your problem. - render: Typescript + render: TypeScript validations: required: false - type: input diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66d7a52d0d..67ce232c33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v4 @@ -45,7 +45,7 @@ jobs: contents: read id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v4 @@ -78,7 +78,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-node' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v4 @@ -97,7 +97,7 @@ jobs: if: github.repository == 'cloudflare/cloudflare-typescript' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v4 diff --git a/.github/workflows/detect-breaking-changes.yml b/.github/workflows/detect-breaking-changes.yml new file mode 100644 index 0000000000..bdd7ff0b1b --- /dev/null +++ b/.github/workflows/detect-breaking-changes.yml @@ -0,0 +1,36 @@ +name: CI +on: + pull_request: + branches: + - main + - next + +jobs: + detect_breaking_changes: + runs-on: 'ubuntu-latest' + name: detect-breaking-changes + if: github.repository == 'cloudflare/cloudflare-typescript' + steps: + - name: Calculate fetch-depth + run: | + echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV + + - uses: actions/checkout@v6 + with: + # Ensure we can check out the pull request base in the script below. + fetch-depth: ${{ env.FETCH_DEPTH }} + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: '20' + - name: Install dependencies + run: | + yarn install + + - name: Detect breaking changes + run: | + # Try to check out previous versions of the breaking change detection script. This ensures that + # we still detect breaking changes when entire files and their tests are removed. + git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true + ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }} diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 00b533b27b..bb4c4943bb 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v3 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 962bb2a13c..b7caf19872 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -17,7 +17,7 @@ jobs: if: github.repository == 'cloudflare/cloudflare-typescript' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check release environment run: | diff --git a/.stats.yml b/.stats.yml index e9269938e3..2f45ab377d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1995 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-28b84a5db03b38290dfe7ef1de2c68feb68762d7a8f207bdbea4d39a7aeef1ea.yml -openapi_spec_hash: ba6bd61621e4be20b581f4f3bf0978d3 -config_hash: 07dfb48a768bfdcfd417ec643bab23f5 +configured_endpoints: 2010 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c764e67a143aa372dd5f9971c38ba9cb79f063a8527bf09abe87bc40ea4e8d46.yml +openapi_spec_hash: 0f0810f21752c54bb1e0cbaf15b09986 +config_hash: 4f7156f8131682ce0acd20f172d81e18 diff --git a/README.md b/README.md index 9fd1925642..84d6c4b95c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,15 @@ This library provides convenient access to the Cloudflare REST API from server-s The REST API documentation can be found on [developers.cloudflare.com](https://developers.cloudflare.com/api). The full API of this library can be found in [api.md](api.md). +## MCP Server + +Use the Cloudflare MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application. + +[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=cloudflare-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNsb3VkZmxhcmUtbWNwIl19) +[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22cloudflare-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22cloudflare-mcp%22%5D%7D) + +> Note: You may need to set environment variables in your MCP client. + ## Installation ```sh @@ -72,36 +81,31 @@ import Cloudflare, { toFile } from 'cloudflare'; const client = new Cloudflare(); // If you have access to Node `fs` we recommend using `fs.createReadStream()`: -await client.apiGateway.userSchemas.create({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - file: fs.createReadStream('/path/to/file'), - kind: 'openapi_v3', +await client.kv.namespaces.values.update('0f2ac74b498b48028cb68387c421e279', 'My-Key', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + value: fs.createReadStream('/path/to/file'), }); // Or if you have the web `File` API you can pass a `File` instance: -await client.apiGateway.userSchemas.create({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - file: new File(['my bytes'], 'file'), - kind: 'openapi_v3', +await client.kv.namespaces.values.update('0f2ac74b498b48028cb68387c421e279', 'My-Key', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + value: new File(['my bytes'], 'file'), }); // You can also pass a `fetch` `Response`: -await client.apiGateway.userSchemas.create({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - file: await fetch('https://somesite/file'), - kind: 'openapi_v3', +await client.kv.namespaces.values.update('0f2ac74b498b48028cb68387c421e279', 'My-Key', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + value: await fetch('https://somesite/file'), }); // Finally, if none of the above are convenient, you can use our `toFile` helper: -await client.apiGateway.userSchemas.create({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - file: await toFile(Buffer.from('my bytes'), 'file'), - kind: 'openapi_v3', +await client.kv.namespaces.values.update('0f2ac74b498b48028cb68387c421e279', 'My-Key', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + value: await toFile(Buffer.from('my bytes'), 'file'), }); -await client.apiGateway.userSchemas.create({ - zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - file: await toFile(new Uint8Array([0, 1, 2]), 'file'), - kind: 'openapi_v3', +await client.kv.namespaces.values.update('0f2ac74b498b48028cb68387c421e279', 'My-Key', { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + value: await toFile(new Uint8Array([0, 1, 2]), 'file'), }); ``` @@ -113,15 +117,17 @@ a subclass of `APIError` will be thrown: ```ts -const zone = await client.zones.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }).catch(async (err) => { - if (err instanceof Cloudflare.APIError) { - console.log(err.status); // 400 - console.log(err.name); // BadRequestError - console.log(err.headers); // {server: 'nginx', ...} - } else { - throw err; - } -}); +const zone = await client.zones + .get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }) + .catch(async (err) => { + if (err instanceof Cloudflare.APIError) { + console.log(err.status); // 400 + console.log(err.name); // BadRequestError + console.log(err.headers); // {server: 'nginx', ...} + } else { + throw err; + } + }); ``` Error codes are as follows: @@ -223,13 +229,21 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi const client = new Cloudflare(); const response = await client.zones - .create({ account: { id: '023e105f4ecef8ad9ca31a8372d0c353' }, name: 'example.com', type: 'full' }) + .create({ + account: { id: '023e105f4ecef8ad9ca31a8372d0c353' }, + name: 'example.com', + type: 'full', + }) .asResponse(); console.log(response.headers.get('X-My-Header')); console.log(response.statusText); // access the underlying Response object const { data: zone, response: raw } = await client.zones - .create({ account: { id: '023e105f4ecef8ad9ca31a8372d0c353' }, name: 'example.com', type: 'full' }) + .create({ + account: { id: '023e105f4ecef8ad9ca31a8372d0c353' }, + name: 'example.com', + type: 'full', + }) .withResponse(); console.log(raw.headers.get('X-My-Header')); console.log(zone.id); diff --git a/api.md b/api.md index 43dece5972..85e5f48163 100644 --- a/api.md +++ b/api.md @@ -1806,7 +1806,6 @@ Methods: Types: -- ZoneAuthenticatedOriginPull - OriginTLSClientAuthCreateResponse - OriginTLSClientAuthListResponse - OriginTLSClientAuthDeleteResponse @@ -1819,34 +1818,51 @@ Methods: - client.originTLSClientAuth.delete(certificateId, { ...params }) -> OriginTLSClientAuthDeleteResponse - client.originTLSClientAuth.get(certificateId, { ...params }) -> OriginTLSClientAuthGetResponse +## ZoneCertificates + +Types: + +- ZoneAuthenticatedOriginPull +- ZoneCertificateCreateResponse +- ZoneCertificateListResponse +- ZoneCertificateDeleteResponse +- ZoneCertificateGetResponse + +Methods: + +- client.originTLSClientAuth.zoneCertificates.create({ ...params }) -> ZoneCertificateCreateResponse +- client.originTLSClientAuth.zoneCertificates.list({ ...params }) -> ZoneCertificateListResponsesSinglePage +- client.originTLSClientAuth.zoneCertificates.delete(certificateId, { ...params }) -> ZoneCertificateDeleteResponse +- client.originTLSClientAuth.zoneCertificates.get(certificateId, { ...params }) -> ZoneCertificateGetResponse + ## Hostnames Types: -- AuthenticatedOriginPull -- HostnameUpdateResponse +- AuthenticatedOriginPull +- HostnameUpdateResponse Methods: -- client.originTLSClientAuth.hostnames.update({ ...params }) -> HostnameUpdateResponsesSinglePage -- client.originTLSClientAuth.hostnames.get(hostname, { ...params }) -> AuthenticatedOriginPull +- client.originTLSClientAuth.hostnames.update({ ...params }) -> HostnameUpdateResponsesSinglePage +- client.originTLSClientAuth.hostnames.get(hostname, { ...params }) -> AuthenticatedOriginPull -### Certificates +## HostnameCertificates Types: -- Certificate -- CertificateCreateResponse -- CertificateListResponse -- CertificateDeleteResponse -- CertificateGetResponse +- Certificate +- HostnameCertificateCreateResponse +- HostnameCertificateListResponse +- HostnameCertificateDeleteResponse +- HostnameCertificateGetResponse Methods: -- client.originTLSClientAuth.hostnames.certificates.create({ ...params }) -> CertificateCreateResponse -- client.originTLSClientAuth.hostnames.certificates.list({ ...params }) -> CertificateListResponsesSinglePage -- client.originTLSClientAuth.hostnames.certificates.delete(certificateId, { ...params }) -> CertificateDeleteResponse -- client.originTLSClientAuth.hostnames.certificates.get(certificateId, { ...params }) -> CertificateGetResponse +- client.originTLSClientAuth.hostnameCertificates.create({ ...params }) -> HostnameCertificateCreateResponse +- client.originTLSClientAuth.hostnameCertificates.list({ ...params }) -> HostnameCertificateListResponsesSinglePage +- client.originTLSClientAuth.hostnameCertificates.delete(certificateId, { ...params }) -> HostnameCertificateDeleteResponse +- client.originTLSClientAuth.hostnameCertificates.get(certificateId, { ...params }) -> HostnameCertificateGetResponse ## Settings @@ -3298,10 +3314,6 @@ Types: - IPList -Methods: - -- client.intel.ipLists.get({ ...params }) -> IPListsSinglePage - ## Miscategorizations Types: @@ -7939,6 +7951,17 @@ Methods: - client.botManagement.update({ ...params }) -> BotManagementUpdateResponse - client.botManagement.get({ ...params }) -> BotManagementGetResponse +# Fraud + +Types: + +- FraudSettings + +Methods: + +- client.fraud.update({ ...params }) -> FraudSettings +- client.fraud.get({ ...params }) -> FraudSettings + # OriginPostQuantumEncryption Types: @@ -8706,6 +8729,46 @@ Methods: - client.aiGateway.evaluations.delete(gatewayId, id, { ...params }) -> EvaluationDeleteResponse - client.aiGateway.evaluations.get(gatewayId, id, { ...params }) -> EvaluationGetResponse +## DynamicRouting + +Types: + +- DynamicRoutingCreateResponse +- DynamicRoutingUpdateResponse +- DynamicRoutingListResponse +- DynamicRoutingDeleteResponse +- DynamicRoutingCreateDeploymentResponse +- DynamicRoutingCreateVersionResponse +- DynamicRoutingGetResponse +- DynamicRoutingGetVersionResponse +- DynamicRoutingListDeploymentsResponse +- DynamicRoutingListVersionsResponse + +Methods: + +- client.aiGateway.dynamicRouting.create(gatewayId, { ...params }) -> DynamicRoutingCreateResponse +- client.aiGateway.dynamicRouting.update(gatewayId, id, { ...params }) -> DynamicRoutingUpdateResponse +- client.aiGateway.dynamicRouting.list(gatewayId, { ...params }) -> DynamicRoutingListResponse +- client.aiGateway.dynamicRouting.delete(gatewayId, id, { ...params }) -> DynamicRoutingDeleteResponse +- client.aiGateway.dynamicRouting.createDeployment(gatewayId, id, { ...params }) -> DynamicRoutingCreateDeploymentResponse +- client.aiGateway.dynamicRouting.createVersion(gatewayId, id, { ...params }) -> DynamicRoutingCreateVersionResponse +- client.aiGateway.dynamicRouting.get(gatewayId, id, { ...params }) -> DynamicRoutingGetResponse +- client.aiGateway.dynamicRouting.getVersion(gatewayId, id, versionId, { ...params }) -> DynamicRoutingGetVersionResponse +- client.aiGateway.dynamicRouting.listDeployments(gatewayId, id, { ...params }) -> DynamicRoutingListDeploymentsResponse +- client.aiGateway.dynamicRouting.listVersions(gatewayId, id, { ...params }) -> DynamicRoutingListVersionsResponse + +## ProviderConfigs + +Types: + +- ProviderConfigCreateResponse +- ProviderConfigListResponse + +Methods: + +- client.aiGateway.providerConfigs.create(gatewayId, { ...params }) -> ProviderConfigCreateResponse +- client.aiGateway.providerConfigs.list(gatewayId, { ...params }) -> ProviderConfigListResponsesV4PagePaginationArray + ## URLs Types: @@ -9176,7 +9239,9 @@ Types: - InstanceUpdateResponse - InstanceListResponse - InstanceDeleteResponse +- InstanceChatCompletionsResponse - InstanceReadResponse +- InstanceSearchResponse - InstanceStatsResponse Methods: @@ -9185,7 +9250,9 @@ Methods: - client.aiSearch.instances.update(id, { ...params }) -> InstanceUpdateResponse - client.aiSearch.instances.list({ ...params }) -> InstanceListResponsesV4PagePaginationArray - client.aiSearch.instances.delete(id, { ...params }) -> InstanceDeleteResponse +- client.aiSearch.instances.chatCompletions(id, { ...params }) -> InstanceChatCompletionsResponse - client.aiSearch.instances.read(id, { ...params }) -> InstanceReadResponse +- client.aiSearch.instances.search(id, { ...params }) -> InstanceSearchResponse - client.aiSearch.instances.stats(id, { ...params }) -> InstanceStatsResponse ### Items diff --git a/release-please-config.json b/release-please-config.json index 1ebd0bde2e..624ed99ecc 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -60,5 +60,8 @@ } ], "release-type": "node", - "extra-files": ["src/version.ts", "README.md"] + "extra-files": [ + "src/version.ts", + "README.md" + ] } diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes index 91b21c284b..807eaf1da0 100755 --- a/scripts/detect-breaking-changes +++ b/scripts/detect-breaking-changes @@ -154,8 +154,9 @@ TEST_PATHS=( tests/api-resources/logs/received/received.test.ts tests/api-resources/logs/received/fields.test.ts tests/api-resources/origin-tls-client-auth/origin-tls-client-auth.test.ts - tests/api-resources/origin-tls-client-auth/hostnames/hostnames.test.ts - tests/api-resources/origin-tls-client-auth/hostnames/certificates.test.ts + tests/api-resources/origin-tls-client-auth/zone-certificates.test.ts + tests/api-resources/origin-tls-client-auth/hostnames.test.ts + tests/api-resources/origin-tls-client-auth/hostname-certificates.test.ts tests/api-resources/origin-tls-client-auth/settings.test.ts tests/api-resources/page-rules.test.ts tests/api-resources/rate-limits.test.ts @@ -283,7 +284,6 @@ TEST_PATHS=( tests/api-resources/intel/domains/bulks.test.ts tests/api-resources/intel/domain-history.test.ts tests/api-resources/intel/ips.test.ts - tests/api-resources/intel/ip-lists.test.ts tests/api-resources/intel/miscategorizations.test.ts tests/api-resources/intel/whois.test.ts tests/api-resources/intel/indicator-feeds/indicator-feeds.test.ts @@ -664,6 +664,7 @@ TEST_PATHS=( tests/api-resources/radar/leaked-credentials/summary.test.ts tests/api-resources/radar/leaked-credentials/timeseries-groups.test.ts tests/api-resources/bot-management.test.ts + tests/api-resources/fraud.test.ts tests/api-resources/origin-post-quantum-encryption.test.ts tests/api-resources/zaraz/zaraz.test.ts tests/api-resources/zaraz/config.test.ts @@ -723,6 +724,8 @@ TEST_PATHS=( tests/api-resources/ai-gateway/logs.test.ts tests/api-resources/ai-gateway/datasets.test.ts tests/api-resources/ai-gateway/evaluations.test.ts + tests/api-resources/ai-gateway/dynamic-routing.test.ts + tests/api-resources/ai-gateway/provider-configs.test.ts tests/api-resources/ai-gateway/urls.test.ts tests/api-resources/iam/iam.test.ts tests/api-resources/iam/permission-groups.test.ts diff --git a/src/index.ts b/src/index.ts index d520290255..3f168787fe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,7 @@ import { CustomNameservers } from './resources/custom-nameservers'; import { CustomPages } from './resources/custom-pages'; import { DCVDelegation } from './resources/dcv-delegation'; import { Filters } from './resources/filters'; +import { Fraud } from './resources/fraud'; import { IPs } from './resources/ips'; import { KeylessCertificates } from './resources/keyless-certificates'; import { ManagedTransforms } from './resources/managed-transforms'; @@ -344,6 +345,7 @@ export class Cloudflare extends Core.APIClient { urlScanner: API.URLScanner = new API.URLScanner(this); radar: API.Radar = new API.Radar(this); botManagement: API.BotManagement = new API.BotManagement(this); + fraud: API.Fraud = new API.Fraud(this); originPostQuantumEncryption: API.OriginPostQuantumEncryption = new API.OriginPostQuantumEncryption(this); zaraz: API.Zaraz = new API.Zaraz(this); speed: API.Speed = new API.Speed(this); @@ -587,6 +589,7 @@ Cloudflare.Vectorize = Vectorize; Cloudflare.URLScanner = URLScanner; Cloudflare.Radar = Radar; Cloudflare.BotManagement = BotManagement; +Cloudflare.Fraud = Fraud; Cloudflare.OriginPostQuantumEncryption = OriginPostQuantumEncryption; Cloudflare.Zaraz = Zaraz; Cloudflare.Speed = Speed; @@ -798,6 +801,8 @@ export declare namespace Cloudflare { export { BotManagement as BotManagement }; + export { Fraud as Fraud }; + export { OriginPostQuantumEncryption as OriginPostQuantumEncryption }; export { Zaraz as Zaraz }; diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts index 332d3d488d..b0bd48a836 100644 --- a/src/resources/accounts/accounts.ts +++ b/src/resources/accounts/accounts.ts @@ -273,7 +273,7 @@ export interface AccountUpdateParams { name: string; /** - * Body param: + * Body param */ type: 'standard' | 'enterprise'; diff --git a/src/resources/accounts/logs/audit.ts b/src/resources/accounts/logs/audit.ts index c951fa3b1a..985eff5625 100644 --- a/src/resources/accounts/logs/audit.ts +++ b/src/resources/accounts/logs/audit.ts @@ -253,62 +253,62 @@ export interface AuditListParams extends CursorPaginationAfterParams { since: string; /** - * Query param: + * Query param */ id?: AuditListParams.ID; /** - * Query param: + * Query param */ account_name?: AuditListParams.AccountName; /** - * Query param: + * Query param */ action_result?: AuditListParams.ActionResult; /** - * Query param: + * Query param */ action_type?: AuditListParams.ActionType; /** - * Query param: + * Query param */ actor_context?: AuditListParams.ActorContext; /** - * Query param: + * Query param */ actor_email?: AuditListParams.ActorEmail; /** - * Query param: + * Query param */ actor_id?: AuditListParams.ActorID; /** - * Query param: + * Query param */ actor_ip_address?: AuditListParams.ActorIPAddress; /** - * Query param: + * Query param */ actor_token_id?: AuditListParams.ActorTokenID; /** - * Query param: + * Query param */ actor_token_name?: AuditListParams.ActorTokenName; /** - * Query param: + * Query param */ actor_type?: AuditListParams.ActorType; /** - * Query param: + * Query param */ audit_log_id?: AuditListParams.AuditLogID; @@ -325,52 +325,52 @@ export interface AuditListParams extends CursorPaginationAfterParams { limit?: number; /** - * Query param: + * Query param */ raw_cf_ray_id?: AuditListParams.RawCfRayID; /** - * Query param: + * Query param */ raw_method?: AuditListParams.RawMethod; /** - * Query param: + * Query param */ raw_status_code?: AuditListParams.RawStatusCode; /** - * Query param: + * Query param */ raw_uri?: AuditListParams.RawURI; /** - * Query param: + * Query param */ resource_id?: AuditListParams.ResourceID; /** - * Query param: + * Query param */ resource_product?: AuditListParams.ResourceProduct; /** - * Query param: + * Query param */ resource_scope?: AuditListParams.ResourceScope; /** - * Query param: + * Query param */ resource_type?: AuditListParams.ResourceType; /** - * Query param: + * Query param */ zone_id?: AuditListParams.ZoneID; /** - * Query param: + * Query param */ zone_name?: AuditListParams.ZoneName; } diff --git a/src/resources/accounts/members.ts b/src/resources/accounts/members.ts index d8e62fa448..7f068658b2 100644 --- a/src/resources/accounts/members.ts +++ b/src/resources/accounts/members.ts @@ -160,7 +160,7 @@ export declare namespace MemberCreateParams { roles: Array; /** - * Body param: + * Body param */ status?: 'accepted' | 'pending'; } @@ -182,7 +182,7 @@ export declare namespace MemberCreateParams { policies: Array; /** - * Body param: + * Body param */ status?: 'accepted' | 'pending'; } diff --git a/src/resources/accounts/tokens/tokens.ts b/src/resources/accounts/tokens/tokens.ts index 964d4dbf9b..f5d2cf3575 100644 --- a/src/resources/accounts/tokens/tokens.ts +++ b/src/resources/accounts/tokens/tokens.ts @@ -306,7 +306,7 @@ export interface TokenCreateParams { policies: Array; /** - * Body param: + * Body param */ condition?: TokenCreateParams.Condition; @@ -365,7 +365,7 @@ export interface TokenUpdateParams { policies: Array; /** - * Body param: + * Body param */ condition?: TokenUpdateParams.Condition; diff --git a/src/resources/accounts/tokens/value.ts b/src/resources/accounts/tokens/value.ts index 26a17684f0..dc8d6d702d 100644 --- a/src/resources/accounts/tokens/value.ts +++ b/src/resources/accounts/tokens/value.ts @@ -42,7 +42,7 @@ export interface ValueUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/addressing/address-maps/accounts.ts b/src/resources/addressing/address-maps/accounts.ts index 24ad9c25e4..ba351be422 100644 --- a/src/resources/addressing/address-maps/accounts.ts +++ b/src/resources/addressing/address-maps/accounts.ts @@ -201,7 +201,7 @@ export interface AccountUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/addressing/address-maps/address-maps.ts b/src/resources/addressing/address-maps/address-maps.ts index c883305809..4c868124c4 100644 --- a/src/resources/addressing/address-maps/address-maps.ts +++ b/src/resources/addressing/address-maps/address-maps.ts @@ -441,7 +441,7 @@ export interface AddressMapCreateParams { enabled?: boolean | null; /** - * Body param: + * Body param */ ips?: Array; diff --git a/src/resources/addressing/address-maps/ips.ts b/src/resources/addressing/address-maps/ips.ts index 9200c70acd..ec5c346e57 100644 --- a/src/resources/addressing/address-maps/ips.ts +++ b/src/resources/addressing/address-maps/ips.ts @@ -203,7 +203,7 @@ export interface IPUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/addressing/address-maps/zones.ts b/src/resources/addressing/address-maps/zones.ts index 88c7b17abf..9014688d83 100644 --- a/src/resources/addressing/address-maps/zones.ts +++ b/src/resources/addressing/address-maps/zones.ts @@ -210,7 +210,7 @@ export interface ZoneUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/addressing/prefixes/bgp-prefixes.ts b/src/resources/addressing/prefixes/bgp-prefixes.ts index f8cd80f52e..feef99102e 100644 --- a/src/resources/addressing/prefixes/bgp-prefixes.ts +++ b/src/resources/addressing/prefixes/bgp-prefixes.ts @@ -247,7 +247,7 @@ export interface BGPPrefixEditParams { auto_advertise_withdraw?: boolean; /** - * Body param: + * Body param */ on_demand?: BGPPrefixEditParams.OnDemand; } diff --git a/src/resources/ai-gateway/ai-gateway.ts b/src/resources/ai-gateway/ai-gateway.ts index ab523f63fc..a283b2e8bd 100644 --- a/src/resources/ai-gateway/ai-gateway.ts +++ b/src/resources/ai-gateway/ai-gateway.ts @@ -17,6 +17,30 @@ import { DatasetUpdateResponse, Datasets, } from './datasets'; +import * as DynamicRoutingAPI from './dynamic-routing'; +import { + DynamicRouting, + DynamicRoutingCreateDeploymentParams, + DynamicRoutingCreateDeploymentResponse, + DynamicRoutingCreateParams, + DynamicRoutingCreateResponse, + DynamicRoutingCreateVersionParams, + DynamicRoutingCreateVersionResponse, + DynamicRoutingDeleteParams, + DynamicRoutingDeleteResponse, + DynamicRoutingGetParams, + DynamicRoutingGetResponse, + DynamicRoutingGetVersionParams, + DynamicRoutingGetVersionResponse, + DynamicRoutingListDeploymentsParams, + DynamicRoutingListDeploymentsResponse, + DynamicRoutingListParams, + DynamicRoutingListResponse, + DynamicRoutingListVersionsParams, + DynamicRoutingListVersionsResponse, + DynamicRoutingUpdateParams, + DynamicRoutingUpdateResponse, +} from './dynamic-routing'; import * as EvaluationTypesAPI from './evaluation-types'; import { EvaluationTypeListParams, @@ -54,6 +78,15 @@ import { LogResponseResponse, Logs, } from './logs'; +import * as ProviderConfigsAPI from './provider-configs'; +import { + ProviderConfigCreateParams, + ProviderConfigCreateResponse, + ProviderConfigListParams, + ProviderConfigListResponse, + ProviderConfigListResponsesV4PagePaginationArray, + ProviderConfigs, +} from './provider-configs'; import * as URLsAPI from './urls'; import { URLGetParams, URLGetResponse, URLs } from './urls'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; @@ -63,6 +96,8 @@ export class AIGateway extends APIResource { logs: LogsAPI.Logs = new LogsAPI.Logs(this._client); datasets: DatasetsAPI.Datasets = new DatasetsAPI.Datasets(this._client); evaluations: EvaluationsAPI.Evaluations = new EvaluationsAPI.Evaluations(this._client); + dynamicRouting: DynamicRoutingAPI.DynamicRouting = new DynamicRoutingAPI.DynamicRouting(this._client); + providerConfigs: ProviderConfigsAPI.ProviderConfigs = new ProviderConfigsAPI.ProviderConfigs(this._client); urls: URLsAPI.URLs = new URLsAPI.URLs(this._client); /** @@ -710,7 +745,7 @@ export namespace AIGatewayGetResponse { export interface AIGatewayCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -720,159 +755,159 @@ export interface AIGatewayCreateParams { id: string; /** - * Body param: + * Body param */ cache_invalidate_on_update: boolean; /** - * Body param: + * Body param */ cache_ttl: number | null; /** - * Body param: + * Body param */ collect_logs: boolean; /** - * Body param: + * Body param */ rate_limiting_interval: number | null; /** - * Body param: + * Body param */ rate_limiting_limit: number | null; /** - * Body param: + * Body param */ rate_limiting_technique: 'fixed' | 'sliding'; /** - * Body param: + * Body param */ authentication?: boolean; /** - * Body param: + * Body param */ is_default?: boolean; /** - * Body param: + * Body param */ log_management?: number | null; /** - * Body param: + * Body param */ log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null; /** - * Body param: + * Body param */ logpush?: boolean; /** - * Body param: + * Body param */ logpush_public_key?: string | null; /** - * Body param: + * Body param */ zdr?: boolean; } export interface AIGatewayUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ cache_invalidate_on_update: boolean; /** - * Body param: + * Body param */ cache_ttl: number | null; /** - * Body param: + * Body param */ collect_logs: boolean; /** - * Body param: + * Body param */ rate_limiting_interval: number | null; /** - * Body param: + * Body param */ rate_limiting_limit: number | null; /** - * Body param: + * Body param */ rate_limiting_technique: 'fixed' | 'sliding'; /** - * Body param: + * Body param */ authentication?: boolean; /** - * Body param: + * Body param */ dlp?: AIGatewayUpdateParams.UnionMember0 | AIGatewayUpdateParams.UnionMember1; /** - * Body param: + * Body param */ is_default?: boolean; /** - * Body param: + * Body param */ log_management?: number | null; /** - * Body param: + * Body param */ log_management_strategy?: 'STOP_INSERTING' | 'DELETE_OLDEST' | null; /** - * Body param: + * Body param */ logpush?: boolean; /** - * Body param: + * Body param */ logpush_public_key?: string | null; /** - * Body param: + * Body param */ otel?: Array | null; /** - * Body param: + * Body param */ store_id?: string | null; /** - * Body param: + * Body param */ stripe?: AIGatewayUpdateParams.Stripe | null; /** - * Body param: + * Body param */ zdr?: boolean; } @@ -929,7 +964,7 @@ export namespace AIGatewayUpdateParams { export interface AIGatewayListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; @@ -956,6 +991,9 @@ AIGateway.Datasets = Datasets; AIGateway.DatasetListResponsesV4PagePaginationArray = DatasetListResponsesV4PagePaginationArray; AIGateway.Evaluations = Evaluations; AIGateway.EvaluationListResponsesV4PagePaginationArray = EvaluationListResponsesV4PagePaginationArray; +AIGateway.DynamicRouting = DynamicRouting; +AIGateway.ProviderConfigs = ProviderConfigs; +AIGateway.ProviderConfigListResponsesV4PagePaginationArray = ProviderConfigListResponsesV4PagePaginationArray; AIGateway.URLs = URLs; export declare namespace AIGateway { @@ -1025,5 +1063,38 @@ export declare namespace AIGateway { type EvaluationGetParams as EvaluationGetParams, }; + export { + DynamicRouting as DynamicRouting, + type DynamicRoutingCreateResponse as DynamicRoutingCreateResponse, + type DynamicRoutingUpdateResponse as DynamicRoutingUpdateResponse, + type DynamicRoutingListResponse as DynamicRoutingListResponse, + type DynamicRoutingDeleteResponse as DynamicRoutingDeleteResponse, + type DynamicRoutingCreateDeploymentResponse as DynamicRoutingCreateDeploymentResponse, + type DynamicRoutingCreateVersionResponse as DynamicRoutingCreateVersionResponse, + type DynamicRoutingGetResponse as DynamicRoutingGetResponse, + type DynamicRoutingGetVersionResponse as DynamicRoutingGetVersionResponse, + type DynamicRoutingListDeploymentsResponse as DynamicRoutingListDeploymentsResponse, + type DynamicRoutingListVersionsResponse as DynamicRoutingListVersionsResponse, + type DynamicRoutingCreateParams as DynamicRoutingCreateParams, + type DynamicRoutingUpdateParams as DynamicRoutingUpdateParams, + type DynamicRoutingListParams as DynamicRoutingListParams, + type DynamicRoutingDeleteParams as DynamicRoutingDeleteParams, + type DynamicRoutingCreateDeploymentParams as DynamicRoutingCreateDeploymentParams, + type DynamicRoutingCreateVersionParams as DynamicRoutingCreateVersionParams, + type DynamicRoutingGetParams as DynamicRoutingGetParams, + type DynamicRoutingGetVersionParams as DynamicRoutingGetVersionParams, + type DynamicRoutingListDeploymentsParams as DynamicRoutingListDeploymentsParams, + type DynamicRoutingListVersionsParams as DynamicRoutingListVersionsParams, + }; + + export { + ProviderConfigs as ProviderConfigs, + type ProviderConfigCreateResponse as ProviderConfigCreateResponse, + type ProviderConfigListResponse as ProviderConfigListResponse, + ProviderConfigListResponsesV4PagePaginationArray as ProviderConfigListResponsesV4PagePaginationArray, + type ProviderConfigCreateParams as ProviderConfigCreateParams, + type ProviderConfigListParams as ProviderConfigListParams, + }; + export { URLs as URLs, type URLGetResponse as URLGetResponse, type URLGetParams as URLGetParams }; } diff --git a/src/resources/ai-gateway/datasets.ts b/src/resources/ai-gateway/datasets.ts index fdf7c5f990..3b9f2b71b1 100644 --- a/src/resources/ai-gateway/datasets.ts +++ b/src/resources/ai-gateway/datasets.ts @@ -395,22 +395,22 @@ export namespace DatasetGetResponse { export interface DatasetCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enable: boolean; /** - * Body param: + * Body param */ filters: Array; /** - * Body param: + * Body param */ name: string; } @@ -440,22 +440,22 @@ export namespace DatasetCreateParams { export interface DatasetUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enable: boolean; /** - * Body param: + * Body param */ filters: Array; /** - * Body param: + * Body param */ name: string; } @@ -485,17 +485,17 @@ export namespace DatasetUpdateParams { export interface DatasetListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ enable?: boolean; /** - * Query param: + * Query param */ name?: string; diff --git a/src/resources/ai-gateway/dynamic-routing.ts b/src/resources/ai-gateway/dynamic-routing.ts new file mode 100644 index 0000000000..ce08dfe018 --- /dev/null +++ b/src/resources/ai-gateway/dynamic-routing.ts @@ -0,0 +1,2394 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; + +export class DynamicRouting extends APIResource { + /** + * Create a new AI Gateway Dynamic Route. + * + * @example + * ```ts + * const dynamicRouting = + * await client.aiGateway.dynamicRouting.create('54442216', { + * account_id: '0d37909e38d3e99c29fa2cd343ac421a', + * elements: [ + * { + * id: 'id', + * outputs: { next: { elementId: 'elementId' } }, + * type: 'start', + * }, + * ], + * name: 'name', + * }); + * ``` + */ + create( + gatewayId: string, + params: DynamicRoutingCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes`, { + body, + ...options, + }) as Core.APIPromise<{ result: DynamicRoutingCreateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Update an AI Gateway Dynamic Route. + * + * @example + * ```ts + * const dynamicRouting = + * await client.aiGateway.dynamicRouting.update( + * '54442216', + * '54442216', + * { + * account_id: '0d37909e38d3e99c29fa2cd343ac421a', + * name: 'Route Name', + * }, + * ); + * ``` + */ + update( + gatewayId: string, + id: string, + params: DynamicRoutingUpdateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return this._client.patch(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}`, { + body, + ...options, + }); + } + + /** + * List all AI Gateway Dynamic Routes. + * + * @example + * ```ts + * const dynamicRoutings = + * await client.aiGateway.dynamicRouting.list('54442216', { + * account_id: '0d37909e38d3e99c29fa2cd343ac421a', + * }); + * ``` + */ + list( + gatewayId: string, + params: DynamicRoutingListParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return this._client.get(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes`, options); + } + + /** + * Delete an AI Gateway Dynamic Route. + * + * @example + * ```ts + * const dynamicRouting = + * await client.aiGateway.dynamicRouting.delete( + * '54442216', + * '54442216', + * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' }, + * ); + * ``` + */ + delete( + gatewayId: string, + id: string, + params: DynamicRoutingDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.delete( + `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}`, + options, + ) as Core.APIPromise<{ result: DynamicRoutingDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Create a new AI Gateway Dynamic Route Deployment. + * + * @example + * ```ts + * const response = + * await client.aiGateway.dynamicRouting.createDeployment( + * '54442216', + * '54442216', + * { + * account_id: '0d37909e38d3e99c29fa2cd343ac421a', + * comment: 'Route Deployment Comment', + * version_id: '54442216', + * }, + * ); + * ``` + */ + createDeployment( + gatewayId: string, + id: string, + params: DynamicRoutingCreateDeploymentParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/deployments`, { + body, + ...options, + }) as Core.APIPromise<{ result: DynamicRoutingCreateDeploymentResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Create a new AI Gateway Dynamic Route Version. + * + * @example + * ```ts + * const response = + * await client.aiGateway.dynamicRouting.createVersion( + * '54442216', + * '54442216', + * { + * account_id: '0d37909e38d3e99c29fa2cd343ac421a', + * comment: 'Route Version Comment', + * elements: [ + * { + * id: 'id', + * outputs: { next: { elementId: 'elementId' } }, + * type: 'start', + * }, + * ], + * }, + * ); + * ``` + */ + createVersion( + gatewayId: string, + id: string, + params: DynamicRoutingCreateVersionParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/versions`, { + body, + ...options, + }) as Core.APIPromise<{ result: DynamicRoutingCreateVersionResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Get an AI Gateway Dynamic Route. + * + * @example + * ```ts + * const dynamicRouting = + * await client.aiGateway.dynamicRouting.get( + * '54442216', + * '54442216', + * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' }, + * ); + * ``` + */ + get( + gatewayId: string, + id: string, + params: DynamicRoutingGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}`, + options, + ) as Core.APIPromise<{ result: DynamicRoutingGetResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Get an AI Gateway Dynamic Route Version. + * + * @example + * ```ts + * const response = + * await client.aiGateway.dynamicRouting.getVersion( + * '54442216', + * '54442216', + * '54442216', + * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' }, + * ); + * ``` + */ + getVersion( + gatewayId: string, + id: string, + versionId: string, + params: DynamicRoutingGetVersionParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return ( + this._client.get( + `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/versions/${versionId}`, + options, + ) as Core.APIPromise<{ result: DynamicRoutingGetVersionResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List all AI Gateway Dynamic Route Deployments. + * + * @example + * ```ts + * const response = + * await client.aiGateway.dynamicRouting.listDeployments( + * '54442216', + * '54442216', + * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' }, + * ); + * ``` + */ + listDeployments( + gatewayId: string, + id: string, + params: DynamicRoutingListDeploymentsParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return this._client.get( + `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/deployments`, + options, + ); + } + + /** + * List all AI Gateway Dynamic Route Versions. + * + * @example + * ```ts + * const response = + * await client.aiGateway.dynamicRouting.listVersions( + * '54442216', + * '54442216', + * { account_id: '0d37909e38d3e99c29fa2cd343ac421a' }, + * ); + * ``` + */ + listVersions( + gatewayId: string, + id: string, + params: DynamicRoutingListVersionsParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id } = params; + return this._client.get( + `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/routes/${id}/versions`, + options, + ); + } +} + +export interface DynamicRoutingCreateResponse { + id: string; + + account_tag: string; + + created_at: string; + + deployment: DynamicRoutingCreateResponse.Deployment; + + elements: Array< + | DynamicRoutingCreateResponse.UnionMember0 + | DynamicRoutingCreateResponse.UnionMember1 + | DynamicRoutingCreateResponse.UnionMember2 + | DynamicRoutingCreateResponse.UnionMember3 + | DynamicRoutingCreateResponse.UnionMember4 + | DynamicRoutingCreateResponse.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; + + version: DynamicRoutingCreateResponse.Version; +} + +export namespace DynamicRoutingCreateResponse { + export interface Deployment { + created_at: string; + + deployment_id: string; + + version_id: string; + + comment?: string | null; + } + + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } + + export interface Version { + active: 'true' | 'false'; + + created_at: string; + + data: string; + + version_id: string; + + comment?: string | null; + } +} + +export interface DynamicRoutingUpdateResponse { + route: DynamicRoutingUpdateResponse.Route; + + success: boolean; +} + +export namespace DynamicRoutingUpdateResponse { + export interface Route { + id: string; + + account_tag: string; + + created_at: string; + + deployment: Route.Deployment; + + elements: Array< + | Route.UnionMember0 + | Route.UnionMember1 + | Route.UnionMember2 + | Route.UnionMember3 + | Route.UnionMember4 + | Route.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; + + version: Route.Version; + } + + export namespace Route { + export interface Deployment { + created_at: string; + + deployment_id: string; + + version_id: string; + + comment?: string | null; + } + + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } + + export interface Version { + active: 'true' | 'false'; + + created_at: string; + + data: string; + + version_id: string; + + comment?: string | null; + } + } +} + +export interface DynamicRoutingListResponse { + data: DynamicRoutingListResponse.Data; + + success: boolean; +} + +export namespace DynamicRoutingListResponse { + export interface Data { + order_by: string; + + order_by_direction: string; + + page: number; + + per_page: number; + + routes: Array; + } + + export namespace Data { + export interface Route { + id: string; + + account_tag: string; + + created_at: string; + + deployment: Route.Deployment; + + elements: Array< + | Route.UnionMember0 + | Route.UnionMember1 + | Route.UnionMember2 + | Route.UnionMember3 + | Route.UnionMember4 + | Route.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; + + version: Route.Version; + } + + export namespace Route { + export interface Deployment { + created_at: string; + + deployment_id: string; + + version_id: string; + + comment?: string | null; + } + + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } + + export interface Version { + active: 'true' | 'false'; + + created_at: string; + + data: string; + + version_id: string; + + comment?: string | null; + } + } + } +} + +export interface DynamicRoutingDeleteResponse { + id: string; + + account_tag: string; + + created_at: string; + + elements: Array< + | DynamicRoutingDeleteResponse.UnionMember0 + | DynamicRoutingDeleteResponse.UnionMember1 + | DynamicRoutingDeleteResponse.UnionMember2 + | DynamicRoutingDeleteResponse.UnionMember3 + | DynamicRoutingDeleteResponse.UnionMember4 + | DynamicRoutingDeleteResponse.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; +} + +export namespace DynamicRoutingDeleteResponse { + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } +} + +export interface DynamicRoutingCreateDeploymentResponse { + id: string; + + account_tag: string; + + created_at: string; + + elements: Array< + | DynamicRoutingCreateDeploymentResponse.UnionMember0 + | DynamicRoutingCreateDeploymentResponse.UnionMember1 + | DynamicRoutingCreateDeploymentResponse.UnionMember2 + | DynamicRoutingCreateDeploymentResponse.UnionMember3 + | DynamicRoutingCreateDeploymentResponse.UnionMember4 + | DynamicRoutingCreateDeploymentResponse.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; +} + +export namespace DynamicRoutingCreateDeploymentResponse { + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } +} + +export interface DynamicRoutingCreateVersionResponse { + id: string; + + account_tag: string; + + created_at: string; + + elements: Array< + | DynamicRoutingCreateVersionResponse.UnionMember0 + | DynamicRoutingCreateVersionResponse.UnionMember1 + | DynamicRoutingCreateVersionResponse.UnionMember2 + | DynamicRoutingCreateVersionResponse.UnionMember3 + | DynamicRoutingCreateVersionResponse.UnionMember4 + | DynamicRoutingCreateVersionResponse.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; +} + +export namespace DynamicRoutingCreateVersionResponse { + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } +} + +export interface DynamicRoutingGetResponse { + id: string; + + account_tag: string; + + created_at: string; + + deployment: DynamicRoutingGetResponse.Deployment; + + elements: Array< + | DynamicRoutingGetResponse.UnionMember0 + | DynamicRoutingGetResponse.UnionMember1 + | DynamicRoutingGetResponse.UnionMember2 + | DynamicRoutingGetResponse.UnionMember3 + | DynamicRoutingGetResponse.UnionMember4 + | DynamicRoutingGetResponse.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; + + version: DynamicRoutingGetResponse.Version; +} + +export namespace DynamicRoutingGetResponse { + export interface Deployment { + created_at: string; + + deployment_id: string; + + version_id: string; + + comment?: string | null; + } + + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } + + export interface Version { + active: 'true' | 'false'; + + created_at: string; + + data: string; + + version_id: string; + + comment?: string | null; + } +} + +export interface DynamicRoutingGetVersionResponse { + id: string; + + account_tag: string; + + active: 'true' | 'false'; + + created_at: string; + + data: string; + + elements: Array< + | DynamicRoutingGetVersionResponse.UnionMember0 + | DynamicRoutingGetVersionResponse.UnionMember1 + | DynamicRoutingGetVersionResponse.UnionMember2 + | DynamicRoutingGetVersionResponse.UnionMember3 + | DynamicRoutingGetVersionResponse.UnionMember4 + | DynamicRoutingGetVersionResponse.UnionMember5 + >; + + gateway_id: string; + + modified_at: string; + + name: string; + + version_id: string; + + comment?: string | null; +} + +export namespace DynamicRoutingGetVersionResponse { + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } +} + +export interface DynamicRoutingListDeploymentsResponse { + data: DynamicRoutingListDeploymentsResponse.Data; + + success: boolean; +} + +export namespace DynamicRoutingListDeploymentsResponse { + export interface Data { + deployments: Array; + + order_by: string; + + order_by_direction: string; + + page: number; + + per_page: number; + } + + export namespace Data { + export interface Deployment { + created_at: string; + + deployment_id: string; + + version_id: string; + + comment?: string | null; + } + } +} + +export interface DynamicRoutingListVersionsResponse { + data: DynamicRoutingListVersionsResponse.Data; + + success: boolean; +} + +export namespace DynamicRoutingListVersionsResponse { + export interface Data { + order_by: string; + + order_by_direction: string; + + page: number; + + per_page: number; + + versions: Array; + } + + export namespace Data { + export interface Version { + active: 'true' | 'false'; + + created_at: string; + + data: string; + + version_id: string; + + comment?: string | null; + } + } +} + +export interface DynamicRoutingCreateParams { + /** + * Path param + */ + account_id: string; + + /** + * Body param + */ + elements: Array< + | DynamicRoutingCreateParams.UnionMember0 + | DynamicRoutingCreateParams.UnionMember1 + | DynamicRoutingCreateParams.UnionMember2 + | DynamicRoutingCreateParams.UnionMember3 + | DynamicRoutingCreateParams.UnionMember4 + | DynamicRoutingCreateParams.UnionMember5 + >; + + /** + * Body param + */ + name: string; +} + +export namespace DynamicRoutingCreateParams { + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } +} + +export interface DynamicRoutingUpdateParams { + /** + * Path param + */ + account_id: string; + + /** + * Body param + */ + name: string; +} + +export interface DynamicRoutingListParams { + account_id: string; +} + +export interface DynamicRoutingDeleteParams { + account_id: string; +} + +export interface DynamicRoutingCreateDeploymentParams { + /** + * Path param + */ + account_id: string; + + /** + * Body param + */ + comment: string; + + /** + * Body param + */ + version_id: string; +} + +export interface DynamicRoutingCreateVersionParams { + /** + * Path param + */ + account_id: string; + + /** + * Body param + */ + comment: string; + + /** + * Body param + */ + elements: Array< + | DynamicRoutingCreateVersionParams.UnionMember0 + | DynamicRoutingCreateVersionParams.UnionMember1 + | DynamicRoutingCreateVersionParams.UnionMember2 + | DynamicRoutingCreateVersionParams.UnionMember3 + | DynamicRoutingCreateVersionParams.UnionMember4 + | DynamicRoutingCreateVersionParams.UnionMember5 + >; +} + +export namespace DynamicRoutingCreateVersionParams { + export interface UnionMember0 { + id: string; + + outputs: UnionMember0.Outputs; + + type: 'start'; + } + + export namespace UnionMember0 { + export interface Outputs { + next: Outputs.Next; + } + + export namespace Outputs { + export interface Next { + elementId: string; + } + } + } + + export interface UnionMember1 { + id: string; + + outputs: UnionMember1.Outputs; + + properties: UnionMember1.Properties; + + type: 'conditional'; + } + + export namespace UnionMember1 { + export interface Outputs { + false: Outputs.False; + + true: Outputs.True; + } + + export namespace Outputs { + export interface False { + elementId: string; + } + + export interface True { + elementId: string; + } + } + + export interface Properties { + conditions?: unknown; + } + } + + export interface UnionMember2 { + id: string; + + outputs: { [key: string]: UnionMember2.Outputs }; + + type: 'percentage'; + } + + export namespace UnionMember2 { + export interface Outputs { + elementId: string; + } + } + + export interface UnionMember3 { + id: string; + + outputs: UnionMember3.Outputs; + + properties: UnionMember3.Properties; + + type: 'rate'; + } + + export namespace UnionMember3 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + key: string; + + limit: number; + + limitType: 'count' | 'cost'; + + window: number; + } + } + + export interface UnionMember4 { + id: string; + + outputs: UnionMember4.Outputs; + + properties: UnionMember4.Properties; + + type: 'model'; + } + + export namespace UnionMember4 { + export interface Outputs { + fallback: Outputs.Fallback; + + success: Outputs.Success; + } + + export namespace Outputs { + export interface Fallback { + elementId: string; + } + + export interface Success { + elementId: string; + } + } + + export interface Properties { + model: string; + + provider: string; + + retries: number; + + timeout: number; + } + } + + export interface UnionMember5 { + id: string; + + outputs: { [key: string]: UnionMember5.Outputs }; + + type: 'end'; + } + + export namespace UnionMember5 { + export interface Outputs { + elementId: string; + } + } +} + +export interface DynamicRoutingGetParams { + account_id: string; +} + +export interface DynamicRoutingGetVersionParams { + account_id: string; +} + +export interface DynamicRoutingListDeploymentsParams { + account_id: string; +} + +export interface DynamicRoutingListVersionsParams { + account_id: string; +} + +export declare namespace DynamicRouting { + export { + type DynamicRoutingCreateResponse as DynamicRoutingCreateResponse, + type DynamicRoutingUpdateResponse as DynamicRoutingUpdateResponse, + type DynamicRoutingListResponse as DynamicRoutingListResponse, + type DynamicRoutingDeleteResponse as DynamicRoutingDeleteResponse, + type DynamicRoutingCreateDeploymentResponse as DynamicRoutingCreateDeploymentResponse, + type DynamicRoutingCreateVersionResponse as DynamicRoutingCreateVersionResponse, + type DynamicRoutingGetResponse as DynamicRoutingGetResponse, + type DynamicRoutingGetVersionResponse as DynamicRoutingGetVersionResponse, + type DynamicRoutingListDeploymentsResponse as DynamicRoutingListDeploymentsResponse, + type DynamicRoutingListVersionsResponse as DynamicRoutingListVersionsResponse, + type DynamicRoutingCreateParams as DynamicRoutingCreateParams, + type DynamicRoutingUpdateParams as DynamicRoutingUpdateParams, + type DynamicRoutingListParams as DynamicRoutingListParams, + type DynamicRoutingDeleteParams as DynamicRoutingDeleteParams, + type DynamicRoutingCreateDeploymentParams as DynamicRoutingCreateDeploymentParams, + type DynamicRoutingCreateVersionParams as DynamicRoutingCreateVersionParams, + type DynamicRoutingGetParams as DynamicRoutingGetParams, + type DynamicRoutingGetVersionParams as DynamicRoutingGetVersionParams, + type DynamicRoutingListDeploymentsParams as DynamicRoutingListDeploymentsParams, + type DynamicRoutingListVersionsParams as DynamicRoutingListVersionsParams, + }; +} diff --git a/src/resources/ai-gateway/evaluation-types.ts b/src/resources/ai-gateway/evaluation-types.ts index 8a50a99868..6749f9d312 100644 --- a/src/resources/ai-gateway/evaluation-types.ts +++ b/src/resources/ai-gateway/evaluation-types.ts @@ -53,17 +53,17 @@ export interface EvaluationTypeListResponse { export interface EvaluationTypeListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ order_by?: string; /** - * Query param: + * Query param */ order_by_direction?: 'asc' | 'desc'; } diff --git a/src/resources/ai-gateway/evaluations.ts b/src/resources/ai-gateway/evaluations.ts index 07acb57c43..57f7df5241 100644 --- a/src/resources/ai-gateway/evaluations.ts +++ b/src/resources/ai-gateway/evaluations.ts @@ -500,39 +500,39 @@ export namespace EvaluationGetResponse { export interface EvaluationCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ dataset_ids: Array; /** - * Body param: + * Body param */ evaluation_type_ids: Array; /** - * Body param: + * Body param */ name: string; } export interface EvaluationListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ name?: string; /** - * Query param: + * Query param */ processed?: boolean; diff --git a/src/resources/ai-gateway/index.ts b/src/resources/ai-gateway/index.ts index 462f59f88a..682de9f76b 100644 --- a/src/resources/ai-gateway/index.ts +++ b/src/resources/ai-gateway/index.ts @@ -15,6 +15,29 @@ export { type DatasetDeleteParams, type DatasetGetParams, } from './datasets'; +export { + DynamicRouting, + type DynamicRoutingCreateResponse, + type DynamicRoutingUpdateResponse, + type DynamicRoutingListResponse, + type DynamicRoutingDeleteResponse, + type DynamicRoutingCreateDeploymentResponse, + type DynamicRoutingCreateVersionResponse, + type DynamicRoutingGetResponse, + type DynamicRoutingGetVersionResponse, + type DynamicRoutingListDeploymentsResponse, + type DynamicRoutingListVersionsResponse, + type DynamicRoutingCreateParams, + type DynamicRoutingUpdateParams, + type DynamicRoutingListParams, + type DynamicRoutingDeleteParams, + type DynamicRoutingCreateDeploymentParams, + type DynamicRoutingCreateVersionParams, + type DynamicRoutingGetParams, + type DynamicRoutingGetVersionParams, + type DynamicRoutingListDeploymentsParams, + type DynamicRoutingListVersionsParams, +} from './dynamic-routing'; export { EvaluationListResponsesV4PagePaginationArray, Evaluations, @@ -49,4 +72,12 @@ export { type LogRequestParams, type LogResponseParams, } from './logs'; +export { + ProviderConfigListResponsesV4PagePaginationArray, + ProviderConfigs, + type ProviderConfigCreateResponse, + type ProviderConfigListResponse, + type ProviderConfigCreateParams, + type ProviderConfigListParams, +} from './provider-configs'; export { URLs, type URLGetResponse, type URLGetParams } from './urls'; diff --git a/src/resources/ai-gateway/logs.ts b/src/resources/ai-gateway/logs.ts index e3cdca10e1..ac67d83cb0 100644 --- a/src/resources/ai-gateway/logs.ts +++ b/src/resources/ai-gateway/logs.ts @@ -266,137 +266,137 @@ export type LogResponseResponse = unknown; export interface LogListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; /** - * @deprecated Query param: + * @deprecated Query param */ cached?: boolean; /** - * @deprecated Query param: + * @deprecated Query param */ direction?: 'asc' | 'desc'; /** - * @deprecated Query param: + * @deprecated Query param */ end_date?: string; /** - * @deprecated Query param: + * @deprecated Query param */ feedback?: 0 | 1; /** - * Query param: + * Query param */ filters?: Array; /** - * @deprecated Query param: + * @deprecated Query param */ max_cost?: number; /** - * @deprecated Query param: + * @deprecated Query param */ max_duration?: number; /** - * @deprecated Query param: + * @deprecated Query param */ max_tokens_in?: number; /** - * @deprecated Query param: + * @deprecated Query param */ max_tokens_out?: number; /** - * @deprecated Query param: + * @deprecated Query param */ max_total_tokens?: number; /** - * Query param: + * Query param */ meta_info?: boolean; /** - * @deprecated Query param: + * @deprecated Query param */ min_cost?: number; /** - * @deprecated Query param: + * @deprecated Query param */ min_duration?: number; /** - * @deprecated Query param: + * @deprecated Query param */ min_tokens_in?: number; /** - * @deprecated Query param: + * @deprecated Query param */ min_tokens_out?: number; /** - * @deprecated Query param: + * @deprecated Query param */ min_total_tokens?: number; /** - * @deprecated Query param: + * @deprecated Query param */ model?: string; /** - * @deprecated Query param: + * @deprecated Query param */ model_type?: string; /** - * Query param: + * Query param */ order_by?: 'created_at' | 'provider' | 'model' | 'model_type' | 'success' | 'cached'; /** - * Query param: + * Query param */ order_by_direction?: 'asc' | 'desc'; /** - * @deprecated Query param: + * @deprecated Query param */ provider?: string; /** - * @deprecated Query param: + * @deprecated Query param */ request_content_type?: string; /** - * @deprecated Query param: + * @deprecated Query param */ response_content_type?: string; /** - * Query param: + * Query param */ search?: string; /** - * @deprecated Query param: + * @deprecated Query param */ start_date?: string; /** - * @deprecated Query param: + * @deprecated Query param */ success?: boolean; } @@ -438,22 +438,22 @@ export namespace LogListParams { export interface LogDeleteParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ filters?: Array; /** - * Query param: + * Query param */ limit?: number; /** - * Query param: + * Query param */ order_by?: | 'created_at' @@ -469,7 +469,7 @@ export interface LogDeleteParams { | 'feedback'; /** - * Query param: + * Query param */ order_by_direction?: 'asc' | 'desc'; } @@ -511,22 +511,22 @@ export namespace LogDeleteParams { export interface LogEditParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ feedback?: number | null; /** - * Body param: + * Body param */ metadata?: { [key: string]: string | number | boolean } | null; /** - * Body param: + * Body param */ score?: number | null; } diff --git a/src/resources/ai-gateway/provider-configs.ts b/src/resources/ai-gateway/provider-configs.ts new file mode 100644 index 0000000000..c7e58e9de8 --- /dev/null +++ b/src/resources/ai-gateway/provider-configs.ts @@ -0,0 +1,189 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; +import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination'; + +export class ProviderConfigs extends APIResource { + /** + * Create a new Provider Configs + * + * @example + * ```ts + * const providerConfig = + * await client.aiGateway.providerConfigs.create( + * 'my-gateway', + * { + * account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', + * alias: 'alias', + * default_config: true, + * provider_slug: 'provider_slug', + * secret: 'secret', + * secret_id: 'secret_id', + * }, + * ); + * ``` + */ + create( + gatewayId: string, + params: ProviderConfigCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/provider_configs`, { + body, + ...options, + }) as Core.APIPromise<{ result: ProviderConfigCreateResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List Provider Configs + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const providerConfigListResponse of client.aiGateway.providerConfigs.list( + * 'my-gateway', + * { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0' }, + * )) { + * // ... + * } + * ``` + */ + list( + gatewayId: string, + params: ProviderConfigListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { account_id, ...query } = params; + return this._client.getAPIList( + `/accounts/${account_id}/ai-gateway/gateways/${gatewayId}/provider_configs`, + ProviderConfigListResponsesV4PagePaginationArray, + { query, ...options }, + ); + } +} + +export class ProviderConfigListResponsesV4PagePaginationArray extends V4PagePaginationArray {} + +export interface ProviderConfigCreateResponse { + id: string; + + account_id: string; + + account_tag: string; + + alias: string; + + default_config: boolean; + + /** + * gateway id + */ + gateway_id: string; + + modified_at: string; + + provider_slug: string; + + secret_id: string; + + secret_preview: string; + + rate_limit?: number; + + rate_limit_period?: number; +} + +export interface ProviderConfigListResponse { + id: string; + + account_id: string; + + account_tag: string; + + alias: string; + + default_config: boolean; + + /** + * gateway id + */ + gateway_id: string; + + modified_at: string; + + provider_slug: string; + + secret_id: string; + + secret_preview: string; + + rate_limit?: number; + + rate_limit_period?: number; +} + +export interface ProviderConfigCreateParams { + /** + * Path param + */ + account_id: string; + + /** + * Body param + */ + alias: string; + + /** + * Body param + */ + default_config: boolean; + + /** + * Body param + */ + provider_slug: string; + + /** + * Body param + */ + secret: string; + + /** + * Body param + */ + secret_id: string; + + /** + * Body param + */ + rate_limit?: number; + + /** + * Body param + */ + rate_limit_period?: number; +} + +export interface ProviderConfigListParams extends V4PagePaginationArrayParams { + /** + * Path param + */ + account_id: string; +} + +ProviderConfigs.ProviderConfigListResponsesV4PagePaginationArray = + ProviderConfigListResponsesV4PagePaginationArray; + +export declare namespace ProviderConfigs { + export { + type ProviderConfigCreateResponse as ProviderConfigCreateResponse, + type ProviderConfigListResponse as ProviderConfigListResponse, + ProviderConfigListResponsesV4PagePaginationArray as ProviderConfigListResponsesV4PagePaginationArray, + type ProviderConfigCreateParams as ProviderConfigCreateParams, + type ProviderConfigListParams as ProviderConfigListParams, + }; +} diff --git a/src/resources/ai/ai.ts b/src/resources/ai/ai.ts index 3d1778abe1..64adea2848 100644 --- a/src/resources/ai/ai.ts +++ b/src/resources/ai/ai.ts @@ -68,11 +68,13 @@ export type AIRunResponse = | Array | Core.Uploadable | AIRunResponse.Audio + | Core.Uploadable | AIRunResponse.TextEmbeddings | AIRunResponse.AutomaticSpeechRecognition | Array | Array - | AIRunResponse.UnionMember7 + | AIRunResponse.UnionMember8 + | Core.Uploadable | AIRunResponse.Translation | AIRunResponse.Summarization | AIRunResponse.ImageToText @@ -195,7 +197,7 @@ export namespace AIRunResponse { } } - export interface UnionMember7 { + export interface UnionMember8 { /** * The generated text response from the model */ @@ -204,15 +206,15 @@ export namespace AIRunResponse { /** * An array of tool calls requests made during the response generation */ - tool_calls?: Array; + tool_calls?: Array; /** * Usage statistics for the inference request */ - usage?: UnionMember7.Usage; + usage?: UnionMember8.Usage; } - export namespace UnionMember7 { + export namespace UnionMember8 { export interface ToolCall { /** * The arguments passed to be passed to the tool call request @@ -295,7 +297,7 @@ export type AIRunParams = export declare namespace AIRunParams { export interface TextClassification { /** - * Path param: + * Path param */ account_id: string; @@ -307,7 +309,7 @@ export declare namespace AIRunParams { export interface TextToImage { /** - * Path param: + * Path param */ account_id: string; @@ -376,7 +378,7 @@ export declare namespace AIRunParams { export interface TextToSpeech { /** - * Path param: + * Path param */ account_id: string; @@ -394,7 +396,7 @@ export declare namespace AIRunParams { export interface TextEmbeddings { /** - * Path param: + * Path param */ account_id: string; @@ -406,7 +408,7 @@ export declare namespace AIRunParams { export interface AutomaticSpeechRecognition { /** - * Path param: + * Path param */ account_id: string; @@ -430,7 +432,7 @@ export declare namespace AIRunParams { export interface ImageClassification { /** - * Path param: + * Path param */ account_id: string; @@ -443,7 +445,7 @@ export declare namespace AIRunParams { export interface ObjectDetection { /** - * Path param: + * Path param */ account_id: string; @@ -456,7 +458,7 @@ export declare namespace AIRunParams { export interface Prompt { /** - * Path param: + * Path param */ account_id: string; @@ -499,7 +501,7 @@ export declare namespace AIRunParams { repetition_penalty?: number; /** - * Body param: + * Body param */ response_format?: Prompt.ResponseFormat; @@ -545,7 +547,7 @@ export declare namespace AIRunParams { export interface Messages { /** - * Path param: + * Path param */ account_id: string; @@ -561,7 +563,7 @@ export declare namespace AIRunParams { frequency_penalty?: number; /** - * Body param: + * Body param */ functions?: Array; @@ -587,7 +589,7 @@ export declare namespace AIRunParams { repetition_penalty?: number; /** - * Body param: + * Body param */ response_format?: Messages.ResponseFormat; @@ -779,7 +781,7 @@ export declare namespace AIRunParams { export interface Translation { /** - * Path param: + * Path param */ account_id: string; @@ -803,7 +805,7 @@ export declare namespace AIRunParams { export interface Summarization { /** - * Path param: + * Path param */ account_id: string; @@ -820,7 +822,7 @@ export declare namespace AIRunParams { export interface ImageToText { /** - * Path param: + * Path param */ account_id: string; @@ -890,7 +892,7 @@ export declare namespace AIRunParams { export interface Variant12 { /** - * Path param: + * Path param */ account_id: string; @@ -959,7 +961,7 @@ export declare namespace AIRunParams { export interface Variant13 { /** - * Path param: + * Path param */ account_id: string; @@ -1042,7 +1044,7 @@ export declare namespace AIRunParams { export interface MultimodalEmbeddings { /** - * Path param: + * Path param */ account_id: string; @@ -1052,7 +1054,7 @@ export declare namespace AIRunParams { image?: string; /** - * Body param: + * Body param */ text?: Array; } diff --git a/src/resources/ai/finetunes/assets.ts b/src/resources/ai/finetunes/assets.ts index bd45121e1a..b4504c0f79 100644 --- a/src/resources/ai/finetunes/assets.ts +++ b/src/resources/ai/finetunes/assets.ts @@ -26,17 +26,17 @@ export interface AssetCreateResponse { export interface AssetCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ file?: Core.Uploadable; /** - * Body param: + * Body param */ file_name?: string; } diff --git a/src/resources/ai/finetunes/finetunes.ts b/src/resources/ai/finetunes/finetunes.ts index a32d999063..183df88d0a 100644 --- a/src/resources/ai/finetunes/finetunes.ts +++ b/src/resources/ai/finetunes/finetunes.ts @@ -71,27 +71,27 @@ export interface FinetuneListResponse { export interface FinetuneCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ model: string; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ public?: boolean; } diff --git a/src/resources/ai/finetunes/public.ts b/src/resources/ai/finetunes/public.ts index 8494bc7eb4..d469708d39 100644 --- a/src/resources/ai/finetunes/public.ts +++ b/src/resources/ai/finetunes/public.ts @@ -41,7 +41,7 @@ export interface PublicListResponse { export interface PublicListParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/ai/models/models.ts b/src/resources/ai/models/models.ts index 3a80c39394..752742dde3 100644 --- a/src/resources/ai/models/models.ts +++ b/src/resources/ai/models/models.ts @@ -31,7 +31,7 @@ export type ModelListResponse = unknown; export interface ModelListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/ai/models/schema.ts b/src/resources/ai/models/schema.ts index 1864a8ba7d..0c9fc8dbc1 100644 --- a/src/resources/ai/models/schema.ts +++ b/src/resources/ai/models/schema.ts @@ -21,7 +21,7 @@ export type SchemaGetResponse = unknown; export interface SchemaGetParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/ai/to-markdown.ts b/src/resources/ai/to-markdown.ts index 319d2ea8c1..0a6218b150 100644 --- a/src/resources/ai/to-markdown.ts +++ b/src/resources/ai/to-markdown.ts @@ -72,7 +72,7 @@ export interface ToMarkdownSupportedParams { export interface ToMarkdownTransformParams { /** - * Path param: + * Path param */ account_id: string; } diff --git a/src/resources/aisearch/aisearch.ts b/src/resources/aisearch/aisearch.ts index 38fe1486d6..732c8c4ade 100644 --- a/src/resources/aisearch/aisearch.ts +++ b/src/resources/aisearch/aisearch.ts @@ -18,6 +18,8 @@ import { } from './tokens'; import * as InstancesAPI from './instances/instances'; import { + InstanceChatCompletionsParams, + InstanceChatCompletionsResponse, InstanceCreateParams, InstanceCreateResponse, InstanceDeleteParams, @@ -27,6 +29,8 @@ import { InstanceListResponsesV4PagePaginationArray, InstanceReadParams, InstanceReadResponse, + InstanceSearchParams, + InstanceSearchResponse, InstanceStatsParams, InstanceStatsResponse, InstanceUpdateParams, @@ -51,14 +55,18 @@ export declare namespace AISearch { type InstanceUpdateResponse as InstanceUpdateResponse, type InstanceListResponse as InstanceListResponse, type InstanceDeleteResponse as InstanceDeleteResponse, + type InstanceChatCompletionsResponse as InstanceChatCompletionsResponse, type InstanceReadResponse as InstanceReadResponse, + type InstanceSearchResponse as InstanceSearchResponse, type InstanceStatsResponse as InstanceStatsResponse, InstanceListResponsesV4PagePaginationArray as InstanceListResponsesV4PagePaginationArray, type InstanceCreateParams as InstanceCreateParams, type InstanceUpdateParams as InstanceUpdateParams, type InstanceListParams as InstanceListParams, type InstanceDeleteParams as InstanceDeleteParams, + type InstanceChatCompletionsParams as InstanceChatCompletionsParams, type InstanceReadParams as InstanceReadParams, + type InstanceSearchParams as InstanceSearchParams, type InstanceStatsParams as InstanceStatsParams, }; diff --git a/src/resources/aisearch/index.ts b/src/resources/aisearch/index.ts index f81ab35006..9c78c3e801 100644 --- a/src/resources/aisearch/index.ts +++ b/src/resources/aisearch/index.ts @@ -8,13 +8,17 @@ export { type InstanceUpdateResponse, type InstanceListResponse, type InstanceDeleteResponse, + type InstanceChatCompletionsResponse, type InstanceReadResponse, + type InstanceSearchResponse, type InstanceStatsResponse, type InstanceCreateParams, type InstanceUpdateParams, type InstanceListParams, type InstanceDeleteParams, + type InstanceChatCompletionsParams, type InstanceReadParams, + type InstanceSearchParams, type InstanceStatsParams, } from './instances/index'; export { diff --git a/src/resources/aisearch/instances/index.ts b/src/resources/aisearch/instances/index.ts index 392d8edc2e..c140ae2abc 100644 --- a/src/resources/aisearch/instances/index.ts +++ b/src/resources/aisearch/instances/index.ts @@ -7,13 +7,17 @@ export { type InstanceUpdateResponse, type InstanceListResponse, type InstanceDeleteResponse, + type InstanceChatCompletionsResponse, type InstanceReadResponse, + type InstanceSearchResponse, type InstanceStatsResponse, type InstanceCreateParams, type InstanceUpdateParams, type InstanceListParams, type InstanceDeleteParams, + type InstanceChatCompletionsParams, type InstanceReadParams, + type InstanceSearchParams, type InstanceStatsParams, } from './instances'; export { diff --git a/src/resources/aisearch/instances/instances.ts b/src/resources/aisearch/instances/instances.ts index bcbcda3d7d..d579a02325 100644 --- a/src/resources/aisearch/instances/instances.ts +++ b/src/resources/aisearch/instances/instances.ts @@ -40,7 +40,6 @@ export class Instances extends APIResource { * account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', * id: 'my-ai-search', * source: 'source', - * token_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', * type: 'r2', * }); * ``` @@ -132,6 +131,33 @@ export class Instances extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Chat Completions + * + * @example + * ```ts + * const response = + * await client.aiSearch.instances.chatCompletions( + * 'my-ai-search', + * { + * account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', + * messages: [{ content: 'content', role: 'system' }], + * }, + * ); + * ``` + */ + chatCompletions( + id: string, + params: InstanceChatCompletionsParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return this._client.post(`/accounts/${account_id}/ai-search/instances/${id}/chat/completions`, { + body, + ...options, + }); + } + /** * Read instances. * @@ -156,6 +182,34 @@ export class Instances extends APIResource { )._thenUnwrap((obj) => obj.result); } + /** + * Search + * + * @example + * ```ts + * const response = await client.aiSearch.instances.search( + * 'my-ai-search', + * { + * account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', + * messages: [{ content: 'content', role: 'system' }], + * }, + * ); + * ``` + */ + search( + id: string, + params: InstanceSearchParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { account_id, ...body } = params; + return ( + this._client.post(`/accounts/${account_id}/ai-search/instances/${id}/search`, { + body, + ...options, + }) as Core.APIPromise<{ result: InstanceSearchResponse }> + )._thenUnwrap((obj) => obj.result); + } + /** * Stats * @@ -202,8 +256,6 @@ export interface InstanceCreateResponse { source: string; - token_id: string; - type: 'r2' | 'web-crawler'; vectorize_name: string; @@ -251,10 +303,10 @@ export interface InstanceCreateResponse { created_by?: string; embedding_model?: + | '@cf/qwen/qwen3-embedding-0.6b' | '@cf/baai/bge-m3' | '@cf/baai/bge-large-en-v1.5' | '@cf/google/embeddinggemma-300m' - | '@cf/qwen/qwen3-embedding-0.6b' | 'google-ai-studio/gemini-embedding-001' | 'openai/text-embedding-3-small' | 'openai/text-embedding-3-large' @@ -356,6 +408,8 @@ export interface InstanceCreateResponse { system_prompt_rewrite_query?: string; + token_id?: string; + vectorize_active_namespace?: string; } @@ -413,14 +467,16 @@ export namespace InstanceCreateResponse { export interface SourceParams { /** - * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_, - * /private/\*_, _\private\*) + * List of path patterns to exclude. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /admin/** matches + * /admin/users and /admin/settings/advanced) */ exclude_items?: Array; /** - * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html, - * /docs/\*_, _\blog\*.html) + * List of path patterns to include. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /blog/** matches + * /blog/post and /blog/2024/post) */ include_items?: Array; @@ -446,6 +502,12 @@ export namespace InstanceCreateResponse { include_images?: boolean; + /** + * List of specific sitemap URLs to use for crawling. Only valid when parse_type is + * 'sitemap'. + */ + specific_sitemaps?: Array; + use_browser_rendering?: boolean; } @@ -478,8 +540,6 @@ export interface InstanceUpdateResponse { source: string; - token_id: string; - type: 'r2' | 'web-crawler'; vectorize_name: string; @@ -527,10 +587,10 @@ export interface InstanceUpdateResponse { created_by?: string; embedding_model?: + | '@cf/qwen/qwen3-embedding-0.6b' | '@cf/baai/bge-m3' | '@cf/baai/bge-large-en-v1.5' | '@cf/google/embeddinggemma-300m' - | '@cf/qwen/qwen3-embedding-0.6b' | 'google-ai-studio/gemini-embedding-001' | 'openai/text-embedding-3-small' | 'openai/text-embedding-3-large' @@ -632,6 +692,8 @@ export interface InstanceUpdateResponse { system_prompt_rewrite_query?: string; + token_id?: string; + vectorize_active_namespace?: string; } @@ -689,14 +751,16 @@ export namespace InstanceUpdateResponse { export interface SourceParams { /** - * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_, - * /private/\*_, _\private\*) + * List of path patterns to exclude. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /admin/** matches + * /admin/users and /admin/settings/advanced) */ exclude_items?: Array; /** - * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html, - * /docs/\*_, _\blog\*.html) + * List of path patterns to include. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /blog/** matches + * /blog/post and /blog/2024/post) */ include_items?: Array; @@ -722,6 +786,12 @@ export namespace InstanceUpdateResponse { include_images?: boolean; + /** + * List of specific sitemap URLs to use for crawling. Only valid when parse_type is + * 'sitemap'. + */ + specific_sitemaps?: Array; + use_browser_rendering?: boolean; } @@ -754,8 +824,6 @@ export interface InstanceListResponse { source: string; - token_id: string; - type: 'r2' | 'web-crawler'; vectorize_name: string; @@ -803,10 +871,10 @@ export interface InstanceListResponse { created_by?: string; embedding_model?: + | '@cf/qwen/qwen3-embedding-0.6b' | '@cf/baai/bge-m3' | '@cf/baai/bge-large-en-v1.5' | '@cf/google/embeddinggemma-300m' - | '@cf/qwen/qwen3-embedding-0.6b' | 'google-ai-studio/gemini-embedding-001' | 'openai/text-embedding-3-small' | 'openai/text-embedding-3-large' @@ -908,6 +976,8 @@ export interface InstanceListResponse { system_prompt_rewrite_query?: string; + token_id?: string; + vectorize_active_namespace?: string; } @@ -965,14 +1035,16 @@ export namespace InstanceListResponse { export interface SourceParams { /** - * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_, - * /private/\*_, _\private\*) + * List of path patterns to exclude. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /admin/** matches + * /admin/users and /admin/settings/advanced) */ exclude_items?: Array; /** - * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html, - * /docs/\*_, _\blog\*.html) + * List of path patterns to include. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /blog/** matches + * /blog/post and /blog/2024/post) */ include_items?: Array; @@ -998,6 +1070,12 @@ export namespace InstanceListResponse { include_images?: boolean; + /** + * List of specific sitemap URLs to use for crawling. Only valid when parse_type is + * 'sitemap'. + */ + specific_sitemaps?: Array; + use_browser_rendering?: boolean; } @@ -1030,8 +1108,6 @@ export interface InstanceDeleteResponse { source: string; - token_id: string; - type: 'r2' | 'web-crawler'; vectorize_name: string; @@ -1079,10 +1155,10 @@ export interface InstanceDeleteResponse { created_by?: string; embedding_model?: + | '@cf/qwen/qwen3-embedding-0.6b' | '@cf/baai/bge-m3' | '@cf/baai/bge-large-en-v1.5' | '@cf/google/embeddinggemma-300m' - | '@cf/qwen/qwen3-embedding-0.6b' | 'google-ai-studio/gemini-embedding-001' | 'openai/text-embedding-3-small' | 'openai/text-embedding-3-large' @@ -1184,6 +1260,8 @@ export interface InstanceDeleteResponse { system_prompt_rewrite_query?: string; + token_id?: string; + vectorize_active_namespace?: string; } @@ -1241,14 +1319,16 @@ export namespace InstanceDeleteResponse { export interface SourceParams { /** - * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_, - * /private/\*_, _\private\*) + * List of path patterns to exclude. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /admin/** matches + * /admin/users and /admin/settings/advanced) */ exclude_items?: Array; /** - * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html, - * /docs/\*_, _\blog\*.html) + * List of path patterns to include. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /blog/** matches + * /blog/post and /blog/2024/post) */ include_items?: Array; @@ -1274,6 +1354,12 @@ export namespace InstanceDeleteResponse { include_images?: boolean; + /** + * List of specific sitemap URLs to use for crawling. Only valid when parse_type is + * 'sitemap'. + */ + specific_sitemaps?: Array; + use_browser_rendering?: boolean; } @@ -1288,6 +1374,72 @@ export namespace InstanceDeleteResponse { } } +export interface InstanceChatCompletionsResponse { + choices: Array; + + chunks: Array; + + id?: string; + + model?: string; + + object?: string; + + [k: string]: unknown; +} + +export namespace InstanceChatCompletionsResponse { + export interface Choice { + message: Choice.Message; + + index?: number; + } + + export namespace Choice { + export interface Message { + content: string | null; + + role: 'system' | 'developer' | 'user' | 'assistant' | 'tool'; + + [k: string]: unknown; + } + } + + export interface Chunk { + id: string; + + score: number; + + text: string; + + type: string; + + item?: Chunk.Item; + + scoring_details?: Chunk.ScoringDetails; + } + + export namespace Chunk { + export interface Item { + key: string; + + metadata?: { [key: string]: unknown }; + + timestamp?: number; + } + + export interface ScoringDetails { + keyword_rank?: number; + + keyword_score?: number; + + vector_rank?: number; + + vector_score?: number; + } + } +} + export interface InstanceReadResponse { /** * Use your AI Search ID. @@ -1306,8 +1458,6 @@ export interface InstanceReadResponse { source: string; - token_id: string; - type: 'r2' | 'web-crawler'; vectorize_name: string; @@ -1355,10 +1505,10 @@ export interface InstanceReadResponse { created_by?: string; embedding_model?: + | '@cf/qwen/qwen3-embedding-0.6b' | '@cf/baai/bge-m3' | '@cf/baai/bge-large-en-v1.5' | '@cf/google/embeddinggemma-300m' - | '@cf/qwen/qwen3-embedding-0.6b' | 'google-ai-studio/gemini-embedding-001' | 'openai/text-embedding-3-small' | 'openai/text-embedding-3-large' @@ -1460,6 +1610,8 @@ export interface InstanceReadResponse { system_prompt_rewrite_query?: string; + token_id?: string; + vectorize_active_namespace?: string; } @@ -1517,14 +1669,16 @@ export namespace InstanceReadResponse { export interface SourceParams { /** - * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_, - * /private/\*_, _\private\*) + * List of path patterns to exclude. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /admin/** matches + * /admin/users and /admin/settings/advanced) */ exclude_items?: Array; /** - * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html, - * /docs/\*_, _\blog\*.html) + * List of path patterns to include. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /blog/** matches + * /blog/post and /blog/2024/post) */ include_items?: Array; @@ -1550,6 +1704,12 @@ export namespace InstanceReadResponse { include_images?: boolean; + /** + * List of specific sitemap URLs to use for crawling. Only valid when parse_type is + * 'sitemap'. + */ + specific_sitemaps?: Array; + use_browser_rendering?: boolean; } @@ -1564,6 +1724,48 @@ export namespace InstanceReadResponse { } } +export interface InstanceSearchResponse { + chunks: Array; + + search_query: string; +} + +export namespace InstanceSearchResponse { + export interface Chunk { + id: string; + + score: number; + + text: string; + + type: string; + + item?: Chunk.Item; + + scoring_details?: Chunk.ScoringDetails; + } + + export namespace Chunk { + export interface Item { + key: string; + + metadata?: { [key: string]: unknown }; + + timestamp?: number; + } + + export interface ScoringDetails { + keyword_rank?: number; + + keyword_score?: number; + + vector_rank?: number; + + vector_score?: number; + } + } +} + export interface InstanceStatsResponse { completed?: number; @@ -1584,7 +1786,7 @@ export interface InstanceStatsResponse { export interface InstanceCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -1594,27 +1796,22 @@ export interface InstanceCreateParams { id: string; /** - * Body param: + * Body param */ source: string; /** - * Body param: - */ - token_id: string; - - /** - * Body param: + * Body param */ type: 'r2' | 'web-crawler'; /** - * Body param: + * Body param */ ai_gateway_id?: string; /** - * Body param: + * Body param */ ai_search_model?: | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' @@ -1645,65 +1842,65 @@ export interface InstanceCreateParams { | ''; /** - * Body param: + * Body param */ chunk?: boolean; /** - * Body param: + * Body param */ chunk_overlap?: number; /** - * Body param: + * Body param */ chunk_size?: number; /** - * Body param: + * Body param */ embedding_model?: + | '@cf/qwen/qwen3-embedding-0.6b' | '@cf/baai/bge-m3' | '@cf/baai/bge-large-en-v1.5' | '@cf/google/embeddinggemma-300m' - | '@cf/qwen/qwen3-embedding-0.6b' | 'google-ai-studio/gemini-embedding-001' | 'openai/text-embedding-3-small' | 'openai/text-embedding-3-large' | ''; /** - * Body param: + * Body param */ hybrid_search_enabled?: boolean; /** - * Body param: + * Body param */ max_num_results?: number; /** - * Body param: + * Body param */ metadata?: InstanceCreateParams.Metadata; /** - * Body param: + * Body param */ public_endpoint_params?: InstanceCreateParams.PublicEndpointParams; /** - * Body param: + * Body param */ reranking?: boolean; /** - * Body param: + * Body param */ reranking_model?: '@cf/baai/bge-reranker-base' | ''; /** - * Body param: + * Body param */ rewrite_model?: | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' @@ -1734,19 +1931,24 @@ export interface InstanceCreateParams { | ''; /** - * Body param: + * Body param */ rewrite_query?: boolean; /** - * Body param: + * Body param */ score_threshold?: number; /** - * Body param: + * Body param */ source_params?: InstanceCreateParams.SourceParams; + + /** + * Body param + */ + token_id?: string; } export namespace InstanceCreateParams { @@ -1803,14 +2005,16 @@ export namespace InstanceCreateParams { export interface SourceParams { /** - * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_, - * /private/\*_, _\private\*) + * List of path patterns to exclude. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /admin/** matches + * /admin/users and /admin/settings/advanced) */ exclude_items?: Array; /** - * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html, - * /docs/\*_, _\blog\*.html) + * List of path patterns to include. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /blog/** matches + * /blog/post and /blog/2024/post) */ include_items?: Array; @@ -1836,6 +2040,12 @@ export namespace InstanceCreateParams { include_images?: boolean; + /** + * List of specific sitemap URLs to use for crawling. Only valid when parse_type is + * 'sitemap'. + */ + specific_sitemaps?: Array; + use_browser_rendering?: boolean; } @@ -1852,17 +2062,17 @@ export namespace InstanceCreateParams { export interface InstanceUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ ai_gateway_id?: string; /** - * Body param: + * Body param */ ai_search_model?: | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' @@ -1893,80 +2103,80 @@ export interface InstanceUpdateParams { | ''; /** - * Body param: + * Body param */ cache?: boolean; /** - * Body param: + * Body param */ cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes'; /** - * Body param: + * Body param */ chunk?: boolean; /** - * Body param: + * Body param */ chunk_overlap?: number; /** - * Body param: + * Body param */ chunk_size?: number; /** - * Body param: + * Body param */ embedding_model?: + | '@cf/qwen/qwen3-embedding-0.6b' | '@cf/baai/bge-m3' | '@cf/baai/bge-large-en-v1.5' | '@cf/google/embeddinggemma-300m' - | '@cf/qwen/qwen3-embedding-0.6b' | 'google-ai-studio/gemini-embedding-001' | 'openai/text-embedding-3-small' | 'openai/text-embedding-3-large' | ''; /** - * Body param: + * Body param */ hybrid_search_enabled?: boolean; /** - * Body param: + * Body param */ max_num_results?: number; /** - * Body param: + * Body param */ metadata?: InstanceUpdateParams.Metadata; /** - * Body param: + * Body param */ paused?: boolean; /** - * Body param: + * Body param */ public_endpoint_params?: InstanceUpdateParams.PublicEndpointParams; /** - * Body param: + * Body param */ reranking?: boolean; /** - * Body param: + * Body param */ reranking_model?: '@cf/baai/bge-reranker-base' | ''; /** - * Body param: + * Body param */ rewrite_model?: | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' @@ -1997,27 +2207,27 @@ export interface InstanceUpdateParams { | ''; /** - * Body param: + * Body param */ rewrite_query?: boolean; /** - * Body param: + * Body param */ score_threshold?: number; /** - * Body param: + * Body param */ source_params?: InstanceUpdateParams.SourceParams; /** - * Body param: + * Body param */ summarization?: boolean; /** - * Body param: + * Body param */ summarization_model?: | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' @@ -2048,22 +2258,22 @@ export interface InstanceUpdateParams { | ''; /** - * Body param: + * Body param */ system_prompt_ai_search?: string; /** - * Body param: + * Body param */ system_prompt_index_summarization?: string; /** - * Body param: + * Body param */ system_prompt_rewrite_query?: string; /** - * Body param: + * Body param */ token_id?: string; } @@ -2122,14 +2332,16 @@ export namespace InstanceUpdateParams { export interface SourceParams { /** - * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_, - * /private/\*_, _\private\*) + * List of path patterns to exclude. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /admin/** matches + * /admin/users and /admin/settings/advanced) */ exclude_items?: Array; /** - * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html, - * /docs/\*_, _\blog\*.html) + * List of path patterns to include. Uses micromatch glob syntax: \* matches within + * a path segment, ** matches across path segments (e.g., /blog/** matches + * /blog/post and /blog/2024/post) */ include_items?: Array; @@ -2155,6 +2367,12 @@ export namespace InstanceUpdateParams { include_images?: boolean; + /** + * List of specific sitemap URLs to use for crawling. Only valid when parse_type is + * 'sitemap'. + */ + specific_sitemaps?: Array; + use_browser_rendering?: boolean; } @@ -2171,7 +2389,7 @@ export namespace InstanceUpdateParams { export interface InstanceListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; @@ -2185,10 +2403,282 @@ export interface InstanceDeleteParams { account_id: string; } +export interface InstanceChatCompletionsParams { + /** + * Path param + */ + account_id: string; + + /** + * Body param + */ + messages: Array; + + /** + * Body param + */ + ai_search_options?: InstanceChatCompletionsParams.AISearchOptions; + + /** + * Body param + */ + model?: + | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' + | '@cf/meta/llama-3.1-8b-instruct-fast' + | '@cf/meta/llama-3.1-8b-instruct-fp8' + | '@cf/meta/llama-4-scout-17b-16e-instruct' + | '@cf/qwen/qwen3-30b-a3b-fp8' + | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b' + | '@cf/moonshotai/kimi-k2-instruct' + | 'anthropic/claude-3-7-sonnet' + | 'anthropic/claude-sonnet-4' + | 'anthropic/claude-opus-4' + | 'anthropic/claude-3-5-haiku' + | 'cerebras/qwen-3-235b-a22b-instruct' + | 'cerebras/qwen-3-235b-a22b-thinking' + | 'cerebras/llama-3.3-70b' + | 'cerebras/llama-4-maverick-17b-128e-instruct' + | 'cerebras/llama-4-scout-17b-16e-instruct' + | 'cerebras/gpt-oss-120b' + | 'google-ai-studio/gemini-2.5-flash' + | 'google-ai-studio/gemini-2.5-pro' + | 'grok/grok-4' + | 'groq/llama-3.3-70b-versatile' + | 'groq/llama-3.1-8b-instant' + | 'openai/gpt-5' + | 'openai/gpt-5-mini' + | 'openai/gpt-5-nano' + | ''; + + /** + * Body param + */ + stream?: boolean; + + [k: string]: unknown; +} + +export namespace InstanceChatCompletionsParams { + export interface Message { + content: string | null; + + role: 'system' | 'developer' | 'user' | 'assistant' | 'tool'; + + [k: string]: unknown; + } + + export interface AISearchOptions { + query_rewrite?: AISearchOptions.QueryRewrite; + + reranking?: AISearchOptions.Reranking; + + retrieval?: AISearchOptions.Retrieval; + } + + export namespace AISearchOptions { + export interface QueryRewrite { + enabled?: boolean; + + model?: + | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' + | '@cf/meta/llama-3.1-8b-instruct-fast' + | '@cf/meta/llama-3.1-8b-instruct-fp8' + | '@cf/meta/llama-4-scout-17b-16e-instruct' + | '@cf/qwen/qwen3-30b-a3b-fp8' + | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b' + | '@cf/moonshotai/kimi-k2-instruct' + | 'anthropic/claude-3-7-sonnet' + | 'anthropic/claude-sonnet-4' + | 'anthropic/claude-opus-4' + | 'anthropic/claude-3-5-haiku' + | 'cerebras/qwen-3-235b-a22b-instruct' + | 'cerebras/qwen-3-235b-a22b-thinking' + | 'cerebras/llama-3.3-70b' + | 'cerebras/llama-4-maverick-17b-128e-instruct' + | 'cerebras/llama-4-scout-17b-16e-instruct' + | 'cerebras/gpt-oss-120b' + | 'google-ai-studio/gemini-2.5-flash' + | 'google-ai-studio/gemini-2.5-pro' + | 'grok/grok-4' + | 'groq/llama-3.3-70b-versatile' + | 'groq/llama-3.1-8b-instant' + | 'openai/gpt-5' + | 'openai/gpt-5-mini' + | 'openai/gpt-5-nano' + | ''; + + rewrite_prompt?: string; + } + + export interface Reranking { + enabled?: boolean; + + match_threshold?: number; + + model?: '@cf/baai/bge-reranker-base' | ''; + } + + export interface Retrieval { + context_expansion?: number; + + filters?: Retrieval.UnionMember0 | Retrieval.UnionMember1; + + match_threshold?: number; + + max_num_results?: number; + + retrieval_type?: 'vector' | 'keyword' | 'hybrid'; + } + + export namespace Retrieval { + export interface UnionMember0 { + key: string; + + type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte'; + + value: string | number | boolean; + } + + export interface UnionMember1 { + filters: Array; + + type: 'and' | 'or'; + } + + export namespace UnionMember1 { + export interface Filter { + key: string; + + type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte'; + + value: string | number | boolean; + } + } + } + } +} + export interface InstanceReadParams { account_id: string; } +export interface InstanceSearchParams { + /** + * Path param + */ + account_id: string; + + /** + * Body param + */ + messages: Array; + + /** + * Body param + */ + ai_search_options?: InstanceSearchParams.AISearchOptions; +} + +export namespace InstanceSearchParams { + export interface Message { + content: string | null; + + role: 'system' | 'developer' | 'user' | 'assistant' | 'tool'; + + [k: string]: unknown; + } + + export interface AISearchOptions { + query_rewrite?: AISearchOptions.QueryRewrite; + + reranking?: AISearchOptions.Reranking; + + retrieval?: AISearchOptions.Retrieval; + } + + export namespace AISearchOptions { + export interface QueryRewrite { + enabled?: boolean; + + model?: + | '@cf/meta/llama-3.3-70b-instruct-fp8-fast' + | '@cf/meta/llama-3.1-8b-instruct-fast' + | '@cf/meta/llama-3.1-8b-instruct-fp8' + | '@cf/meta/llama-4-scout-17b-16e-instruct' + | '@cf/qwen/qwen3-30b-a3b-fp8' + | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b' + | '@cf/moonshotai/kimi-k2-instruct' + | 'anthropic/claude-3-7-sonnet' + | 'anthropic/claude-sonnet-4' + | 'anthropic/claude-opus-4' + | 'anthropic/claude-3-5-haiku' + | 'cerebras/qwen-3-235b-a22b-instruct' + | 'cerebras/qwen-3-235b-a22b-thinking' + | 'cerebras/llama-3.3-70b' + | 'cerebras/llama-4-maverick-17b-128e-instruct' + | 'cerebras/llama-4-scout-17b-16e-instruct' + | 'cerebras/gpt-oss-120b' + | 'google-ai-studio/gemini-2.5-flash' + | 'google-ai-studio/gemini-2.5-pro' + | 'grok/grok-4' + | 'groq/llama-3.3-70b-versatile' + | 'groq/llama-3.1-8b-instant' + | 'openai/gpt-5' + | 'openai/gpt-5-mini' + | 'openai/gpt-5-nano' + | ''; + + rewrite_prompt?: string; + } + + export interface Reranking { + enabled?: boolean; + + match_threshold?: number; + + model?: '@cf/baai/bge-reranker-base' | ''; + } + + export interface Retrieval { + context_expansion?: number; + + filters?: Retrieval.UnionMember0 | Retrieval.UnionMember1; + + match_threshold?: number; + + max_num_results?: number; + + retrieval_type?: 'vector' | 'keyword' | 'hybrid'; + } + + export namespace Retrieval { + export interface UnionMember0 { + key: string; + + type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte'; + + value: string | number | boolean; + } + + export interface UnionMember1 { + filters: Array; + + type: 'and' | 'or'; + } + + export namespace UnionMember1 { + export interface Filter { + key: string; + + type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte'; + + value: string | number | boolean; + } + } + } + } +} + export interface InstanceStatsParams { account_id: string; } @@ -2205,14 +2695,18 @@ export declare namespace Instances { type InstanceUpdateResponse as InstanceUpdateResponse, type InstanceListResponse as InstanceListResponse, type InstanceDeleteResponse as InstanceDeleteResponse, + type InstanceChatCompletionsResponse as InstanceChatCompletionsResponse, type InstanceReadResponse as InstanceReadResponse, + type InstanceSearchResponse as InstanceSearchResponse, type InstanceStatsResponse as InstanceStatsResponse, InstanceListResponsesV4PagePaginationArray as InstanceListResponsesV4PagePaginationArray, type InstanceCreateParams as InstanceCreateParams, type InstanceUpdateParams as InstanceUpdateParams, type InstanceListParams as InstanceListParams, type InstanceDeleteParams as InstanceDeleteParams, + type InstanceChatCompletionsParams as InstanceChatCompletionsParams, type InstanceReadParams as InstanceReadParams, + type InstanceSearchParams as InstanceSearchParams, type InstanceStatsParams as InstanceStatsParams, }; diff --git a/src/resources/aisearch/instances/items.ts b/src/resources/aisearch/instances/items.ts index 08a7ae9762..1b6b7a631d 100644 --- a/src/resources/aisearch/instances/items.ts +++ b/src/resources/aisearch/instances/items.ts @@ -33,7 +33,7 @@ export class Items extends APIResource { } /** - * Get Items. + * Get Item. * * @example * ```ts @@ -92,17 +92,17 @@ export interface ItemGetResponse { export interface ItemListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ search?: string; /** - * Query param: + * Query param */ status?: 'queued' | 'running' | 'completed' | 'error' | 'skipped'; } diff --git a/src/resources/aisearch/instances/jobs.ts b/src/resources/aisearch/instances/jobs.ts index 004f50b98f..f08012bbba 100644 --- a/src/resources/aisearch/instances/jobs.ts +++ b/src/resources/aisearch/instances/jobs.ts @@ -176,7 +176,7 @@ export interface JobCreateParams { export interface JobListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; } @@ -187,17 +187,17 @@ export interface JobGetParams { export interface JobLogsParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ page?: number; /** - * Query param: + * Query param */ per_page?: number; } diff --git a/src/resources/aisearch/tokens.ts b/src/resources/aisearch/tokens.ts index ba54622174..212d1bae5d 100644 --- a/src/resources/aisearch/tokens.ts +++ b/src/resources/aisearch/tokens.ts @@ -269,27 +269,27 @@ export interface TokenReadResponse { export interface TokenCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ cf_api_id: string; /** - * Body param: + * Body param */ cf_api_key: string; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ legacy?: boolean; } @@ -300,7 +300,7 @@ export interface TokenUpdateParams { export interface TokenListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; } diff --git a/src/resources/alerting/silences.ts b/src/resources/alerting/silences.ts index eec14eeafd..a1a4fa6da8 100644 --- a/src/resources/alerting/silences.ts +++ b/src/resources/alerting/silences.ts @@ -277,7 +277,7 @@ export interface SilenceCreateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } @@ -308,7 +308,7 @@ export interface SilenceUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/api-gateway/configurations.ts b/src/resources/api-gateway/configurations.ts index 8d390ae8aa..a9462e934c 100644 --- a/src/resources/api-gateway/configurations.ts +++ b/src/resources/api-gateway/configurations.ts @@ -102,7 +102,7 @@ export interface ConfigurationUpdateParams { zone_id: string; /** - * Body param: + * Body param */ auth_id_characteristics: Array< | ConfigurationUpdateParams.APIShieldAuthIDCharacteristic diff --git a/src/resources/api-gateway/discovery/operations.ts b/src/resources/api-gateway/discovery/operations.ts index 2ed9c4cc6a..f7b4a5fd74 100644 --- a/src/resources/api-gateway/discovery/operations.ts +++ b/src/resources/api-gateway/discovery/operations.ts @@ -182,7 +182,7 @@ export interface OperationBulkEditParams { zone_id: string; /** - * Body param: + * Body param */ body: { [key: string]: OperationBulkEditParams.Body }; } diff --git a/src/resources/api-gateway/operations/operations.ts b/src/resources/api-gateway/operations/operations.ts index 44afc92131..df5b631ca3 100644 --- a/src/resources/api-gateway/operations/operations.ts +++ b/src/resources/api-gateway/operations/operations.ts @@ -1417,7 +1417,7 @@ export interface OperationBulkCreateParams { zone_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/api-gateway/operations/schema-validation.ts b/src/resources/api-gateway/operations/schema-validation.ts index f9f298355e..4d7e821cce 100644 --- a/src/resources/api-gateway/operations/schema-validation.ts +++ b/src/resources/api-gateway/operations/schema-validation.ts @@ -166,7 +166,7 @@ export interface SchemaValidationEditParams { zone_id: string; /** - * Body param: + * Body param */ settings_multiple_request: SettingsMultipleRequestParam; } diff --git a/src/resources/audit-logs.ts b/src/resources/audit-logs.ts index bb07e279be..ef9d81b224 100644 --- a/src/resources/audit-logs.ts +++ b/src/resources/audit-logs.ts @@ -35,12 +35,12 @@ export interface AuditLogListParams extends V4PagePaginationArrayParams { id?: string; /** - * Query param: + * Query param */ action?: AuditLogListParams.Action; /** - * Query param: + * Query param */ actor?: AuditLogListParams.Actor; @@ -72,7 +72,7 @@ export interface AuditLogListParams extends V4PagePaginationArrayParams { since?: (string & {}) | (string & {}); /** - * Query param: + * Query param */ zone?: AuditLogListParams.Zone; } diff --git a/src/resources/botnet-feed/asn.ts b/src/resources/botnet-feed/asn.ts index d15791e65e..117d7f3a6a 100755 --- a/src/resources/botnet-feed/asn.ts +++ b/src/resources/botnet-feed/asn.ts @@ -65,7 +65,7 @@ export interface ASNDayReportParams { account_id: string; /** - * Query param: + * Query param */ date?: string; } diff --git a/src/resources/brand-protection/logo-matches.ts b/src/resources/brand-protection/logo-matches.ts index bc53041299..d87e3837f6 100644 --- a/src/resources/brand-protection/logo-matches.ts +++ b/src/resources/brand-protection/logo-matches.ts @@ -41,44 +41,44 @@ export interface LogoMatchGetResponse { export interface LogoMatchDownloadParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ limit?: string; /** - * Query param: + * Query param */ logo_id?: Array; /** - * Query param: + * Query param */ offset?: string; } export interface LogoMatchGetParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ limit?: string; /** - * Query param: + * Query param */ logo_id?: Array; /** - * Query param: + * Query param */ offset?: string; } diff --git a/src/resources/brand-protection/logos.ts b/src/resources/brand-protection/logos.ts index dfc6907049..7a87dab36c 100644 --- a/src/resources/brand-protection/logos.ts +++ b/src/resources/brand-protection/logos.ts @@ -39,27 +39,27 @@ export interface LogoCreateResponse { export interface LogoCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ match_type?: string; /** - * Query param: + * Query param */ tag?: string; /** - * Query param: + * Query param */ threshold?: number; /** - * Body param: + * Body param */ image?: Core.Uploadable; } diff --git a/src/resources/brand-protection/matches.ts b/src/resources/brand-protection/matches.ts index 5ce299de58..985c0569c3 100644 --- a/src/resources/brand-protection/matches.ts +++ b/src/resources/brand-protection/matches.ts @@ -41,54 +41,54 @@ export interface MatchGetResponse { export interface MatchDownloadParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ id?: string; /** - * Query param: + * Query param */ include_domain_id?: boolean; /** - * Query param: + * Query param */ limit?: number; /** - * Query param: + * Query param */ offset?: number; } export interface MatchGetParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ id?: string; /** - * Query param: + * Query param */ include_domain_id?: boolean; /** - * Query param: + * Query param */ limit?: number; /** - * Query param: + * Query param */ offset?: number; } diff --git a/src/resources/brand-protection/queries.ts b/src/resources/brand-protection/queries.ts index 06cb1cc58a..bc6733d4fd 100644 --- a/src/resources/brand-protection/queries.ts +++ b/src/resources/brand-protection/queries.ts @@ -44,81 +44,81 @@ export class Queries extends APIResource { export interface QueryCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ id?: string; /** - * Query param: + * Query param */ query_scan?: boolean; /** - * Query param: + * Query param */ query_tag?: string; /** - * Body param: + * Body param */ max_time?: string | null; /** - * Body param: + * Body param */ min_time?: string | null; /** - * Body param: + * Body param */ body_scan?: boolean; /** - * Body param: + * Body param */ string_matches?: unknown; /** - * Body param: + * Body param */ body_tag?: string; } export interface QueryDeleteParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ id?: string; /** - * Query param: + * Query param */ scan?: boolean; /** - * Query param: + * Query param */ tag?: string; } export interface QueryBulkParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ queries?: Array<{ [key: string]: unknown }>; } diff --git a/src/resources/browser-rendering/content.ts b/src/resources/browser-rendering/content.ts index d4984ec714..ada1748fdf 100644 --- a/src/resources/browser-rendering/content.ts +++ b/src/resources/browser-rendering/content.ts @@ -119,7 +119,7 @@ export declare namespace ContentCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -160,17 +160,17 @@ export declare namespace ContentCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -380,7 +380,7 @@ export declare namespace ContentCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -421,17 +421,17 @@ export declare namespace ContentCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; diff --git a/src/resources/browser-rendering/json.ts b/src/resources/browser-rendering/json.ts index 03ab07cf74..b3f80e11ac 100644 --- a/src/resources/browser-rendering/json.ts +++ b/src/resources/browser-rendering/json.ts @@ -123,7 +123,7 @@ export declare namespace JsonCreateParams { custom_ai?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -133,7 +133,7 @@ export declare namespace JsonCreateParams { gotoOptions?: Variant0.GotoOptions; /** - * Body param: + * Body param */ prompt?: string; @@ -169,22 +169,22 @@ export declare namespace JsonCreateParams { >; /** - * Body param: + * Body param */ response_format?: Variant0.ResponseFormat; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -423,7 +423,7 @@ export declare namespace JsonCreateParams { custom_ai?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -433,7 +433,7 @@ export declare namespace JsonCreateParams { gotoOptions?: Variant1.GotoOptions; /** - * Body param: + * Body param */ prompt?: string; @@ -469,22 +469,22 @@ export declare namespace JsonCreateParams { >; /** - * Body param: + * Body param */ response_format?: Variant1.ResponseFormat; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; diff --git a/src/resources/browser-rendering/links.ts b/src/resources/browser-rendering/links.ts index 906d33b1a9..6a9f8f2b65 100644 --- a/src/resources/browser-rendering/links.ts +++ b/src/resources/browser-rendering/links.ts @@ -115,12 +115,12 @@ export declare namespace LinkCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; /** - * Body param: + * Body param */ excludeExternalLinks?: boolean; @@ -161,17 +161,17 @@ export declare namespace LinkCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -181,7 +181,7 @@ export declare namespace LinkCreateParams { viewport?: Variant0.Viewport; /** - * Body param: + * Body param */ visibleLinksOnly?: boolean; @@ -385,12 +385,12 @@ export declare namespace LinkCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; /** - * Body param: + * Body param */ excludeExternalLinks?: boolean; @@ -431,17 +431,17 @@ export declare namespace LinkCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -451,7 +451,7 @@ export declare namespace LinkCreateParams { viewport?: Variant1.Viewport; /** - * Body param: + * Body param */ visibleLinksOnly?: boolean; diff --git a/src/resources/browser-rendering/markdown.ts b/src/resources/browser-rendering/markdown.ts index 208da5e339..bfe57ddb71 100644 --- a/src/resources/browser-rendering/markdown.ts +++ b/src/resources/browser-rendering/markdown.ts @@ -122,7 +122,7 @@ export declare namespace MarkdownCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -163,17 +163,17 @@ export declare namespace MarkdownCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -383,7 +383,7 @@ export declare namespace MarkdownCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -424,17 +424,17 @@ export declare namespace MarkdownCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; diff --git a/src/resources/browser-rendering/pdf.ts b/src/resources/browser-rendering/pdf.ts index 0d306669ff..0e62ff0380 100644 --- a/src/resources/browser-rendering/pdf.ts +++ b/src/resources/browser-rendering/pdf.ts @@ -118,7 +118,7 @@ export declare namespace PDFCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -164,17 +164,17 @@ export declare namespace PDFCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -483,7 +483,7 @@ export declare namespace PDFCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -529,17 +529,17 @@ export declare namespace PDFCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; diff --git a/src/resources/browser-rendering/scrape.ts b/src/resources/browser-rendering/scrape.ts index ca424063f2..23c420601c 100644 --- a/src/resources/browser-rendering/scrape.ts +++ b/src/resources/browser-rendering/scrape.ts @@ -103,7 +103,7 @@ export declare namespace ScrapeCreateParams { account_id: string; /** - * Body param: + * Body param */ elements: Array; @@ -184,7 +184,7 @@ export declare namespace ScrapeCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -225,17 +225,17 @@ export declare namespace ScrapeCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -373,7 +373,7 @@ export declare namespace ScrapeCreateParams { account_id: string; /** - * Body param: + * Body param */ elements: Array; @@ -453,7 +453,7 @@ export declare namespace ScrapeCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -494,17 +494,17 @@ export declare namespace ScrapeCreateParams { >; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; diff --git a/src/resources/browser-rendering/screenshot.ts b/src/resources/browser-rendering/screenshot.ts index 435ee741d5..74d83a1503 100644 --- a/src/resources/browser-rendering/screenshot.ts +++ b/src/resources/browser-rendering/screenshot.ts @@ -140,7 +140,7 @@ export declare namespace ScreenshotCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -186,27 +186,27 @@ export declare namespace ScreenshotCreateParams { screenshotOptions?: Variant0.ScreenshotOptions; /** - * Body param: + * Body param */ scrollPage?: boolean; /** - * Body param: + * Body param */ selector?: string; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -452,7 +452,7 @@ export declare namespace ScreenshotCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -498,27 +498,27 @@ export declare namespace ScreenshotCreateParams { screenshotOptions?: Variant1.ScreenshotOptions; /** - * Body param: + * Body param */ scrollPage?: boolean; /** - * Body param: + * Body param */ selector?: string; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; diff --git a/src/resources/browser-rendering/snapshot.ts b/src/resources/browser-rendering/snapshot.ts index 0cb5af646a..9a33090e23 100644 --- a/src/resources/browser-rendering/snapshot.ts +++ b/src/resources/browser-rendering/snapshot.ts @@ -131,7 +131,7 @@ export declare namespace SnapshotCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -172,22 +172,22 @@ export declare namespace SnapshotCreateParams { >; /** - * Body param: + * Body param */ screenshotOptions?: Variant0.ScreenshotOptions; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; @@ -428,7 +428,7 @@ export declare namespace SnapshotCreateParams { cookies?: Array; /** - * Body param: + * Body param */ emulateMediaType?: string; @@ -469,22 +469,22 @@ export declare namespace SnapshotCreateParams { >; /** - * Body param: + * Body param */ screenshotOptions?: Variant1.ScreenshotOptions; /** - * Body param: + * Body param */ setExtraHTTPHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ setJavaScriptEnabled?: boolean; /** - * Body param: + * Body param */ userAgent?: string; diff --git a/src/resources/cache/cache-reserve.ts b/src/resources/cache/cache-reserve.ts index 1d6bc46412..0add13588f 100644 --- a/src/resources/cache/cache-reserve.ts +++ b/src/resources/cache/cache-reserve.ts @@ -244,7 +244,7 @@ export interface CacheReserveClearParams { zone_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/cache/cache.ts b/src/resources/cache/cache.ts index 4b57d9c83f..8855abfea6 100644 --- a/src/resources/cache/cache.ts +++ b/src/resources/cache/cache.ts @@ -152,7 +152,7 @@ export type CachePurgeParams = export declare namespace CachePurgeParams { export interface CachePurgeFlexPurgeByTags { /** - * Path param: + * Path param */ zone_id: string; @@ -166,7 +166,7 @@ export declare namespace CachePurgeParams { export interface CachePurgeFlexPurgeByHostnames { /** - * Path param: + * Path param */ zone_id: string; @@ -179,7 +179,7 @@ export declare namespace CachePurgeParams { export interface CachePurgeFlexPurgeByPrefixes { /** - * Path param: + * Path param */ zone_id: string; @@ -192,7 +192,7 @@ export declare namespace CachePurgeParams { export interface CachePurgeEverything { /** - * Path param: + * Path param */ zone_id: string; @@ -205,7 +205,7 @@ export declare namespace CachePurgeParams { export interface CachePurgeSingleFile { /** - * Path param: + * Path param */ zone_id: string; @@ -218,7 +218,7 @@ export declare namespace CachePurgeParams { export interface CachePurgeSingleFileWithURLAndHeaders { /** - * Path param: + * Path param */ zone_id: string; diff --git a/src/resources/certificate-authorities/hostname-associations.ts b/src/resources/certificate-authorities/hostname-associations.ts index 918bb201a7..e4a320a684 100644 --- a/src/resources/certificate-authorities/hostname-associations.ts +++ b/src/resources/certificate-authorities/hostname-associations.ts @@ -67,7 +67,7 @@ export interface HostnameAssociationUpdateParams { zone_id: string; /** - * Body param: + * Body param */ hostnames?: Array; diff --git a/src/resources/client-certificates.ts b/src/resources/client-certificates.ts index a7842e54dd..33ae8aa998 100644 --- a/src/resources/client-certificates.ts +++ b/src/resources/client-certificates.ts @@ -298,7 +298,7 @@ export interface ClientCertificateEditParams { zone_id: string; /** - * Body param: + * Body param */ reactivate?: boolean; } diff --git a/src/resources/cloud-connector/rules.ts b/src/resources/cloud-connector/rules.ts index 1e2a9e6381..759ac85362 100644 --- a/src/resources/cloud-connector/rules.ts +++ b/src/resources/cloud-connector/rules.ts @@ -111,7 +111,7 @@ export interface RuleUpdateParams { zone_id: string; /** - * Body param: + * Body param */ rules?: Array; } diff --git a/src/resources/cloudforce-one/threat-events/categories.ts b/src/resources/cloudforce-one/threat-events/categories.ts index cd9e316204..9119742948 100644 --- a/src/resources/cloudforce-one/threat-events/categories.ts +++ b/src/resources/cloudforce-one/threat-events/categories.ts @@ -185,22 +185,22 @@ export interface CategoryCreateParams { account_id: string; /** - * Body param: + * Body param */ killChain: number; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ mitreAttack?: Array; /** - * Body param: + * Body param */ shortname?: string; } @@ -232,22 +232,22 @@ export interface CategoryEditParams { account_id: string; /** - * Body param: + * Body param */ killChain?: number; /** - * Body param: + * Body param */ mitreAttack?: Array; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ shortname?: string; } diff --git a/src/resources/cloudforce-one/threat-events/datasets/datasets.ts b/src/resources/cloudforce-one/threat-events/datasets/datasets.ts index b622d676cc..6654a96b71 100644 --- a/src/resources/cloudforce-one/threat-events/datasets/datasets.ts +++ b/src/resources/cloudforce-one/threat-events/datasets/datasets.ts @@ -53,7 +53,11 @@ export class Datasets extends APIResource { * const response = * await client.cloudforceOne.threatEvents.datasets.edit( * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - * { account_id: 'account_id', isPublic: true, name: 'x' }, + * { + * account_id: 'account_id', + * isPublic: true, + * name: 'x', + * }, * ); * ``` */ diff --git a/src/resources/cloudforce-one/threat-events/event-tags.ts b/src/resources/cloudforce-one/threat-events/event-tags.ts index 67e2e277e5..565805a382 100644 --- a/src/resources/cloudforce-one/threat-events/event-tags.ts +++ b/src/resources/cloudforce-one/threat-events/event-tags.ts @@ -72,7 +72,7 @@ export interface EventTagCreateParams { account_id: string; /** - * Body param: + * Body param */ tags: Array; } diff --git a/src/resources/cloudforce-one/threat-events/raw.ts b/src/resources/cloudforce-one/threat-events/raw.ts index d2069e55fb..d9ddec26f7 100644 --- a/src/resources/cloudforce-one/threat-events/raw.ts +++ b/src/resources/cloudforce-one/threat-events/raw.ts @@ -80,17 +80,17 @@ export interface RawEditParams { account_id: string; /** - * Body param: + * Body param */ data?: unknown; /** - * Body param: + * Body param */ source?: string; /** - * Body param: + * Body param */ tlp?: string; } diff --git a/src/resources/cloudforce-one/threat-events/tags.ts b/src/resources/cloudforce-one/threat-events/tags.ts index 3fb276c176..150707cceb 100644 --- a/src/resources/cloudforce-one/threat-events/tags.ts +++ b/src/resources/cloudforce-one/threat-events/tags.ts @@ -70,82 +70,82 @@ export interface TagCreateParams { account_id: string; /** - * Body param: + * Body param */ value: string; /** - * Body param: + * Body param */ activeDuration?: string; /** - * Body param: + * Body param */ actorCategory?: string; /** - * Body param: + * Body param */ aliasGroupNames?: Array; /** - * Body param: + * Body param */ aliasGroupNamesInternal?: Array; /** - * Body param: + * Body param */ analyticPriority?: number; /** - * Body param: + * Body param */ attributionConfidence?: string; /** - * Body param: + * Body param */ attributionOrganization?: string; /** - * Body param: + * Body param */ categoryUuid?: string; /** - * Body param: + * Body param */ externalReferenceLinks?: Array; /** - * Body param: + * Body param */ internalDescription?: string; /** - * Body param: + * Body param */ motive?: string; /** - * Body param: + * Body param */ opsecLevel?: string; /** - * Body param: + * Body param */ originCountryISO?: string; /** - * Body param: + * Body param */ priority?: number; /** - * Body param: + * Body param */ sophisticationLevel?: string; } diff --git a/src/resources/cloudforce-one/threat-events/threat-events.ts b/src/resources/cloudforce-one/threat-events/threat-events.ts index 3865bd31a6..4463f847d8 100644 --- a/src/resources/cloudforce-one/threat-events/threat-events.ts +++ b/src/resources/cloudforce-one/threat-events/threat-events.ts @@ -229,6 +229,8 @@ export interface ThreatEventCreateResponse { category: string; + datasetId: string; + date: string; event: string; @@ -284,6 +286,8 @@ export namespace ThreatEventListResponse { category: string; + datasetId: string; + date: string; event: string; @@ -359,14 +363,15 @@ export interface ThreatEventBulkCreateResponse { queuedIndicatorsCount: number; /** - * Number of events skipped due to duplicate UUID (only when preserveUuid=true) + * Correlation ID for async indicator processing */ - skippedEventsCount: number; + createBulkEventsRequestId?: string; /** - * Correlation ID for async indicator processing + * Array of created events with UUIDs and shard locations. Only present when + * includeCreatedEvents=true */ - createBulkEventsRequestId?: string; + createdEvents?: Array; /** * Array of error details @@ -375,6 +380,23 @@ export interface ThreatEventBulkCreateResponse { } export namespace ThreatEventBulkCreateResponse { + export interface CreatedEvent { + /** + * Original index in the input data array + */ + eventIndex: number; + + /** + * Dataset ID of the shard where the event was created + */ + shardId: string; + + /** + * UUID of the created event + */ + uuid: string; + } + export interface Error { /** * Error message @@ -395,6 +417,8 @@ export interface ThreatEventEditResponse { category: string; + datasetId: string; + date: string; event: string; @@ -447,6 +471,8 @@ export interface ThreatEventGetResponse { category: string; + datasetId: string; + date: string; event: string; @@ -499,52 +525,52 @@ export interface ThreatEventCreateParams { account_id: string; /** - * Body param: + * Body param */ category: string; /** - * Body param: + * Body param */ date: string; /** - * Body param: + * Body param */ event: string; /** - * Body param: + * Body param */ raw: ThreatEventCreateParams.Raw; /** - * Body param: + * Body param */ tlp: string; /** - * Body param: + * Body param */ accountId?: number; /** - * Body param: + * Body param */ attacker?: string | null; /** - * Body param: + * Body param */ attackerCountry?: string; /** - * Body param: + * Body param */ datasetId?: string; /** - * Body param: + * Body param */ indicator?: string; @@ -555,35 +581,29 @@ export interface ThreatEventCreateParams { indicators?: Array; /** - * Body param: + * Body param */ indicatorType?: string; /** - * Body param: + * Body param */ insight?: string; /** - * Body param: + * Body param */ tags?: Array; /** - * Body param: + * Body param */ targetCountry?: string; /** - * Body param: + * Body param */ targetIndustry?: string; - - /** - * Body param: Optional UUID for the event. Only used when preserveUuid=true in - * bulk create. Must be a valid UUID format. - */ - uuid?: string; } export namespace ThreatEventCreateParams { @@ -615,42 +635,52 @@ export interface ThreatEventListParams { account_id: string; /** - * Query param: + * Query param: Cursor for pagination. When provided, filters are embedded in the + * cursor so you only need to pass cursor and pageSize. Returned in the previous + * response's result_info.cursor field. Use cursor-based pagination for deep + * pagination (beyond 100,000 records) or for optimal performance. + */ + cursor?: string; + + /** + * Query param */ datasetId?: Array; /** - * Query param: + * Query param */ forceRefresh?: boolean; /** - * Query param: + * Query param */ format?: 'json' | 'stix2'; /** - * Query param: + * Query param */ order?: 'asc' | 'desc'; /** - * Query param: + * Query param */ orderBy?: string; /** - * Query param: + * Query param: Page number (1-indexed) for offset-based pagination. Limited to + * offset of 100,000 records. For deep pagination, use cursor-based pagination + * instead. */ page?: number; /** - * Query param: + * Query param: Number of results per page. Maximum 25,000. */ pageSize?: number; /** - * Query param: + * Query param */ search?: Array; } @@ -691,21 +721,20 @@ export interface ThreatEventBulkCreateParams { account_id: string; /** - * Body param: + * Body param */ data: Array; /** - * Body param: + * Body param */ datasetId: string; /** - * Body param: When true, use provided UUIDs from event data instead of generating - * new ones. Used for migration scenarios where original UUIDs must be preserved. - * Duplicate UUIDs will be skipped. + * Body param: When true, response includes array of created event UUIDs and shard + * IDs. Useful for tracking which events were created and where. */ - preserveUuid?: boolean; + includeCreatedEvents?: boolean; } export namespace ThreatEventBulkCreateParams { @@ -745,12 +774,6 @@ export namespace ThreatEventBulkCreateParams { targetCountry?: string; targetIndustry?: string; - - /** - * Optional UUID for the event. Only used when preserveUuid=true in bulk create. - * Must be a valid UUID format. - */ - uuid?: string; } export namespace Data { @@ -783,72 +806,72 @@ export interface ThreatEventEditParams { account_id: string; /** - * Body param: + * Body param */ attacker?: string | null; /** - * Body param: + * Body param */ attackerCountry?: string; /** - * Body param: + * Body param */ category?: string; /** - * Body param: + * Body param */ createdAt?: string; /** - * Body param: + * Body param */ datasetId?: string; /** - * Body param: + * Body param */ date?: string; /** - * Body param: + * Body param */ event?: string; /** - * Body param: + * Body param */ indicator?: string; /** - * Body param: + * Body param */ indicatorType?: string; /** - * Body param: + * Body param */ insight?: string; /** - * Body param: + * Body param */ raw?: ThreatEventEditParams.Raw; /** - * Body param: + * Body param */ targetCountry?: string; /** - * Body param: + * Body param */ targetIndustry?: string; /** - * Body param: + * Body param */ tlp?: string; } diff --git a/src/resources/connectivity/directory/services.ts b/src/resources/connectivity/directory/services.ts index 65079e2c04..fd2c10d763 100644 --- a/src/resources/connectivity/directory/services.ts +++ b/src/resources/connectivity/directory/services.ts @@ -458,7 +458,7 @@ export interface ServiceCreateParams { account_id: string; /** - * Body param: + * Body param */ host: | ServiceCreateParams.InfraIPv4Host @@ -467,22 +467,22 @@ export interface ServiceCreateParams { | ServiceCreateParams.InfraHostnameHost; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ type: 'http'; /** - * Body param: + * Body param */ http_port?: number | null; /** - * Body param: + * Body param */ https_port?: number | null; } @@ -543,12 +543,12 @@ export namespace ServiceCreateParams { export interface ServiceUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ host: | ServiceUpdateParams.InfraIPv4Host @@ -557,22 +557,22 @@ export interface ServiceUpdateParams { | ServiceUpdateParams.InfraHostnameHost; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ type: 'http'; /** - * Body param: + * Body param */ http_port?: number | null; /** - * Body param: + * Body param */ https_port?: number | null; } @@ -638,7 +638,7 @@ export interface ServiceListParams extends V4PagePaginationArrayParams { account_id: string; /** - * Query param: + * Query param */ type?: 'http' | null; } diff --git a/src/resources/content-scanning/payloads.ts b/src/resources/content-scanning/payloads.ts index 12c7fa4b8e..3905f4e2b4 100644 --- a/src/resources/content-scanning/payloads.ts +++ b/src/resources/content-scanning/payloads.ts @@ -149,7 +149,7 @@ export interface PayloadCreateParams { zone_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/custom-certificates/custom-certificates.ts b/src/resources/custom-certificates/custom-certificates.ts index deefdb9eb5..ee7d22563d 100644 --- a/src/resources/custom-certificates/custom-certificates.ts +++ b/src/resources/custom-certificates/custom-certificates.ts @@ -156,30 +156,61 @@ export interface CustomCertificate { */ id: string; + /** + * Identifier. + */ + zone_id: string; + /** * A ubiquitous bundle has the highest probability of being verified everywhere, * even by clients using outdated or unusual trust stores. An optimal bundle uses * the shortest chain and newest intermediates. And the force bundle verifies the * chain, but does not otherwise modify it. */ - bundle_method: CustomHostnamesAPI.BundleMethod; + bundle_method?: CustomHostnamesAPI.BundleMethod; /** * When the certificate from the authority expires. */ - expires_on: string; + expires_on?: string; - hosts: Array; + /** + * Specify the region where your private key can be held locally for optimal TLS + * performance. HTTPS connections to any excluded data center will still be fully + * encrypted, but will incur some latency while Keyless SSL is used to complete the + * handshake with the nearest allowed data center. Options allow distribution to + * only to U.S. data centers, only to E.U. data centers, or only to highest + * security data centers. Default distribution is to all Cloudflare datacenters, + * for optimal performance. + */ + geo_restrictions?: GeoRestrictions; + + hosts?: Array; /** * The certificate authority that issued the certificate. */ - issuer: string; + issuer?: string; + + keyless_server?: KeylessCertificatesAPI.KeylessCertificate; /** * When the certificate was last modified. */ - modified_on: string; + modified_on?: string; + + /** + * Specify the policy that determines the region where your private key will be + * held locally. HTTPS connections to any excluded data center will still be fully + * encrypted, but will incur some latency while Keyless SSL is used to complete the + * handshake with the nearest allowed data center. Any combination of countries, + * specified by their two letter country code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * can be chosen, such as 'country: IN', as well as 'region: EU' which refers to + * the EU region. If there are too few data centers satisfying the policy, it will + * be rejected. + */ + policy?: string; /** * The order/priority in which the certificate will be used in a request. The @@ -187,53 +218,22 @@ export interface CustomCertificate { * but 'legacy_custom' certificates will always supercede 'sni_custom' * certificates. */ - priority: number; + priority?: number; /** * The type of hash used for the certificate. */ - signature: string; + signature?: string; /** * Status of the zone's custom SSL. */ - status: 'active' | 'expired' | 'deleted' | 'pending' | 'initializing'; + status?: 'active' | 'expired' | 'deleted' | 'pending' | 'initializing'; /** * When the certificate was uploaded to Cloudflare. */ - uploaded_on: string; - - /** - * Identifier. - */ - zone_id: string; - - /** - * Specify the region where your private key can be held locally for optimal TLS - * performance. HTTPS connections to any excluded data center will still be fully - * encrypted, but will incur some latency while Keyless SSL is used to complete the - * handshake with the nearest allowed data center. Options allow distribution to - * only to U.S. data centers, only to E.U. data centers, or only to highest - * security data centers. Default distribution is to all Cloudflare datacenters, - * for optimal performance. - */ - geo_restrictions?: GeoRestrictions; - - keyless_server?: KeylessCertificatesAPI.KeylessCertificate; - - /** - * Specify the policy that determines the region where your private key will be - * held locally. HTTPS connections to any excluded data center will still be fully - * encrypted, but will incur some latency while Keyless SSL is used to complete the - * handshake with the nearest allowed data center. Any combination of countries, - * specified by their two letter country code - * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - * can be chosen, such as 'country: IN', as well as 'region: EU' which refers to - * the EU region. If there are too few data centers satisfying the policy, it will - * be rejected. - */ - policy?: string; + uploaded_on?: string; } /** @@ -354,53 +354,74 @@ export interface CustomCertificateDeleteParams { zone_id: string; } -export interface CustomCertificateEditParams { - /** - * Path param: Identifier. - */ - zone_id: string; - - /** - * Body param: A ubiquitous bundle has the highest probability of being verified - * everywhere, even by clients using outdated or unusual trust stores. An optimal - * bundle uses the shortest chain and newest intermediates. And the force bundle - * verifies the chain, but does not otherwise modify it. - */ - bundle_method?: CustomHostnamesAPI.BundleMethodParam; - - /** - * Body param: The zone's SSL certificate or certificate and the intermediate(s). - */ - certificate?: string; - - /** - * Body param: Specify the region where your private key can be held locally for - * optimal TLS performance. HTTPS connections to any excluded data center will - * still be fully encrypted, but will incur some latency while Keyless SSL is used - * to complete the handshake with the nearest allowed data center. Options allow - * distribution to only to U.S. data centers, only to E.U. data centers, or only to - * highest security data centers. Default distribution is to all Cloudflare - * datacenters, for optimal performance. - */ - geo_restrictions?: GeoRestrictionsParam; - - /** - * Body param: Specify the policy that determines the region where your private key - * will be held locally. HTTPS connections to any excluded data center will still - * be fully encrypted, but will incur some latency while Keyless SSL is used to - * complete the handshake with the nearest allowed data center. Any combination of - * countries, specified by their two letter country code - * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - * can be chosen, such as 'country: IN', as well as 'region: EU' which refers to - * the EU region. If there are too few data centers satisfying the policy, it will - * be rejected. - */ - policy?: string; +export type CustomCertificateEditParams = + | CustomCertificateEditParams.Variant0 + | CustomCertificateEditParams.Variant1; + +export declare namespace CustomCertificateEditParams { + export interface Variant0 { + /** + * Path param: Identifier. + */ + zone_id: string; + + /** + * Body param: A ubiquitous bundle has the highest probability of being verified + * everywhere, even by clients using outdated or unusual trust stores. An optimal + * bundle uses the shortest chain and newest intermediates. And the force bundle + * verifies the chain, but does not otherwise modify it. + */ + bundle_method?: CustomHostnamesAPI.BundleMethodParam; + } - /** - * Body param: The zone's private key. - */ - private_key?: string; + export interface Variant1 { + /** + * Path param: Identifier. + */ + zone_id: string; + + /** + * Body param: The zone's SSL certificate or certificate and the intermediate(s). + */ + certificate: string; + + /** + * Body param: The zone's private key. + */ + private_key: string; + + /** + * Body param: A ubiquitous bundle has the highest probability of being verified + * everywhere, even by clients using outdated or unusual trust stores. An optimal + * bundle uses the shortest chain and newest intermediates. And the force bundle + * verifies the chain, but does not otherwise modify it. + */ + bundle_method?: CustomHostnamesAPI.BundleMethodParam; + + /** + * Body param: Specify the region where your private key can be held locally for + * optimal TLS performance. HTTPS connections to any excluded data center will + * still be fully encrypted, but will incur some latency while Keyless SSL is used + * to complete the handshake with the nearest allowed data center. Options allow + * distribution to only to U.S. data centers, only to E.U. data centers, or only to + * highest security data centers. Default distribution is to all Cloudflare + * datacenters, for optimal performance. + */ + geo_restrictions?: GeoRestrictionsParam; + + /** + * Body param: Specify the policy that determines the region where your private key + * will be held locally. HTTPS connections to any excluded data center will still + * be fully encrypted, but will incur some latency while Keyless SSL is used to + * complete the handshake with the nearest allowed data center. Any combination of + * countries, specified by their two letter country code + * (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + * can be chosen, such as 'country: IN', as well as 'region: EU' which refers to + * the EU region. If there are too few data centers satisfying the policy, it will + * be rejected. + */ + policy?: string; + } } export interface CustomCertificateGetParams { diff --git a/src/resources/d1/database/database.ts b/src/resources/d1/database/database.ts index db2ee081de..2ca49794b5 100644 --- a/src/resources/d1/database/database.ts +++ b/src/resources/d1/database/database.ts @@ -787,7 +787,7 @@ export interface DatabaseExportParams { current_bookmark?: string; /** - * Body param: + * Body param */ dump_options?: DatabaseExportParams.DumpOptions; } @@ -903,7 +903,7 @@ export declare namespace DatabaseQueryParams { sql: string; /** - * Body param: + * Body param */ params?: Array; } @@ -915,7 +915,7 @@ export declare namespace DatabaseQueryParams { account_id: string; /** - * Body param: + * Body param */ batch?: Array; } @@ -952,7 +952,7 @@ export declare namespace DatabaseRawParams { sql: string; /** - * Body param: + * Body param */ params?: Array; } @@ -964,7 +964,7 @@ export declare namespace DatabaseRawParams { account_id: string; /** - * Body param: + * Body param */ batch?: Array; } diff --git a/src/resources/diagnostics/traceroutes.ts b/src/resources/diagnostics/traceroutes.ts index 292c9f8484..891c7ef581 100644 --- a/src/resources/diagnostics/traceroutes.ts +++ b/src/resources/diagnostics/traceroutes.ts @@ -167,7 +167,7 @@ export interface TracerouteCreateParams { account_id: string; /** - * Body param: + * Body param */ targets: Array; @@ -178,7 +178,7 @@ export interface TracerouteCreateParams { colos?: Array; /** - * Body param: + * Body param */ options?: TracerouteCreateParams.Options; } diff --git a/src/resources/dns-firewall/dns-firewall.ts b/src/resources/dns-firewall/dns-firewall.ts index b71c825e34..b8c62627f2 100644 --- a/src/resources/dns-firewall/dns-firewall.ts +++ b/src/resources/dns-firewall/dns-firewall.ts @@ -558,7 +558,7 @@ export interface DNSFirewallCreateParams { name: string; /** - * Body param: + * Body param */ upstream_ips: Array; @@ -721,7 +721,7 @@ export interface DNSFirewallEditParams { retries?: number; /** - * Body param: + * Body param */ upstream_ips?: Array; } diff --git a/src/resources/dns/records.ts b/src/resources/dns/records.ts index b3eb5c6bb2..a838bd1fe8 100644 --- a/src/resources/dns/records.ts +++ b/src/resources/dns/records.ts @@ -9924,12 +9924,12 @@ export interface RecordListParams extends V4PagePaginationArrayParams { zone_id: string; /** - * Query param: + * Query param */ comment?: RecordListParams.Comment; /** - * Query param: + * Query param */ content?: RecordListParams.Content; @@ -9947,7 +9947,7 @@ export interface RecordListParams extends V4PagePaginationArrayParams { match?: 'any' | 'all'; /** - * Query param: + * Query param */ name?: RecordListParams.Name; @@ -9972,7 +9972,7 @@ export interface RecordListParams extends V4PagePaginationArrayParams { search?: string; /** - * Query param: + * Query param */ tag?: RecordListParams.Tag; @@ -10146,17 +10146,17 @@ export interface RecordBatchParams { zone_id: string; /** - * Body param: + * Body param */ deletes?: Array; /** - * Body param: + * Body param */ patches?: Array; /** - * Body param: + * Body param */ posts?: Array< | ARecordParam @@ -10183,7 +10183,7 @@ export interface RecordBatchParams { >; /** - * Body param: + * Body param */ puts?: Array; } @@ -12282,7 +12282,7 @@ export interface RecordScanParams { zone_id: string; /** - * Body param: + * Body param */ body: unknown; } @@ -12301,7 +12301,7 @@ export interface RecordScanReviewParams { zone_id: string; /** - * Body param: + * Body param */ accepts?: Array< | ARecordParam @@ -12328,7 +12328,7 @@ export interface RecordScanReviewParams { >; /** - * Body param: + * Body param */ rejects?: Array; } diff --git a/src/resources/dns/settings/account/account.ts b/src/resources/dns/settings/account/account.ts index 9c46a00f70..e28d705120 100644 --- a/src/resources/dns/settings/account/account.ts +++ b/src/resources/dns/settings/account/account.ts @@ -315,7 +315,7 @@ export interface AccountEditParams { account_id: string; /** - * Body param: + * Body param */ zone_defaults?: AccountEditParams.ZoneDefaults; } diff --git a/src/resources/dns/settings/account/views.ts b/src/resources/dns/settings/account/views.ts index 788751376e..b57c602d36 100644 --- a/src/resources/dns/settings/account/views.ts +++ b/src/resources/dns/settings/account/views.ts @@ -283,7 +283,7 @@ export interface ViewListParams extends V4PagePaginationArrayParams { match?: 'any' | 'all'; /** - * Query param: + * Query param */ name?: ViewListParams.Name; diff --git a/src/resources/dns/zone-transfers/acls.ts b/src/resources/dns/zone-transfers/acls.ts index 47ba5613f9..f491af2edb 100644 --- a/src/resources/dns/zone-transfers/acls.ts +++ b/src/resources/dns/zone-transfers/acls.ts @@ -141,7 +141,7 @@ export interface ACLDeleteResponse { export interface ACLCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -162,7 +162,7 @@ export interface ACLCreateParams { export interface ACLUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/dns/zone-transfers/force-axfr.ts b/src/resources/dns/zone-transfers/force-axfr.ts index 32234249f2..61981d2a16 100644 --- a/src/resources/dns/zone-transfers/force-axfr.ts +++ b/src/resources/dns/zone-transfers/force-axfr.ts @@ -34,12 +34,12 @@ export type ForceAXFR = string; export interface ForceAXFRCreateParams { /** - * Path param: + * Path param */ zone_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/dns/zone-transfers/incoming.ts b/src/resources/dns/zone-transfers/incoming.ts index f7d8516c50..230588ff8f 100644 --- a/src/resources/dns/zone-transfers/incoming.ts +++ b/src/resources/dns/zone-transfers/incoming.ts @@ -272,7 +272,7 @@ export interface IncomingGetResponse { export interface IncomingCreateParams { /** - * Path param: + * Path param */ zone_id: string; @@ -295,7 +295,7 @@ export interface IncomingCreateParams { export interface IncomingUpdateParams { /** - * Path param: + * Path param */ zone_id: string; diff --git a/src/resources/dns/zone-transfers/outgoing/outgoing.ts b/src/resources/dns/zone-transfers/outgoing/outgoing.ts index af3129b4d8..6ff8266057 100644 --- a/src/resources/dns/zone-transfers/outgoing/outgoing.ts +++ b/src/resources/dns/zone-transfers/outgoing/outgoing.ts @@ -341,7 +341,7 @@ export interface OutgoingGetResponse { export interface OutgoingCreateParams { /** - * Path param: + * Path param */ zone_id: string; @@ -358,7 +358,7 @@ export interface OutgoingCreateParams { export interface OutgoingUpdateParams { /** - * Path param: + * Path param */ zone_id: string; @@ -379,36 +379,36 @@ export interface OutgoingDeleteParams { export interface OutgoingDisableParams { /** - * Path param: + * Path param */ zone_id: string; /** - * Body param: + * Body param */ body: unknown; } export interface OutgoingEnableParams { /** - * Path param: + * Path param */ zone_id: string; /** - * Body param: + * Body param */ body: unknown; } export interface OutgoingForceNotifyParams { /** - * Path param: + * Path param */ zone_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/dns/zone-transfers/peers.ts b/src/resources/dns/zone-transfers/peers.ts index bcb71b93ea..3bbd2ceeb6 100644 --- a/src/resources/dns/zone-transfers/peers.ts +++ b/src/resources/dns/zone-transfers/peers.ts @@ -157,7 +157,7 @@ export interface PeerDeleteResponse { export interface PeerCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -169,7 +169,7 @@ export interface PeerCreateParams { export interface PeerUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/dns/zone-transfers/tsigs.ts b/src/resources/dns/zone-transfers/tsigs.ts index cc1814dd2c..58c497dc07 100644 --- a/src/resources/dns/zone-transfers/tsigs.ts +++ b/src/resources/dns/zone-transfers/tsigs.ts @@ -147,7 +147,7 @@ export interface TSIGDeleteResponse { export interface TSIGCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -169,7 +169,7 @@ export interface TSIGCreateParams { export interface TSIGUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/email-routing/email-routing.ts b/src/resources/email-routing/email-routing.ts index bf68594b09..4366910bcd 100644 --- a/src/resources/email-routing/email-routing.ts +++ b/src/resources/email-routing/email-routing.ts @@ -141,7 +141,7 @@ export interface EmailRoutingDisableParams { zone_id: string; /** - * Body param: + * Body param */ body: unknown; } @@ -153,7 +153,7 @@ export interface EmailRoutingEnableParams { zone_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/email-security/investigate/investigate.ts b/src/resources/email-security/investigate/investigate.ts index 017c835c52..3e552eafe7 100644 --- a/src/resources/email-security/investigate/investigate.ts +++ b/src/resources/email-security/investigate/investigate.ts @@ -419,12 +419,12 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams { action_log?: boolean; /** - * Query param: + * Query param */ alert_id?: string; /** - * Query param: + * Query param */ cursor?: string; @@ -454,12 +454,12 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams { message_action?: 'PREVIEW' | 'QUARANTINE_RELEASED' | 'MOVED'; /** - * Query param: + * Query param */ message_id?: string; /** - * Query param: + * Query param */ metric?: string; @@ -493,12 +493,12 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams { query?: string; /** - * Query param: + * Query param */ recipient?: string; /** - * Query param: + * Query param */ sender?: string; @@ -509,7 +509,7 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams { start?: string; /** - * Query param: + * Query param */ subject?: string; } diff --git a/src/resources/email-security/investigate/move.ts b/src/resources/email-security/investigate/move.ts index 75284bb033..3d465a2a6c 100644 --- a/src/resources/email-security/investigate/move.ts +++ b/src/resources/email-security/investigate/move.ts @@ -45,7 +45,6 @@ export class Move extends APIResource { * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * destination: 'Inbox', - * postfix_ids: ['4Njp3P0STMz2c02Q'], * }, * )) { * // ... @@ -118,7 +117,7 @@ export interface MoveCreateParams { account_id: string; /** - * Body param: + * Body param */ destination: | 'Inbox' @@ -135,7 +134,7 @@ export interface MoveBulkParams { account_id: string; /** - * Body param: + * Body param */ destination: | 'Inbox' @@ -145,9 +144,15 @@ export interface MoveBulkParams { | 'RecoverableItemsPurges'; /** - * Body param: + * Body param: List of message IDs to move. */ - postfix_ids: Array; + ids?: Array; + + /** + * @deprecated Body param: Deprecated: Use `ids` instead. List of message IDs to + * move. + */ + postfix_ids?: Array; } Move.MoveCreateResponsesSinglePage = MoveCreateResponsesSinglePage; diff --git a/src/resources/email-security/investigate/reclassify.ts b/src/resources/email-security/investigate/reclassify.ts index 2330f8cf94..5c40b08ab7 100644 --- a/src/resources/email-security/investigate/reclassify.ts +++ b/src/resources/email-security/investigate/reclassify.ts @@ -43,7 +43,7 @@ export interface ReclassifyCreateParams { account_id: string; /** - * Body param: + * Body param */ expected_disposition: 'NONE' | 'BULK' | 'MALICIOUS' | 'SPAM' | 'SPOOF' | 'SUSPICIOUS'; @@ -53,7 +53,7 @@ export interface ReclassifyCreateParams { eml_content?: string; /** - * Body param: + * Body param */ escalated_submission_id?: string; } diff --git a/src/resources/email-security/investigate/release.ts b/src/resources/email-security/investigate/release.ts index 24d3511e19..b047eb8172 100644 --- a/src/resources/email-security/investigate/release.ts +++ b/src/resources/email-security/investigate/release.ts @@ -37,6 +37,8 @@ export class Release extends APIResource { export class ReleaseBulkResponsesSinglePage extends SinglePage {} export interface ReleaseBulkResponse { + id: string; + /** * The identifier of the message. */ diff --git a/src/resources/email-security/settings/allow-policies.ts b/src/resources/email-security/settings/allow-policies.ts index 2cd1553022..76847cc6f7 100644 --- a/src/resources/email-security/settings/allow-policies.ts +++ b/src/resources/email-security/settings/allow-policies.ts @@ -396,7 +396,7 @@ export interface AllowPolicyCreateParams { is_exempt_recipient: boolean; /** - * Body param: + * Body param */ is_regex: boolean; @@ -407,12 +407,12 @@ export interface AllowPolicyCreateParams { is_trusted_sender: boolean; /** - * Body param: + * Body param */ pattern: string; /** - * Body param: + * Body param */ pattern_type: 'EMAIL' | 'DOMAIN' | 'IP' | 'UNKNOWN'; @@ -423,22 +423,22 @@ export interface AllowPolicyCreateParams { verify_sender: boolean; /** - * Body param: + * Body param */ comments?: string | null; /** - * @deprecated Body param: + * @deprecated Body param */ is_recipient?: boolean; /** - * @deprecated Body param: + * @deprecated Body param */ is_sender?: boolean; /** - * @deprecated Body param: + * @deprecated Body param */ is_spoof?: boolean; } @@ -455,32 +455,32 @@ export interface AllowPolicyListParams extends V4PagePaginationArrayParams { direction?: 'asc' | 'desc'; /** - * Query param: + * Query param */ is_acceptable_sender?: boolean; /** - * Query param: + * Query param */ is_exempt_recipient?: boolean; /** - * Query param: + * Query param */ is_recipient?: boolean; /** - * Query param: + * Query param */ is_sender?: boolean; /** - * Query param: + * Query param */ is_spoof?: boolean; /** - * Query param: + * Query param */ is_trusted_sender?: boolean; @@ -490,12 +490,12 @@ export interface AllowPolicyListParams extends V4PagePaginationArrayParams { order?: 'pattern' | 'created_at'; /** - * Query param: + * Query param */ pattern?: string; /** - * Query param: + * Query param */ pattern_type?: 'EMAIL' | 'DOMAIN' | 'IP' | 'UNKNOWN'; @@ -507,7 +507,7 @@ export interface AllowPolicyListParams extends V4PagePaginationArrayParams { search?: string; /** - * Query param: + * Query param */ verify_sender?: boolean; } @@ -526,7 +526,7 @@ export interface AllowPolicyEditParams { account_id: string; /** - * Body param: + * Body param */ comments?: string | null; @@ -543,7 +543,7 @@ export interface AllowPolicyEditParams { is_exempt_recipient?: boolean | null; /** - * Body param: + * Body param */ is_regex?: boolean | null; @@ -554,12 +554,12 @@ export interface AllowPolicyEditParams { is_trusted_sender?: boolean | null; /** - * Body param: + * Body param */ pattern?: string | null; /** - * Body param: + * Body param */ pattern_type?: 'EMAIL' | 'DOMAIN' | 'IP' | 'UNKNOWN' | null; diff --git a/src/resources/email-security/settings/block-senders.ts b/src/resources/email-security/settings/block-senders.ts index edbc87faf9..c467059989 100644 --- a/src/resources/email-security/settings/block-senders.ts +++ b/src/resources/email-security/settings/block-senders.ts @@ -228,22 +228,22 @@ export interface BlockSenderCreateParams { account_id: string; /** - * Body param: + * Body param */ is_regex: boolean; /** - * Body param: + * Body param */ pattern: string; /** - * Body param: + * Body param */ pattern_type: 'EMAIL' | 'DOMAIN' | 'IP' | 'UNKNOWN'; /** - * Body param: + * Body param */ comments?: string | null; } @@ -265,12 +265,12 @@ export interface BlockSenderListParams extends V4PagePaginationArrayParams { order?: 'pattern' | 'created_at'; /** - * Query param: + * Query param */ pattern?: string; /** - * Query param: + * Query param */ pattern_type?: 'EMAIL' | 'DOMAIN' | 'IP' | 'UNKNOWN'; @@ -296,22 +296,22 @@ export interface BlockSenderEditParams { account_id: string; /** - * Body param: + * Body param */ comments?: string | null; /** - * Body param: + * Body param */ is_regex?: boolean | null; /** - * Body param: + * Body param */ pattern?: string | null; /** - * Body param: + * Body param */ pattern_type?: 'EMAIL' | 'DOMAIN' | 'IP' | 'UNKNOWN' | null; } diff --git a/src/resources/email-security/settings/domains.ts b/src/resources/email-security/settings/domains.ts index a18128ec9f..286176881f 100644 --- a/src/resources/email-security/settings/domains.ts +++ b/src/resources/email-security/settings/domains.ts @@ -439,22 +439,22 @@ export interface DomainEditParams { account_id: string; /** - * Body param: + * Body param */ ip_restrictions: Array; /** - * Body param: + * Body param */ allowed_delivery_modes?: Array<'DIRECT' | 'BCC' | 'JOURNAL' | 'API' | 'RETRO_SCAN'>; /** - * Body param: + * Body param */ domain?: string; /** - * Body param: + * Body param */ drop_dispositions?: Array< | 'MALICIOUS' @@ -470,37 +470,37 @@ export interface DomainEditParams { >; /** - * Body param: + * Body param */ folder?: 'AllItems' | 'Inbox'; /** - * Body param: + * Body param */ integration_id?: string; /** - * Body param: + * Body param */ lookback_hops?: number; /** - * Body param: + * Body param */ regions?: Array<'GLOBAL' | 'AU' | 'DE' | 'IN' | 'US'>; /** - * Body param: + * Body param */ require_tls_inbound?: boolean; /** - * Body param: + * Body param */ require_tls_outbound?: boolean; /** - * Body param: + * Body param */ transport?: string; } diff --git a/src/resources/email-security/settings/impersonation-registry.ts b/src/resources/email-security/settings/impersonation-registry.ts index f103f012b4..36d4bc0c5c 100644 --- a/src/resources/email-security/settings/impersonation-registry.ts +++ b/src/resources/email-security/settings/impersonation-registry.ts @@ -262,17 +262,17 @@ export interface ImpersonationRegistryCreateParams { account_id: string; /** - * Body param: + * Body param */ email: string; /** - * Body param: + * Body param */ is_email_regex: boolean; /** - * Body param: + * Body param */ name: string; } @@ -294,7 +294,7 @@ export interface ImpersonationRegistryListParams extends V4PagePaginationArrayPa order?: 'name' | 'email' | 'created_at'; /** - * Query param: + * Query param */ provenance?: 'A1S_INTERNAL' | 'SNOOPY-CASB_OFFICE_365' | 'SNOOPY-OFFICE_365' | 'SNOOPY-GOOGLE_DIRECTORY'; @@ -320,17 +320,17 @@ export interface ImpersonationRegistryEditParams { account_id: string; /** - * Body param: + * Body param */ email?: string | null; /** - * Body param: + * Body param */ is_email_regex?: boolean | null; /** - * Body param: + * Body param */ name?: string | null; } diff --git a/src/resources/email-security/settings/trusted-domains.ts b/src/resources/email-security/settings/trusted-domains.ts index 5d2b18768c..236ccf1c7d 100644 --- a/src/resources/email-security/settings/trusted-domains.ts +++ b/src/resources/email-security/settings/trusted-domains.ts @@ -317,7 +317,7 @@ export declare namespace TrustedDomainCreateParams { is_recent: boolean; /** - * Body param: + * Body param */ is_regex: boolean; @@ -329,12 +329,12 @@ export declare namespace TrustedDomainCreateParams { is_similarity: boolean; /** - * Body param: + * Body param */ pattern: string; /** - * Body param: + * Body param */ comments?: string | null; } @@ -346,7 +346,7 @@ export declare namespace TrustedDomainCreateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } @@ -386,12 +386,12 @@ export interface TrustedDomainListParams extends V4PagePaginationArrayParams { direction?: 'asc' | 'desc'; /** - * Query param: + * Query param */ is_recent?: boolean; /** - * Query param: + * Query param */ is_similarity?: boolean; @@ -401,7 +401,7 @@ export interface TrustedDomainListParams extends V4PagePaginationArrayParams { order?: 'pattern' | 'created_at'; /** - * Query param: + * Query param */ pattern?: string; @@ -427,7 +427,7 @@ export interface TrustedDomainEditParams { account_id: string; /** - * Body param: + * Body param */ comments?: string; @@ -438,7 +438,7 @@ export interface TrustedDomainEditParams { is_recent?: boolean; /** - * Body param: + * Body param */ is_regex?: boolean; @@ -450,7 +450,7 @@ export interface TrustedDomainEditParams { is_similarity?: boolean; /** - * Body param: + * Body param */ pattern?: string; } diff --git a/src/resources/email-security/submissions.ts b/src/resources/email-security/submissions.ts index f8764b948a..a2ba9907af 100644 --- a/src/resources/email-security/submissions.ts +++ b/src/resources/email-security/submissions.ts @@ -102,22 +102,22 @@ export interface SubmissionListParams extends V4PagePaginationArrayParams { end?: string; /** - * Query param: + * Query param */ original_disposition?: 'MALICIOUS' | 'SUSPICIOUS' | 'SPOOF' | 'SPAM' | 'BULK' | 'NONE'; /** - * Query param: + * Query param */ outcome_disposition?: 'MALICIOUS' | 'SUSPICIOUS' | 'SPOOF' | 'SPAM' | 'BULK' | 'NONE'; /** - * Query param: + * Query param */ query?: string | null; /** - * Query param: + * Query param */ requested_disposition?: 'MALICIOUS' | 'SUSPICIOUS' | 'SPOOF' | 'SPAM' | 'BULK' | 'NONE'; @@ -128,17 +128,17 @@ export interface SubmissionListParams extends V4PagePaginationArrayParams { start?: string; /** - * Query param: + * Query param */ status?: string; /** - * Query param: + * Query param */ submission_id?: string; /** - * Query param: + * Query param */ type?: 'TEAM' | 'USER'; } diff --git a/src/resources/filters.ts b/src/resources/filters.ts index ce6af0a7d1..100e41e35a 100644 --- a/src/resources/filters.ts +++ b/src/resources/filters.ts @@ -211,7 +211,7 @@ export interface FilterCreateParams { zone_id: string; /** - * Body param: + * Body param */ body: Array; } @@ -291,7 +291,7 @@ export interface FilterBulkDeleteParams { zone_id: string; /** - * Query param: + * Query param */ id: Array; } @@ -303,7 +303,7 @@ export interface FilterBulkUpdateParams { zone_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/firewall/access-rules.ts b/src/resources/firewall/access-rules.ts index 0eb03fcc28..813863dc1a 100644 --- a/src/resources/firewall/access-rules.ts +++ b/src/resources/firewall/access-rules.ts @@ -727,7 +727,7 @@ export interface AccessRuleListParams extends V4PagePaginationArrayParams { zone_id?: string; /** - * Query param: + * Query param */ configuration?: AccessRuleListParams.Configuration; diff --git a/src/resources/firewall/rules.ts b/src/resources/firewall/rules.ts index c79774ee3b..2d2717347c 100644 --- a/src/resources/firewall/rules.ts +++ b/src/resources/firewall/rules.ts @@ -237,7 +237,7 @@ export interface RuleCreateParams { action: RuleCreateParams.Action; /** - * Body param: + * Body param */ filter: FiltersAPI.FirewallFilterParam; } @@ -310,7 +310,7 @@ export interface RuleUpdateParams { action: RuleUpdateParams.Action; /** - * Body param: + * Body param */ filter: FiltersAPI.FirewallFilterParam; } @@ -418,7 +418,7 @@ export interface RuleBulkEditParams { zone_id: string; /** - * Body param: + * Body param */ body: unknown; } @@ -430,7 +430,7 @@ export interface RuleBulkUpdateParams { zone_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/firewall/ua-rules.ts b/src/resources/firewall/ua-rules.ts index f01d578705..b9ab01ae46 100644 --- a/src/resources/firewall/ua-rules.ts +++ b/src/resources/firewall/ua-rules.ts @@ -370,7 +370,7 @@ export interface UARuleCreateParams { zone_id: string; /** - * Body param: + * Body param */ configuration: UARuleCreateParams.Configuration; diff --git a/src/resources/fraud.ts b/src/resources/fraud.ts new file mode 100644 index 0000000000..02349a2919 --- /dev/null +++ b/src/resources/fraud.ts @@ -0,0 +1,107 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../resource'; +import * as Core from '../core'; + +export class Fraud extends APIResource { + /** + * Update Fraud Detection settings for a zone. + * + * Notes on `username_expressions` behavior: + * + * - If omitted or set to null, expressions are not modified. + * - If provided as an empty array `[]`, all expressions will be cleared. + * + * @example + * ```ts + * const fraudSettings = await client.fraud.update({ + * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + * username_expressions: [], + * }); + * ``` + */ + update(params: FraudUpdateParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.put(`/zones/${zone_id}/fraud_detection/settings`, { + body, + ...options, + }) as Core.APIPromise<{ result: FraudSettings }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Retrieve Fraud Detection settings for a zone. + * + * @example + * ```ts + * const fraudSettings = await client.fraud.get({ + * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + * }); + * ``` + */ + get(params: FraudGetParams, options?: Core.RequestOptions): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.get(`/zones/${zone_id}/fraud_detection/settings`, options) as Core.APIPromise<{ + result: FraudSettings; + }> + )._thenUnwrap((obj) => obj.result); + } +} + +export interface FraudSettings { + /** + * Whether Fraud User Profiles is enabled for the zone. + */ + user_profiles?: 'enabled' | 'disabled'; + + /** + * List of expressions to detect usernames in write HTTP requests. + * + * - Maximum of 10 expressions. + * - Omit or set to null to leave unchanged on update. + * - Provide an empty array `[]` to clear all expressions on update. + * - Invalid expressions will result in a 10400 Bad Request with details in the + * `messages` array. + */ + username_expressions?: Array; +} + +export interface FraudUpdateParams { + /** + * Path param: Identifier. + */ + zone_id: string; + + /** + * Body param: Whether Fraud User Profiles is enabled for the zone. + */ + user_profiles?: 'enabled' | 'disabled'; + + /** + * Body param: List of expressions to detect usernames in write HTTP requests. + * + * - Maximum of 10 expressions. + * - Omit or set to null to leave unchanged on update. + * - Provide an empty array `[]` to clear all expressions on update. + * - Invalid expressions will result in a 10400 Bad Request with details in the + * `messages` array. + */ + username_expressions?: Array; +} + +export interface FraudGetParams { + /** + * Identifier. + */ + zone_id: string; +} + +export declare namespace Fraud { + export { + type FraudSettings as FraudSettings, + type FraudUpdateParams as FraudUpdateParams, + type FraudGetParams as FraudGetParams, + }; +} diff --git a/src/resources/hyperdrive/configs.ts b/src/resources/hyperdrive/configs.ts index 950652bb59..b35e40f538 100644 --- a/src/resources/hyperdrive/configs.ts +++ b/src/resources/hyperdrive/configs.ts @@ -191,21 +191,21 @@ export interface ConfigCreateParams { name: string; /** - * Body param: + * Body param */ origin: | ConfigCreateParams.PublicDatabase | ConfigCreateParams.AccessProtectedDatabaseBehindCloudflareTunnel; /** - * Body param: + * Body param */ caching?: | ConfigCreateParams.HyperdriveHyperdriveCachingCommon | ConfigCreateParams.HyperdriveHyperdriveCachingEnabled; /** - * Body param: + * Body param */ mtls?: ConfigCreateParams.MTLS; @@ -348,21 +348,21 @@ export interface ConfigUpdateParams { name: string; /** - * Body param: + * Body param */ origin: | ConfigUpdateParams.PublicDatabase | ConfigUpdateParams.AccessProtectedDatabaseBehindCloudflareTunnel; /** - * Body param: + * Body param */ caching?: | ConfigUpdateParams.HyperdriveHyperdriveCachingCommon | ConfigUpdateParams.HyperdriveHyperdriveCachingEnabled; /** - * Body param: + * Body param */ mtls?: ConfigUpdateParams.MTLS; @@ -513,14 +513,14 @@ export interface ConfigEditParams { account_id: string; /** - * Body param: + * Body param */ caching?: | ConfigEditParams.HyperdriveHyperdriveCachingCommon | ConfigEditParams.HyperdriveHyperdriveCachingEnabled; /** - * Body param: + * Body param */ mtls?: ConfigEditParams.MTLS; @@ -531,7 +531,7 @@ export interface ConfigEditParams { name?: string; /** - * Body param: + * Body param */ origin?: | ConfigEditParams.HyperdriveHyperdriveDatabase diff --git a/src/resources/iam/user-groups/members.ts b/src/resources/iam/user-groups/members.ts index d234c6099d..f2ab10977b 100644 --- a/src/resources/iam/user-groups/members.ts +++ b/src/resources/iam/user-groups/members.ts @@ -209,7 +209,7 @@ export interface MemberCreateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/images/v1/variants.ts b/src/resources/images/v1/variants.ts index 4af2f39fd9..9deae4d224 100644 --- a/src/resources/images/v1/variants.ts +++ b/src/resources/images/v1/variants.ts @@ -345,7 +345,7 @@ export interface VariantCreateParams { account_id: string; /** - * Body param: + * Body param */ id: string; diff --git a/src/resources/images/v2/v2.ts b/src/resources/images/v2/v2.ts index 63d32823e7..6d570434b0 100644 --- a/src/resources/images/v2/v2.ts +++ b/src/resources/images/v2/v2.ts @@ -10,9 +10,45 @@ export class V2 extends APIResource { directUploads: DirectUploadsAPI.DirectUploads = new DirectUploadsAPI.DirectUploads(this._client); /** - * List up to 10000 images with one request. Use the optional parameters below to - * get a specific range of images. Endpoint returns continuation_token if more - * images are present. + * List up to 10000 images with up to 1000 results per page. Use the optional + * parameters below to get a specific range of images. Pagination is supported via + * continuation_token. + * + * **Metadata Filtering (Optional):** + * + * You can optionally filter images by custom metadata fields using the + * `meta.[]=` syntax. + * + * **Supported Operators:** + * + * - `eq` / `eq:string` / `eq:number` / `eq:boolean` - Exact match + * - `in` / `in:string` / `in:number` - Match any value in list (pipe-separated) + * + * **Metadata Filter Constraints:** + * + * - Maximum 5 metadata filters per request + * - Maximum 5 levels of nesting (e.g., `meta.first.second.third.fourth.fifth`) + * - Maximum 10 elements for list operators (`in`) + * - Supports string, number, and boolean value types + * + * **Examples:** + * + * ``` + * # List all images + * /v2/images + * + * # Filter by metadata + * /v2/images?meta.status[eq]=active + * + * # Filter by nested metadata + * /v2/images?meta.region.name[eq]=eu-west + * + * # Combine metadata filters with creator + * /v2/images?meta.status[eq]=active&creator=user123 + * + * # Multiple metadata filters (AND logic) + * /v2/images?meta.status[eq]=active&meta.priority[eq:number]=5 + * ``` * * @example * ```ts @@ -48,8 +84,8 @@ export interface V2ListParams { account_id: string; /** - * Query param: Continuation token for a next page. List images V2 returns - * continuation_token + * Query param: Continuation token to fetch next page. Passed as a query param when + * requesting List V2 api endpoint. */ continuation_token?: string | null; @@ -60,16 +96,42 @@ export interface V2ListParams { creator?: string | null; /** - * Query param: Number of items per page. + * Query param + */ + meta?: V2ListParams.Meta; + + /** + * Query param: Number of items per page */ per_page?: number; /** - * Query param: Sorting order by upload time. + * Query param: Sorting order by upload time */ sort_order?: 'asc' | 'desc'; } +export namespace V2ListParams { + export interface Meta { + /** + * Optional metadata filter(s). Multiple filters can be combined with AND logic. + * + * **Operators:** + * + * - `eq`, `eq:string`, `eq:number`, `eq:boolean` - Exact match + * - `in`, `in:string`, `in:number` - Match any value in pipe-separated list + * + * **Examples:** + * + * - `meta.status[eq]=active` + * - `meta.priority[eq:number]=5` + * - `meta.enabled[eq:boolean]=true` + * - `meta.region[in]=us-east|us-west|eu-west` + */ + '[]'?: string; + } +} + V2.DirectUploads = DirectUploads; export declare namespace V2 { diff --git a/src/resources/index.ts b/src/resources/index.ts index ef78a3abc8..52f44444c1 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -39,6 +39,7 @@ export { EmailRouting } from './email-routing/email-routing'; export { EmailSecurity } from './email-security/email-security'; export { Filters } from './filters'; export { Firewall } from './firewall/firewall'; +export { Fraud } from './fraud'; export { Healthchecks } from './healthchecks/healthchecks'; export { Hostnames } from './hostnames/hostnames'; export { HyperdriveResource } from './hyperdrive/hyperdrive'; diff --git a/src/resources/intel/attack-surface-report/issue-types.ts b/src/resources/intel/attack-surface-report/issue-types.ts index 71e10e5c18..c7c14d749b 100644 --- a/src/resources/intel/attack-surface-report/issue-types.ts +++ b/src/resources/intel/attack-surface-report/issue-types.ts @@ -6,7 +6,7 @@ import { SinglePage } from '../../../pagination'; export class IssueTypes extends APIResource { /** - * Get Security Center Issues Types + * Retrieves Security Center Issues Types * * @example * ```ts diff --git a/src/resources/intel/attack-surface-report/issues.ts b/src/resources/intel/attack-surface-report/issues.ts index a10956bec3..a80b5432be 100644 --- a/src/resources/intel/attack-surface-report/issues.ts +++ b/src/resources/intel/attack-surface-report/issues.ts @@ -7,7 +7,7 @@ import { V4PagePagination, type V4PagePaginationParams } from '../../../paginati export class Issues extends APIResource { /** - * Get Security Center Issues + * Retrieves Security Center Issues * * @deprecated */ @@ -24,7 +24,7 @@ export class Issues extends APIResource { } /** - * Get Security Center Issue Counts by Class + * Retrieves Security Center Issue Counts by Class * * @deprecated */ @@ -39,7 +39,7 @@ export class Issues extends APIResource { } /** - * Archive Security Center Insight + * Archives Security Center Insight * * @deprecated */ @@ -56,7 +56,7 @@ export class Issues extends APIResource { } /** - * Get Security Center Issue Counts by Severity + * Retrieves Security Center Issue Counts by Severity * * @deprecated */ @@ -74,7 +74,7 @@ export class Issues extends APIResource { } /** - * Get Security Center Issue Counts by Type + * Retrieves Security Center Issue Counts by Type * * @deprecated */ @@ -113,19 +113,19 @@ export type SeverityQueryParamParam = 'low' | 'moderate' | 'critical'; export interface IssueListResponse { /** - * Total number of results + * Indicates the total number of results. */ count?: number; issues?: Array; /** - * Current page within paginated list of results + * Specifies the current page within paginated list of results. */ page?: number; /** - * Number of results per page of results + * Sets the number of results per page of results. */ per_page?: number; } @@ -158,7 +158,7 @@ export namespace IssueListResponse { export namespace Issue { export interface Payload { /** - * Method used to detect insight + * Describes the method used to detect insight. */ detection_method?: string; @@ -249,57 +249,57 @@ export interface IssueListParams extends V4PagePaginationParams { account_id: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } @@ -311,57 +311,57 @@ export interface IssueClassParams { account_id: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } @@ -373,7 +373,7 @@ export interface IssueDismissParams { account_id: string; /** - * Body param: + * Body param */ dismiss?: boolean; } @@ -385,57 +385,57 @@ export interface IssueSeverityParams { account_id: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } @@ -447,57 +447,57 @@ export interface IssueTypeParams { account_id: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } diff --git a/src/resources/intel/dns.ts b/src/resources/intel/dns.ts index 19065cb49b..713e3b1c24 100644 --- a/src/resources/intel/dns.ts +++ b/src/resources/intel/dns.ts @@ -77,12 +77,12 @@ export interface DNSListParams extends V4PagePaginationParams { account_id: string; /** - * Query param: + * Query param */ ipv4?: string; /** - * Query param: + * Query param */ start_end_params?: DNSListParams.StartEndParams; } diff --git a/src/resources/intel/domain-history.ts b/src/resources/intel/domain-history.ts index 711f7a1ab2..814a7a4bf7 100644 --- a/src/resources/intel/domain-history.ts +++ b/src/resources/intel/domain-history.ts @@ -63,7 +63,7 @@ export interface DomainHistoryGetParams { account_id: string; /** - * Query param: + * Query param */ domain?: string; } diff --git a/src/resources/intel/domains/domains.ts b/src/resources/intel/domains/domains.ts index 38d41ecd00..d7cb3acabf 100644 --- a/src/resources/intel/domains/domains.ts +++ b/src/resources/intel/domains/domains.ts @@ -150,7 +150,7 @@ export interface DomainGetParams { account_id: string; /** - * Query param: + * Query param */ domain?: string; } diff --git a/src/resources/intel/index.ts b/src/resources/intel/index.ts index 9364800222..362f19c93a 100644 --- a/src/resources/intel/index.ts +++ b/src/resources/intel/index.ts @@ -10,7 +10,7 @@ export { type DomainHistoryGetParams, } from './domain-history'; export { Domains, type Domain, type DomainGetParams } from './domains/index'; -export { IPListsSinglePage, IPLists, type IPList, type IPListGetParams } from './ip-lists'; +export { IPLists, type IPList } from './ip-lists'; export { IPs, type IP, type IPGetResponse, type IPGetParams } from './ips'; export { IndicatorFeedListResponsesSinglePage, diff --git a/src/resources/intel/intel.ts b/src/resources/intel/intel.ts index 37f224c7f0..6f48a03cd6 100644 --- a/src/resources/intel/intel.ts +++ b/src/resources/intel/intel.ts @@ -11,7 +11,7 @@ import { DomainHistoryResource, } from './domain-history'; import * as IPListsAPI from './ip-lists'; -import { IPList, IPListGetParams, IPLists, IPListsSinglePage } from './ip-lists'; +import { IPList, IPLists } from './ip-lists'; import * as IPsAPI from './ips'; import { IP, IPGetParams, IPGetResponse, IPs } from './ips'; import * as MiscategorizationsAPI from './miscategorizations'; @@ -71,7 +71,6 @@ Intel.Domains = Domains; Intel.DomainHistoryResource = DomainHistoryResource; Intel.IPs = IPs; Intel.IPLists = IPLists; -Intel.IPListsSinglePage = IPListsSinglePage; Intel.Miscategorizations = Miscategorizations; Intel.IndicatorFeeds = IndicatorFeeds; Intel.IndicatorFeedListResponsesSinglePage = IndicatorFeedListResponsesSinglePage; @@ -95,12 +94,7 @@ export declare namespace Intel { export { IPs as IPs, type IP as IP, type IPGetResponse as IPGetResponse, type IPGetParams as IPGetParams }; - export { - IPLists as IPLists, - type IPList as IPList, - IPListsSinglePage as IPListsSinglePage, - type IPListGetParams as IPListGetParams, - }; + export { IPLists as IPLists, type IPList as IPList }; export { Miscategorizations as Miscategorizations, diff --git a/src/resources/intel/ip-lists.ts b/src/resources/intel/ip-lists.ts index ac2db32412..fe6bbe423c 100644 --- a/src/resources/intel/ip-lists.ts +++ b/src/resources/intel/ip-lists.ts @@ -1,30 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../resource'; -import * as Core from '../../core'; -import { SinglePage } from '../../pagination'; -export class IPLists extends APIResource { - /** - * Get IP Lists. - * - * @example - * ```ts - * // Automatically fetches more pages as needed. - * for await (const ipList of client.intel.ipLists.get({ - * account_id: '023e105f4ecef8ad9ca31a8372d0c353', - * })) { - * // ... - * } - * ``` - */ - get(params: IPListGetParams, options?: Core.RequestOptions): Core.PagePromise { - const { account_id } = params; - return this._client.getAPIList(`/accounts/${account_id}/intel/ip-list`, IPListsSinglePage, options); - } -} - -export class IPListsSinglePage extends SinglePage {} +export class IPLists extends APIResource {} export interface IPList { id?: number; @@ -34,19 +12,6 @@ export interface IPList { name?: string; } -export interface IPListGetParams { - /** - * Identifier. - */ - account_id: string; -} - -IPLists.IPListsSinglePage = IPListsSinglePage; - export declare namespace IPLists { - export { - type IPList as IPList, - IPListsSinglePage as IPListsSinglePage, - type IPListGetParams as IPListGetParams, - }; + export { type IPList as IPList }; } diff --git a/src/resources/intel/ips.ts b/src/resources/intel/ips.ts index 618929af34..09873d83a9 100644 --- a/src/resources/intel/ips.ts +++ b/src/resources/intel/ips.ts @@ -76,12 +76,12 @@ export interface IPGetParams { account_id: string; /** - * Query param: + * Query param */ ipv4?: string; /** - * Query param: + * Query param */ ipv6?: string; } diff --git a/src/resources/intel/miscategorizations.ts b/src/resources/intel/miscategorizations.ts index de9c9205f1..a5a11f290a 100644 --- a/src/resources/intel/miscategorizations.ts +++ b/src/resources/intel/miscategorizations.ts @@ -86,7 +86,7 @@ export interface MiscategorizationCreateParams { content_removes?: Array; /** - * Body param: + * Body param */ indicator_type?: 'domain' | 'ipv4' | 'ipv6' | 'url'; diff --git a/src/resources/intel/whois.ts b/src/resources/intel/whois.ts index cd297ae775..811ad8b9f4 100644 --- a/src/resources/intel/whois.ts +++ b/src/resources/intel/whois.ts @@ -227,7 +227,7 @@ export interface WhoisGetParams { account_id: string; /** - * Query param: + * Query param */ domain?: string; } diff --git a/src/resources/kv/namespaces/keys.ts b/src/resources/kv/namespaces/keys.ts index 138942ad57..4d5f847bfe 100644 --- a/src/resources/kv/namespaces/keys.ts +++ b/src/resources/kv/namespaces/keys.ts @@ -214,7 +214,7 @@ export interface KeyBulkDeleteParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } @@ -248,7 +248,7 @@ export interface KeyBulkUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/kv/namespaces/namespaces.ts b/src/resources/kv/namespaces/namespaces.ts index df179e53bb..849a0151f2 100644 --- a/src/resources/kv/namespaces/namespaces.ts +++ b/src/resources/kv/namespaces/namespaces.ts @@ -393,7 +393,7 @@ export interface NamespaceBulkDeleteParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } @@ -427,7 +427,7 @@ export interface NamespaceBulkUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/kv/namespaces/values.ts b/src/resources/kv/namespaces/values.ts index a8de1f25b5..b1420f04cd 100644 --- a/src/resources/kv/namespaces/values.ts +++ b/src/resources/kv/namespaces/values.ts @@ -125,7 +125,7 @@ export interface ValueUpdateParams { /** * Body param: A byte sequence to be stored, up to 25 MiB in length. */ - value: string; + value: string | Core.Uploadable; /** * Query param: Expires the key at a certain time, measured in number of seconds diff --git a/src/resources/load-balancers/load-balancers.ts b/src/resources/load-balancers/load-balancers.ts index eb4687adca..beff7db4a4 100644 --- a/src/resources/load-balancers/load-balancers.ts +++ b/src/resources/load-balancers/load-balancers.ts @@ -1605,7 +1605,7 @@ export interface LoadBalancerDeleteResponse { export interface LoadBalancerCreateParams { /** - * Path param: + * Path param */ zone_id: string; @@ -1779,7 +1779,7 @@ export interface LoadBalancerCreateParams { export interface LoadBalancerUpdateParams { /** - * Path param: + * Path param */ zone_id: string; @@ -1966,7 +1966,7 @@ export interface LoadBalancerDeleteParams { export interface LoadBalancerEditParams { /** - * Path param: + * Path param */ zone_id: string; diff --git a/src/resources/magic-cloud-networking/catalog-syncs/catalog-syncs.ts b/src/resources/magic-cloud-networking/catalog-syncs/catalog-syncs.ts index 84012e1386..bc05cc2235 100644 --- a/src/resources/magic-cloud-networking/catalog-syncs/catalog-syncs.ts +++ b/src/resources/magic-cloud-networking/catalog-syncs/catalog-syncs.ts @@ -1220,64 +1220,64 @@ export type CatalogSyncRefreshResponse = string; export interface CatalogSyncCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ destination_type: 'NONE' | 'ZERO_TRUST_LIST'; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ update_mode: 'AUTO' | 'MANUAL'; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ policy?: string; /** - * Header param: + * Header param */ forwarded?: string; } export interface CatalogSyncUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ policy?: string; /** - * Body param: + * Body param */ update_mode?: 'AUTO' | 'MANUAL'; } @@ -1288,39 +1288,39 @@ export interface CatalogSyncListParams { export interface CatalogSyncDeleteParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ delete_destination?: boolean; } export interface CatalogSyncEditParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ policy?: string; /** - * Body param: + * Body param */ update_mode?: 'AUTO' | 'MANUAL'; } diff --git a/src/resources/magic-cloud-networking/catalog-syncs/prebuilt-policies.ts b/src/resources/magic-cloud-networking/catalog-syncs/prebuilt-policies.ts index e080008ae5..af071022cf 100644 --- a/src/resources/magic-cloud-networking/catalog-syncs/prebuilt-policies.ts +++ b/src/resources/magic-cloud-networking/catalog-syncs/prebuilt-policies.ts @@ -35,7 +35,7 @@ export interface PrebuiltPolicyListResponse { export interface PrebuiltPolicyListParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/magic-cloud-networking/cloud-integrations.ts b/src/resources/magic-cloud-networking/cloud-integrations.ts index 9b74ccf750..32c1d73d7e 100644 --- a/src/resources/magic-cloud-networking/cloud-integrations.ts +++ b/src/resources/magic-cloud-networking/cloud-integrations.ts @@ -1416,86 +1416,86 @@ export namespace CloudIntegrationInitialSetupResponse { export interface CloudIntegrationCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ cloud_type: 'AWS' | 'AZURE' | 'GOOGLE' | 'CLOUDFLARE'; /** - * Body param: + * Body param */ friendly_name: string; /** - * Body param: + * Body param */ description?: string; /** - * Header param: + * Header param */ forwarded?: string; } export interface CloudIntegrationUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ aws_arn?: string; /** - * Body param: + * Body param */ azure_subscription_id?: string; /** - * Body param: + * Body param */ azure_tenant_id?: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ friendly_name?: string; /** - * Body param: + * Body param */ gcp_project_id?: string; /** - * Body param: + * Body param */ gcp_service_account_email?: string; } export interface CloudIntegrationListParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ cloudflare?: boolean; /** - * Query param: + * Query param */ desc?: boolean; @@ -1505,7 +1505,7 @@ export interface CloudIntegrationListParams { order_by?: string; /** - * Query param: + * Query param */ status?: boolean; } @@ -1516,12 +1516,12 @@ export interface CloudIntegrationDeleteParams { export interface CloudIntegrationDiscoverParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ v2?: boolean; } @@ -1532,54 +1532,54 @@ export interface CloudIntegrationDiscoverAllParams { export interface CloudIntegrationEditParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ aws_arn?: string; /** - * Body param: + * Body param */ azure_subscription_id?: string; /** - * Body param: + * Body param */ azure_tenant_id?: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ friendly_name?: string; /** - * Body param: + * Body param */ gcp_project_id?: string; /** - * Body param: + * Body param */ gcp_service_account_email?: string; } export interface CloudIntegrationGetParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ status?: boolean; } diff --git a/src/resources/magic-cloud-networking/on-ramps/address-spaces.ts b/src/resources/magic-cloud-networking/on-ramps/address-spaces.ts index 9a7d5b4278..b49fa36a02 100644 --- a/src/resources/magic-cloud-networking/on-ramps/address-spaces.ts +++ b/src/resources/magic-cloud-networking/on-ramps/address-spaces.ts @@ -67,12 +67,12 @@ export interface AddressSpaceEditResponse { export interface AddressSpaceUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ prefixes: Array; } @@ -83,12 +83,12 @@ export interface AddressSpaceListParams { export interface AddressSpaceEditParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ prefixes: Array; } diff --git a/src/resources/magic-cloud-networking/on-ramps/on-ramps.ts b/src/resources/magic-cloud-networking/on-ramps/on-ramps.ts index a6753d95fb..96d4b90ed9 100644 --- a/src/resources/magic-cloud-networking/on-ramps/on-ramps.ts +++ b/src/resources/magic-cloud-networking/on-ramps/on-ramps.ts @@ -8777,12 +8777,12 @@ export namespace OnRampPlanResponse { export interface OnRampCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ cloud_type: 'AWS' | 'AZURE' | 'GOOGLE'; @@ -8793,37 +8793,37 @@ export interface OnRampCreateParams { dynamic_routing: boolean; /** - * Body param: + * Body param */ install_routes_in_cloud: boolean; /** - * Body param: + * Body param */ install_routes_in_magic_wan: boolean; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ type: 'OnrampTypeSingle' | 'OnrampTypeHub'; /** - * Body param: + * Body param */ adopted_hub_id?: string; /** - * Body param: + * Body param */ attached_hubs?: Array; /** - * Body param: + * Body param */ attached_vpcs?: Array; @@ -8834,101 +8834,101 @@ export interface OnRampCreateParams { cloud_asn?: number; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ hub_provider_id?: string; /** - * Body param: + * Body param */ manage_hub_to_hub_attachments?: boolean; /** - * Body param: + * Body param */ manage_vpc_to_hub_attachments?: boolean; /** - * Body param: + * Body param */ region?: string; /** - * Body param: + * Body param */ vpc?: string; /** - * Header param: + * Header param */ forwarded?: string; } export interface OnRampUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ attached_hubs?: Array; /** - * Body param: + * Body param */ attached_vpcs?: Array; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ install_routes_in_cloud?: boolean; /** - * Body param: + * Body param */ install_routes_in_magic_wan?: boolean; /** - * Body param: + * Body param */ manage_hub_to_hub_attachments?: boolean; /** - * Body param: + * Body param */ manage_vpc_to_hub_attachments?: boolean; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ vpc?: string; } export interface OnRampListParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ desc?: boolean; @@ -8938,29 +8938,29 @@ export interface OnRampListParams { order_by?: string; /** - * Query param: + * Query param */ status?: boolean; /** - * Query param: + * Query param */ vpcs?: boolean; } export interface OnRampDeleteParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ destroy?: boolean; /** - * Query param: + * Query param */ force?: boolean; } @@ -8971,52 +8971,52 @@ export interface OnRampApplyParams { export interface OnRampEditParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ attached_hubs?: Array; /** - * Body param: + * Body param */ attached_vpcs?: Array; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ install_routes_in_cloud?: boolean; /** - * Body param: + * Body param */ install_routes_in_magic_wan?: boolean; /** - * Body param: + * Body param */ manage_hub_to_hub_attachments?: boolean; /** - * Body param: + * Body param */ manage_vpc_to_hub_attachments?: boolean; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ vpc?: string; } @@ -9027,27 +9027,27 @@ export interface OnRampExportParams { export interface OnRampGetParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ planned_resources?: boolean; /** - * Query param: + * Query param */ post_apply_resources?: boolean; /** - * Query param: + * Query param */ status?: boolean; /** - * Query param: + * Query param */ vpcs?: boolean; } diff --git a/src/resources/magic-cloud-networking/resources.ts b/src/resources/magic-cloud-networking/resources.ts index 11446e8bbd..a7288237ae 100644 --- a/src/resources/magic-cloud-networking/resources.ts +++ b/src/resources/magic-cloud-networking/resources.ts @@ -1228,22 +1228,22 @@ export type ResourcePolicyPreviewResponse = string; export interface ResourceListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ cloudflare?: boolean; /** - * Query param: + * Query param */ desc?: boolean; /** - * Query param: + * Query param */ managed?: boolean; @@ -1253,27 +1253,27 @@ export interface ResourceListParams extends V4PagePaginationArrayParams { order_by?: string; /** - * Query param: + * Query param */ provider_id?: string; /** - * Query param: + * Query param */ region?: string; /** - * Query param: + * Query param */ resource_group?: string; /** - * Query param: + * Query param */ resource_id?: Array; /** - * Query param: + * Query param */ resource_type?: Array< | 'aws_customer_gateway' @@ -1336,24 +1336,24 @@ export interface ResourceListParams extends V4PagePaginationArrayParams { >; /** - * Query param: + * Query param */ search?: Array; /** - * Query param: + * Query param */ v2?: boolean; } export interface ResourceExportParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ desc?: boolean; @@ -1363,27 +1363,27 @@ export interface ResourceExportParams { order_by?: string; /** - * Query param: + * Query param */ provider_id?: string; /** - * Query param: + * Query param */ region?: string; /** - * Query param: + * Query param */ resource_group?: string; /** - * Query param: + * Query param */ resource_id?: Array; /** - * Query param: + * Query param */ resource_type?: Array< | 'aws_customer_gateway' @@ -1446,36 +1446,36 @@ export interface ResourceExportParams { >; /** - * Query param: + * Query param */ search?: Array; /** - * Query param: + * Query param */ v2?: boolean; } export interface ResourceGetParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ v2?: boolean; } export interface ResourcePolicyPreviewParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ policy: string; } diff --git a/src/resources/magic-network-monitoring/configs/configs.ts b/src/resources/magic-network-monitoring/configs/configs.ts index 9b993968e0..c6767bde9a 100644 --- a/src/resources/magic-network-monitoring/configs/configs.ts +++ b/src/resources/magic-network-monitoring/configs/configs.ts @@ -156,7 +156,7 @@ export namespace Configuration { export interface ConfigCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -172,12 +172,12 @@ export interface ConfigCreateParams { name: string; /** - * Body param: + * Body param */ router_ips?: Array; /** - * Body param: + * Body param */ warp_devices?: Array; } @@ -207,7 +207,7 @@ export namespace ConfigCreateParams { export interface ConfigUpdateParams { /** - * Path param: + * Path param */ account_id: string; @@ -223,12 +223,12 @@ export interface ConfigUpdateParams { name: string; /** - * Body param: + * Body param */ router_ips?: Array; /** - * Body param: + * Body param */ warp_devices?: Array; } @@ -262,7 +262,7 @@ export interface ConfigDeleteParams { export interface ConfigEditParams { /** - * Path param: + * Path param */ account_id: string; @@ -278,12 +278,12 @@ export interface ConfigEditParams { name?: string; /** - * Body param: + * Body param */ router_ips?: Array; /** - * Body param: + * Body param */ warp_devices?: Array; } diff --git a/src/resources/magic-network-monitoring/rules/advertisements.ts b/src/resources/magic-network-monitoring/rules/advertisements.ts index 64aed74e67..86ee8ab95a 100644 --- a/src/resources/magic-network-monitoring/rules/advertisements.ts +++ b/src/resources/magic-network-monitoring/rules/advertisements.ts @@ -45,12 +45,12 @@ export interface Advertisement { export interface AdvertisementEditParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/magic-network-monitoring/rules/rules.ts b/src/resources/magic-network-monitoring/rules/rules.ts index adf6f46887..623c5bc48d 100644 --- a/src/resources/magic-network-monitoring/rules/rules.ts +++ b/src/resources/magic-network-monitoring/rules/rules.ts @@ -229,7 +229,7 @@ export interface MagicNetworkMonitoringRule { export interface RuleCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -269,14 +269,14 @@ export interface RuleCreateParams { packet_threshold?: number; /** - * Body param: + * Body param */ prefixes?: Array; } export interface RuleUpdateParams { /** - * Path param: + * Path param */ account_id: string; @@ -321,7 +321,7 @@ export interface RuleUpdateParams { packet_threshold?: number; /** - * Body param: + * Body param */ prefixes?: Array; } @@ -336,7 +336,7 @@ export interface RuleDeleteParams { export interface RuleEditParams { /** - * Path param: + * Path param */ account_id: string; @@ -376,7 +376,7 @@ export interface RuleEditParams { packet_threshold?: number; /** - * Body param: + * Body param */ prefixes?: Array; } diff --git a/src/resources/magic-transit/cf-interconnects.ts b/src/resources/magic-transit/cf-interconnects.ts index ae644c3ba2..bc13ec168a 100644 --- a/src/resources/magic-transit/cf-interconnects.ts +++ b/src/resources/magic-transit/cf-interconnects.ts @@ -500,7 +500,7 @@ export interface CfInterconnectUpdateParams { gre?: CfInterconnectUpdateParams.GRE; /** - * Body param: + * Body param */ health_check?: MagicTransitAPI.HealthCheckParam; @@ -565,7 +565,7 @@ export interface CfInterconnectBulkUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; diff --git a/src/resources/magic-transit/connectors/connectors.ts b/src/resources/magic-transit/connectors/connectors.ts index 368ca729b7..8c4f29cda2 100644 --- a/src/resources/magic-transit/connectors/connectors.ts +++ b/src/resources/magic-transit/connectors/connectors.ts @@ -383,27 +383,27 @@ export interface ConnectorCreateParams { device: ConnectorCreateParams.Device; /** - * Body param: + * Body param */ activated?: boolean; /** - * Body param: + * Body param */ interrupt_window_duration_hours?: number; /** - * Body param: + * Body param */ interrupt_window_hour_of_day?: number; /** - * Body param: + * Body param */ notes?: string; /** - * Body param: + * Body param */ timezone?: string; } @@ -431,22 +431,22 @@ export interface ConnectorUpdateParams { account_id: string; /** - * Body param: + * Body param */ activated?: boolean; /** - * Body param: + * Body param */ interrupt_window_duration_hours?: number; /** - * Body param: + * Body param */ interrupt_window_hour_of_day?: number; /** - * Body param: + * Body param */ notes?: string; @@ -456,7 +456,7 @@ export interface ConnectorUpdateParams { provision_license?: boolean; /** - * Body param: + * Body param */ timezone?: string; } @@ -482,22 +482,22 @@ export interface ConnectorEditParams { account_id: string; /** - * Body param: + * Body param */ activated?: boolean; /** - * Body param: + * Body param */ interrupt_window_duration_hours?: number; /** - * Body param: + * Body param */ interrupt_window_hour_of_day?: number; /** - * Body param: + * Body param */ notes?: string; @@ -507,7 +507,7 @@ export interface ConnectorEditParams { provision_license?: boolean; /** - * Body param: + * Body param */ timezone?: string; } diff --git a/src/resources/magic-transit/connectors/events/events.ts b/src/resources/magic-transit/connectors/events/events.ts index 6e1b1201dd..7d34c03fd3 100644 --- a/src/resources/magic-transit/connectors/events/events.ts +++ b/src/resources/magic-transit/connectors/events/events.ts @@ -260,17 +260,17 @@ export interface EventListParams { account_id: string; /** - * Query param: + * Query param */ from: number; /** - * Query param: + * Query param */ to: number; /** - * Query param: + * Query param */ cursor?: string; @@ -280,7 +280,7 @@ export interface EventListParams { k?: string; /** - * Query param: + * Query param */ limit?: number; } diff --git a/src/resources/magic-transit/connectors/snapshots/latest.ts b/src/resources/magic-transit/connectors/snapshots/latest.ts index c51d9f1abe..1223455cf2 100644 --- a/src/resources/magic-transit/connectors/snapshots/latest.ts +++ b/src/resources/magic-transit/connectors/snapshots/latest.ts @@ -1301,6 +1301,16 @@ export namespace LatestListResponse { * MTU as measured between the two ends of the tunnel */ probed_mtu?: number; + + /** + * Number of recent healthy pings for this tunnel + */ + recent_healthy_pings?: number; + + /** + * Number of recent unhealthy pings for this tunnel + */ + recent_unhealthy_pings?: number; } } } diff --git a/src/resources/magic-transit/connectors/snapshots/snapshots.ts b/src/resources/magic-transit/connectors/snapshots/snapshots.ts index a7d1e0d815..04a4b53ed5 100644 --- a/src/resources/magic-transit/connectors/snapshots/snapshots.ts +++ b/src/resources/magic-transit/connectors/snapshots/snapshots.ts @@ -1352,6 +1352,16 @@ export namespace SnapshotGetResponse { * MTU as measured between the two ends of the tunnel */ probed_mtu?: number; + + /** + * Number of recent healthy pings for this tunnel + */ + recent_healthy_pings?: number; + + /** + * Number of recent unhealthy pings for this tunnel + */ + recent_unhealthy_pings?: number; } } @@ -1362,22 +1372,22 @@ export interface SnapshotListParams { account_id: string; /** - * Query param: + * Query param */ from: number; /** - * Query param: + * Query param */ to: number; /** - * Query param: + * Query param */ cursor?: string; /** - * Query param: + * Query param */ limit?: number; } diff --git a/src/resources/magic-transit/gre-tunnels.ts b/src/resources/magic-transit/gre-tunnels.ts index 8ce3288b29..d349a947f6 100644 --- a/src/resources/magic-transit/gre-tunnels.ts +++ b/src/resources/magic-transit/gre-tunnels.ts @@ -1419,7 +1419,7 @@ export interface GRETunnelCreateParams { automatic_return_routing?: boolean; /** - * Body param: + * Body param */ bgp?: GRETunnelCreateParams.BGP; @@ -1429,7 +1429,7 @@ export interface GRETunnelCreateParams { description?: string; /** - * Body param: + * Body param */ health_check?: GRETunnelCreateParams.HealthCheck; @@ -1591,7 +1591,7 @@ export interface GRETunnelUpdateParams { description?: string; /** - * Body param: + * Body param */ health_check?: GRETunnelUpdateParams.HealthCheck; @@ -1709,7 +1709,7 @@ export interface GRETunnelBulkUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; diff --git a/src/resources/magic-transit/ipsec-tunnels.ts b/src/resources/magic-transit/ipsec-tunnels.ts index ff23a3a048..77a2287bad 100644 --- a/src/resources/magic-transit/ipsec-tunnels.ts +++ b/src/resources/magic-transit/ipsec-tunnels.ts @@ -1612,12 +1612,12 @@ export interface IPSECTunnelCreateParams { automatic_return_routing?: boolean; /** - * Body param: + * Body param */ bgp?: IPSECTunnelCreateParams.BGP; /** - * Body param: + * Body param */ custom_remote_identities?: IPSECTunnelCreateParams.CustomRemoteIdentities; @@ -1633,7 +1633,7 @@ export interface IPSECTunnelCreateParams { description?: string; /** - * Body param: + * Body param */ health_check?: IPSECTunnelCreateParams.HealthCheck; @@ -1798,12 +1798,12 @@ export interface IPSECTunnelUpdateParams { automatic_return_routing?: boolean; /** - * Body param: + * Body param */ bgp?: IPSECTunnelUpdateParams.BGP; /** - * Body param: + * Body param */ custom_remote_identities?: IPSECTunnelUpdateParams.CustomRemoteIdentities; @@ -1819,7 +1819,7 @@ export interface IPSECTunnelUpdateParams { description?: string; /** - * Body param: + * Body param */ health_check?: IPSECTunnelUpdateParams.HealthCheck; @@ -1986,7 +1986,7 @@ export interface IPSECTunnelBulkUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; @@ -2017,7 +2017,7 @@ export interface IPSECTunnelPSKGenerateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/magic-transit/routes.ts b/src/resources/magic-transit/routes.ts index d9f546bca8..1a41861c46 100644 --- a/src/resources/magic-transit/routes.ts +++ b/src/resources/magic-transit/routes.ts @@ -677,7 +677,7 @@ export interface RouteBulkUpdateParams { account_id: string; /** - * Body param: + * Body param */ routes: Array; } diff --git a/src/resources/magic-transit/sites/acls.ts b/src/resources/magic-transit/sites/acls.ts index 25d32dcf63..8a19f2e5e1 100644 --- a/src/resources/magic-transit/sites/acls.ts +++ b/src/resources/magic-transit/sites/acls.ts @@ -301,12 +301,12 @@ export interface ACLCreateParams { account_id: string; /** - * Body param: + * Body param */ lan_1: ACLConfigurationParam; /** - * Body param: + * Body param */ lan_2: ACLConfigurationParam; @@ -329,7 +329,7 @@ export interface ACLCreateParams { forward_locally?: boolean; /** - * Body param: + * Body param */ protocols?: Array; @@ -362,12 +362,12 @@ export interface ACLUpdateParams { forward_locally?: boolean; /** - * Body param: + * Body param */ lan_1?: ACLConfigurationParam; /** - * Body param: + * Body param */ lan_2?: ACLConfigurationParam; @@ -377,7 +377,7 @@ export interface ACLUpdateParams { name?: string; /** - * Body param: + * Body param */ protocols?: Array; @@ -424,12 +424,12 @@ export interface ACLEditParams { forward_locally?: boolean; /** - * Body param: + * Body param */ lan_1?: ACLConfigurationParam; /** - * Body param: + * Body param */ lan_2?: ACLConfigurationParam; @@ -439,7 +439,7 @@ export interface ACLEditParams { name?: string; /** - * Body param: + * Body param */ protocols?: Array; diff --git a/src/resources/magic-transit/sites/lans.ts b/src/resources/magic-transit/sites/lans.ts index e4c7823a1a..49bf5ddd95 100644 --- a/src/resources/magic-transit/sites/lans.ts +++ b/src/resources/magic-transit/sites/lans.ts @@ -14,10 +14,7 @@ export class LANs extends APIResource { * // Automatically fetches more pages as needed. * for await (const lan of client.magicTransit.sites.lans.create( * '023e105f4ecef8ad9ca31a8372d0c353', - * { - * account_id: '023e105f4ecef8ad9ca31a8372d0c353', - * physport: 1, - * }, + * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } @@ -242,6 +239,8 @@ export interface LAN { */ id?: string; + bond_id?: number; + /** * mark true to use this LAN for HA probing. only works for site with HA turned on. * only one LAN can be set as the ha_link. @@ -375,9 +374,9 @@ export interface LANCreateParams { account_id: string; /** - * Body param: + * Body param */ - physport: number; + bond_id?: number; /** * Body param: mark true to use this LAN for HA probing. only works for site with @@ -386,17 +385,22 @@ export interface LANCreateParams { ha_link?: boolean; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ nat?: NatParam; /** - * Body param: + * Body param + */ + physport?: number; + + /** + * Body param */ routed_subnets?: Array; @@ -421,22 +425,27 @@ export interface LANUpdateParams { account_id: string; /** - * Body param: + * Body param + */ + bond_id?: number; + + /** + * Body param */ name?: string; /** - * Body param: + * Body param */ nat?: NatParam; /** - * Body param: + * Body param */ physport?: number; /** - * Body param: + * Body param */ routed_subnets?: Array; @@ -475,22 +484,27 @@ export interface LANEditParams { account_id: string; /** - * Body param: + * Body param + */ + bond_id?: number; + + /** + * Body param */ name?: string; /** - * Body param: + * Body param */ nat?: NatParam; /** - * Body param: + * Body param */ physport?: number; /** - * Body param: + * Body param */ routed_subnets?: Array; diff --git a/src/resources/magic-transit/sites/sites.ts b/src/resources/magic-transit/sites/sites.ts index 8971d500a6..3bb8b54239 100644 --- a/src/resources/magic-transit/sites/sites.ts +++ b/src/resources/magic-transit/sites/sites.ts @@ -270,7 +270,7 @@ export interface SiteCreateParams { connector_id?: string; /** - * Body param: + * Body param */ description?: string; @@ -304,7 +304,7 @@ export interface SiteUpdateParams { connector_id?: string; /** - * Body param: + * Body param */ description?: string; @@ -356,7 +356,7 @@ export interface SiteEditParams { connector_id?: string; /** - * Body param: + * Body param */ description?: string; diff --git a/src/resources/magic-transit/sites/wans.ts b/src/resources/magic-transit/sites/wans.ts index 70f010546d..68917c6a5b 100644 --- a/src/resources/magic-transit/sites/wans.ts +++ b/src/resources/magic-transit/sites/wans.ts @@ -260,17 +260,17 @@ export interface WANCreateParams { account_id: string; /** - * Body param: + * Body param */ physport: number; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ priority?: number; @@ -293,17 +293,17 @@ export interface WANUpdateParams { account_id: string; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ physport?: number; /** - * Body param: + * Body param */ priority?: number; @@ -340,17 +340,17 @@ export interface WANEditParams { account_id: string; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param */ physport?: number; /** - * Body param: + * Body param */ priority?: number; diff --git a/src/resources/network-interconnects/cnis.ts b/src/resources/network-interconnects/cnis.ts index 80177ff6f8..eabdb8be7a 100644 --- a/src/resources/network-interconnects/cnis.ts +++ b/src/resources/network-interconnects/cnis.ts @@ -425,17 +425,17 @@ export interface CNICreateParams { account: string; /** - * Body param: + * Body param */ interconnect: string; /** - * Body param: + * Body param */ magic: CNICreateParams.Magic; /** - * Body param: + * Body param */ bgp?: CNICreateParams.BGP; } @@ -491,7 +491,7 @@ export interface CNIUpdateParams { account_id: string; /** - * Body param: + * Body param */ id: string; @@ -513,7 +513,7 @@ export interface CNIUpdateParams { interconnect: string; /** - * Body param: + * Body param */ magic: CNIUpdateParams.Magic; @@ -523,7 +523,7 @@ export interface CNIUpdateParams { p2p_ip: string; /** - * Body param: + * Body param */ bgp?: CNIUpdateParams.BGP; } @@ -579,12 +579,12 @@ export interface CNIListParams { account_id: string; /** - * Query param: + * Query param */ cursor?: number | null; /** - * Query param: + * Query param */ limit?: number | null; diff --git a/src/resources/network-interconnects/interconnects.ts b/src/resources/network-interconnects/interconnects.ts index 0ba927420e..afcb04ba6d 100644 --- a/src/resources/network-interconnects/interconnects.ts +++ b/src/resources/network-interconnects/interconnects.ts @@ -337,22 +337,22 @@ export declare namespace InterconnectCreateParams { account_id: string; /** - * Body param: + * Body param */ account: string; /** - * Body param: + * Body param */ slot_id: string; /** - * Body param: + * Body param */ type: string; /** - * Body param: + * Body param */ speed?: string | null; } @@ -364,7 +364,7 @@ export declare namespace InterconnectCreateParams { account_id: string; /** - * Body param: + * Body param */ account: string; @@ -391,7 +391,7 @@ export declare namespace InterconnectCreateParams { pairing_key: string; /** - * Body param: + * Body param */ type: string; } @@ -404,12 +404,12 @@ export interface InterconnectListParams { account_id: string; /** - * Query param: + * Query param */ cursor?: number | null; /** - * Query param: + * Query param */ limit?: number | null; diff --git a/src/resources/network-interconnects/settings.ts b/src/resources/network-interconnects/settings.ts index 736f47b8a5..2c4d2bed44 100644 --- a/src/resources/network-interconnects/settings.ts +++ b/src/resources/network-interconnects/settings.ts @@ -52,7 +52,7 @@ export interface SettingUpdateParams { account_id: string; /** - * Body param: + * Body param */ default_asn?: number | null; } diff --git a/src/resources/network-interconnects/slots.ts b/src/resources/network-interconnects/slots.ts index b7248ac02e..58c2806f8f 100644 --- a/src/resources/network-interconnects/slots.ts +++ b/src/resources/network-interconnects/slots.ts @@ -119,12 +119,12 @@ export interface SlotListParams { address_contains?: string | null; /** - * Query param: + * Query param */ cursor?: number | null; /** - * Query param: + * Query param */ limit?: number | null; diff --git a/src/resources/origin-tls-client-auth/hostnames/certificates.ts b/src/resources/origin-tls-client-auth/hostname-certificates.ts similarity index 77% rename from src/resources/origin-tls-client-auth/hostnames/certificates.ts rename to src/resources/origin-tls-client-auth/hostname-certificates.ts index 012c5ca71e..3457772071 100644 --- a/src/resources/origin-tls-client-auth/hostnames/certificates.ts +++ b/src/resources/origin-tls-client-auth/hostname-certificates.ts @@ -1,19 +1,19 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from '../../../resource'; -import * as Core from '../../../core'; +import { APIResource } from '../../resource'; +import * as Core from '../../core'; import * as HostnamesAPI from './hostnames'; -import { SinglePage } from '../../../pagination'; +import { SinglePage } from '../../pagination'; -export class Certificates extends APIResource { +export class HostnameCertificates extends APIResource { /** * Upload a certificate to be used for client authentication on a hostname. 10 * hostname certificates per zone are allowed. * * @example * ```ts - * const certificate = - * await client.originTLSClientAuth.hostnames.certificates.create( + * const hostnameCertificate = + * await client.originTLSClientAuth.hostnameCertificates.create( * { * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', * certificate: @@ -25,15 +25,15 @@ export class Certificates extends APIResource { * ``` */ create( - params: CertificateCreateParams, + params: HostnameCertificateCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id, ...body } = params; return ( this._client.post(`/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates`, { body, ...options, - }) as Core.APIPromise<{ result: CertificateCreateResponse }> + }) as Core.APIPromise<{ result: HostnameCertificateCreateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -43,7 +43,7 @@ export class Certificates extends APIResource { * @example * ```ts * // Automatically fetches more pages as needed. - * for await (const certificateListResponse of client.originTLSClientAuth.hostnames.certificates.list( + * for await (const hostnameCertificateListResponse of client.originTLSClientAuth.hostnameCertificates.list( * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... @@ -51,13 +51,13 @@ export class Certificates extends APIResource { * ``` */ list( - params: CertificateListParams, + params: HostnameCertificateListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id } = params; return this._client.getAPIList( `/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates`, - CertificateListResponsesSinglePage, + HostnameCertificateListResponsesSinglePage, options, ); } @@ -67,8 +67,8 @@ export class Certificates extends APIResource { * * @example * ```ts - * const certificate = - * await client.originTLSClientAuth.hostnames.certificates.delete( + * const hostnameCertificate = + * await client.originTLSClientAuth.hostnameCertificates.delete( * '023e105f4ecef8ad9ca31a8372d0c353', * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); @@ -76,15 +76,15 @@ export class Certificates extends APIResource { */ delete( certificateId: string, - params: CertificateDeleteParams, + params: HostnameCertificateDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; return ( this._client.delete( `/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates/${certificateId}`, options, - ) as Core.APIPromise<{ result: CertificateDeleteResponse }> + ) as Core.APIPromise<{ result: HostnameCertificateDeleteResponse }> )._thenUnwrap((obj) => obj.result); } @@ -93,8 +93,8 @@ export class Certificates extends APIResource { * * @example * ```ts - * const certificate = - * await client.originTLSClientAuth.hostnames.certificates.get( + * const hostnameCertificate = + * await client.originTLSClientAuth.hostnameCertificates.get( * '023e105f4ecef8ad9ca31a8372d0c353', * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); @@ -102,20 +102,20 @@ export class Certificates extends APIResource { */ get( certificateId: string, - params: CertificateGetParams, + params: HostnameCertificateGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; return ( this._client.get( `/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates/${certificateId}`, options, - ) as Core.APIPromise<{ result: CertificateGetResponse }> + ) as Core.APIPromise<{ result: HostnameCertificateGetResponse }> )._thenUnwrap((obj) => obj.result); } } -export class CertificateListResponsesSinglePage extends SinglePage {} +export class HostnameCertificateListResponsesSinglePage extends SinglePage {} export interface Certificate { /** @@ -166,7 +166,7 @@ export interface Certificate { uploaded_on?: string; } -export interface CertificateCreateResponse { +export interface HostnameCertificateCreateResponse { /** * Identifier. */ @@ -215,7 +215,7 @@ export interface CertificateCreateResponse { uploaded_on?: string; } -export interface CertificateListResponse extends HostnamesAPI.AuthenticatedOriginPull { +export interface HostnameCertificateListResponse extends HostnamesAPI.AuthenticatedOriginPull { /** * Identifier. */ @@ -249,7 +249,7 @@ export interface CertificateListResponse extends HostnamesAPI.AuthenticatedOrigi private_key?: string; } -export interface CertificateDeleteResponse { +export interface HostnameCertificateDeleteResponse { /** * Identifier. */ @@ -298,7 +298,7 @@ export interface CertificateDeleteResponse { uploaded_on?: string; } -export interface CertificateGetResponse { +export interface HostnameCertificateGetResponse { /** * Identifier. */ @@ -347,7 +347,7 @@ export interface CertificateGetResponse { uploaded_on?: string; } -export interface CertificateCreateParams { +export interface HostnameCertificateCreateParams { /** * Path param: Identifier. */ @@ -364,40 +364,40 @@ export interface CertificateCreateParams { private_key: string; } -export interface CertificateListParams { +export interface HostnameCertificateListParams { /** * Identifier. */ zone_id: string; } -export interface CertificateDeleteParams { +export interface HostnameCertificateDeleteParams { /** * Identifier. */ zone_id: string; } -export interface CertificateGetParams { +export interface HostnameCertificateGetParams { /** * Identifier. */ zone_id: string; } -Certificates.CertificateListResponsesSinglePage = CertificateListResponsesSinglePage; +HostnameCertificates.HostnameCertificateListResponsesSinglePage = HostnameCertificateListResponsesSinglePage; -export declare namespace Certificates { +export declare namespace HostnameCertificates { export { type Certificate as Certificate, - type CertificateCreateResponse as CertificateCreateResponse, - type CertificateListResponse as CertificateListResponse, - type CertificateDeleteResponse as CertificateDeleteResponse, - type CertificateGetResponse as CertificateGetResponse, - CertificateListResponsesSinglePage as CertificateListResponsesSinglePage, - type CertificateCreateParams as CertificateCreateParams, - type CertificateListParams as CertificateListParams, - type CertificateDeleteParams as CertificateDeleteParams, - type CertificateGetParams as CertificateGetParams, + type HostnameCertificateCreateResponse as HostnameCertificateCreateResponse, + type HostnameCertificateListResponse as HostnameCertificateListResponse, + type HostnameCertificateDeleteResponse as HostnameCertificateDeleteResponse, + type HostnameCertificateGetResponse as HostnameCertificateGetResponse, + HostnameCertificateListResponsesSinglePage as HostnameCertificateListResponsesSinglePage, + type HostnameCertificateCreateParams as HostnameCertificateCreateParams, + type HostnameCertificateListParams as HostnameCertificateListParams, + type HostnameCertificateDeleteParams as HostnameCertificateDeleteParams, + type HostnameCertificateGetParams as HostnameCertificateGetParams, }; } diff --git a/src/resources/origin-tls-client-auth/hostnames.ts b/src/resources/origin-tls-client-auth/hostnames.ts index 40578b9fd7..dbdf3b6fbe 100644 --- a/src/resources/origin-tls-client-auth/hostnames.ts +++ b/src/resources/origin-tls-client-auth/hostnames.ts @@ -1,3 +1,241 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export * from './hostnames/index'; +import { APIResource } from '../../resource'; +import * as Core from '../../core'; +import { SinglePage } from '../../pagination'; + +export class Hostnames extends APIResource { + /** + * Associate a hostname to a certificate and enable, disable or invalidate the + * association. If disabled, client certificate will not be sent to the hostname + * even if activated at the zone level. 100 maximum associations on a single + * certificate are allowed. Note: Use a null value for parameter _enabled_ to + * invalidate the association. + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const hostnameUpdateResponse of client.originTLSClientAuth.hostnames.update( + * { + * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + * config: [{}], + * }, + * )) { + * // ... + * } + * ``` + */ + update( + params: HostnameUpdateParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { zone_id, ...body } = params; + return this._client.getAPIList( + `/zones/${zone_id}/origin_tls_client_auth/hostnames`, + HostnameUpdateResponsesSinglePage, + { body, method: 'put', ...options }, + ); + } + + /** + * Get the Hostname Status for Client Authentication + * + * @example + * ```ts + * const authenticatedOriginPull = + * await client.originTLSClientAuth.hostnames.get( + * 'app.example.com', + * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + * ); + * ``` + */ + get( + hostname: string, + params: HostnameGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.get( + `/zones/${zone_id}/origin_tls_client_auth/hostnames/${hostname}`, + options, + ) as Core.APIPromise<{ result: AuthenticatedOriginPull }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class HostnameUpdateResponsesSinglePage extends SinglePage {} + +export interface AuthenticatedOriginPull { + /** + * Identifier. + */ + cert_id?: string; + + /** + * Status of the certificate or the association. + */ + cert_status?: + | 'initializing' + | 'pending_deployment' + | 'pending_deletion' + | 'active' + | 'deleted' + | 'deployment_timed_out' + | 'deletion_timed_out'; + + /** + * The time when the certificate was updated. + */ + cert_updated_at?: string; + + /** + * The time when the certificate was uploaded. + */ + cert_uploaded_on?: string; + + /** + * The hostname certificate. + */ + certificate?: string; + + /** + * The time when the certificate was created. + */ + created_at?: string; + + /** + * Indicates whether hostname-level authenticated origin pulls is enabled. A null + * value voids the association. + */ + enabled?: boolean | null; + + /** + * The date when the certificate expires. + */ + expires_on?: string; + + /** + * The hostname on the origin for which the client certificate uploaded will be + * used. + */ + hostname?: string; + + /** + * The certificate authority that issued the certificate. + */ + issuer?: string; + + /** + * The serial number on the uploaded certificate. + */ + serial_number?: string; + + /** + * The type of hash used for the certificate. + */ + signature?: string; + + /** + * Status of the certificate or the association. + */ + status?: + | 'initializing' + | 'pending_deployment' + | 'pending_deletion' + | 'active' + | 'deleted' + | 'deployment_timed_out' + | 'deletion_timed_out'; + + /** + * The time when the certificate was updated. + */ + updated_at?: string; +} + +export interface HostnameUpdateResponse extends AuthenticatedOriginPull { + /** + * Identifier. + */ + id?: string; + + /** + * Identifier. + */ + cert_id?: string; + + /** + * The hostname certificate. + */ + certificate?: string; + + /** + * Indicates whether hostname-level authenticated origin pulls is enabled. A null + * value voids the association. + */ + enabled?: boolean | null; + + /** + * The hostname on the origin for which the client certificate uploaded will be + * used. + */ + hostname?: string; + + /** + * The hostname certificate's private key. + */ + private_key?: string; +} + +export interface HostnameUpdateParams { + /** + * Path param: Identifier. + */ + zone_id: string; + + /** + * Body param + */ + config: Array; +} + +export namespace HostnameUpdateParams { + export interface Config { + /** + * Certificate identifier tag. + */ + cert_id?: string; + + /** + * Indicates whether hostname-level authenticated origin pulls is enabled. A null + * value voids the association. + */ + enabled?: boolean | null; + + /** + * The hostname on the origin for which the client certificate uploaded will be + * used. + */ + hostname?: string; + } +} + +export interface HostnameGetParams { + /** + * Identifier. + */ + zone_id: string; +} + +Hostnames.HostnameUpdateResponsesSinglePage = HostnameUpdateResponsesSinglePage; + +export declare namespace Hostnames { + export { + type AuthenticatedOriginPull as AuthenticatedOriginPull, + type HostnameUpdateResponse as HostnameUpdateResponse, + HostnameUpdateResponsesSinglePage as HostnameUpdateResponsesSinglePage, + type HostnameUpdateParams as HostnameUpdateParams, + type HostnameGetParams as HostnameGetParams, + }; +} diff --git a/src/resources/origin-tls-client-auth/hostnames/hostnames.ts b/src/resources/origin-tls-client-auth/hostnames/hostnames.ts deleted file mode 100644 index 8727482dbe..0000000000 --- a/src/resources/origin-tls-client-auth/hostnames/hostnames.ts +++ /dev/null @@ -1,273 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../resource'; -import * as Core from '../../../core'; -import * as CertificatesAPI from './certificates'; -import { - Certificate, - CertificateCreateParams, - CertificateCreateResponse, - CertificateDeleteParams, - CertificateDeleteResponse, - CertificateGetParams, - CertificateGetResponse, - CertificateListParams, - CertificateListResponse, - CertificateListResponsesSinglePage, - Certificates, -} from './certificates'; -import { SinglePage } from '../../../pagination'; - -export class Hostnames extends APIResource { - certificates: CertificatesAPI.Certificates = new CertificatesAPI.Certificates(this._client); - - /** - * Associate a hostname to a certificate and enable, disable or invalidate the - * association. If disabled, client certificate will not be sent to the hostname - * even if activated at the zone level. 100 maximum associations on a single - * certificate are allowed. Note: Use a null value for parameter _enabled_ to - * invalidate the association. - * - * @example - * ```ts - * // Automatically fetches more pages as needed. - * for await (const hostnameUpdateResponse of client.originTLSClientAuth.hostnames.update( - * { - * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - * config: [{}], - * }, - * )) { - * // ... - * } - * ``` - */ - update( - params: HostnameUpdateParams, - options?: Core.RequestOptions, - ): Core.PagePromise { - const { zone_id, ...body } = params; - return this._client.getAPIList( - `/zones/${zone_id}/origin_tls_client_auth/hostnames`, - HostnameUpdateResponsesSinglePage, - { body, method: 'put', ...options }, - ); - } - - /** - * Get the Hostname Status for Client Authentication - * - * @example - * ```ts - * const authenticatedOriginPull = - * await client.originTLSClientAuth.hostnames.get( - * 'app.example.com', - * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, - * ); - * ``` - */ - get( - hostname: string, - params: HostnameGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { - const { zone_id } = params; - return ( - this._client.get( - `/zones/${zone_id}/origin_tls_client_auth/hostnames/${hostname}`, - options, - ) as Core.APIPromise<{ result: AuthenticatedOriginPull }> - )._thenUnwrap((obj) => obj.result); - } -} - -export class HostnameUpdateResponsesSinglePage extends SinglePage {} - -export interface AuthenticatedOriginPull { - /** - * Identifier. - */ - cert_id?: string; - - /** - * Status of the certificate or the association. - */ - cert_status?: - | 'initializing' - | 'pending_deployment' - | 'pending_deletion' - | 'active' - | 'deleted' - | 'deployment_timed_out' - | 'deletion_timed_out'; - - /** - * The time when the certificate was updated. - */ - cert_updated_at?: string; - - /** - * The time when the certificate was uploaded. - */ - cert_uploaded_on?: string; - - /** - * The hostname certificate. - */ - certificate?: string; - - /** - * The time when the certificate was created. - */ - created_at?: string; - - /** - * Indicates whether hostname-level authenticated origin pulls is enabled. A null - * value voids the association. - */ - enabled?: boolean | null; - - /** - * The date when the certificate expires. - */ - expires_on?: string; - - /** - * The hostname on the origin for which the client certificate uploaded will be - * used. - */ - hostname?: string; - - /** - * The certificate authority that issued the certificate. - */ - issuer?: string; - - /** - * The serial number on the uploaded certificate. - */ - serial_number?: string; - - /** - * The type of hash used for the certificate. - */ - signature?: string; - - /** - * Status of the certificate or the association. - */ - status?: - | 'initializing' - | 'pending_deployment' - | 'pending_deletion' - | 'active' - | 'deleted' - | 'deployment_timed_out' - | 'deletion_timed_out'; - - /** - * The time when the certificate was updated. - */ - updated_at?: string; -} - -export interface HostnameUpdateResponse extends AuthenticatedOriginPull { - /** - * Identifier. - */ - id?: string; - - /** - * Identifier. - */ - cert_id?: string; - - /** - * The hostname certificate. - */ - certificate?: string; - - /** - * Indicates whether hostname-level authenticated origin pulls is enabled. A null - * value voids the association. - */ - enabled?: boolean | null; - - /** - * The hostname on the origin for which the client certificate uploaded will be - * used. - */ - hostname?: string; - - /** - * The hostname certificate's private key. - */ - private_key?: string; -} - -export interface HostnameUpdateParams { - /** - * Path param: Identifier. - */ - zone_id: string; - - /** - * Body param: - */ - config: Array; -} - -export namespace HostnameUpdateParams { - export interface Config { - /** - * Certificate identifier tag. - */ - cert_id?: string; - - /** - * Indicates whether hostname-level authenticated origin pulls is enabled. A null - * value voids the association. - */ - enabled?: boolean | null; - - /** - * The hostname on the origin for which the client certificate uploaded will be - * used. - */ - hostname?: string; - } -} - -export interface HostnameGetParams { - /** - * Identifier. - */ - zone_id: string; -} - -Hostnames.HostnameUpdateResponsesSinglePage = HostnameUpdateResponsesSinglePage; -Hostnames.Certificates = Certificates; -Hostnames.CertificateListResponsesSinglePage = CertificateListResponsesSinglePage; - -export declare namespace Hostnames { - export { - type AuthenticatedOriginPull as AuthenticatedOriginPull, - type HostnameUpdateResponse as HostnameUpdateResponse, - HostnameUpdateResponsesSinglePage as HostnameUpdateResponsesSinglePage, - type HostnameUpdateParams as HostnameUpdateParams, - type HostnameGetParams as HostnameGetParams, - }; - - export { - Certificates as Certificates, - type Certificate as Certificate, - type CertificateCreateResponse as CertificateCreateResponse, - type CertificateListResponse as CertificateListResponse, - type CertificateDeleteResponse as CertificateDeleteResponse, - type CertificateGetResponse as CertificateGetResponse, - CertificateListResponsesSinglePage as CertificateListResponsesSinglePage, - type CertificateCreateParams as CertificateCreateParams, - type CertificateListParams as CertificateListParams, - type CertificateDeleteParams as CertificateDeleteParams, - type CertificateGetParams as CertificateGetParams, - }; -} diff --git a/src/resources/origin-tls-client-auth/hostnames/index.ts b/src/resources/origin-tls-client-auth/hostnames/index.ts deleted file mode 100644 index d528aaa209..0000000000 --- a/src/resources/origin-tls-client-auth/hostnames/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -export { - CertificateListResponsesSinglePage, - Certificates, - type Certificate, - type CertificateCreateResponse, - type CertificateListResponse, - type CertificateDeleteResponse, - type CertificateGetResponse, - type CertificateCreateParams, - type CertificateListParams, - type CertificateDeleteParams, - type CertificateGetParams, -} from './certificates'; -export { - HostnameUpdateResponsesSinglePage, - Hostnames, - type AuthenticatedOriginPull, - type HostnameUpdateResponse, - type HostnameUpdateParams, - type HostnameGetParams, -} from './hostnames'; diff --git a/src/resources/origin-tls-client-auth/index.ts b/src/resources/origin-tls-client-auth/index.ts index 9134bc8c3a..e1af803820 100644 --- a/src/resources/origin-tls-client-auth/index.ts +++ b/src/resources/origin-tls-client-auth/index.ts @@ -1,5 +1,18 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { + HostnameCertificateListResponsesSinglePage, + HostnameCertificates, + type Certificate, + type HostnameCertificateCreateResponse, + type HostnameCertificateListResponse, + type HostnameCertificateDeleteResponse, + type HostnameCertificateGetResponse, + type HostnameCertificateCreateParams, + type HostnameCertificateListParams, + type HostnameCertificateDeleteParams, + type HostnameCertificateGetParams, +} from './hostname-certificates'; export { HostnameUpdateResponsesSinglePage, Hostnames, @@ -7,7 +20,7 @@ export { type HostnameUpdateResponse, type HostnameUpdateParams, type HostnameGetParams, -} from './hostnames/index'; +} from './hostnames'; export { OriginTLSClientAuth } from './origin-tls-client-auth'; export { Settings, @@ -16,3 +29,16 @@ export { type SettingUpdateParams, type SettingGetParams, } from './settings'; +export { + ZoneCertificateListResponsesSinglePage, + ZoneCertificates, + type ZoneAuthenticatedOriginPull, + type ZoneCertificateCreateResponse, + type ZoneCertificateListResponse, + type ZoneCertificateDeleteResponse, + type ZoneCertificateGetResponse, + type ZoneCertificateCreateParams, + type ZoneCertificateListParams, + type ZoneCertificateDeleteParams, + type ZoneCertificateGetParams, +} from './zone-certificates'; diff --git a/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts b/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts index b0b2c06d51..7246e7c01e 100644 --- a/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts +++ b/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts @@ -2,6 +2,29 @@ import { APIResource } from '../../resource'; import * as Core from '../../core'; +import * as HostnameCertificatesAPI from './hostname-certificates'; +import { + Certificate, + HostnameCertificateCreateParams, + HostnameCertificateCreateResponse, + HostnameCertificateDeleteParams, + HostnameCertificateDeleteResponse, + HostnameCertificateGetParams, + HostnameCertificateGetResponse, + HostnameCertificateListParams, + HostnameCertificateListResponse, + HostnameCertificateListResponsesSinglePage, + HostnameCertificates, +} from './hostname-certificates'; +import * as HostnamesAPI from './hostnames'; +import { + AuthenticatedOriginPull, + HostnameGetParams, + HostnameUpdateParams, + HostnameUpdateResponse, + HostnameUpdateResponsesSinglePage, + Hostnames, +} from './hostnames'; import * as SettingsAPI from './settings'; import { SettingGetParams, @@ -10,19 +33,29 @@ import { SettingUpdateResponse, Settings, } from './settings'; -import * as HostnamesAPI from './hostnames/hostnames'; +import * as ZoneCertificatesAPI from './zone-certificates'; import { - AuthenticatedOriginPull, - HostnameGetParams, - HostnameUpdateParams, - HostnameUpdateResponse, - HostnameUpdateResponsesSinglePage, - Hostnames, -} from './hostnames/hostnames'; + ZoneAuthenticatedOriginPull, + ZoneCertificateCreateParams, + ZoneCertificateCreateResponse, + ZoneCertificateDeleteParams, + ZoneCertificateDeleteResponse, + ZoneCertificateGetParams, + ZoneCertificateGetResponse, + ZoneCertificateListParams, + ZoneCertificateListResponse, + ZoneCertificateListResponsesSinglePage, + ZoneCertificates, +} from './zone-certificates'; import { SinglePage } from '../../pagination'; export class OriginTLSClientAuth extends APIResource { + zoneCertificates: ZoneCertificatesAPI.ZoneCertificates = new ZoneCertificatesAPI.ZoneCertificates( + this._client, + ); hostnames: HostnamesAPI.Hostnames = new HostnamesAPI.Hostnames(this._client); + hostnameCertificates: HostnameCertificatesAPI.HostnameCertificates = + new HostnameCertificatesAPI.HostnameCertificates(this._client); settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client); /** @@ -32,17 +65,7 @@ export class OriginTLSClientAuth extends APIResource { * zone-level authenticated origin pulls by making a PUT call to settings endpoint * to see the uploaded certificate in use. * - * @example - * ```ts - * const originTLSClientAuth = - * await client.originTLSClientAuth.create({ - * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - * certificate: - * '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n', - * private_key: - * '-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n', - * }); - * ``` + * @deprecated Use zone_certificates.create for zone-level certificates. This method will be removed in a future major version. */ create( params: OriginTLSClientAuthCreateParams, @@ -59,15 +82,7 @@ export class OriginTLSClientAuth extends APIResource { /** * List Certificates * - * @example - * ```ts - * // Automatically fetches more pages as needed. - * for await (const originTLSClientAuthListResponse of client.originTLSClientAuth.list( - * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, - * )) { - * // ... - * } - * ``` + * @deprecated Use zone_certificates.list for zone-level certificates. This method will be removed in a future major version. */ list( params: OriginTLSClientAuthListParams, @@ -84,14 +99,7 @@ export class OriginTLSClientAuth extends APIResource { /** * Delete Certificate * - * @example - * ```ts - * const originTLSClientAuth = - * await client.originTLSClientAuth.delete( - * '023e105f4ecef8ad9ca31a8372d0c353', - * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, - * ); - * ``` + * @deprecated Use zone_certificates.delete for zone-level certificates. This method will be removed in a future major version. */ delete( certificateId: string, @@ -110,14 +118,7 @@ export class OriginTLSClientAuth extends APIResource { /** * Get Certificate Details * - * @example - * ```ts - * const originTLSClientAuth = - * await client.originTLSClientAuth.get( - * '023e105f4ecef8ad9ca31a8372d0c353', - * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, - * ); - * ``` + * @deprecated Use zone_certificates.get for zone-level certificates. This method will be removed in a future major version. */ get( certificateId: string, @@ -136,51 +137,7 @@ export class OriginTLSClientAuth extends APIResource { export class OriginTLSClientAuthListResponsesSinglePage extends SinglePage {} -export interface ZoneAuthenticatedOriginPull { - /** - * Identifier. - */ - id?: string; - - /** - * The zone's leaf certificate. - */ - certificate?: string; - - /** - * When the certificate from the authority expires. - */ - expires_on?: string; - - /** - * The certificate authority that issued the certificate. - */ - issuer?: string; - - /** - * The type of hash used for the certificate. - */ - signature?: string; - - /** - * Status of the certificate activation. - */ - status?: - | 'initializing' - | 'pending_deployment' - | 'pending_deletion' - | 'active' - | 'deleted' - | 'deployment_timed_out' - | 'deletion_timed_out'; - - /** - * This is the time the certificate was uploaded. - */ - uploaded_on?: string; -} - -export interface OriginTLSClientAuthCreateResponse extends ZoneAuthenticatedOriginPull { +export interface OriginTLSClientAuthCreateResponse extends ZoneCertificatesAPI.ZoneAuthenticatedOriginPull { /** * Identifier. */ @@ -202,7 +159,7 @@ export interface OriginTLSClientAuthCreateResponse extends ZoneAuthenticatedOrig private_key?: string; } -export interface OriginTLSClientAuthListResponse extends ZoneAuthenticatedOriginPull { +export interface OriginTLSClientAuthListResponse extends ZoneCertificatesAPI.ZoneAuthenticatedOriginPull { /** * Identifier. */ @@ -224,7 +181,7 @@ export interface OriginTLSClientAuthListResponse extends ZoneAuthenticatedOrigin private_key?: string; } -export interface OriginTLSClientAuthDeleteResponse extends ZoneAuthenticatedOriginPull { +export interface OriginTLSClientAuthDeleteResponse extends ZoneCertificatesAPI.ZoneAuthenticatedOriginPull { /** * Identifier. */ @@ -246,7 +203,7 @@ export interface OriginTLSClientAuthDeleteResponse extends ZoneAuthenticatedOrig private_key?: string; } -export interface OriginTLSClientAuthGetResponse extends ZoneAuthenticatedOriginPull { +export interface OriginTLSClientAuthGetResponse extends ZoneCertificatesAPI.ZoneAuthenticatedOriginPull { /** * Identifier. */ @@ -307,13 +264,16 @@ export interface OriginTLSClientAuthGetParams { } OriginTLSClientAuth.OriginTLSClientAuthListResponsesSinglePage = OriginTLSClientAuthListResponsesSinglePage; +OriginTLSClientAuth.ZoneCertificates = ZoneCertificates; +OriginTLSClientAuth.ZoneCertificateListResponsesSinglePage = ZoneCertificateListResponsesSinglePage; OriginTLSClientAuth.Hostnames = Hostnames; OriginTLSClientAuth.HostnameUpdateResponsesSinglePage = HostnameUpdateResponsesSinglePage; +OriginTLSClientAuth.HostnameCertificates = HostnameCertificates; +OriginTLSClientAuth.HostnameCertificateListResponsesSinglePage = HostnameCertificateListResponsesSinglePage; OriginTLSClientAuth.Settings = Settings; export declare namespace OriginTLSClientAuth { export { - type ZoneAuthenticatedOriginPull as ZoneAuthenticatedOriginPull, type OriginTLSClientAuthCreateResponse as OriginTLSClientAuthCreateResponse, type OriginTLSClientAuthListResponse as OriginTLSClientAuthListResponse, type OriginTLSClientAuthDeleteResponse as OriginTLSClientAuthDeleteResponse, @@ -325,6 +285,20 @@ export declare namespace OriginTLSClientAuth { type OriginTLSClientAuthGetParams as OriginTLSClientAuthGetParams, }; + export { + ZoneCertificates as ZoneCertificates, + type ZoneAuthenticatedOriginPull as ZoneAuthenticatedOriginPull, + type ZoneCertificateCreateResponse as ZoneCertificateCreateResponse, + type ZoneCertificateListResponse as ZoneCertificateListResponse, + type ZoneCertificateDeleteResponse as ZoneCertificateDeleteResponse, + type ZoneCertificateGetResponse as ZoneCertificateGetResponse, + ZoneCertificateListResponsesSinglePage as ZoneCertificateListResponsesSinglePage, + type ZoneCertificateCreateParams as ZoneCertificateCreateParams, + type ZoneCertificateListParams as ZoneCertificateListParams, + type ZoneCertificateDeleteParams as ZoneCertificateDeleteParams, + type ZoneCertificateGetParams as ZoneCertificateGetParams, + }; + export { Hostnames as Hostnames, type AuthenticatedOriginPull as AuthenticatedOriginPull, @@ -334,6 +308,20 @@ export declare namespace OriginTLSClientAuth { type HostnameGetParams as HostnameGetParams, }; + export { + HostnameCertificates as HostnameCertificates, + type Certificate as Certificate, + type HostnameCertificateCreateResponse as HostnameCertificateCreateResponse, + type HostnameCertificateListResponse as HostnameCertificateListResponse, + type HostnameCertificateDeleteResponse as HostnameCertificateDeleteResponse, + type HostnameCertificateGetResponse as HostnameCertificateGetResponse, + HostnameCertificateListResponsesSinglePage as HostnameCertificateListResponsesSinglePage, + type HostnameCertificateCreateParams as HostnameCertificateCreateParams, + type HostnameCertificateListParams as HostnameCertificateListParams, + type HostnameCertificateDeleteParams as HostnameCertificateDeleteParams, + type HostnameCertificateGetParams as HostnameCertificateGetParams, + }; + export { Settings as Settings, type SettingUpdateResponse as SettingUpdateResponse, diff --git a/src/resources/origin-tls-client-auth/zone-certificates.ts b/src/resources/origin-tls-client-auth/zone-certificates.ts new file mode 100644 index 0000000000..2bf3e2a996 --- /dev/null +++ b/src/resources/origin-tls-client-auth/zone-certificates.ts @@ -0,0 +1,304 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../resource'; +import * as Core from '../../core'; +import { SinglePage } from '../../pagination'; + +export class ZoneCertificates extends APIResource { + /** + * Upload your own certificate you want Cloudflare to use for edge-to-origin + * communication to override the shared certificate. Please note that it is + * important to keep only one certificate active. Also, make sure to enable + * zone-level authenticated origin pulls by making a PUT call to settings endpoint + * to see the uploaded certificate in use. + * + * @example + * ```ts + * const zoneCertificate = + * await client.originTLSClientAuth.zoneCertificates.create({ + * zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + * certificate: + * '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n', + * private_key: + * '-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n', + * }); + * ``` + */ + create( + params: ZoneCertificateCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id, ...body } = params; + return ( + this._client.post(`/zones/${zone_id}/origin_tls_client_auth`, { body, ...options }) as Core.APIPromise<{ + result: ZoneCertificateCreateResponse; + }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * List Certificates + * + * @example + * ```ts + * // Automatically fetches more pages as needed. + * for await (const zoneCertificateListResponse of client.originTLSClientAuth.zoneCertificates.list( + * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + * )) { + * // ... + * } + * ``` + */ + list( + params: ZoneCertificateListParams, + options?: Core.RequestOptions, + ): Core.PagePromise { + const { zone_id } = params; + return this._client.getAPIList( + `/zones/${zone_id}/origin_tls_client_auth`, + ZoneCertificateListResponsesSinglePage, + options, + ); + } + + /** + * Delete Certificate + * + * @example + * ```ts + * const zoneCertificate = + * await client.originTLSClientAuth.zoneCertificates.delete( + * '023e105f4ecef8ad9ca31a8372d0c353', + * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + * ); + * ``` + */ + delete( + certificateId: string, + params: ZoneCertificateDeleteParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.delete( + `/zones/${zone_id}/origin_tls_client_auth/${certificateId}`, + options, + ) as Core.APIPromise<{ result: ZoneCertificateDeleteResponse }> + )._thenUnwrap((obj) => obj.result); + } + + /** + * Get Certificate Details + * + * @example + * ```ts + * const zoneCertificate = + * await client.originTLSClientAuth.zoneCertificates.get( + * '023e105f4ecef8ad9ca31a8372d0c353', + * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + * ); + * ``` + */ + get( + certificateId: string, + params: ZoneCertificateGetParams, + options?: Core.RequestOptions, + ): Core.APIPromise { + const { zone_id } = params; + return ( + this._client.get( + `/zones/${zone_id}/origin_tls_client_auth/${certificateId}`, + options, + ) as Core.APIPromise<{ result: ZoneCertificateGetResponse }> + )._thenUnwrap((obj) => obj.result); + } +} + +export class ZoneCertificateListResponsesSinglePage extends SinglePage {} + +export interface ZoneAuthenticatedOriginPull { + /** + * Identifier. + */ + id?: string; + + /** + * The zone's leaf certificate. + */ + certificate?: string; + + /** + * When the certificate from the authority expires. + */ + expires_on?: string; + + /** + * The certificate authority that issued the certificate. + */ + issuer?: string; + + /** + * The type of hash used for the certificate. + */ + signature?: string; + + /** + * Status of the certificate activation. + */ + status?: + | 'initializing' + | 'pending_deployment' + | 'pending_deletion' + | 'active' + | 'deleted' + | 'deployment_timed_out' + | 'deletion_timed_out'; + + /** + * This is the time the certificate was uploaded. + */ + uploaded_on?: string; +} + +export interface ZoneCertificateCreateResponse extends ZoneAuthenticatedOriginPull { + /** + * Identifier. + */ + id?: string; + + /** + * The zone's leaf certificate. + */ + certificate?: string; + + /** + * Indicates whether zone-level authenticated origin pulls is enabled. + */ + enabled?: boolean; + + /** + * The zone's private key. + */ + private_key?: string; +} + +export interface ZoneCertificateListResponse extends ZoneAuthenticatedOriginPull { + /** + * Identifier. + */ + id?: string; + + /** + * The zone's leaf certificate. + */ + certificate?: string; + + /** + * Indicates whether zone-level authenticated origin pulls is enabled. + */ + enabled?: boolean; + + /** + * The zone's private key. + */ + private_key?: string; +} + +export interface ZoneCertificateDeleteResponse extends ZoneAuthenticatedOriginPull { + /** + * Identifier. + */ + id?: string; + + /** + * The zone's leaf certificate. + */ + certificate?: string; + + /** + * Indicates whether zone-level authenticated origin pulls is enabled. + */ + enabled?: boolean; + + /** + * The zone's private key. + */ + private_key?: string; +} + +export interface ZoneCertificateGetResponse extends ZoneAuthenticatedOriginPull { + /** + * Identifier. + */ + id?: string; + + /** + * The zone's leaf certificate. + */ + certificate?: string; + + /** + * Indicates whether zone-level authenticated origin pulls is enabled. + */ + enabled?: boolean; + + /** + * The zone's private key. + */ + private_key?: string; +} + +export interface ZoneCertificateCreateParams { + /** + * Path param: Identifier. + */ + zone_id: string; + + /** + * Body param: The zone's leaf certificate. + */ + certificate: string; + + /** + * Body param: The zone's private key. + */ + private_key: string; +} + +export interface ZoneCertificateListParams { + /** + * Identifier. + */ + zone_id: string; +} + +export interface ZoneCertificateDeleteParams { + /** + * Identifier. + */ + zone_id: string; +} + +export interface ZoneCertificateGetParams { + /** + * Identifier. + */ + zone_id: string; +} + +ZoneCertificates.ZoneCertificateListResponsesSinglePage = ZoneCertificateListResponsesSinglePage; + +export declare namespace ZoneCertificates { + export { + type ZoneAuthenticatedOriginPull as ZoneAuthenticatedOriginPull, + type ZoneCertificateCreateResponse as ZoneCertificateCreateResponse, + type ZoneCertificateListResponse as ZoneCertificateListResponse, + type ZoneCertificateDeleteResponse as ZoneCertificateDeleteResponse, + type ZoneCertificateGetResponse as ZoneCertificateGetResponse, + ZoneCertificateListResponsesSinglePage as ZoneCertificateListResponsesSinglePage, + type ZoneCertificateCreateParams as ZoneCertificateCreateParams, + type ZoneCertificateListParams as ZoneCertificateListParams, + type ZoneCertificateDeleteParams as ZoneCertificateDeleteParams, + type ZoneCertificateGetParams as ZoneCertificateGetParams, + }; +} diff --git a/src/resources/pipelines/pipelines.ts b/src/resources/pipelines/pipelines.ts index ebe126d177..0bd75928cd 100644 --- a/src/resources/pipelines/pipelines.ts +++ b/src/resources/pipelines/pipelines.ts @@ -1022,7 +1022,7 @@ export interface PipelineCreateParams { account_id: string; /** - * Body param: + * Body param */ destination: PipelineCreateParams.Destination; @@ -1032,7 +1032,7 @@ export interface PipelineCreateParams { name: string; /** - * Body param: + * Body param */ source: Array< | PipelineCreateParams.CloudflarePipelinesWorkersPipelinesHTTPSource @@ -1176,7 +1176,7 @@ export interface PipelineUpdateParams { account_id: string; /** - * Body param: + * Body param */ destination: PipelineUpdateParams.Destination; @@ -1186,7 +1186,7 @@ export interface PipelineUpdateParams { name: string; /** - * Body param: + * Body param */ source: Array< | PipelineUpdateParams.CloudflarePipelinesWorkersPipelinesHTTPSource diff --git a/src/resources/pipelines/sinks.ts b/src/resources/pipelines/sinks.ts index bc79abd008..75e1a12a15 100644 --- a/src/resources/pipelines/sinks.ts +++ b/src/resources/pipelines/sinks.ts @@ -1219,12 +1219,12 @@ export interface SinkCreateParams { | SinkCreateParams.CloudflarePipelinesR2DataCatalogTable; /** - * Body param: + * Body param */ format?: SinkCreateParams.Json | SinkCreateParams.Parquet; /** - * Body param: + * Body param */ schema?: SinkCreateParams.Schema; } @@ -1570,7 +1570,7 @@ export interface SinkListParams extends V4PagePaginationArrayParams { account_id: string; /** - * Query param: + * Query param */ pipeline_id?: string; } diff --git a/src/resources/pipelines/streams.ts b/src/resources/pipelines/streams.ts index 8c0537e878..e45f4f47e3 100644 --- a/src/resources/pipelines/streams.ts +++ b/src/resources/pipelines/streams.ts @@ -944,22 +944,22 @@ export interface StreamCreateParams { name: string; /** - * Body param: + * Body param */ format?: StreamCreateParams.Json | StreamCreateParams.Parquet; /** - * Body param: + * Body param */ http?: StreamCreateParams.HTTP; /** - * Body param: + * Body param */ schema?: StreamCreateParams.Schema; /** - * Body param: + * Body param */ worker_binding?: StreamCreateParams.WorkerBinding; } @@ -1178,12 +1178,12 @@ export interface StreamUpdateParams { account_id: string; /** - * Body param: + * Body param */ http?: StreamUpdateParams.HTTP; /** - * Body param: + * Body param */ worker_binding?: StreamUpdateParams.WorkerBinding; } diff --git a/src/resources/queues/consumers.ts b/src/resources/queues/consumers.ts index 43eae71410..80f9fe36e1 100644 --- a/src/resources/queues/consumers.ts +++ b/src/resources/queues/consumers.ts @@ -263,7 +263,7 @@ export declare namespace ConsumerCreateParams { account_id: string; /** - * Body param: + * Body param */ dead_letter_queue?: string; @@ -273,12 +273,12 @@ export declare namespace ConsumerCreateParams { script_name?: string; /** - * Body param: + * Body param */ settings?: MqWorkerConsumer.Settings; /** - * Body param: + * Body param */ type?: 'worker'; } @@ -322,17 +322,17 @@ export declare namespace ConsumerCreateParams { account_id: string; /** - * Body param: + * Body param */ dead_letter_queue?: string; /** - * Body param: + * Body param */ settings?: MqHTTPConsumer.Settings; /** - * Body param: + * Body param */ type?: 'http_pull'; } @@ -376,7 +376,7 @@ export declare namespace ConsumerUpdateParams { account_id: string; /** - * Body param: + * Body param */ dead_letter_queue?: string; @@ -386,12 +386,12 @@ export declare namespace ConsumerUpdateParams { script_name?: string; /** - * Body param: + * Body param */ settings?: MqWorkerConsumer.Settings; /** - * Body param: + * Body param */ type?: 'worker'; } @@ -435,17 +435,17 @@ export declare namespace ConsumerUpdateParams { account_id: string; /** - * Body param: + * Body param */ dead_letter_queue?: string; /** - * Body param: + * Body param */ settings?: MqHTTPConsumer.Settings; /** - * Body param: + * Body param */ type?: 'http_pull'; } diff --git a/src/resources/queues/messages.ts b/src/resources/queues/messages.ts index 3557b14318..7d1ef35ee2 100644 --- a/src/resources/queues/messages.ts +++ b/src/resources/queues/messages.ts @@ -171,12 +171,12 @@ export interface MessageAckParams { account_id: string; /** - * Body param: + * Body param */ acks?: Array; /** - * Body param: + * Body param */ retries?: Array; } @@ -218,7 +218,7 @@ export interface MessageBulkPushParams { delay_seconds?: number; /** - * Body param: + * Body param */ messages?: Array; } @@ -277,12 +277,12 @@ export declare namespace MessagePushParams { account_id: string; /** - * Body param: + * Body param */ body?: string; /** - * Body param: + * Body param */ content_type?: 'text'; @@ -300,12 +300,12 @@ export declare namespace MessagePushParams { account_id: string; /** - * Body param: + * Body param */ body?: unknown; /** - * Body param: + * Body param */ content_type?: 'json'; diff --git a/src/resources/queues/queues.ts b/src/resources/queues/queues.ts index 836f42bd41..211639311f 100644 --- a/src/resources/queues/queues.ts +++ b/src/resources/queues/queues.ts @@ -245,7 +245,7 @@ export interface QueueCreateParams { account_id: string; /** - * Body param: + * Body param */ queue_name: string; } @@ -257,12 +257,12 @@ export interface QueueUpdateParams { account_id: string; /** - * Body param: + * Body param */ queue_name?: string; /** - * Body param: + * Body param */ settings?: QueueUpdateParams.Settings; } @@ -307,12 +307,12 @@ export interface QueueEditParams { account_id: string; /** - * Body param: + * Body param */ queue_name?: string; /** - * Body param: + * Body param */ settings?: QueueEditParams.Settings; } diff --git a/src/resources/r2/buckets/cors.ts b/src/resources/r2/buckets/cors.ts index 4510c1d09b..553be32005 100644 --- a/src/resources/r2/buckets/cors.ts +++ b/src/resources/r2/buckets/cors.ts @@ -167,7 +167,7 @@ export interface CORSUpdateParams { account_id: string; /** - * Body param: + * Body param */ rules?: Array; diff --git a/src/resources/r2/buckets/lifecycle.ts b/src/resources/r2/buckets/lifecycle.ts index 3903139ecd..c1e7958eed 100644 --- a/src/resources/r2/buckets/lifecycle.ts +++ b/src/resources/r2/buckets/lifecycle.ts @@ -217,7 +217,7 @@ export interface LifecycleUpdateParams { account_id: string; /** - * Body param: + * Body param */ rules?: Array; diff --git a/src/resources/r2/buckets/locks.ts b/src/resources/r2/buckets/locks.ts index ee01f31ede..752b03c136 100644 --- a/src/resources/r2/buckets/locks.ts +++ b/src/resources/r2/buckets/locks.ts @@ -134,7 +134,7 @@ export interface LockUpdateParams { account_id: string; /** - * Body param: + * Body param */ rules?: Array; diff --git a/src/resources/r2/super-slurper/connectivity-precheck.ts b/src/resources/r2/super-slurper/connectivity-precheck.ts index 2283824388..349ab9fd56 100644 --- a/src/resources/r2/super-slurper/connectivity-precheck.ts +++ b/src/resources/r2/super-slurper/connectivity-precheck.ts @@ -82,37 +82,37 @@ export type ConnectivityPrecheckSourceParams = export declare namespace ConnectivityPrecheckSourceParams { export interface R2SlurperS3SourceSchema { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ bucket: string; /** - * Body param: + * Body param */ secret: R2SlurperS3SourceSchema.Secret; /** - * Body param: + * Body param */ vendor: 's3'; /** - * Body param: + * Body param */ endpoint?: string | null; /** - * Body param: + * Body param */ pathPrefix?: string | null; /** - * Body param: + * Body param */ region?: string | null; } @@ -127,27 +127,27 @@ export declare namespace ConnectivityPrecheckSourceParams { export interface R2SlurperGcsSourceSchema { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ bucket: string; /** - * Body param: + * Body param */ secret: R2SlurperGcsSourceSchema.Secret; /** - * Body param: + * Body param */ vendor: 'gcs'; /** - * Body param: + * Body param */ pathPrefix?: string | null; } @@ -162,32 +162,32 @@ export declare namespace ConnectivityPrecheckSourceParams { export interface R2SlurperR2SourceSchema { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ bucket: string; /** - * Body param: + * Body param */ secret: R2SlurperR2SourceSchema.Secret; /** - * Body param: + * Body param */ vendor: SippyAPI.ProviderParam; /** - * Body param: + * Body param */ jurisdiction?: 'default' | 'eu' | 'fedramp'; /** - * Body param: + * Body param */ pathPrefix?: string | null; } @@ -203,27 +203,27 @@ export declare namespace ConnectivityPrecheckSourceParams { export interface ConnectivityPrecheckTargetParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ bucket: string; /** - * Body param: + * Body param */ secret: ConnectivityPrecheckTargetParams.Secret; /** - * Body param: + * Body param */ vendor: SippyAPI.ProviderParam; /** - * Body param: + * Body param */ jurisdiction?: 'default' | 'eu' | 'fedramp'; } diff --git a/src/resources/r2/super-slurper/jobs/jobs.ts b/src/resources/r2/super-slurper/jobs/jobs.ts index c57e763e78..0ce937df7d 100644 --- a/src/resources/r2/super-slurper/jobs/jobs.ts +++ b/src/resources/r2/super-slurper/jobs/jobs.ts @@ -347,17 +347,17 @@ export type JobResumeResponse = string; export interface JobCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ overwrite?: boolean; /** - * Body param: + * Body param */ source?: | JobCreateParams.R2SlurperS3SourceSchema @@ -365,7 +365,7 @@ export interface JobCreateParams { | JobCreateParams.R2SlurperR2SourceSchema; /** - * Body param: + * Body param */ target?: JobCreateParams.Target; } @@ -452,17 +452,17 @@ export namespace JobCreateParams { export interface JobListParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ limit?: number; /** - * Query param: + * Query param */ offset?: number; } diff --git a/src/resources/r2/super-slurper/jobs/logs.ts b/src/resources/r2/super-slurper/jobs/logs.ts index d282bef9d7..05f206ac9c 100644 --- a/src/resources/r2/super-slurper/jobs/logs.ts +++ b/src/resources/r2/super-slurper/jobs/logs.ts @@ -64,17 +64,17 @@ export interface LogListResponse { export interface LogListParams { /** - * Path param: + * Path param */ account_id: string; /** - * Query param: + * Query param */ limit?: number; /** - * Query param: + * Query param */ offset?: number; } diff --git a/src/resources/radar/ai/to-markdown.ts b/src/resources/radar/ai/to-markdown.ts index b3016565e9..0b5ee4b4a4 100644 --- a/src/resources/radar/ai/to-markdown.ts +++ b/src/resources/radar/ai/to-markdown.ts @@ -47,7 +47,7 @@ export interface ToMarkdownCreateResponse { export interface ToMarkdownCreateParams { /** - * Path param: + * Path param */ account_id: string; } diff --git a/src/resources/radar/datasets.ts b/src/resources/radar/datasets.ts index 81c009e99b..b6caac1492 100644 --- a/src/resources/radar/datasets.ts +++ b/src/resources/radar/datasets.ts @@ -134,7 +134,7 @@ export interface DatasetListParams { export interface DatasetDownloadParams { /** - * Body param: + * Body param */ datasetId: number; diff --git a/src/resources/realtime-kit/active-session.ts b/src/resources/realtime-kit/active-session.ts index 167a4a8a41..dee7f298b1 100644 --- a/src/resources/realtime-kit/active-session.ts +++ b/src/resources/realtime-kit/active-session.ts @@ -368,12 +368,12 @@ export interface ActiveSessionKickParticipantsParams { account_id: string; /** - * Body param: + * Body param */ custom_participant_ids: Array; /** - * Body param: + * Body param */ participant_ids: Array; } diff --git a/src/resources/realtime-kit/apps.ts b/src/resources/realtime-kit/apps.ts index cab8de4165..322180ca80 100644 --- a/src/resources/realtime-kit/apps.ts +++ b/src/resources/realtime-kit/apps.ts @@ -83,12 +83,12 @@ export interface AppGetParams { export interface AppPostParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ name: string; } diff --git a/src/resources/realtime-kit/livestreams.ts b/src/resources/realtime-kit/livestreams.ts index e1875a77e7..fd95452447 100644 --- a/src/resources/realtime-kit/livestreams.ts +++ b/src/resources/realtime-kit/livestreams.ts @@ -1020,12 +1020,12 @@ export interface LivestreamStartLivestreamingAMeetingParams { account_id: string; /** - * Body param: + * Body param */ name?: string | null; /** - * Body param: + * Body param */ video_config?: LivestreamStartLivestreamingAMeetingParams.VideoConfig; } diff --git a/src/resources/realtime-kit/meetings.ts b/src/resources/realtime-kit/meetings.ts index 79a3ac7b11..94ed2e1700 100644 --- a/src/resources/realtime-kit/meetings.ts +++ b/src/resources/realtime-kit/meetings.ts @@ -2503,7 +2503,7 @@ export interface MeetingGetMeetingByIDParams { account_id: string; /** - * Query param: + * Query param */ name?: string; } diff --git a/src/resources/realtime-kit/presets.ts b/src/resources/realtime-kit/presets.ts index 8838ed3837..37c4879a70 100644 --- a/src/resources/realtime-kit/presets.ts +++ b/src/resources/realtime-kit/presets.ts @@ -1898,7 +1898,7 @@ export interface PresetCreateParams { account_id: string; /** - * Body param: + * Body param */ config: PresetCreateParams.Config; @@ -1908,12 +1908,12 @@ export interface PresetCreateParams { name: string; /** - * Body param: + * Body param */ ui: PresetCreateParams.UI; /** - * Body param: + * Body param */ permissions?: PresetCreateParams.Permissions; } @@ -2321,7 +2321,7 @@ export interface PresetUpdateParams { account_id: string; /** - * Body param: + * Body param */ config?: PresetUpdateParams.Config; @@ -2331,12 +2331,12 @@ export interface PresetUpdateParams { name?: string; /** - * Body param: + * Body param */ permissions?: PresetUpdateParams.Permissions; /** - * Body param: + * Body param */ ui?: PresetUpdateParams.UI; } diff --git a/src/resources/realtime-kit/recordings.ts b/src/resources/realtime-kit/recordings.ts index 874b7ffe3c..6f7e6cc1c7 100644 --- a/src/resources/realtime-kit/recordings.ts +++ b/src/resources/realtime-kit/recordings.ts @@ -1184,12 +1184,12 @@ export interface RecordingGetRecordingsParams { search?: string; /** - * Query param: + * Query param */ sort_by?: 'invokedTime'; /** - * Query param: + * Query param */ sort_order?: 'ASC' | 'DESC'; @@ -1212,7 +1212,7 @@ export interface RecordingPauseResumeStopRecordingParams { account_id: string; /** - * Body param: + * Body param */ action: 'stop' | 'pause' | 'resume'; } @@ -1264,17 +1264,17 @@ export interface RecordingStartRecordingsParams { meeting_id?: string; /** - * Body param: + * Body param */ realtimekit_bucket_config?: RecordingStartRecordingsParams.RealtimekitBucketConfig; /** - * Body param: + * Body param */ rtmp_out_config?: RecordingStartRecordingsParams.RtmpOutConfig; /** - * Body param: + * Body param */ storage_config?: RecordingStartRecordingsParams.StorageConfig | null; @@ -1284,7 +1284,7 @@ export interface RecordingStartRecordingsParams { url?: string; /** - * Body param: + * Body param */ video_config?: RecordingStartRecordingsParams.VideoConfig; } @@ -1485,7 +1485,7 @@ export interface RecordingStartTrackRecordingParams { account_id: string; /** - * Body param: + * Body param */ layers: { [key: string]: RecordingStartTrackRecordingParams.Layers }; diff --git a/src/resources/realtime-kit/sessions.ts b/src/resources/realtime-kit/sessions.ts index 2d0b7ef728..a89a1bd01b 100644 --- a/src/resources/realtime-kit/sessions.ts +++ b/src/resources/realtime-kit/sessions.ts @@ -1345,12 +1345,12 @@ export interface SessionGetSessionParticipantsParams { search?: string; /** - * Query param: + * Query param */ sort_by?: 'joinedAt' | 'duration'; /** - * Query param: + * Query param */ sort_order?: 'ASC' | 'DESC'; @@ -1400,7 +1400,7 @@ export interface SessionGetSessionsParams { page_no?: number; /** - * Query param: + * Query param */ participants?: string; @@ -1416,12 +1416,12 @@ export interface SessionGetSessionsParams { search?: string; /** - * Query param: + * Query param */ sort_by?: 'minutesConsumed' | 'createdAt'; /** - * Query param: + * Query param */ sort_order?: 'ASC' | 'DESC'; @@ -1432,7 +1432,7 @@ export interface SessionGetSessionsParams { start_time?: string; /** - * Query param: + * Query param */ status?: 'LIVE' | 'ENDED'; } diff --git a/src/resources/realtime-kit/webhooks.ts b/src/resources/realtime-kit/webhooks.ts index a64eb8e013..87da10e684 100644 --- a/src/resources/realtime-kit/webhooks.ts +++ b/src/resources/realtime-kit/webhooks.ts @@ -558,7 +558,7 @@ export interface WebhookEditWebhookParams { account_id: string; /** - * Body param: + * Body param */ enabled?: boolean; diff --git a/src/resources/request-tracers/traces.ts b/src/resources/request-tracers/traces.ts index 3f5b99c978..c2a00e60b9 100644 --- a/src/resources/request-tracers/traces.ts +++ b/src/resources/request-tracers/traces.ts @@ -124,7 +124,7 @@ export interface TraceCreateParams { url: string; /** - * Body param: + * Body param */ body?: TraceCreateParams.Body; diff --git a/src/resources/resource-sharing/resource-sharing.ts b/src/resources/resource-sharing/resource-sharing.ts index a020353393..9f3b768fae 100644 --- a/src/resources/resource-sharing/resource-sharing.ts +++ b/src/resources/resource-sharing/resource-sharing.ts @@ -829,12 +829,12 @@ export interface ResourceSharingCreateParams { name: string; /** - * Body param: + * Body param */ recipients: Array; /** - * Body param: + * Body param */ resources: Array; } diff --git a/src/resources/rules/lists/items.ts b/src/resources/rules/lists/items.ts index fa8de075e8..bf3a94d7d4 100644 --- a/src/resources/rules/lists/items.ts +++ b/src/resources/rules/lists/items.ts @@ -438,7 +438,7 @@ export interface ItemCreateParams { account_id: string; /** - * Body param: + * Body param */ body: Array< | ItemCreateParams.ListsListItemIPComment @@ -506,7 +506,7 @@ export interface ItemUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: Array< | ItemUpdateParams.ListsListItemIPComment @@ -594,7 +594,7 @@ export interface ItemDeleteParams { account_id: string; /** - * Body param: + * Body param */ items?: Array; } diff --git a/src/resources/rum/rules.ts b/src/resources/rum/rules.ts index 5ebec69721..e6ad3f1877 100644 --- a/src/resources/rum/rules.ts +++ b/src/resources/rum/rules.ts @@ -238,7 +238,7 @@ export interface RuleCreateParams { account_id: string; /** - * Body param: + * Body param */ host?: string; @@ -253,7 +253,7 @@ export interface RuleCreateParams { is_paused?: boolean; /** - * Body param: + * Body param */ paths?: Array; } @@ -265,7 +265,7 @@ export interface RuleUpdateParams { account_id: string; /** - * Body param: + * Body param */ host?: string; @@ -280,7 +280,7 @@ export interface RuleUpdateParams { is_paused?: boolean; /** - * Body param: + * Body param */ paths?: Array; } diff --git a/src/resources/schema-validation/settings/operations.ts b/src/resources/schema-validation/settings/operations.ts index 2ee8cd95f2..8962e3c696 100644 --- a/src/resources/schema-validation/settings/operations.ts +++ b/src/resources/schema-validation/settings/operations.ts @@ -274,7 +274,7 @@ export interface OperationBulkEditParams { zone_id: string; /** - * Body param: + * Body param */ body: { [key: string]: OperationBulkEditParams.Body }; } diff --git a/src/resources/secrets-store/stores/secrets.ts b/src/resources/secrets-store/stores/secrets.ts index ec0ca694ed..f3cbbcf5f5 100644 --- a/src/resources/secrets-store/stores/secrets.ts +++ b/src/resources/secrets-store/stores/secrets.ts @@ -462,7 +462,7 @@ export interface SecretCreateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/secrets-store/stores/stores.ts b/src/resources/secrets-store/stores/stores.ts index 296961d915..690411a92f 100644 --- a/src/resources/secrets-store/stores/stores.ts +++ b/src/resources/secrets-store/stores/stores.ts @@ -184,7 +184,7 @@ export interface StoreCreateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/security-center/insights/class.ts b/src/resources/security-center/insights/class.ts index 124e4ed2df..ca1e67c634 100644 --- a/src/resources/security-center/insights/class.ts +++ b/src/resources/security-center/insights/class.ts @@ -8,7 +8,7 @@ import { CloudflareError } from '../../../error'; export class Class extends APIResource { /** - * Get Security Center Insight Counts by Class + * Retrieves Security Center Insight Counts by Class */ get(params?: ClassGetParams, options?: Core.RequestOptions): Core.APIPromise; get(options?: Core.RequestOptions): Core.APIPromise; @@ -69,57 +69,57 @@ export interface ClassGetParams { zone_id?: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } diff --git a/src/resources/security-center/insights/insights.ts b/src/resources/security-center/insights/insights.ts index 42ba05277e..0ec56b0e02 100644 --- a/src/resources/security-center/insights/insights.ts +++ b/src/resources/security-center/insights/insights.ts @@ -19,7 +19,7 @@ export class Insights extends APIResource { type: TypeAPI.Type = new TypeAPI.Type(this._client); /** - * Get Security Center Insights + * Retrieves Security Center Insights */ list( params?: InsightListParams, @@ -60,7 +60,7 @@ export class Insights extends APIResource { } /** - * Archive Security Center Insight + * Archives Security Center Insight */ dismiss( issueId: string, @@ -95,19 +95,19 @@ export class InsightListResponsesV4PagePagination extends V4PagePagination; /** - * Current page within paginated list of results + * Specifies the current page within paginated list of results. */ page?: number; /** - * Number of results per page of results + * Sets the number of results per page of results. */ per_page?: number; } @@ -140,7 +140,7 @@ export namespace InsightListResponse { export namespace Issue { export interface Payload { /** - * Method used to detect insight + * Describes the method used to detect insight. */ detection_method?: string; @@ -208,57 +208,57 @@ export interface InsightListParams extends V4PagePaginationParams { zone_id?: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } @@ -277,7 +277,7 @@ export interface InsightDismissParams { zone_id?: string; /** - * Body param: + * Body param */ dismiss?: boolean; } diff --git a/src/resources/security-center/insights/severity.ts b/src/resources/security-center/insights/severity.ts index 4f8d5d7859..7eefed3032 100644 --- a/src/resources/security-center/insights/severity.ts +++ b/src/resources/security-center/insights/severity.ts @@ -8,7 +8,7 @@ import { CloudflareError } from '../../../error'; export class Severity extends APIResource { /** - * Get Security Center Insight Counts by Severity + * Retrieves Security Center Insight Counts by Severity */ get(params?: SeverityGetParams, options?: Core.RequestOptions): Core.APIPromise; get(options?: Core.RequestOptions): Core.APIPromise; @@ -69,57 +69,57 @@ export interface SeverityGetParams { zone_id?: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } diff --git a/src/resources/security-center/insights/type.ts b/src/resources/security-center/insights/type.ts index c66d5f2996..56353304a1 100644 --- a/src/resources/security-center/insights/type.ts +++ b/src/resources/security-center/insights/type.ts @@ -8,7 +8,7 @@ import { CloudflareError } from '../../../error'; export class Type extends APIResource { /** - * Get Security Center Insight Counts by Type + * Retrieves Security Center Insight Counts by Type */ get(params?: TypeGetParams, options?: Core.RequestOptions): Core.APIPromise; get(options?: Core.RequestOptions): Core.APIPromise; @@ -69,57 +69,57 @@ export interface TypeGetParams { zone_id?: string; /** - * Query param: + * Query param */ dismissed?: boolean; /** - * Query param: + * Query param */ issue_class?: Array; /** - * Query param: + * Query param */ 'issue_class~neq'?: Array; /** - * Query param: + * Query param */ issue_type?: Array; /** - * Query param: + * Query param */ 'issue_type~neq'?: Array; /** - * Query param: + * Query param */ product?: Array; /** - * Query param: + * Query param */ 'product~neq'?: Array; /** - * Query param: + * Query param */ severity?: Array; /** - * Query param: + * Query param */ 'severity~neq'?: Array; /** - * Query param: + * Query param */ subject?: Array; /** - * Query param: + * Query param */ 'subject~neq'?: Array; } diff --git a/src/resources/security-txt.ts b/src/resources/security-txt.ts index d82c20ba39..cf584bda6f 100644 --- a/src/resources/security-txt.ts +++ b/src/resources/security-txt.ts @@ -5,7 +5,7 @@ import * as Core from '../core'; export class SecurityTXT extends APIResource { /** - * Update security.txt + * Updates security.txt * * @example * ```ts @@ -23,7 +23,7 @@ export class SecurityTXT extends APIResource { } /** - * Delete security.txt + * Deletes security.txt * * @example * ```ts @@ -41,7 +41,7 @@ export class SecurityTXT extends APIResource { } /** - * Get security.txt + * Retrieves security.txt * * @example * ```ts @@ -177,47 +177,47 @@ export interface SecurityTXTUpdateParams { zone_id: string; /** - * Body param: + * Body param */ acknowledgments?: Array; /** - * Body param: + * Body param */ canonical?: Array; /** - * Body param: + * Body param */ contact?: Array; /** - * Body param: + * Body param */ enabled?: boolean; /** - * Body param: + * Body param */ encryption?: Array; /** - * Body param: + * Body param */ expires?: string; /** - * Body param: + * Body param */ hiring?: Array; /** - * Body param: + * Body param */ policy?: Array; /** - * Body param: + * Body param */ preferredLanguages?: string; } diff --git a/src/resources/speed/pages/pages.ts b/src/resources/speed/pages/pages.ts index e8752803f9..fead8327d0 100644 --- a/src/resources/speed/pages/pages.ts +++ b/src/resources/speed/pages/pages.ts @@ -144,7 +144,7 @@ export interface PageTrendParams { | 'us-west1'; /** - * Query param: + * Query param */ start: string; @@ -154,7 +154,7 @@ export interface PageTrendParams { tz: string; /** - * Query param: + * Query param */ end?: string; } diff --git a/src/resources/stream/clip.ts b/src/resources/stream/clip.ts index 36283ca91a..65463b4543 100644 --- a/src/resources/stream/clip.ts +++ b/src/resources/stream/clip.ts @@ -188,7 +188,7 @@ export interface ClipCreateParams { thumbnailTimestampPct?: number; /** - * Body param: + * Body param */ watermark?: ClipCreateParams.Watermark; } diff --git a/src/resources/stream/copy.ts b/src/resources/stream/copy.ts index 0bf383535e..eb4849cb8f 100644 --- a/src/resources/stream/copy.ts +++ b/src/resources/stream/copy.ts @@ -88,7 +88,7 @@ export interface CopyCreateParams { thumbnailTimestampPct?: number; /** - * Body param: + * Body param */ watermark?: CopyCreateParams.Watermark; diff --git a/src/resources/stream/direct-upload.ts b/src/resources/stream/direct-upload.ts index 3fdbbffe22..685d25038f 100644 --- a/src/resources/stream/direct-upload.ts +++ b/src/resources/stream/direct-upload.ts @@ -120,7 +120,7 @@ export interface DirectUploadCreateParams { thumbnailTimestampPct?: number; /** - * Body param: + * Body param */ watermark?: DirectUploadCreateParams.Watermark; diff --git a/src/resources/stream/downloads.ts b/src/resources/stream/downloads.ts index 8ec0b0a192..37d6788fd7 100644 --- a/src/resources/stream/downloads.ts +++ b/src/resources/stream/downloads.ts @@ -169,7 +169,7 @@ export interface DownloadCreateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/stream/keys.ts b/src/resources/stream/keys.ts index 3b3ee39919..9eb0fb7164 100644 --- a/src/resources/stream/keys.ts +++ b/src/resources/stream/keys.ts @@ -119,7 +119,7 @@ export interface KeyCreateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/stream/stream.ts b/src/resources/stream/stream.ts index 0a83b64f6e..2a4f2a1c12 100644 --- a/src/resources/stream/stream.ts +++ b/src/resources/stream/stream.ts @@ -423,7 +423,7 @@ export interface StreamCreateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; diff --git a/src/resources/token-validation/configuration/configuration.ts b/src/resources/token-validation/configuration/configuration.ts index a4e09be2f4..352343f6ec 100644 --- a/src/resources/token-validation/configuration/configuration.ts +++ b/src/resources/token-validation/configuration/configuration.ts @@ -314,27 +314,27 @@ export interface ConfigurationCreateParams { zone_id: string; /** - * Body param: + * Body param */ credentials: ConfigurationCreateParams.Credentials; /** - * Body param: + * Body param */ description: string; /** - * Body param: + * Body param */ title: string; /** - * Body param: + * Body param */ token_sources: Array; /** - * Body param: + * Body param */ token_type: 'JWT'; } @@ -472,17 +472,17 @@ export interface ConfigurationEditParams { zone_id: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ title?: string; /** - * Body param: + * Body param */ token_sources?: Array; } diff --git a/src/resources/token-validation/configuration/credentials.ts b/src/resources/token-validation/configuration/credentials.ts index 447ee00ba5..0563386e83 100644 --- a/src/resources/token-validation/configuration/credentials.ts +++ b/src/resources/token-validation/configuration/credentials.ts @@ -168,7 +168,7 @@ export interface CredentialUpdateParams { zone_id: string; /** - * Body param: + * Body param */ keys: Array< | CredentialUpdateParams.APIShieldCredentialsJWTKeyRSA diff --git a/src/resources/token-validation/rules.ts b/src/resources/token-validation/rules.ts index bfd7e857b0..27a4e7ab69 100644 --- a/src/resources/token-validation/rules.ts +++ b/src/resources/token-validation/rules.ts @@ -441,7 +441,7 @@ export interface RuleBulkCreateParams { zone_id: string; /** - * Body param: + * Body param */ body: Array; } @@ -534,7 +534,7 @@ export interface RuleBulkEditParams { zone_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/turnstile/widgets.ts b/src/resources/turnstile/widgets.ts index 5022529882..0bd5b047c4 100644 --- a/src/resources/turnstile/widgets.ts +++ b/src/resources/turnstile/widgets.ts @@ -314,7 +314,7 @@ export interface WidgetCreateParams { account_id: string; /** - * Body param: + * Body param */ domains: Array; @@ -387,7 +387,7 @@ export interface WidgetUpdateParams { account_id: string; /** - * Body param: + * Body param */ domains: Array; diff --git a/src/resources/url-scanner/scans.ts b/src/resources/url-scanner/scans.ts index 20506e24bd..c0d997e231 100644 --- a/src/resources/url-scanner/scans.ts +++ b/src/resources/url-scanner/scans.ts @@ -1326,7 +1326,7 @@ export interface ScanCreateParams { account_id: string; /** - * Body param: + * Body param */ url: string; @@ -1531,7 +1531,7 @@ export interface ScanCreateParams { | 'ZW'; /** - * Body param: + * Body param */ customagent?: string; @@ -1541,7 +1541,7 @@ export interface ScanCreateParams { customHeaders?: { [key: string]: string }; /** - * Body param: + * Body param */ referer?: string; diff --git a/src/resources/vectorize/indexes/indexes.ts b/src/resources/vectorize/indexes/indexes.ts index d500b2ab6a..34baff7b64 100644 --- a/src/resources/vectorize/indexes/indexes.ts +++ b/src/resources/vectorize/indexes/indexes.ts @@ -557,7 +557,7 @@ export interface IndexCreateParams { config: IndexDimensionConfigurationParam | IndexCreateParams.VectorizeIndexPresetConfiguration; /** - * Body param: + * Body param */ name: string; diff --git a/src/resources/waiting-rooms/rules.ts b/src/resources/waiting-rooms/rules.ts index 01ab7fd8b8..036d3f9e41 100644 --- a/src/resources/waiting-rooms/rules.ts +++ b/src/resources/waiting-rooms/rules.ts @@ -208,7 +208,7 @@ export interface RuleCreateParams { zone_id: string; /** - * Body param: + * Body param */ rules: RuleCreateParams.Rules; } @@ -244,7 +244,7 @@ export interface RuleUpdateParams { zone_id: string; /** - * Body param: + * Body param */ rules: Array; } diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts index e65723e7b8..7eccbf2a2d 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.ts @@ -257,19 +257,22 @@ export interface ScriptUpdateResponse { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: | ScriptUpdateResponse.UnionMember0 | ScriptUpdateResponse.UnionMember1 | ScriptUpdateResponse.UnionMember2 - | ScriptUpdateResponse.UnionMember3; + | ScriptUpdateResponse.UnionMember3 + | ScriptUpdateResponse.UnionMember4 + | ScriptUpdateResponse.UnionMember5 + | ScriptUpdateResponse.UnionMember6 + | ScriptUpdateResponse.UnionMember7; /** * @deprecated */ - placement_mode?: 'smart'; + placement_mode?: 'smart' | 'targeted'; /** * @deprecated @@ -441,6 +444,125 @@ export namespace ScriptUpdateResponse { */ status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } export type ScriptDeleteResponse = unknown; @@ -574,10 +696,17 @@ export namespace ScriptUpdateParams { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement?: Metadata.UnionMember0 | Metadata.UnionMember1 | Metadata.UnionMember2 | Metadata.UnionMember3; + placement?: + | Metadata.UnionMember0 + | Metadata.UnionMember1 + | Metadata.UnionMember2 + | Metadata.UnionMember3 + | Metadata.UnionMember4 + | Metadata.UnionMember5 + | Metadata.UnionMember6 + | Metadata.UnionMember7; /** * List of strings to use as tags for this Worker. @@ -1352,6 +1481,77 @@ export namespace ScriptUpdateParams { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } } diff --git a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts index 457cf2163d..fc8d864ee3 100644 --- a/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts +++ b/src/resources/workers-for-platforms/dispatch/namespaces/scripts/settings.ts @@ -131,14 +131,17 @@ export interface SettingEditResponse { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: | SettingEditResponse.Mode | SettingEditResponse.Region | SettingEditResponse.Hostname - | SettingEditResponse.Host; + | SettingEditResponse.Host + | SettingEditResponse.UnionMember4 + | SettingEditResponse.UnionMember5 + | SettingEditResponse.UnionMember6 + | SettingEditResponse.UnionMember7; /** * Tags associated with the Worker. @@ -818,6 +821,77 @@ export namespace SettingEditResponse { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } export interface SettingGetResponse { @@ -888,14 +962,17 @@ export interface SettingGetResponse { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: | SettingGetResponse.Mode | SettingGetResponse.Region | SettingGetResponse.Hostname - | SettingGetResponse.Host; + | SettingGetResponse.Host + | SettingGetResponse.UnionMember4 + | SettingGetResponse.UnionMember5 + | SettingGetResponse.UnionMember6 + | SettingGetResponse.UnionMember7; /** * Tags associated with the Worker. @@ -1575,6 +1652,77 @@ export namespace SettingGetResponse { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } export interface SettingEditParams { @@ -1584,7 +1732,7 @@ export interface SettingEditParams { account_id: string; /** - * Body param: + * Body param */ settings?: SettingEditParams.Settings; } @@ -1663,10 +1811,17 @@ export namespace SettingEditParams { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement?: Settings.Mode | Settings.Region | Settings.Hostname | Settings.Host; + placement?: + | Settings.Mode + | Settings.Region + | Settings.Hostname + | Settings.Host + | Settings.UnionMember4 + | Settings.UnionMember5 + | Settings.UnionMember6 + | Settings.UnionMember7; /** * Tags associated with the Worker. @@ -2381,6 +2536,77 @@ export namespace SettingEditParams { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } } diff --git a/src/resources/workers/account-settings.ts b/src/resources/workers/account-settings.ts index 8e6d6d8940..3f9009f07a 100644 --- a/src/resources/workers/account-settings.ts +++ b/src/resources/workers/account-settings.ts @@ -71,12 +71,12 @@ export interface AccountSettingUpdateParams { account_id: string; /** - * Body param: + * Body param */ default_usage_model?: string; /** - * Body param: + * Body param */ green_compute?: boolean; } diff --git a/src/resources/workers/assets/upload.ts b/src/resources/workers/assets/upload.ts index 37a376320f..764eb3da6b 100644 --- a/src/resources/workers/assets/upload.ts +++ b/src/resources/workers/assets/upload.ts @@ -48,7 +48,7 @@ export interface UploadCreateParams { base64: true; /** - * Body param: + * Body param */ body: { [key: string]: string }; } diff --git a/src/resources/workers/beta/workers/versions.ts b/src/resources/workers/beta/workers/versions.ts index 9ccfe39b95..fb7909a3e1 100644 --- a/src/resources/workers/beta/workers/versions.ts +++ b/src/resources/workers/beta/workers/versions.ts @@ -230,9 +230,19 @@ export interface Version { modules?: Array; /** - * Placement settings for the version. + * Configuration for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement?: Version.Placement; + placement?: + | Version.Mode + | Version.Region + | Version.Hostname + | Version.Host + | Version.UnionMember4 + | Version.UnionMember5 + | Version.UnionMember6 + | Version.UnionMember7; /** * The client used to create the version. @@ -916,14 +926,104 @@ export namespace Version { name: string; } - /** - * Placement settings for the version. - */ - export interface Placement { + export interface Mode { + /** + * Enables + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + mode: 'smart'; + } + + export interface Region { + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host and port for targeted placement. + */ + host: string; + } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + /** - * Placement mode for the version. + * Targeted placement mode. */ - mode?: 'smart'; + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } } } @@ -1082,9 +1182,19 @@ export interface VersionCreateParams { modules?: Array; /** - * Body param: Placement settings for the version. + * Body param: Configuration for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement?: VersionCreateParams.Placement; + placement?: + | VersionCreateParams.Mode + | VersionCreateParams.Region + | VersionCreateParams.Hostname + | VersionCreateParams.Host + | VersionCreateParams.UnionMember4 + | VersionCreateParams.UnionMember5 + | VersionCreateParams.UnionMember6 + | VersionCreateParams.UnionMember7; /** * @deprecated Body param: Usage model for the version. @@ -1785,14 +1895,104 @@ export namespace VersionCreateParams { name: string; } - /** - * Placement settings for the version. - */ - export interface Placement { + export interface Mode { + /** + * Enables + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + mode: 'smart'; + } + + export interface Region { + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host and port for targeted placement. + */ + host: string; + } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + /** - * Placement mode for the version. + * Targeted placement mode. */ - mode?: 'smart'; + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } } } diff --git a/src/resources/workers/observability/telemetry.ts b/src/resources/workers/observability/telemetry.ts index 23fa78c987..d66f80de80 100644 --- a/src/resources/workers/observability/telemetry.ts +++ b/src/resources/workers/observability/telemetry.ts @@ -1131,17 +1131,17 @@ export interface TelemetryKeysParams { account_id: string; /** - * Body param: + * Body param */ datasets?: Array; /** - * Body param: + * Body param */ filters?: Array; /** - * Body param: + * Body param */ from?: number; @@ -1151,7 +1151,7 @@ export interface TelemetryKeysParams { keyNeedle?: TelemetryKeysParams.KeyNeedle; /** - * Body param: + * Body param */ limit?: number; @@ -1161,7 +1161,7 @@ export interface TelemetryKeysParams { needle?: TelemetryKeysParams.Needle; /** - * Body param: + * Body param */ to?: number; } @@ -1511,32 +1511,32 @@ export interface TelemetryValuesParams { account_id: string; /** - * Body param: + * Body param */ datasets: Array; /** - * Body param: + * Body param */ key: string; /** - * Body param: + * Body param */ timeframe: TelemetryValuesParams.Timeframe; /** - * Body param: + * Body param */ type: 'string' | 'boolean' | 'number'; /** - * Body param: + * Body param */ filters?: Array; /** - * Body param: + * Body param */ limit?: number; diff --git a/src/resources/workers/scripts/deployments.ts b/src/resources/workers/scripts/deployments.ts index 1283130f6b..1bfded1c53 100644 --- a/src/resources/workers/scripts/deployments.ts +++ b/src/resources/workers/scripts/deployments.ts @@ -219,12 +219,12 @@ export interface DeploymentCreateParams { account_id: string; /** - * Body param: + * Body param */ strategy: 'percentage'; /** - * Body param: + * Body param */ versions: Array; @@ -236,7 +236,7 @@ export interface DeploymentCreateParams { force?: boolean; /** - * Body param: + * Body param */ annotations?: DeploymentCreateParams.Annotations; } diff --git a/src/resources/workers/scripts/schedules.ts b/src/resources/workers/scripts/schedules.ts index c73bba91ac..95de674615 100644 --- a/src/resources/workers/scripts/schedules.ts +++ b/src/resources/workers/scripts/schedules.ts @@ -94,7 +94,7 @@ export interface ScheduleUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/workers/scripts/script-and-version-settings.ts b/src/resources/workers/scripts/script-and-version-settings.ts index 770335682c..b62eb10dec 100644 --- a/src/resources/workers/scripts/script-and-version-settings.ts +++ b/src/resources/workers/scripts/script-and-version-settings.ts @@ -127,14 +127,17 @@ export interface ScriptAndVersionSettingEditResponse { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: | ScriptAndVersionSettingEditResponse.Mode | ScriptAndVersionSettingEditResponse.Region | ScriptAndVersionSettingEditResponse.Hostname - | ScriptAndVersionSettingEditResponse.Host; + | ScriptAndVersionSettingEditResponse.Host + | ScriptAndVersionSettingEditResponse.UnionMember4 + | ScriptAndVersionSettingEditResponse.UnionMember5 + | ScriptAndVersionSettingEditResponse.UnionMember6 + | ScriptAndVersionSettingEditResponse.UnionMember7; /** * Tags associated with the Worker. @@ -814,6 +817,77 @@ export namespace ScriptAndVersionSettingEditResponse { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } export interface ScriptAndVersionSettingGetResponse { @@ -884,14 +958,17 @@ export interface ScriptAndVersionSettingGetResponse { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: | ScriptAndVersionSettingGetResponse.Mode | ScriptAndVersionSettingGetResponse.Region | ScriptAndVersionSettingGetResponse.Hostname - | ScriptAndVersionSettingGetResponse.Host; + | ScriptAndVersionSettingGetResponse.Host + | ScriptAndVersionSettingGetResponse.UnionMember4 + | ScriptAndVersionSettingGetResponse.UnionMember5 + | ScriptAndVersionSettingGetResponse.UnionMember6 + | ScriptAndVersionSettingGetResponse.UnionMember7; /** * Tags associated with the Worker. @@ -1571,6 +1648,77 @@ export namespace ScriptAndVersionSettingGetResponse { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } export interface ScriptAndVersionSettingEditParams { @@ -1580,7 +1728,7 @@ export interface ScriptAndVersionSettingEditParams { account_id: string; /** - * Body param: + * Body param */ settings?: ScriptAndVersionSettingEditParams.Settings; } @@ -1659,10 +1807,17 @@ export namespace ScriptAndVersionSettingEditParams { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement?: Settings.Mode | Settings.Region | Settings.Hostname | Settings.Host; + placement?: + | Settings.Mode + | Settings.Region + | Settings.Hostname + | Settings.Host + | Settings.UnionMember4 + | Settings.UnionMember5 + | Settings.UnionMember6 + | Settings.UnionMember7; /** * Tags associated with the Worker. @@ -2377,6 +2532,77 @@ export namespace ScriptAndVersionSettingEditParams { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } } diff --git a/src/resources/workers/scripts/scripts.ts b/src/resources/workers/scripts/scripts.ts index caafb8509c..202fd2d7e0 100644 --- a/src/resources/workers/scripts/scripts.ts +++ b/src/resources/workers/scripts/scripts.ts @@ -302,16 +302,24 @@ export interface Script { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement?: Script.UnionMember0 | Script.UnionMember1 | Script.UnionMember2 | Script.UnionMember3; + placement?: + | Script.UnionMember0 + | Script.UnionMember1 + | Script.UnionMember2 + | Script.UnionMember3 + | Script.UnionMember4 + | Script.UnionMember5 + | Script.UnionMember6 + | Script.UnionMember7; /** - * @deprecated Enables + * @deprecated Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement_mode?: 'smart'; + placement_mode?: 'smart' | 'targeted'; /** * @deprecated Status of @@ -484,6 +492,125 @@ export namespace Script { */ status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } export interface ScriptSetting { @@ -651,19 +778,22 @@ export interface ScriptUpdateResponse { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: | ScriptUpdateResponse.UnionMember0 | ScriptUpdateResponse.UnionMember1 | ScriptUpdateResponse.UnionMember2 - | ScriptUpdateResponse.UnionMember3; + | ScriptUpdateResponse.UnionMember3 + | ScriptUpdateResponse.UnionMember4 + | ScriptUpdateResponse.UnionMember5 + | ScriptUpdateResponse.UnionMember6 + | ScriptUpdateResponse.UnionMember7; /** * @deprecated */ - placement_mode?: 'smart'; + placement_mode?: 'smart' | 'targeted'; /** * @deprecated @@ -835,6 +965,125 @@ export namespace ScriptUpdateResponse { */ status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } export interface ScriptListResponse { @@ -916,19 +1165,22 @@ export interface ScriptListResponse { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ placement?: | ScriptListResponse.UnionMember0 | ScriptListResponse.UnionMember1 | ScriptListResponse.UnionMember2 - | ScriptListResponse.UnionMember3; + | ScriptListResponse.UnionMember3 + | ScriptListResponse.UnionMember4 + | ScriptListResponse.UnionMember5 + | ScriptListResponse.UnionMember6 + | ScriptListResponse.UnionMember7; /** * @deprecated */ - placement_mode?: 'smart'; + placement_mode?: 'smart' | 'targeted'; /** * @deprecated @@ -1106,6 +1358,125 @@ export namespace ScriptListResponse { status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; } + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + + /** + * The last time the script was analyzed for + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + last_analyzed_at?: string; + + /** + * Status of + * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). + */ + status?: 'SUCCESS' | 'UNSUPPORTED_APPLICATION' | 'INSUFFICIENT_INVOCATIONS'; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } + export interface Route { /** * Identifier. @@ -1299,10 +1670,17 @@ export namespace ScriptUpdateParams { /** * Configuration for * [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). - * Specify either mode for Smart Placement, or one of region/hostname/host for - * targeted placement. + * Specify mode='smart' for Smart Placement, or one of region/hostname/host. */ - placement?: Metadata.UnionMember0 | Metadata.UnionMember1 | Metadata.UnionMember2 | Metadata.UnionMember3; + placement?: + | Metadata.UnionMember0 + | Metadata.UnionMember1 + | Metadata.UnionMember2 + | Metadata.UnionMember3 + | Metadata.UnionMember4 + | Metadata.UnionMember5 + | Metadata.UnionMember6 + | Metadata.UnionMember7; /** * List of strings to use as tags for this Worker. @@ -2077,6 +2455,77 @@ export namespace ScriptUpdateParams { */ host: string; } + + export interface UnionMember4 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Cloud region for targeted placement in format 'provider:region'. + */ + region: string; + } + + export interface UnionMember5 { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember6 { + /** + * TCP host and port for targeted placement. + */ + host: string; + + /** + * Targeted placement mode. + */ + mode: 'targeted'; + } + + export interface UnionMember7 { + /** + * Targeted placement mode. + */ + mode: 'targeted'; + + /** + * Array of placement targets (currently limited to single target). + */ + target: Array; + } + + export namespace UnionMember7 { + export interface Region { + /** + * Cloud region in format 'provider:region'. + */ + region: string; + } + + export interface Hostname { + /** + * HTTP hostname for targeted placement. + */ + hostname: string; + } + + export interface Host { + /** + * TCP host:port for targeted placement. + */ + host: string; + } + } } } diff --git a/src/resources/workers/scripts/tail.ts b/src/resources/workers/scripts/tail.ts index b2efada0e8..60ff51076c 100644 --- a/src/resources/workers/scripts/tail.ts +++ b/src/resources/workers/scripts/tail.ts @@ -194,7 +194,7 @@ export interface TailCreateParams { account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/workers/subdomains.ts b/src/resources/workers/subdomains.ts index 85e90515b3..bb706d07eb 100644 --- a/src/resources/workers/subdomains.ts +++ b/src/resources/workers/subdomains.ts @@ -80,7 +80,7 @@ export interface SubdomainUpdateParams { account_id: string; /** - * Body param: + * Body param */ subdomain: string; } diff --git a/src/resources/workflows/instances/events.ts b/src/resources/workflows/instances/events.ts index 20f3a15ba5..621f94b297 100644 --- a/src/resources/workflows/instances/events.ts +++ b/src/resources/workflows/instances/events.ts @@ -28,12 +28,12 @@ export type EventCreateResponse = unknown; export interface EventCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body?: unknown; } diff --git a/src/resources/workflows/instances/instances.ts b/src/resources/workflows/instances/instances.ts index 87e0ff5b59..6b287ba9b4 100644 --- a/src/resources/workflows/instances/instances.ts +++ b/src/resources/workflows/instances/instances.ts @@ -230,12 +230,18 @@ export namespace InstanceGetResponse { export interface Config { retries: Config.Retries; - timeout: unknown | number; + /** + * Specifies the timeout duration. + */ + timeout: string | number; } export namespace Config { export interface Retries { - delay: unknown | number; + /** + * Specifies the delay duration. + */ + delay: string | number; limit: number; @@ -309,22 +315,22 @@ export namespace InstanceGetResponse { export interface InstanceCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ instance_id?: string; /** - * Body param: + * Body param */ instance_retention?: InstanceCreateParams.InstanceRetention; /** - * Body param: + * Body param */ params?: unknown; } @@ -332,12 +338,12 @@ export interface InstanceCreateParams { export namespace InstanceCreateParams { export interface InstanceRetention { /** - * Duration in milliseconds or as a string like '5 minutes' + * Specifies the duration in milliseconds or as a string like '5 minutes'. */ error_retention?: number | string; /** - * Duration in milliseconds or as a string like '5 minutes' + * Specifies the duration in milliseconds or as a string like '5 minutes'. */ success_retention?: number | string; } @@ -345,7 +351,7 @@ export namespace InstanceCreateParams { export interface InstanceListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; @@ -371,7 +377,7 @@ export interface InstanceListParams extends V4PagePaginationArrayParams { direction?: 'asc' | 'desc'; /** - * Query param: + * Query param */ status?: | 'queued' @@ -386,12 +392,12 @@ export interface InstanceListParams extends V4PagePaginationArrayParams { export interface InstanceBulkParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body?: Array; } @@ -408,12 +414,12 @@ export namespace InstanceBulkParams { export namespace Body { export interface InstanceRetention { /** - * Duration in milliseconds or as a string like '5 minutes' + * Specifies the duration in milliseconds or as a string like '5 minutes'. */ error_retention?: number | string; /** - * Duration in milliseconds or as a string like '5 minutes' + * Specifies the duration in milliseconds or as a string like '5 minutes'. */ success_retention?: number | string; } diff --git a/src/resources/workflows/instances/status.ts b/src/resources/workflows/instances/status.ts index 488fe73031..47777885e2 100644 --- a/src/resources/workflows/instances/status.ts +++ b/src/resources/workflows/instances/status.ts @@ -42,7 +42,7 @@ export interface StatusEditResponse { export interface StatusEditParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/workflows/versions.ts b/src/resources/workflows/versions.ts index dab04a8662..cad3cdd698 100644 --- a/src/resources/workflows/versions.ts +++ b/src/resources/workflows/versions.ts @@ -68,7 +68,7 @@ export interface VersionGetResponse { export interface VersionListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; } diff --git a/src/resources/workflows/workflows.ts b/src/resources/workflows/workflows.ts index d7f69588d8..789534ec38 100644 --- a/src/resources/workflows/workflows.ts +++ b/src/resources/workflows/workflows.ts @@ -205,24 +205,24 @@ export namespace WorkflowGetResponse { export interface WorkflowUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ class_name: string; /** - * Body param: + * Body param */ script_name: string; } export interface WorkflowListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/access/ai-controls/mcp/portals.ts b/src/resources/zero-trust/access/ai-controls/mcp/portals.ts index 4cb98f4717..6d8990d3d9 100644 --- a/src/resources/zero-trust/access/ai-controls/mcp/portals.ts +++ b/src/resources/zero-trust/access/ai-controls/mcp/portals.ts @@ -156,6 +156,11 @@ export interface PortalCreateResponse { modified_at?: string; modified_by?: string; + + /** + * Route outbound MCP traffic through Zero Trust Secure Web Gateway + */ + secure_web_gateway?: boolean; } export interface PortalUpdateResponse { @@ -177,6 +182,11 @@ export interface PortalUpdateResponse { modified_at?: string; modified_by?: string; + + /** + * Route outbound MCP traffic through Zero Trust Secure Web Gateway + */ + secure_web_gateway?: boolean; } export interface PortalListResponse { @@ -198,6 +208,11 @@ export interface PortalListResponse { modified_at?: string; modified_by?: string; + + /** + * Route outbound MCP traffic through Zero Trust Secure Web Gateway + */ + secure_web_gateway?: boolean; } export interface PortalDeleteResponse { @@ -219,6 +234,11 @@ export interface PortalDeleteResponse { modified_at?: string; modified_by?: string; + + /** + * Route outbound MCP traffic through Zero Trust Secure Web Gateway + */ + secure_web_gateway?: boolean; } export interface PortalReadResponse { @@ -242,6 +262,11 @@ export interface PortalReadResponse { modified_at?: string; modified_by?: string; + + /** + * Route outbound MCP traffic through Zero Trust Secure Web Gateway + */ + secure_web_gateway?: boolean; } export namespace PortalReadResponse { @@ -275,6 +300,8 @@ export namespace PortalReadResponse { error?: string; + last_successful_sync?: string; + last_synced?: string; modified_at?: string; @@ -289,7 +316,7 @@ export namespace PortalReadResponse { export interface PortalCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -299,22 +326,27 @@ export interface PortalCreateParams { id: string; /** - * Body param: + * Body param */ hostname: string; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param: Route outbound MCP traffic through Zero Trust Secure Web Gateway + */ + secure_web_gateway?: boolean; + + /** + * Body param */ servers?: Array; } @@ -356,27 +388,32 @@ export namespace PortalCreateParams { export interface PortalUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ description?: string; /** - * Body param: + * Body param */ hostname?: string; /** - * Body param: + * Body param */ name?: string; /** - * Body param: + * Body param: Route outbound MCP traffic through Zero Trust Secure Web Gateway + */ + secure_web_gateway?: boolean; + + /** + * Body param */ servers?: Array; } @@ -418,7 +455,7 @@ export namespace PortalUpdateParams { export interface PortalListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/access/ai-controls/mcp/servers.ts b/src/resources/zero-trust/access/ai-controls/mcp/servers.ts index 776c2423f0..d476b51090 100644 --- a/src/resources/zero-trust/access/ai-controls/mcp/servers.ts +++ b/src/resources/zero-trust/access/ai-controls/mcp/servers.ts @@ -188,6 +188,8 @@ export interface ServerCreateResponse { error?: string; + last_successful_sync?: string; + last_synced?: string; modified_at?: string; @@ -221,6 +223,8 @@ export interface ServerUpdateResponse { error?: string; + last_successful_sync?: string; + last_synced?: string; modified_at?: string; @@ -254,6 +258,8 @@ export interface ServerListResponse { error?: string; + last_successful_sync?: string; + last_synced?: string; modified_at?: string; @@ -287,6 +293,8 @@ export interface ServerDeleteResponse { error?: string; + last_successful_sync?: string; + last_synced?: string; modified_at?: string; @@ -320,6 +328,8 @@ export interface ServerReadResponse { error?: string; + last_successful_sync?: string; + last_synced?: string; modified_at?: string; @@ -333,7 +343,7 @@ export type ServerSyncResponse = unknown; export interface ServerCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -343,56 +353,56 @@ export interface ServerCreateParams { id: string; /** - * Body param: + * Body param */ auth_type: 'oauth' | 'bearer' | 'unauthenticated'; /** - * Body param: + * Body param */ hostname: string; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ auth_credentials?: string; /** - * Body param: + * Body param */ description?: string | null; } export interface ServerUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ auth_credentials?: string; /** - * Body param: + * Body param */ description?: string | null; /** - * Body param: + * Body param */ name?: string; } export interface ServerListParams extends V4PagePaginationArrayParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/access/applications/applications.ts b/src/resources/zero-trust/access/applications/applications.ts index 242cb13fc1..317dcca6fc 100644 --- a/src/resources/zero-trust/access/applications/applications.ts +++ b/src/resources/zero-trust/access/applications/applications.ts @@ -562,6 +562,14 @@ export namespace Application { skip_interstitial?: boolean; updated_at?: string; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace SelfHostedApplication { @@ -1023,6 +1031,14 @@ export namespace Application { skip_interstitial?: boolean; updated_at?: string; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserSSHApplication { @@ -1187,6 +1203,14 @@ export namespace Application { skip_interstitial?: boolean; updated_at?: string; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserVNCApplication { @@ -2772,6 +2796,14 @@ export namespace ApplicationCreateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace SelfHostedApplication { @@ -3453,6 +3485,14 @@ export namespace ApplicationCreateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserSSHApplication { @@ -3887,6 +3927,14 @@ export namespace ApplicationCreateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserVNCApplication { @@ -4843,6 +4891,8 @@ export namespace ApplicationCreateResponse { */ name?: string; + policies?: Array; + /** * The tags you want assigned to an application. Tags are used to filter * applications in the App Launcher dashboard. @@ -4855,6 +4905,89 @@ export namespace ApplicationCreateResponse { type?: ApplicationsAPI.ApplicationType; } + export namespace BookmarkApplication { + export interface Policy { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. Infrastructure + * application policies can only use the Allow action. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + } + export interface InfrastructureApplication { target_criteria: Array; @@ -5158,6 +5291,14 @@ export namespace ApplicationCreateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserRdpApplication { @@ -5611,6 +5752,14 @@ export namespace ApplicationUpdateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace SelfHostedApplication { @@ -6292,6 +6441,14 @@ export namespace ApplicationUpdateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserSSHApplication { @@ -6726,6 +6883,14 @@ export namespace ApplicationUpdateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserVNCApplication { @@ -7682,6 +7847,8 @@ export namespace ApplicationUpdateResponse { */ name?: string; + policies?: Array; + /** * The tags you want assigned to an application. Tags are used to filter * applications in the App Launcher dashboard. @@ -7694,6 +7861,89 @@ export namespace ApplicationUpdateResponse { type?: ApplicationsAPI.ApplicationType; } + export namespace BookmarkApplication { + export interface Policy { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. Infrastructure + * application policies can only use the Allow action. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + } + export interface InfrastructureApplication { target_criteria: Array; @@ -7997,6 +8247,14 @@ export namespace ApplicationUpdateResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserRdpApplication { @@ -8450,6 +8708,14 @@ export namespace ApplicationListResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace SelfHostedApplication { @@ -9131,6 +9397,14 @@ export namespace ApplicationListResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserSSHApplication { @@ -9565,6 +9839,14 @@ export namespace ApplicationListResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserVNCApplication { @@ -10521,6 +10803,8 @@ export namespace ApplicationListResponse { */ name?: string; + policies?: Array; + /** * The tags you want assigned to an application. Tags are used to filter * applications in the App Launcher dashboard. @@ -10533,52 +10817,135 @@ export namespace ApplicationListResponse { type?: ApplicationsAPI.ApplicationType; } - export interface InfrastructureApplication { - target_criteria: Array; - - /** - * The application type. - */ - type: ApplicationsAPI.ApplicationType; - - /** - * UUID. - */ - id?: string; - - /** - * Audience tag. - */ - aud?: string; - - /** - * The name of the application. - */ - name?: string; - - policies?: Array; - } - - export namespace InfrastructureApplication { - export interface TargetCriterion { + export namespace BookmarkApplication { + export interface Policy { /** - * The port that the targets use for the chosen communication protocol. A port - * cannot be assigned to multiple protocols. + * The UUID of the policy */ - port: number; + id?: string; /** - * The communication protocol your application secures. + * Administrators who can approve a temporary authentication request. */ - protocol: 'SSH'; + approval_groups?: Array; /** - * Contains a map of target attribute keys to target attribute values. + * Requires the user to request access from an administrator at the start of each + * session. */ - target_attributes: { [key: string]: Array }; - } + approval_required?: boolean; + + created_at?: string; - export interface Policy { + /** + * The action Access will take if a user matches this policy. Infrastructure + * application policies can only use the Allow action. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + } + + export interface InfrastructureApplication { + target_criteria: Array; + + /** + * The application type. + */ + type: ApplicationsAPI.ApplicationType; + + /** + * UUID. + */ + id?: string; + + /** + * Audience tag. + */ + aud?: string; + + /** + * The name of the application. + */ + name?: string; + + policies?: Array; + } + + export namespace InfrastructureApplication { + export interface TargetCriterion { + /** + * The port that the targets use for the chosen communication protocol. A port + * cannot be assigned to multiple protocols. + */ + port: number; + + /** + * The communication protocol your application secures. + */ + protocol: 'SSH'; + + /** + * Contains a map of target attribute keys to target attribute values. + */ + target_attributes: { [key: string]: Array }; + } + + export interface Policy { /** * The UUID of the policy */ @@ -10836,6 +11203,14 @@ export namespace ApplicationListResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserRdpApplication { @@ -11296,6 +11671,14 @@ export namespace ApplicationGetResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace SelfHostedApplication { @@ -11977,6 +12360,14 @@ export namespace ApplicationGetResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserSSHApplication { @@ -12411,6 +12802,14 @@ export namespace ApplicationGetResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserVNCApplication { @@ -13367,6 +13766,8 @@ export namespace ApplicationGetResponse { */ name?: string; + policies?: Array; + /** * The tags you want assigned to an application. Tags are used to filter * applications in the App Launcher dashboard. @@ -13379,6 +13780,89 @@ export namespace ApplicationGetResponse { type?: ApplicationsAPI.ApplicationType; } + export namespace BookmarkApplication { + export interface Policy { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + created_at?: string; + + /** + * The action Access will take if a user matches this policy. Infrastructure + * application policies can only use the Allow action. + */ + decision?: ApplicationsAPI.Decision; + + /** + * Rules evaluated with a NOT logical operator. To match the policy, a user cannot + * meet any of the Exclude rules. + */ + exclude?: Array; + + /** + * Rules evaluated with an OR logical operator. A user needs to meet only one of + * the Include rules. + */ + include?: Array; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The name of the Access policy. + */ + name?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * Rules evaluated with an AND logical operator. To match the policy, a user must + * meet all of the Require rules. + */ + require?: Array; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + + updated_at?: string; + } + } + export interface InfrastructureApplication { target_criteria: Array; @@ -13682,6 +14166,14 @@ export namespace ApplicationGetResponse { * applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Determines if users can access this application via a clientless browser + * isolation URL. This allows users to access private domains without connecting to + * Gateway. The option requires Clientless Browser Isolation to be set up with + * policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserRdpApplication { @@ -13955,7 +14447,7 @@ export type ApplicationCreateParams = | ApplicationCreateParams.DeviceEnrollmentPermissionsApplication | ApplicationCreateParams.BrowserIsolationPermissionsApplication | ApplicationCreateParams.GatewayIdentityProxyEndpointApplication - | ApplicationCreateParams.AccessBookmarkProps + | ApplicationCreateParams.BookmarkApplication | ApplicationCreateParams.InfrastructureApplication | ApplicationCreateParams.BrowserRdpApplication; @@ -14015,7 +14507,7 @@ export declare namespace ApplicationCreateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -14150,6 +14642,14 @@ export declare namespace ApplicationCreateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace SelfHostedApplication { @@ -14430,7 +14930,7 @@ export declare namespace ApplicationCreateParams { policies?: Array; /** - * Body param: + * Body param */ saas_app?: SAMLSaaSAppParam | OIDCSaaSAppParam; @@ -14686,7 +15186,7 @@ export declare namespace ApplicationCreateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -14821,6 +15321,14 @@ export declare namespace ApplicationCreateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserSSHApplication { @@ -15116,7 +15624,7 @@ export declare namespace ApplicationCreateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -15251,6 +15759,14 @@ export declare namespace ApplicationCreateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserVNCApplication { @@ -16105,7 +16621,7 @@ export declare namespace ApplicationCreateParams { } } - export interface AccessBookmarkProps { + export interface BookmarkApplication { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. @@ -16138,6 +16654,13 @@ export declare namespace ApplicationCreateParams { */ name?: string; + /** + * Body param: The policies that Access applies to the application, in ascending + * order of precedence. Items can reference existing policies or create new + * policies exclusive to the application. + */ + policies?: Array; + /** * Body param: The tags you want assigned to an application. Tags are used to * filter applications in the App Launcher dashboard. @@ -16150,9 +16673,75 @@ export declare namespace ApplicationCreateParams { type?: ApplicationTypeParam; } + export namespace BookmarkApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface InfrastructureApplication { /** - * Body param: + * Body param */ target_criteria: Array; @@ -16281,7 +16870,7 @@ export declare namespace ApplicationCreateParams { domain: string; /** - * Body param: + * Body param */ target_criteria: Array; @@ -16333,7 +16922,7 @@ export declare namespace ApplicationCreateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -16468,6 +17057,14 @@ export declare namespace ApplicationCreateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserRdpApplication { @@ -16722,7 +17319,7 @@ export type ApplicationUpdateParams = | ApplicationUpdateParams.DeviceEnrollmentPermissionsApplication | ApplicationUpdateParams.BrowserIsolationPermissionsApplication | ApplicationUpdateParams.GatewayIdentityProxyEndpointApplication - | ApplicationUpdateParams.AccessBookmarkProps + | ApplicationUpdateParams.BookmarkApplication | ApplicationUpdateParams.InfrastructureApplication | ApplicationUpdateParams.BrowserRdpApplication; @@ -16782,7 +17379,7 @@ export declare namespace ApplicationUpdateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -16917,6 +17514,14 @@ export declare namespace ApplicationUpdateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace SelfHostedApplication { @@ -17197,7 +17802,7 @@ export declare namespace ApplicationUpdateParams { policies?: Array; /** - * Body param: + * Body param */ saas_app?: SAMLSaaSAppParam | OIDCSaaSAppParam; @@ -17453,7 +18058,7 @@ export declare namespace ApplicationUpdateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -17588,6 +18193,14 @@ export declare namespace ApplicationUpdateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserSSHApplication { @@ -17883,7 +18496,7 @@ export declare namespace ApplicationUpdateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -18018,6 +18631,14 @@ export declare namespace ApplicationUpdateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserVNCApplication { @@ -18872,7 +19493,7 @@ export declare namespace ApplicationUpdateParams { } } - export interface AccessBookmarkProps { + export interface BookmarkApplication { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the * Zone ID. @@ -18905,6 +19526,13 @@ export declare namespace ApplicationUpdateParams { */ name?: string; + /** + * Body param: The policies that Access applies to the application, in ascending + * order of precedence. Items can reference existing policies or create new + * policies exclusive to the application. + */ + policies?: Array; + /** * Body param: The tags you want assigned to an application. Tags are used to * filter applications in the App Launcher dashboard. @@ -18917,9 +19545,75 @@ export declare namespace ApplicationUpdateParams { type?: ApplicationTypeParam; } + export namespace BookmarkApplication { + /** + * A JSON that links a reusable policy to an application. + */ + export interface AccessAppPolicyLink { + /** + * The UUID of the policy + */ + id?: string; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + } + + export interface UnionMember2 { + /** + * The UUID of the policy + */ + id?: string; + + /** + * Administrators who can approve a temporary authentication request. + */ + approval_groups?: Array; + + /** + * Requires the user to request access from an administrator at the start of each + * session. + */ + approval_required?: boolean; + + /** + * Require this application to be served in an isolated browser for users matching + * this policy. 'Client Web Isolation' must be on for the account in order to use + * this feature. + */ + isolation_required?: boolean; + + /** + * The order of execution for this policy. Must be unique for each policy within an + * app. + */ + precedence?: number; + + /** + * A custom message that will appear on the purpose justification screen. + */ + purpose_justification_prompt?: string; + + /** + * Require users to enter a justification when they log in to the application. + */ + purpose_justification_required?: boolean; + + /** + * The amount of time that tokens issued for the application will be valid. Must be + * in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + * m, h. + */ + session_duration?: string; + } + } + export interface InfrastructureApplication { /** - * Body param: + * Body param */ target_criteria: Array; @@ -19048,7 +19742,7 @@ export declare namespace ApplicationUpdateParams { domain: string; /** - * Body param: + * Body param */ target_criteria: Array; @@ -19100,7 +19794,7 @@ export declare namespace ApplicationUpdateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ cors_headers?: CORSHeadersParam; @@ -19235,6 +19929,14 @@ export declare namespace ApplicationUpdateParams { * filter applications in the App Launcher dashboard. */ tags?: Array; + + /** + * Body param: Determines if users can access this application via a clientless + * browser isolation URL. This allows users to access private domains without + * connecting to Gateway. The option requires Clientless Browser Isolation to be + * set up with policies that allow users of this application. + */ + use_clientless_isolation_app_launcher_url?: boolean; } export namespace BrowserRdpApplication { diff --git a/src/resources/zero-trust/access/applications/policy-tests/policy-tests.ts b/src/resources/zero-trust/access/applications/policy-tests/policy-tests.ts index 514203d28e..7abaf77b3e 100755 --- a/src/resources/zero-trust/access/applications/policy-tests/policy-tests.ts +++ b/src/resources/zero-trust/access/applications/policy-tests/policy-tests.ts @@ -133,7 +133,7 @@ export interface PolicyTestCreateParams { account_id: string; /** - * Body param: + * Body param */ policies?: Array; } diff --git a/src/resources/zero-trust/access/bookmarks.ts b/src/resources/zero-trust/access/bookmarks.ts index e7a38cc373..9db4d8bafb 100644 --- a/src/resources/zero-trust/access/bookmarks.ts +++ b/src/resources/zero-trust/access/bookmarks.ts @@ -132,24 +132,24 @@ export interface BookmarkDeleteResponse { export interface BookmarkCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: unknown; } export interface BookmarkUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/zero-trust/access/certificates/settings.ts b/src/resources/zero-trust/access/certificates/settings.ts index 8978760fb7..2474eca43b 100644 --- a/src/resources/zero-trust/access/certificates/settings.ts +++ b/src/resources/zero-trust/access/certificates/settings.ts @@ -151,7 +151,7 @@ export interface CertificateSettingsParam { export interface SettingUpdateParams { /** - * Body param: + * Body param */ settings: Array; diff --git a/src/resources/zero-trust/access/infrastructure/targets.ts b/src/resources/zero-trust/access/infrastructure/targets.ts index 9e1c6adb3f..8950b2ea76 100644 --- a/src/resources/zero-trust/access/infrastructure/targets.ts +++ b/src/resources/zero-trust/access/infrastructure/targets.ts @@ -149,7 +149,12 @@ export class Targets extends APIResource { * for await (const targetBulkUpdateResponse of client.zeroTrust.access.infrastructure.targets.bulkUpdate( * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', - * body: [{ hostname: 'infra-access-target', ip: {} }], + * body: [ + * { + * hostname: 'infra-access-target', + * ip: {}, + * }, + * ], * }, * )) { * // ... @@ -868,7 +873,7 @@ export interface TargetBulkUpdateParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/zero-trust/devices/devices_.ts b/src/resources/zero-trust/devices/devices_.ts index 5c55139d8c..da9d83ead5 100644 --- a/src/resources/zero-trust/devices/devices_.ts +++ b/src/resources/zero-trust/devices/devices_.ts @@ -454,7 +454,7 @@ export type DeviceRevokeResponse = unknown; export interface DeviceListParams extends CursorPaginationParams { /** - * Path param: + * Path param */ account_id: string; @@ -477,7 +477,7 @@ export interface DeviceListParams extends CursorPaginationParams { include?: string; /** - * Query param: + * Query param */ last_seen_user?: DeviceListParams.LastSeenUser; @@ -531,7 +531,7 @@ export interface DeviceDeleteParams { export interface DeviceGetParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/dex-tests.ts b/src/resources/zero-trust/devices/dex-tests.ts index 4446969263..8452034ce1 100644 --- a/src/resources/zero-trust/devices/dex-tests.ts +++ b/src/resources/zero-trust/devices/dex-tests.ts @@ -630,7 +630,7 @@ export namespace DEXTestGetResponse { export interface DEXTestCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -666,7 +666,7 @@ export interface DEXTestCreateParams { target_policies?: Array; /** - * Body param: + * Body param */ targeted?: boolean; } @@ -713,7 +713,7 @@ export namespace DEXTestCreateParams { export interface DEXTestUpdateParams { /** - * Path param: + * Path param */ account_id: string; @@ -749,7 +749,7 @@ export interface DEXTestUpdateParams { target_policies?: Array; /** - * Body param: + * Body param */ targeted?: boolean; } diff --git a/src/resources/zero-trust/devices/networks.ts b/src/resources/zero-trust/devices/networks.ts index 1a36d1173c..aff3c1bfc9 100644 --- a/src/resources/zero-trust/devices/networks.ts +++ b/src/resources/zero-trust/devices/networks.ts @@ -181,7 +181,7 @@ export namespace DeviceNetwork { export interface NetworkCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -225,7 +225,7 @@ export namespace NetworkCreateParams { export interface NetworkUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/policies/custom/custom.ts b/src/resources/zero-trust/devices/policies/custom/custom.ts index ca817fa90f..8da3d8120e 100644 --- a/src/resources/zero-trust/devices/policies/custom/custom.ts +++ b/src/resources/zero-trust/devices/policies/custom/custom.ts @@ -150,7 +150,7 @@ export class Custom extends APIResource { export interface CustomCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -261,7 +261,7 @@ export interface CustomCreateParams { sccm_vpn_boundary_support?: boolean; /** - * Body param: + * Body param */ service_mode_v2?: CustomCreateParams.ServiceModeV2; @@ -306,7 +306,7 @@ export interface CustomDeleteParams { export interface CustomEditParams { /** - * Path param: + * Path param */ account_id: string; @@ -417,7 +417,7 @@ export interface CustomEditParams { sccm_vpn_boundary_support?: boolean; /** - * Body param: + * Body param */ service_mode_v2?: CustomEditParams.ServiceModeV2; diff --git a/src/resources/zero-trust/devices/policies/custom/excludes.ts b/src/resources/zero-trust/devices/policies/custom/excludes.ts index d22f85234e..06d11f8b86 100644 --- a/src/resources/zero-trust/devices/policies/custom/excludes.ts +++ b/src/resources/zero-trust/devices/policies/custom/excludes.ts @@ -68,12 +68,12 @@ export class Excludes extends APIResource { export interface ExcludeUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/zero-trust/devices/policies/custom/fallback-domains.ts b/src/resources/zero-trust/devices/policies/custom/fallback-domains.ts index 62ab2c33cb..5cd831532e 100644 --- a/src/resources/zero-trust/devices/policies/custom/fallback-domains.ts +++ b/src/resources/zero-trust/devices/policies/custom/fallback-domains.ts @@ -70,12 +70,12 @@ export class FallbackDomains extends APIResource { export interface FallbackDomainUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ domains: Array; } diff --git a/src/resources/zero-trust/devices/policies/custom/includes.ts b/src/resources/zero-trust/devices/policies/custom/includes.ts index 0404544c4e..2e0598f81a 100644 --- a/src/resources/zero-trust/devices/policies/custom/includes.ts +++ b/src/resources/zero-trust/devices/policies/custom/includes.ts @@ -68,12 +68,12 @@ export class Includes extends APIResource { export interface IncludeUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/zero-trust/devices/policies/default/certificates.ts b/src/resources/zero-trust/devices/policies/default/certificates.ts index e686744708..74f12dd974 100644 --- a/src/resources/zero-trust/devices/policies/default/certificates.ts +++ b/src/resources/zero-trust/devices/policies/default/certificates.ts @@ -60,7 +60,7 @@ export class Certificates extends APIResource { export interface CertificateEditParams { /** - * Path param: + * Path param */ zone_id: string; diff --git a/src/resources/zero-trust/devices/policies/default/default.ts b/src/resources/zero-trust/devices/policies/default/default.ts index 5f7b871f46..643dddfe18 100644 --- a/src/resources/zero-trust/devices/policies/default/default.ts +++ b/src/resources/zero-trust/devices/policies/default/default.ts @@ -278,7 +278,7 @@ export namespace DefaultGetResponse { export interface DefaultEditParams { /** - * Path param: + * Path param */ account_id: string; @@ -360,7 +360,7 @@ export interface DefaultEditParams { sccm_vpn_boundary_support?: boolean; /** - * Body param: + * Body param */ service_mode_v2?: DefaultEditParams.ServiceModeV2; diff --git a/src/resources/zero-trust/devices/policies/default/excludes.ts b/src/resources/zero-trust/devices/policies/default/excludes.ts index cfab7f48a2..ec6eb85f30 100644 --- a/src/resources/zero-trust/devices/policies/default/excludes.ts +++ b/src/resources/zero-trust/devices/policies/default/excludes.ts @@ -62,12 +62,12 @@ export class Excludes extends APIResource { export interface ExcludeUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/zero-trust/devices/policies/default/fallback-domains.ts b/src/resources/zero-trust/devices/policies/default/fallback-domains.ts index e3a475fee1..e27293164e 100644 --- a/src/resources/zero-trust/devices/policies/default/fallback-domains.ts +++ b/src/resources/zero-trust/devices/policies/default/fallback-domains.ts @@ -64,12 +64,12 @@ export class FallbackDomains extends APIResource { export interface FallbackDomainUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ domains: Array; } diff --git a/src/resources/zero-trust/devices/policies/default/includes.ts b/src/resources/zero-trust/devices/policies/default/includes.ts index e84aae6131..f82a22b21a 100644 --- a/src/resources/zero-trust/devices/policies/default/includes.ts +++ b/src/resources/zero-trust/devices/policies/default/includes.ts @@ -62,12 +62,12 @@ export class Includes extends APIResource { export interface IncludeUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/zero-trust/devices/posture/integrations.ts b/src/resources/zero-trust/devices/posture/integrations.ts index e107bdceec..00cd435948 100644 --- a/src/resources/zero-trust/devices/posture/integrations.ts +++ b/src/resources/zero-trust/devices/posture/integrations.ts @@ -209,7 +209,7 @@ export type IntegrationDeleteResponse = unknown | string; export interface IntegrationCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -414,7 +414,7 @@ export interface IntegrationDeleteParams { export interface IntegrationEditParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/posture/posture.ts b/src/resources/zero-trust/devices/posture/posture.ts index 09832bd210..5c59068cf2 100644 --- a/src/resources/zero-trust/devices/posture/posture.ts +++ b/src/resources/zero-trust/devices/posture/posture.ts @@ -1160,7 +1160,7 @@ export interface PostureDeleteResponse { export interface PostureCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -1227,7 +1227,7 @@ export interface PostureCreateParams { export interface PostureUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/registrations.ts b/src/resources/zero-trust/devices/registrations.ts index 30ad8b0eb3..d01db35816 100644 --- a/src/resources/zero-trust/devices/registrations.ts +++ b/src/resources/zero-trust/devices/registrations.ts @@ -438,7 +438,7 @@ export type RegistrationUnrevokeResponse = unknown; export interface RegistrationListParams extends CursorPaginationParams { /** - * Path param: + * Path param */ account_id: string; @@ -448,7 +448,7 @@ export interface RegistrationListParams extends CursorPaginationParams { id?: Array; /** - * Query param: + * Query param */ device?: RegistrationListParams.Device; @@ -491,7 +491,7 @@ export interface RegistrationListParams extends CursorPaginationParams { status?: 'active' | 'all' | 'revoked'; /** - * Query param: + * Query param */ user?: RegistrationListParams.User; } @@ -518,7 +518,7 @@ export interface RegistrationDeleteParams { export interface RegistrationBulkDeleteParams { /** - * Path param: + * Path param */ account_id: string; @@ -530,7 +530,7 @@ export interface RegistrationBulkDeleteParams { export interface RegistrationGetParams { /** - * Path param: + * Path param */ account_id: string; @@ -543,7 +543,7 @@ export interface RegistrationGetParams { export interface RegistrationRevokeParams { /** - * Path param: + * Path param */ account_id: string; @@ -555,7 +555,7 @@ export interface RegistrationRevokeParams { export interface RegistrationUnrevokeParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/resilience/global-warp-override.ts b/src/resources/zero-trust/devices/resilience/global-warp-override.ts index a5e7ef3792..f994d64f39 100644 --- a/src/resources/zero-trust/devices/resilience/global-warp-override.ts +++ b/src/resources/zero-trust/devices/resilience/global-warp-override.ts @@ -81,7 +81,7 @@ export interface GlobalWARPOverrideGetResponse { export interface GlobalWARPOverrideCreateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/revoke.ts b/src/resources/zero-trust/devices/revoke.ts index 9cd83a9305..5b2b7d0c81 100644 --- a/src/resources/zero-trust/devices/revoke.ts +++ b/src/resources/zero-trust/devices/revoke.ts @@ -32,7 +32,7 @@ export type RevokeCreateResponse = unknown | string; export interface RevokeCreateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/settings.ts b/src/resources/zero-trust/devices/settings.ts index 12ea40705f..8ce66111a4 100644 --- a/src/resources/zero-trust/devices/settings.ts +++ b/src/resources/zero-trust/devices/settings.ts @@ -142,7 +142,7 @@ export interface DeviceSettings { export interface SettingUpdateParams { /** - * Path param: + * Path param */ account_id: string; @@ -207,7 +207,7 @@ export interface SettingDeleteParams { export interface SettingEditParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/devices/unrevoke.ts b/src/resources/zero-trust/devices/unrevoke.ts index 87c2048019..ef6eea9919 100644 --- a/src/resources/zero-trust/devices/unrevoke.ts +++ b/src/resources/zero-trust/devices/unrevoke.ts @@ -32,7 +32,7 @@ export type UnrevokeCreateResponse = unknown | string; export interface UnrevokeCreateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/dlp/datasets/datasets.ts b/src/resources/zero-trust/dlp/datasets/datasets.ts index bf4db6a742..860893ae08 100644 --- a/src/resources/zero-trust/dlp/datasets/datasets.ts +++ b/src/resources/zero-trust/dlp/datasets/datasets.ts @@ -352,12 +352,12 @@ export namespace DatasetGetResponse { export interface DatasetCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ name: string; @@ -394,7 +394,7 @@ export interface DatasetCreateParams { export interface DatasetUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/dlp/datasets/upload.ts b/src/resources/zero-trust/dlp/datasets/upload.ts index a7dd84217d..ef95bc9807 100644 --- a/src/resources/zero-trust/dlp/datasets/upload.ts +++ b/src/resources/zero-trust/dlp/datasets/upload.ts @@ -179,7 +179,7 @@ export interface UploadCreateParams { export interface UploadEditParams { /** - * Path param: + * Path param */ account_id: string; } diff --git a/src/resources/zero-trust/dlp/datasets/versions/entries.ts b/src/resources/zero-trust/dlp/datasets/versions/entries.ts index 91fdf41355..d3438ea5f2 100755 --- a/src/resources/zero-trust/dlp/datasets/versions/entries.ts +++ b/src/resources/zero-trust/dlp/datasets/versions/entries.ts @@ -56,7 +56,7 @@ export interface EntryCreateResponse { export interface EntryCreateParams { /** - * Path param: + * Path param */ account_id: string; } diff --git a/src/resources/zero-trust/dlp/datasets/versions/versions.ts b/src/resources/zero-trust/dlp/datasets/versions/versions.ts index a97887e4a8..4cb4879305 100755 --- a/src/resources/zero-trust/dlp/datasets/versions/versions.ts +++ b/src/resources/zero-trust/dlp/datasets/versions/versions.ts @@ -60,12 +60,12 @@ export interface VersionCreateResponse { export interface VersionCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/zero-trust/dlp/email/account-mapping.ts b/src/resources/zero-trust/dlp/email/account-mapping.ts index 1f856bdda8..8fe427f5ae 100644 --- a/src/resources/zero-trust/dlp/email/account-mapping.ts +++ b/src/resources/zero-trust/dlp/email/account-mapping.ts @@ -94,12 +94,12 @@ export namespace AccountMappingGetResponse { export interface AccountMappingCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ auth_requirements: AccountMappingCreateParams.UnionMember0 | AccountMappingCreateParams.Type; } diff --git a/src/resources/zero-trust/dlp/email/rules.ts b/src/resources/zero-trust/dlp/email/rules.ts index 22136ab0c4..f8ccdce817 100644 --- a/src/resources/zero-trust/dlp/email/rules.ts +++ b/src/resources/zero-trust/dlp/email/rules.ts @@ -404,12 +404,12 @@ export namespace RuleGetResponse { export interface RuleCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ action: RuleCreateParams.Action; @@ -419,17 +419,17 @@ export interface RuleCreateParams { conditions: Array; /** - * Body param: + * Body param */ enabled: boolean; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ description?: string | null; } @@ -452,12 +452,12 @@ export namespace RuleCreateParams { export interface RuleUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ action: RuleUpdateParams.Action; @@ -467,17 +467,17 @@ export interface RuleUpdateParams { conditions: Array; /** - * Body param: + * Body param */ enabled: boolean; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ description?: string | null; } @@ -508,12 +508,12 @@ export interface RuleDeleteParams { export interface RuleBulkEditParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ new_priorities: { [key: string]: number }; } diff --git a/src/resources/zero-trust/dlp/entries/custom.ts b/src/resources/zero-trust/dlp/entries/custom.ts index c28bffcd95..0de8055a09 100644 --- a/src/resources/zero-trust/dlp/entries/custom.ts +++ b/src/resources/zero-trust/dlp/entries/custom.ts @@ -548,49 +548,49 @@ export namespace CustomGetResponse { export interface CustomCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enabled: boolean; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ pattern: ProfilesCustomAPI.PatternParam; /** - * Body param: + * Body param */ profile_id?: string; } export interface CustomUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enabled: boolean; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ pattern: ProfilesCustomAPI.PatternParam; } diff --git a/src/resources/zero-trust/dlp/entries/entries.ts b/src/resources/zero-trust/dlp/entries/entries.ts index ee2492d96c..8047bb1a9f 100644 --- a/src/resources/zero-trust/dlp/entries/entries.ts +++ b/src/resources/zero-trust/dlp/entries/entries.ts @@ -714,27 +714,27 @@ export namespace EntryGetResponse { export interface EntryCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enabled: boolean; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ pattern: ProfilesCustomAPI.PatternParam; /** - * Body param: + * Body param */ profile_id?: string; } @@ -747,61 +747,61 @@ export type EntryUpdateParams = export declare namespace EntryUpdateParams { export interface Variant0 { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ pattern: ProfilesCustomAPI.PatternParam; /** - * Body param: + * Body param */ type: 'custom'; /** - * Body param: + * Body param */ enabled?: boolean; } export interface Variant1 { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ type: 'predefined'; /** - * Body param: + * Body param */ enabled?: boolean; } export interface Variant2 { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ type: 'integration'; /** - * Body param: + * Body param */ enabled?: boolean; } diff --git a/src/resources/zero-trust/dlp/entries/integration.ts b/src/resources/zero-trust/dlp/entries/integration.ts index 46d85aab2b..ef52103778 100644 --- a/src/resources/zero-trust/dlp/entries/integration.ts +++ b/src/resources/zero-trust/dlp/entries/integration.ts @@ -545,17 +545,17 @@ export namespace IntegrationGetResponse { export interface IntegrationCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enabled: boolean; /** - * Body param: + * Body param */ entry_id: string; @@ -568,12 +568,12 @@ export interface IntegrationCreateParams { export interface IntegrationUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enabled: boolean; } diff --git a/src/resources/zero-trust/dlp/entries/predefined.ts b/src/resources/zero-trust/dlp/entries/predefined.ts index 27a6407a0a..248915b199 100644 --- a/src/resources/zero-trust/dlp/entries/predefined.ts +++ b/src/resources/zero-trust/dlp/entries/predefined.ts @@ -591,17 +591,17 @@ export namespace PredefinedGetResponse { export interface PredefinedCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enabled: boolean; /** - * Body param: + * Body param */ entry_id: string; @@ -614,12 +614,12 @@ export interface PredefinedCreateParams { export interface PredefinedUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ enabled: boolean; } diff --git a/src/resources/zero-trust/dlp/patterns.ts b/src/resources/zero-trust/dlp/patterns.ts index 8b3dbeefbe..240848eb84 100644 --- a/src/resources/zero-trust/dlp/patterns.ts +++ b/src/resources/zero-trust/dlp/patterns.ts @@ -44,7 +44,7 @@ export interface PatternValidateParams { account_id: string; /** - * Body param: + * Body param */ regex: string; diff --git a/src/resources/zero-trust/dlp/payload-logs.ts b/src/resources/zero-trust/dlp/payload-logs.ts index 719f784ad4..d4595a6693 100644 --- a/src/resources/zero-trust/dlp/payload-logs.ts +++ b/src/resources/zero-trust/dlp/payload-logs.ts @@ -62,12 +62,12 @@ export interface PayloadLogGetResponse { export interface PayloadLogUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ public_key?: string | null; } diff --git a/src/resources/zero-trust/dlp/profiles/custom.ts b/src/resources/zero-trust/dlp/profiles/custom.ts index 9721bae66d..9e10060b5c 100644 --- a/src/resources/zero-trust/dlp/profiles/custom.ts +++ b/src/resources/zero-trust/dlp/profiles/custom.ts @@ -1862,17 +1862,17 @@ export namespace CustomGetResponse { export interface CustomCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ ai_context_enabled?: boolean; @@ -1883,7 +1883,7 @@ export interface CustomCreateParams { allowed_match_count?: number; /** - * Body param: + * Body param */ confidence_threshold?: string | null; @@ -1899,12 +1899,12 @@ export interface CustomCreateParams { description?: string | null; /** - * Body param: + * Body param */ entries?: Array; /** - * Body param: + * Body param */ ocr_enabled?: boolean; @@ -1941,27 +1941,27 @@ export namespace CustomCreateParams { export interface CustomUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ name: string; /** - * Body param: + * Body param */ ai_context_enabled?: boolean; /** - * Body param: + * Body param */ allowed_match_count?: number | null; /** - * Body param: + * Body param */ confidence_threshold?: string | null; @@ -1983,7 +1983,7 @@ export interface CustomUpdateParams { entries?: Array | null; /** - * Body param: + * Body param */ ocr_enabled?: boolean; diff --git a/src/resources/zero-trust/dlp/profiles/predefined.ts b/src/resources/zero-trust/dlp/profiles/predefined.ts index ee55356cbd..3959ba7a5c 100644 --- a/src/resources/zero-trust/dlp/profiles/predefined.ts +++ b/src/resources/zero-trust/dlp/profiles/predefined.ts @@ -98,10 +98,14 @@ export interface PredefinedProfile { confidence_threshold: string | null; + /** + * Entries to enable for this predefined profile. Any entries not provided will be + * disabled. + */ enabled_entries: Array; /** - * @deprecated + * @deprecated This field has been deprecated for `enabled_entries`. */ entries: Array< | PredefinedProfile.CustomEntry @@ -266,10 +270,14 @@ export interface PredefinedUpdateResponse { confidence_threshold: string | null; + /** + * Entries to enable for this predefined profile. Any entries not provided will be + * disabled. + */ enabled_entries: Array; /** - * @deprecated + * @deprecated This field has been deprecated for `enabled_entries`. */ entries: Array< | PredefinedUpdateResponse.CustomEntry @@ -436,10 +444,14 @@ export interface PredefinedGetResponse { confidence_threshold: string | null; + /** + * Entries to enable for this predefined profile. Any entries not provided will be + * disabled. + */ enabled_entries: Array; /** - * @deprecated + * @deprecated This field has been deprecated for `enabled_entries`. */ entries: Array< | PredefinedGetResponse.CustomEntry @@ -596,37 +608,37 @@ export namespace PredefinedGetResponse { export interface PredefinedUpdateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ ai_context_enabled?: boolean; /** - * Body param: + * Body param */ allowed_match_count?: number | null; /** - * Body param: + * Body param */ confidence_threshold?: string | null; /** - * Body param: + * Body param */ enabled_entries?: Array | null; /** - * @deprecated Body param: + * @deprecated Body param */ entries?: Array; /** - * Body param: + * Body param */ ocr_enabled?: boolean; } diff --git a/src/resources/zero-trust/dlp/profiles/profiles.ts b/src/resources/zero-trust/dlp/profiles/profiles.ts index e698764f0f..c7e13b6c0b 100644 --- a/src/resources/zero-trust/dlp/profiles/profiles.ts +++ b/src/resources/zero-trust/dlp/profiles/profiles.ts @@ -1172,7 +1172,7 @@ export namespace ProfileGetResponse { export interface ProfileListParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/gateway/audit-ssh-settings.ts b/src/resources/zero-trust/gateway/audit-ssh-settings.ts index 14f9daa181..879e157ce6 100644 --- a/src/resources/zero-trust/gateway/audit-ssh-settings.ts +++ b/src/resources/zero-trust/gateway/audit-ssh-settings.ts @@ -97,7 +97,7 @@ export interface GatewaySettings { export interface AuditSSHSettingUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/gateway/certificates.ts b/src/resources/zero-trust/gateway/certificates.ts index e0a20d91e0..e824097b93 100644 --- a/src/resources/zero-trust/gateway/certificates.ts +++ b/src/resources/zero-trust/gateway/certificates.ts @@ -494,7 +494,7 @@ export interface CertificateGetResponse { export interface CertificateCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -518,24 +518,24 @@ export interface CertificateDeleteParams { export interface CertificateActivateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: unknown; } export interface CertificateDeactivateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ body: unknown; } diff --git a/src/resources/zero-trust/gateway/configurations/configurations.ts b/src/resources/zero-trust/gateway/configurations/configurations.ts index fb9a035b50..7da669963c 100755 --- a/src/resources/zero-trust/gateway/configurations/configurations.ts +++ b/src/resources/zero-trust/gateway/configurations/configurations.ts @@ -877,7 +877,7 @@ export interface ConfigurationGetResponse { export interface ConfigurationUpdateParams { /** - * Path param: + * Path param */ account_id: string; @@ -889,7 +889,7 @@ export interface ConfigurationUpdateParams { export interface ConfigurationEditParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/gateway/lists/lists.ts b/src/resources/zero-trust/gateway/lists/lists.ts index 20ea4a5a43..28d73663bb 100644 --- a/src/resources/zero-trust/gateway/lists/lists.ts +++ b/src/resources/zero-trust/gateway/lists/lists.ts @@ -239,7 +239,7 @@ export type ListDeleteResponse = unknown; export interface ListCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -280,7 +280,7 @@ export namespace ListCreateParams { export interface ListUpdateParams { /** - * Path param: + * Path param */ account_id: string; @@ -316,7 +316,7 @@ export namespace ListUpdateParams { export interface ListListParams { /** - * Path param: + * Path param */ account_id: string; @@ -332,7 +332,7 @@ export interface ListDeleteParams { export interface ListEditParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/gateway/locations.ts b/src/resources/zero-trust/gateway/locations.ts index d05da196a1..6f68070983 100644 --- a/src/resources/zero-trust/gateway/locations.ts +++ b/src/resources/zero-trust/gateway/locations.ts @@ -379,7 +379,7 @@ export type LocationDeleteResponse = unknown; export interface LocationCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -431,7 +431,7 @@ export namespace LocationCreateParams { export interface LocationUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/gateway/logging.ts b/src/resources/zero-trust/gateway/logging.ts index 62ce2fe19d..1da9d2ae49 100644 --- a/src/resources/zero-trust/gateway/logging.ts +++ b/src/resources/zero-trust/gateway/logging.ts @@ -130,7 +130,7 @@ export namespace LoggingSetting { export interface LoggingUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/gateway/proxy-endpoints.ts b/src/resources/zero-trust/gateway/proxy-endpoints.ts index bf42b723e2..0ac93e4898 100644 --- a/src/resources/zero-trust/gateway/proxy-endpoints.ts +++ b/src/resources/zero-trust/gateway/proxy-endpoints.ts @@ -212,7 +212,7 @@ export type ProxyEndpointCreateParams = export declare namespace ProxyEndpointCreateParams { export interface ZeroTrustGatewayProxyEndpointIPCreate { /** - * Path param: + * Path param */ account_id: string; @@ -229,7 +229,7 @@ export declare namespace ProxyEndpointCreateParams { export interface ZeroTrustGatewayProxyEndpointIdentityCreate { /** - * Path param: + * Path param */ account_id: string; @@ -255,7 +255,7 @@ export interface ProxyEndpointDeleteParams { export interface ProxyEndpointEditParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/gateway/rules.ts b/src/resources/zero-trust/gateway/rules.ts index 5579900154..d2fda9d180 100644 --- a/src/resources/zero-trust/gateway/rules.ts +++ b/src/resources/zero-trust/gateway/rules.ts @@ -1554,7 +1554,7 @@ export type RuleDeleteResponse = unknown; export interface RuleCreateParams { /** - * Path param: + * Path param */ account_id: string; @@ -1682,7 +1682,7 @@ export namespace RuleCreateParams { export interface RuleUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/organizations/organizations.ts b/src/resources/zero-trust/organizations/organizations.ts index f1dd371de7..a8fa5cefdc 100644 --- a/src/resources/zero-trust/organizations/organizations.ts +++ b/src/resources/zero-trust/organizations/organizations.ts @@ -248,6 +248,23 @@ export interface Organization { custom_pages?: Organization.CustomPages; + /** + * Determines whether to deny all requests to Cloudflare-protected resources that + * lack an associated Access application. If enabled, you must explicitly configure + * an Access application and policy to allow traffic to your Cloudflare-protected + * resources. For domains you want to be public across all subdomains, add the + * domain to the `deny_unmatched_requests_exempted_zone_names` array. + */ + deny_unmatched_requests?: boolean; + + /** + * Contains zone names to exempt from the `deny_unmatched_requests` feature. + * Requests to a subdomain in an exempted zone will block unauthenticated traffic + * by default if there is a configured Access application and policy that matches + * the request. + */ + deny_unmatched_requests_exempted_zone_names?: Array; + /** * Lock all settings as Read-Only in the Dashboard, regardless of user permission. * Updates may only be made via the API or Terraform for this account when enabled. @@ -342,6 +359,24 @@ export interface OrganizationCreateParams { */ auto_redirect_to_identity?: boolean; + /** + * Body param: Determines whether to deny all requests to Cloudflare-protected + * resources that lack an associated Access application. If enabled, you must + * explicitly configure an Access application and policy to allow traffic to your + * Cloudflare-protected resources. For domains you want to be public across all + * subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` + * array. + */ + deny_unmatched_requests?: boolean; + + /** + * Body param: Contains zone names to exempt from the `deny_unmatched_requests` + * feature. Requests to a subdomain in an exempted zone will block unauthenticated + * traffic by default if there is a configured Access application and policy that + * matches the request. + */ + deny_unmatched_requests_exempted_zone_names?: Array; + /** * Body param: Lock all settings as Read-Only in the Dashboard, regardless of user * permission. Updates may only be made via the API or Terraform for this account @@ -350,7 +385,7 @@ export interface OrganizationCreateParams { is_ui_read_only?: boolean; /** - * Body param: + * Body param */ login_design?: LoginDesignParam; @@ -415,10 +450,28 @@ export interface OrganizationUpdateParams { auto_redirect_to_identity?: boolean; /** - * Body param: + * Body param */ custom_pages?: OrganizationUpdateParams.CustomPages; + /** + * Body param: Determines whether to deny all requests to Cloudflare-protected + * resources that lack an associated Access application. If enabled, you must + * explicitly configure an Access application and policy to allow traffic to your + * Cloudflare-protected resources. For domains you want to be public across all + * subdomains, add the domain to the `deny_unmatched_requests_exempted_zone_names` + * array. + */ + deny_unmatched_requests?: boolean; + + /** + * Body param: Contains zone names to exempt from the `deny_unmatched_requests` + * feature. Requests to a subdomain in an exempted zone will block unauthenticated + * traffic by default if there is a configured Access application and policy that + * matches the request. + */ + deny_unmatched_requests_exempted_zone_names?: Array; + /** * Body param: Lock all settings as Read-Only in the Dashboard, regardless of user * permission. Updates may only be made via the API or Terraform for this account @@ -427,7 +480,7 @@ export interface OrganizationUpdateParams { is_ui_read_only?: boolean; /** - * Body param: + * Body param */ login_design?: LoginDesignParam; diff --git a/src/resources/zero-trust/risk-scoring/behaviours.ts b/src/resources/zero-trust/risk-scoring/behaviours.ts index 455a73f0ed..dc5518bfa2 100644 --- a/src/resources/zero-trust/risk-scoring/behaviours.ts +++ b/src/resources/zero-trust/risk-scoring/behaviours.ts @@ -87,7 +87,7 @@ export interface BehaviourUpdateParams { account_id: string; /** - * Body param: + * Body param */ behaviors: { [key: string]: BehaviourUpdateParams.Behaviors }; } diff --git a/src/resources/zero-trust/risk-scoring/integrations/integrations.ts b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts index 64c18c65fc..75a27f208e 100644 --- a/src/resources/zero-trust/risk-scoring/integrations/integrations.ts +++ b/src/resources/zero-trust/risk-scoring/integrations/integrations.ts @@ -322,12 +322,12 @@ export interface IntegrationGetResponse { export interface IntegrationCreateParams { /** - * Path param: + * Path param */ account_id: string; /** - * Body param: + * Body param */ integration_type: 'Okta'; @@ -346,7 +346,7 @@ export interface IntegrationCreateParams { export interface IntegrationUpdateParams { /** - * Path param: + * Path param */ account_id: string; diff --git a/src/resources/zero-trust/seats.ts b/src/resources/zero-trust/seats.ts index 99a3379c1a..1acad59144 100644 --- a/src/resources/zero-trust/seats.ts +++ b/src/resources/zero-trust/seats.ts @@ -66,7 +66,7 @@ export interface SeatEditParams { account_id: string; /** - * Body param: + * Body param */ body: Array; } diff --git a/src/resources/zero-trust/tunnels/cloudflared/cloudflared.ts b/src/resources/zero-trust/tunnels/cloudflared/cloudflared.ts index b364fe2a5d..325f0b2a43 100644 --- a/src/resources/zero-trust/tunnels/cloudflared/cloudflared.ts +++ b/src/resources/zero-trust/tunnels/cloudflared/cloudflared.ts @@ -194,7 +194,7 @@ export interface CloudflaredListParams extends V4PagePaginationArrayParams { account_id: string; /** - * Query param: + * Query param */ exclude_prefix?: string; @@ -205,7 +205,7 @@ export interface CloudflaredListParams extends V4PagePaginationArrayParams { existed_at?: string; /** - * Query param: + * Query param */ include_prefix?: string; @@ -235,12 +235,12 @@ export interface CloudflaredListParams extends V4PagePaginationArrayParams { uuid?: string; /** - * Query param: + * Query param */ was_active_at?: string; /** - * Query param: + * Query param */ was_inactive_at?: string; } diff --git a/src/resources/zero-trust/tunnels/cloudflared/management.ts b/src/resources/zero-trust/tunnels/cloudflared/management.ts index 91886f859e..d80429c981 100644 --- a/src/resources/zero-trust/tunnels/cloudflared/management.ts +++ b/src/resources/zero-trust/tunnels/cloudflared/management.ts @@ -48,7 +48,7 @@ export interface ManagementCreateParams { account_id: string; /** - * Body param: + * Body param */ resources: Array<'logs'>; } diff --git a/src/resources/zero-trust/tunnels/tunnels.ts b/src/resources/zero-trust/tunnels/tunnels.ts index 537b203d46..47144f29b2 100644 --- a/src/resources/zero-trust/tunnels/tunnels.ts +++ b/src/resources/zero-trust/tunnels/tunnels.ts @@ -210,7 +210,7 @@ export interface TunnelListParams extends V4PagePaginationArrayParams { account_id: string; /** - * Query param: + * Query param */ exclude_prefix?: string; @@ -221,7 +221,7 @@ export interface TunnelListParams extends V4PagePaginationArrayParams { existed_at?: string; /** - * Query param: + * Query param */ include_prefix?: string; @@ -256,12 +256,12 @@ export interface TunnelListParams extends V4PagePaginationArrayParams { uuid?: string; /** - * Query param: + * Query param */ was_active_at?: string; /** - * Query param: + * Query param */ was_inactive_at?: string; } diff --git a/src/resources/zero-trust/tunnels/warp-connector/warp-connector.ts b/src/resources/zero-trust/tunnels/warp-connector/warp-connector.ts index 5761e72573..590f78f57b 100644 --- a/src/resources/zero-trust/tunnels/warp-connector/warp-connector.ts +++ b/src/resources/zero-trust/tunnels/warp-connector/warp-connector.ts @@ -731,7 +731,7 @@ export interface WARPConnectorListParams extends V4PagePaginationArrayParams { account_id: string; /** - * Query param: + * Query param */ exclude_prefix?: string; @@ -742,7 +742,7 @@ export interface WARPConnectorListParams extends V4PagePaginationArrayParams { existed_at?: string; /** - * Query param: + * Query param */ include_prefix?: string; @@ -772,12 +772,12 @@ export interface WARPConnectorListParams extends V4PagePaginationArrayParams { uuid?: string; /** - * Query param: + * Query param */ was_active_at?: string; /** - * Query param: + * Query param */ was_inactive_at?: string; } diff --git a/tests/api-resources/accounts/accounts.test.ts b/tests/api-resources/accounts/accounts.test.ts index c3e50bb520..184ece32ff 100644 --- a/tests/api-resources/accounts/accounts.test.ts +++ b/tests/api-resources/accounts/accounts.test.ts @@ -78,7 +78,12 @@ describe('resource accounts', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.accounts.list( - { direction: 'desc', name: 'example.com', page: 1, per_page: 5 }, + { + direction: 'desc', + name: 'example.com', + page: 1, + per_page: 5, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/accounts/tokens/tokens.test.ts b/tests/api-resources/accounts/tokens/tokens.test.ts index 0248b48cf9..4ee7703c79 100644 --- a/tests/api-resources/accounts/tokens/tokens.test.ts +++ b/tests/api-resources/accounts/tokens/tokens.test.ts @@ -44,8 +44,14 @@ describe('resource tokens', () => { { effect: 'allow', permission_groups: [ - { id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } }, - { id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } }, + { + id: 'c8fed203ed3043cba015a93ad1616f1f', + meta: { key: 'key', value: 'value' }, + }, + { + id: '82e64a83756745bbbb1c9c2701bf816b', + meta: { key: 'key', value: 'value' }, + }, ], resources: { foo: 'string' }, }, @@ -95,8 +101,14 @@ describe('resource tokens', () => { { effect: 'allow', permission_groups: [ - { id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } }, - { id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } }, + { + id: 'c8fed203ed3043cba015a93ad1616f1f', + meta: { key: 'key', value: 'value' }, + }, + { + id: '82e64a83756745bbbb1c9c2701bf816b', + meta: { key: 'key', value: 'value' }, + }, ], resources: { foo: 'string' }, }, diff --git a/tests/api-resources/addressing/address-maps/accounts.test.ts b/tests/api-resources/addressing/address-maps/accounts.test.ts index a2a3c028a3..2da56ddb71 100644 --- a/tests/api-resources/addressing/address-maps/accounts.test.ts +++ b/tests/api-resources/addressing/address-maps/accounts.test.ts @@ -13,7 +13,10 @@ describe('resource accounts', () => { test('update: only required params', async () => { const responsePromise = client.addressing.addressMaps.accounts.update( '055817b111884e0227e1be16a0be6ee0', - { account_id: '258def64c72dae45f3e4c8516e2111f2', body: {} }, + { + account_id: '258def64c72dae45f3e4c8516e2111f2', + body: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/addressing/address-maps/ips.test.ts b/tests/api-resources/addressing/address-maps/ips.test.ts index 703d739d84..b9900b4d3e 100644 --- a/tests/api-resources/addressing/address-maps/ips.test.ts +++ b/tests/api-resources/addressing/address-maps/ips.test.ts @@ -14,7 +14,10 @@ describe('resource ips', () => { const responsePromise = client.addressing.addressMaps.ips.update( '055817b111884e0227e1be16a0be6ee0', '192.0.2.1', - { account_id: '258def64c72dae45f3e4c8516e2111f2', body: {} }, + { + account_id: '258def64c72dae45f3e4c8516e2111f2', + body: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,7 +32,10 @@ describe('resource ips', () => { const response = await client.addressing.addressMaps.ips.update( '055817b111884e0227e1be16a0be6ee0', '192.0.2.1', - { account_id: '258def64c72dae45f3e4c8516e2111f2', body: {} }, + { + account_id: '258def64c72dae45f3e4c8516e2111f2', + body: {}, + }, ); }); diff --git a/tests/api-resources/ai-gateway/ai-gateway.test.ts b/tests/api-resources/ai-gateway/ai-gateway.test.ts index a0485ffb38..460f7de032 100644 --- a/tests/api-resources/ai-gateway/ai-gateway.test.ts +++ b/tests/api-resources/ai-gateway/ai-gateway.test.ts @@ -79,13 +79,23 @@ describe('resource aiGateway', () => { rate_limiting_limit: 0, rate_limiting_technique: 'fixed', authentication: true, - dlp: { action: 'BLOCK', enabled: true, profiles: ['string'] }, + dlp: { + action: 'BLOCK', + enabled: true, + profiles: ['string'], + }, is_default: true, log_management: 10000, log_management_strategy: 'STOP_INSERTING', logpush: true, logpush_public_key: 'xxxxxxxxxxxxxxxx', - otel: [{ authorization: 'authorization', headers: { foo: 'string' }, url: 'url' }], + otel: [ + { + authorization: 'authorization', + headers: { foo: 'string' }, + url: 'url', + }, + ], store_id: 'store_id', stripe: { authorization: 'authorization', usage_events: [{ payload: 'payload' }] }, zdr: true, diff --git a/tests/api-resources/ai-gateway/datasets.test.ts b/tests/api-resources/ai-gateway/datasets.test.ts index e8c23e00a1..db483d4cfc 100644 --- a/tests/api-resources/ai-gateway/datasets.test.ts +++ b/tests/api-resources/ai-gateway/datasets.test.ts @@ -14,7 +14,13 @@ describe('resource datasets', () => { const responsePromise = client.aiGateway.datasets.create('my-gateway', { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', enable: true, - filters: [{ key: 'created_at', operator: 'eq', value: ['string'] }], + filters: [ + { + key: 'created_at', + operator: 'eq', + value: ['string'], + }, + ], name: 'name', }); const rawResponse = await responsePromise.asResponse(); @@ -30,7 +36,13 @@ describe('resource datasets', () => { const response = await client.aiGateway.datasets.create('my-gateway', { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', enable: true, - filters: [{ key: 'created_at', operator: 'eq', value: ['string'] }], + filters: [ + { + key: 'created_at', + operator: 'eq', + value: ['string'], + }, + ], name: 'name', }); }); @@ -39,7 +51,13 @@ describe('resource datasets', () => { const responsePromise = client.aiGateway.datasets.update('my-gateway', 'id', { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', enable: true, - filters: [{ key: 'created_at', operator: 'eq', value: ['string'] }], + filters: [ + { + key: 'created_at', + operator: 'eq', + value: ['string'], + }, + ], name: 'name', }); const rawResponse = await responsePromise.asResponse(); @@ -55,7 +73,13 @@ describe('resource datasets', () => { const response = await client.aiGateway.datasets.update('my-gateway', 'id', { account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', enable: true, - filters: [{ key: 'created_at', operator: 'eq', value: ['string'] }], + filters: [ + { + key: 'created_at', + operator: 'eq', + value: ['string'], + }, + ], name: 'name', }); }); diff --git a/tests/api-resources/ai-gateway/dynamic-routing.test.ts b/tests/api-resources/ai-gateway/dynamic-routing.test.ts new file mode 100644 index 0000000000..a369afbbf9 --- /dev/null +++ b/tests/api-resources/ai-gateway/dynamic-routing.test.ts @@ -0,0 +1,240 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource dynamicRouting', () => { + test('create: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.create('54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + elements: [ + { + id: 'id', + outputs: { next: { elementId: 'elementId' } }, + type: 'start', + }, + ], + name: 'name', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.create('54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + elements: [ + { + id: 'id', + outputs: { next: { elementId: 'elementId' } }, + type: 'start', + }, + ], + name: 'name', + }); + }); + + test('update: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.update('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + name: 'Route Name', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('update: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.update('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + name: 'Route Name', + }); + }); + + test('list: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.list('54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('list: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.list('54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.delete('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('delete: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.delete('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + }); + + test('createDeployment: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.createDeployment('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + comment: 'Route Deployment Comment', + version_id: '54442216', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('createDeployment: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.createDeployment('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + comment: 'Route Deployment Comment', + version_id: '54442216', + }); + }); + + test('createVersion: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.createVersion('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + comment: 'Route Version Comment', + elements: [ + { + id: 'id', + outputs: { next: { elementId: 'elementId' } }, + type: 'start', + }, + ], + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('createVersion: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.createVersion('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + comment: 'Route Version Comment', + elements: [ + { + id: 'id', + outputs: { next: { elementId: 'elementId' } }, + type: 'start', + }, + ], + }); + }); + + test('get: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.get('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('get: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.get('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + }); + + test('getVersion: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.getVersion('54442216', '54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('getVersion: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.getVersion('54442216', '54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + }); + + test('listDeployments: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.listDeployments('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('listDeployments: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.listDeployments('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + }); + + test('listVersions: only required params', async () => { + const responsePromise = client.aiGateway.dynamicRouting.listVersions('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('listVersions: required and optional params', async () => { + const response = await client.aiGateway.dynamicRouting.listVersions('54442216', '54442216', { + account_id: '0d37909e38d3e99c29fa2cd343ac421a', + }); + }); +}); diff --git a/tests/api-resources/ai-gateway/logs.test.ts b/tests/api-resources/ai-gateway/logs.test.ts index 33df78db1d..982eab448d 100644 --- a/tests/api-resources/ai-gateway/logs.test.ts +++ b/tests/api-resources/ai-gateway/logs.test.ts @@ -30,7 +30,13 @@ describe('resource logs', () => { direction: 'asc', end_date: '2019-12-27T18:11:19.117Z', feedback: 0, - filters: [{ key: 'id', operator: 'eq', value: ['string'] }], + filters: [ + { + key: 'id', + operator: 'eq', + value: ['string'], + }, + ], max_cost: 0, max_duration: 0, max_tokens_in: 0, @@ -73,7 +79,13 @@ describe('resource logs', () => { test('delete: required and optional params', async () => { const response = await client.aiGateway.logs.delete('my-gateway', { account_id: '0d37909e38d3e99c29fa2cd343ac421a', - filters: [{ key: 'id', operator: 'eq', value: ['string'] }], + filters: [ + { + key: 'id', + operator: 'eq', + value: ['string'], + }, + ], limit: 1, order_by: 'created_at', order_by_direction: 'asc', diff --git a/tests/api-resources/ai-gateway/provider-configs.test.ts b/tests/api-resources/ai-gateway/provider-configs.test.ts new file mode 100644 index 0000000000..42b53bc666 --- /dev/null +++ b/tests/api-resources/ai-gateway/provider-configs.test.ts @@ -0,0 +1,64 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource providerConfigs', () => { + test('create: only required params', async () => { + const responsePromise = client.aiGateway.providerConfigs.create('my-gateway', { + account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', + alias: 'alias', + default_config: true, + provider_slug: 'provider_slug', + secret: 'secret', + secret_id: 'secret_id', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await client.aiGateway.providerConfigs.create('my-gateway', { + account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', + alias: 'alias', + default_config: true, + provider_slug: 'provider_slug', + secret: 'secret', + secret_id: 'secret_id', + rate_limit: 0, + rate_limit_period: 0, + }); + }); + + test('list: only required params', async () => { + const responsePromise = client.aiGateway.providerConfigs.list('my-gateway', { + account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('list: required and optional params', async () => { + const response = await client.aiGateway.providerConfigs.list('my-gateway', { + account_id: '3ebbcb006d4d46d7bb6a8c7f14676cb0', + page: 1, + per_page: 1, + }); + }); +}); diff --git a/tests/api-resources/aisearch/instances/instances.test.ts b/tests/api-resources/aisearch/instances/instances.test.ts index 1e2fbf0cdb..68e18112a5 100644 --- a/tests/api-resources/aisearch/instances/instances.test.ts +++ b/tests/api-resources/aisearch/instances/instances.test.ts @@ -15,7 +15,6 @@ describe('resource instances', () => { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', id: 'my-ai-search', source: 'source', - token_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', type: 'r2', }); const rawResponse = await responsePromise.asResponse(); @@ -32,14 +31,13 @@ describe('resource instances', () => { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', id: 'my-ai-search', source: 'source', - token_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', type: 'r2', ai_gateway_id: 'ai_gateway_id', ai_search_model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast', chunk: true, chunk_overlap: 0, chunk_size: 64, - embedding_model: '@cf/baai/bge-m3', + embedding_model: '@cf/qwen/qwen3-embedding-0.6b', hybrid_search_enabled: true, max_num_results: 1, metadata: { created_from_aisearch_wizard: true, worker_domain: 'worker_domain' }, @@ -48,7 +46,11 @@ describe('resource instances', () => { chat_completions_endpoint: { disabled: true }, enabled: true, mcp: { disabled: true }, - rate_limit: { period_ms: 60000, requests: 1, technique: 'fixed' }, + rate_limit: { + period_ms: 60000, + requests: 1, + technique: 'fixed', + }, search_endpoint: { disabled: true }, }, reranking: true, @@ -57,20 +59,26 @@ describe('resource instances', () => { rewrite_query: true, score_threshold: 0, source_params: { - exclude_items: ['/admin/*', '/private/**', '*\\temp\\*'], - include_items: ['/blog/*', '/docs/**/*.html', '*\\blog\\*.html'], + exclude_items: ['/admin/**', '/private/**', '**\\temp\\**'], + include_items: ['/blog/**', '/docs/**/*.html', '**\\blog\\**.html'], prefix: 'prefix', r2_jurisdiction: 'r2_jurisdiction', web_crawler: { parse_options: { include_headers: { foo: 'string' }, include_images: true, + specific_sitemaps: ['https://example.com/sitemap.xml', 'https://example.com/blog-sitemap.xml'], use_browser_rendering: true, }, parse_type: 'sitemap', - store_options: { storage_id: 'storage_id', r2_jurisdiction: 'r2_jurisdiction', storage_type: 'r2' }, + store_options: { + storage_id: 'storage_id', + r2_jurisdiction: 'r2_jurisdiction', + storage_type: 'r2', + }, }, }, + token_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }); }); @@ -97,7 +105,7 @@ describe('resource instances', () => { chunk: true, chunk_overlap: 0, chunk_size: 64, - embedding_model: '@cf/baai/bge-m3', + embedding_model: '@cf/qwen/qwen3-embedding-0.6b', hybrid_search_enabled: true, max_num_results: 1, metadata: { created_from_aisearch_wizard: true, worker_domain: 'worker_domain' }, @@ -107,7 +115,11 @@ describe('resource instances', () => { chat_completions_endpoint: { disabled: true }, enabled: true, mcp: { disabled: true }, - rate_limit: { period_ms: 60000, requests: 1, technique: 'fixed' }, + rate_limit: { + period_ms: 60000, + requests: 1, + technique: 'fixed', + }, search_endpoint: { disabled: true }, }, reranking: true, @@ -116,18 +128,23 @@ describe('resource instances', () => { rewrite_query: true, score_threshold: 0, source_params: { - exclude_items: ['/admin/*', '/private/**', '*\\temp\\*'], - include_items: ['/blog/*', '/docs/**/*.html', '*\\blog\\*.html'], + exclude_items: ['/admin/**', '/private/**', '**\\temp\\**'], + include_items: ['/blog/**', '/docs/**/*.html', '**\\blog\\**.html'], prefix: 'prefix', r2_jurisdiction: 'r2_jurisdiction', web_crawler: { parse_options: { include_headers: { foo: 'string' }, include_images: true, + specific_sitemaps: ['https://example.com/sitemap.xml', 'https://example.com/blog-sitemap.xml'], use_browser_rendering: true, }, parse_type: 'sitemap', - store_options: { storage_id: 'storage_id', r2_jurisdiction: 'r2_jurisdiction', storage_type: 'r2' }, + store_options: { + storage_id: 'storage_id', + r2_jurisdiction: 'r2_jurisdiction', + storage_type: 'r2', + }, }, }, summarization: true, @@ -180,6 +197,52 @@ describe('resource instances', () => { }); }); + test('chatCompletions: only required params', async () => { + const responsePromise = client.aiSearch.instances.chatCompletions('my-ai-search', { + account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', + messages: [{ content: 'content', role: 'system' }], + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('chatCompletions: required and optional params', async () => { + const response = await client.aiSearch.instances.chatCompletions('my-ai-search', { + account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', + messages: [{ content: 'content', role: 'system' }], + ai_search_options: { + query_rewrite: { + enabled: true, + model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast', + rewrite_prompt: 'rewrite_prompt', + }, + reranking: { + enabled: true, + match_threshold: 0, + model: '@cf/baai/bge-reranker-base', + }, + retrieval: { + context_expansion: 0, + filters: { + key: 'key', + type: 'eq', + value: 'string', + }, + match_threshold: 0, + max_num_results: 1, + retrieval_type: 'vector', + }, + }, + model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast', + stream: true, + }); + }); + test('read: only required params', async () => { const responsePromise = client.aiSearch.instances.read('my-ai-search', { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', @@ -199,6 +262,50 @@ describe('resource instances', () => { }); }); + test('search: only required params', async () => { + const responsePromise = client.aiSearch.instances.search('my-ai-search', { + account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', + messages: [{ content: 'content', role: 'system' }], + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('search: required and optional params', async () => { + const response = await client.aiSearch.instances.search('my-ai-search', { + account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', + messages: [{ content: 'content', role: 'system' }], + ai_search_options: { + query_rewrite: { + enabled: true, + model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast', + rewrite_prompt: 'rewrite_prompt', + }, + reranking: { + enabled: true, + match_threshold: 0, + model: '@cf/baai/bge-reranker-base', + }, + retrieval: { + context_expansion: 0, + filters: { + key: 'key', + type: 'eq', + value: 'string', + }, + match_threshold: 0, + max_num_results: 1, + retrieval_type: 'vector', + }, + }, + }); + }); + test('stats: only required params', async () => { const responsePromise = client.aiSearch.instances.stats('my-ai-search', { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22', diff --git a/tests/api-resources/api-gateway/discovery/operations.test.ts b/tests/api-resources/api-gateway/discovery/operations.test.ts index efb0f604be..f1de475ff3 100644 --- a/tests/api-resources/api-gateway/discovery/operations.test.ts +++ b/tests/api-resources/api-gateway/discovery/operations.test.ts @@ -42,7 +42,10 @@ describe('resource operations', () => { test('bulkEdit: only required params', async () => { const responsePromise = client.apiGateway.discovery.operations.bulkEdit({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: { '3818d821-5901-4147-a474-f5f5aec1d54e': {}, 'b17c8043-99a0-4202-b7d9-8f7cdbee02cd': {} }, + body: { + '3818d821-5901-4147-a474-f5f5aec1d54e': {}, + 'b17c8043-99a0-4202-b7d9-8f7cdbee02cd': {}, + }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/api-gateway/operations/operations.test.ts b/tests/api-resources/api-gateway/operations/operations.test.ts index 210df87d23..b2f1def391 100644 --- a/tests/api-resources/api-gateway/operations/operations.test.ts +++ b/tests/api-resources/api-gateway/operations/operations.test.ts @@ -84,7 +84,13 @@ describe('resource operations', () => { test('bulkCreate: only required params', async () => { const responsePromise = client.apiGateway.operations.bulkCreate({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: [{ endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }], + body: [ + { + endpoint: '/api/v1/users/{var1}', + host: 'www.example.com', + method: 'GET', + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -98,7 +104,13 @@ describe('resource operations', () => { test('bulkCreate: required and optional params', async () => { const response = await client.apiGateway.operations.bulkCreate({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: [{ endpoint: '/api/v1/users/{var1}', host: 'www.example.com', method: 'GET' }], + body: [ + { + endpoint: '/api/v1/users/{var1}', + host: 'www.example.com', + method: 'GET', + }, + ], }); }); diff --git a/tests/api-resources/browser-rendering/content.test.ts b/tests/api-resources/browser-rendering/content.test.ts index dc8dd3d416..661b19afdb 100644 --- a/tests/api-resources/browser-rendering/content.test.ts +++ b/tests/api-resources/browser-rendering/content.test.ts @@ -30,7 +30,14 @@ describe('resource content', () => { url: 'https://example.com/', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -74,7 +81,12 @@ describe('resource content', () => { isLandscape: true, isMobile: true, }, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/browser-rendering/json.test.ts b/tests/api-resources/browser-rendering/json.test.ts index 14d9a4a84a..502e358f59 100644 --- a/tests/api-resources/browser-rendering/json.test.ts +++ b/tests/api-resources/browser-rendering/json.test.ts @@ -30,7 +30,14 @@ describe('resource json', () => { html: '

Hello World!

', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -65,7 +72,10 @@ describe('resource json', () => { prompt: 'prompt', rejectRequestPattern: ['string'], rejectResourceTypes: ['document'], - response_format: { type: 'type', json_schema: { foo: 'string' } }, + response_format: { + type: 'type', + json_schema: { foo: 'string' }, + }, setExtraHTTPHeaders: { foo: 'string' }, setJavaScriptEnabled: true, userAgent: 'userAgent', @@ -77,7 +87,12 @@ describe('resource json', () => { isLandscape: true, isMobile: true, }, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/browser-rendering/links.test.ts b/tests/api-resources/browser-rendering/links.test.ts index d683679af5..db6ff3d198 100644 --- a/tests/api-resources/browser-rendering/links.test.ts +++ b/tests/api-resources/browser-rendering/links.test.ts @@ -30,7 +30,14 @@ describe('resource links', () => { html: '

Hello World!

', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -76,7 +83,12 @@ describe('resource links', () => { isMobile: true, }, visibleLinksOnly: true, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/browser-rendering/markdown.test.ts b/tests/api-resources/browser-rendering/markdown.test.ts index d62ca1fe6e..0db617e9d5 100644 --- a/tests/api-resources/browser-rendering/markdown.test.ts +++ b/tests/api-resources/browser-rendering/markdown.test.ts @@ -30,7 +30,14 @@ describe('resource markdown', () => { url: 'https://example.com/', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -74,7 +81,12 @@ describe('resource markdown', () => { isLandscape: true, isMobile: true, }, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/browser-rendering/pdf.test.ts b/tests/api-resources/browser-rendering/pdf.test.ts index 033ca410d4..b0c1818e82 100644 --- a/tests/api-resources/browser-rendering/pdf.test.ts +++ b/tests/api-resources/browser-rendering/pdf.test.ts @@ -15,7 +15,14 @@ describe('resource pdf', () => { html: '

Hello World!

', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -53,7 +60,12 @@ describe('resource pdf', () => { headerTemplate: 'headerTemplate', height: 'string', landscape: true, - margin: { bottom: 'string', left: 'string', right: 'string', top: 'string' }, + margin: { + bottom: 'string', + left: 'string', + right: 'string', + top: 'string', + }, omitBackground: true, outline: true, pageRanges: 'pageRanges', @@ -77,7 +89,12 @@ describe('resource pdf', () => { isLandscape: true, isMobile: true, }, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/browser-rendering/scrape.test.ts b/tests/api-resources/browser-rendering/scrape.test.ts index d9152bd88b..a2bdca327a 100644 --- a/tests/api-resources/browser-rendering/scrape.test.ts +++ b/tests/api-resources/browser-rendering/scrape.test.ts @@ -32,7 +32,14 @@ describe('resource scrape', () => { html: '

Hello World!

', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -76,7 +83,12 @@ describe('resource scrape', () => { isLandscape: true, isMobile: true, }, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/browser-rendering/screenshot.test.ts b/tests/api-resources/browser-rendering/screenshot.test.ts index 775221803a..94287f025c 100644 --- a/tests/api-resources/browser-rendering/screenshot.test.ts +++ b/tests/api-resources/browser-rendering/screenshot.test.ts @@ -30,7 +30,14 @@ describe('resource screenshot', () => { html: '

Hello World!

', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -65,7 +72,13 @@ describe('resource screenshot', () => { rejectResourceTypes: ['document'], screenshotOptions: { captureBeyondViewport: true, - clip: { height: 0, width: 0, x: 0, y: 0, scale: 0 }, + clip: { + height: 0, + width: 0, + x: 0, + y: 0, + scale: 0, + }, encoding: 'binary', fromSurface: true, fullPage: true, @@ -87,7 +100,12 @@ describe('resource screenshot', () => { isLandscape: true, isMobile: true, }, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/browser-rendering/snapshot.test.ts b/tests/api-resources/browser-rendering/snapshot.test.ts index 748ae2ebbf..ab41742152 100644 --- a/tests/api-resources/browser-rendering/snapshot.test.ts +++ b/tests/api-resources/browser-rendering/snapshot.test.ts @@ -30,7 +30,14 @@ describe('resource snapshot', () => { html: '

Hello World!

', cacheTTL: 86400, actionTimeout: 120000, - addScriptTag: [{ id: 'id', content: 'content', type: 'type', url: 'url' }], + addScriptTag: [ + { + id: 'id', + content: 'content', + type: 'type', + url: 'url', + }, + ], addStyleTag: [{ content: 'content', url: 'url' }], allowRequestPattern: ['string'], allowResourceTypes: ['document'], @@ -65,7 +72,13 @@ describe('resource snapshot', () => { rejectResourceTypes: ['document'], screenshotOptions: { captureBeyondViewport: true, - clip: { height: 0, width: 0, x: 0, y: 0, scale: 0 }, + clip: { + height: 0, + width: 0, + x: 0, + y: 0, + scale: 0, + }, fromSurface: true, fullPage: true, omitBackground: true, @@ -84,7 +97,12 @@ describe('resource snapshot', () => { isLandscape: true, isMobile: true, }, - waitForSelector: { selector: 'selector', hidden: true, timeout: 120000, visible: true }, + waitForSelector: { + selector: 'selector', + hidden: true, + timeout: 120000, + visible: true, + }, waitForTimeout: 120000, }); }); diff --git a/tests/api-resources/cloudforce-one/requests/assets.test.ts b/tests/api-resources/cloudforce-one/requests/assets.test.ts index 13c576c4d7..788b2698c0 100644 --- a/tests/api-resources/cloudforce-one/requests/assets.test.ts +++ b/tests/api-resources/cloudforce-one/requests/assets.test.ts @@ -13,7 +13,11 @@ describe('resource assets', () => { test('create: only required params', async () => { const responsePromise = client.cloudforceOne.requests.assets.create( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', page: 0, per_page: 10 }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + page: 0, + per_page: 10, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -27,7 +31,11 @@ describe('resource assets', () => { test('create: required and optional params', async () => { const response = await client.cloudforceOne.requests.assets.create( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', page: 0, per_page: 10 }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + page: 0, + per_page: 10, + }, ); }); diff --git a/tests/api-resources/cloudforce-one/requests/message.test.ts b/tests/api-resources/cloudforce-one/requests/message.test.ts index e21a989518..4a598ac74a 100644 --- a/tests/api-resources/cloudforce-one/requests/message.test.ts +++ b/tests/api-resources/cloudforce-one/requests/message.test.ts @@ -86,7 +86,11 @@ describe('resource message', () => { test('get: only required params', async () => { const responsePromise = client.cloudforceOne.requests.message.get( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', page: 0, per_page: 10 }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + page: 0, + per_page: 10, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/cloudforce-one/threat-events/datasets/datasets.test.ts b/tests/api-resources/cloudforce-one/threat-events/datasets/datasets.test.ts index 450fb9c3e6..584fef9b97 100644 --- a/tests/api-resources/cloudforce-one/threat-events/datasets/datasets.test.ts +++ b/tests/api-resources/cloudforce-one/threat-events/datasets/datasets.test.ts @@ -56,7 +56,11 @@ describe('resource datasets', () => { test.skip('edit: only required params', async () => { const responsePromise = client.cloudforceOne.threatEvents.datasets.edit( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { account_id: 'account_id', isPublic: true, name: 'x' }, + { + account_id: 'account_id', + isPublic: true, + name: 'x', + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -71,7 +75,11 @@ describe('resource datasets', () => { test.skip('edit: required and optional params', async () => { const response = await client.cloudforceOne.threatEvents.datasets.edit( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { account_id: 'account_id', isPublic: true, name: 'x' }, + { + account_id: 'account_id', + isPublic: true, + name: 'x', + }, ); }); diff --git a/tests/api-resources/cloudforce-one/threat-events/threat-events.test.ts b/tests/api-resources/cloudforce-one/threat-events/threat-events.test.ts index e5b42f8e41..11fb9704a5 100644 --- a/tests/api-resources/cloudforce-one/threat-events/threat-events.test.ts +++ b/tests/api-resources/cloudforce-one/threat-events/threat-events.test.ts @@ -36,7 +36,11 @@ describe('resource threatEvents', () => { category: 'Domain Resolution', date: '2022-04-01T00:00:00Z', event: 'An attacker registered the domain domain.com', - raw: { data: { foo: 'bar' }, source: 'example.com', tlp: 'amber' }, + raw: { + data: { foo: 'bar' }, + source: 'example.com', + tlp: 'amber', + }, tlp: 'amber', accountId: 123456, attacker: 'Flying Yeti', @@ -49,7 +53,6 @@ describe('resource threatEvents', () => { tags: ['malware'], targetCountry: 'US', targetIndustry: 'Agriculture', - uuid: '12345678-1234-1234-1234-1234567890ab', }); }); @@ -69,6 +72,8 @@ describe('resource threatEvents', () => { test.skip('list: required and optional params', async () => { const response = await client.cloudforceOne.threatEvents.list({ account_id: 'account_id', + cursor: + 'eyJ2ZXJzaW9uIjoxLCJwb3NpdGlvbiI6eyJkYXRlIjoiMjAyNC0wMS0xMlQxMDowMDowMFoiLCJ1dWlkIjoiYWJjMTIzIn19', datasetId: ['string'], forceRefresh: true, format: 'json', @@ -76,7 +81,13 @@ describe('resource threatEvents', () => { orderBy: 'orderBy', page: 0, pageSize: 0, - search: [{ field: 'attackerCountry', op: 'equals', value: 'usa' }], + search: [ + { + field: 'attackerCountry', + op: 'equals', + value: 'usa', + }, + ], }); }); @@ -132,7 +143,11 @@ describe('resource threatEvents', () => { category: 'Domain Resolution', date: '2022-04-01T00:00:00Z', event: 'An attacker registered the domain domain.com', - raw: { data: { foo: 'bar' }, source: 'example.com', tlp: 'amber' }, + raw: { + data: { foo: 'bar' }, + source: 'example.com', + tlp: 'amber', + }, tlp: 'amber', accountId: 123456, attacker: 'Flying Yeti', @@ -145,11 +160,10 @@ describe('resource threatEvents', () => { tags: ['malware'], targetCountry: 'US', targetIndustry: 'Agriculture', - uuid: '12345678-1234-1234-1234-1234567890ab', }, ], datasetId: 'durableObjectName', - preserveUuid: true, + includeCreatedEvents: true, }); }); @@ -179,7 +193,11 @@ describe('resource threatEvents', () => { indicator: 'domain2.com', indicatorType: 'domain', insight: 'new insight', - raw: { data: { foo: 'bar' }, source: 'example.com', tlp: 'amber' }, + raw: { + data: { foo: 'bar' }, + source: 'example.com', + tlp: 'amber', + }, targetCountry: 'US', targetIndustry: 'Insurance', tlp: 'amber', diff --git a/tests/api-resources/connectivity/directory/services.test.ts b/tests/api-resources/connectivity/directory/services.test.ts index e38b4d558e..eeada4ca77 100644 --- a/tests/api-resources/connectivity/directory/services.test.ts +++ b/tests/api-resources/connectivity/directory/services.test.ts @@ -48,7 +48,10 @@ describe('resource services', () => { '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', - host: { ipv4: '10.0.0.1', network: { tunnel_id: '0191dce4-9ab4-7fce-b660-8e5dec5172da' } }, + host: { + ipv4: '10.0.0.1', + network: { tunnel_id: '0191dce4-9ab4-7fce-b660-8e5dec5172da' }, + }, name: 'web-app', type: 'http', }, @@ -67,7 +70,10 @@ describe('resource services', () => { '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', - host: { ipv4: '10.0.0.1', network: { tunnel_id: '0191dce4-9ab4-7fce-b660-8e5dec5172da' } }, + host: { + ipv4: '10.0.0.1', + network: { tunnel_id: '0191dce4-9ab4-7fce-b660-8e5dec5172da' }, + }, name: 'web-app', type: 'http', http_port: 8080, diff --git a/tests/api-resources/custom-certificates/custom-certificates.test.ts b/tests/api-resources/custom-certificates/custom-certificates.test.ts index b72ebb0988..fde104a48b 100644 --- a/tests/api-resources/custom-certificates/custom-certificates.test.ts +++ b/tests/api-resources/custom-certificates/custom-certificates.test.ts @@ -98,12 +98,6 @@ describe('resource customCertificates', () => { const response = await client.customCertificates.edit('023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', bundle_method: 'ubiquitous', - certificate: - '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n', - geo_restrictions: { label: 'us' }, - policy: '(country: US) or (region: EU)', - private_key: - '-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n', }); }); diff --git a/tests/api-resources/d1/database/database.test.ts b/tests/api-resources/d1/database/database.test.ts index ce8077424c..979c4446c3 100644 --- a/tests/api-resources/d1/database/database.test.ts +++ b/tests/api-resources/d1/database/database.test.ts @@ -132,7 +132,11 @@ describe('resource database', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', output_format: 'polling', current_bookmark: 'current_bookmark', - dump_options: { no_data: true, no_schema: true, tables: ['string'] }, + dump_options: { + no_data: true, + no_schema: true, + tables: ['string'], + }, }); }); diff --git a/tests/api-resources/diagnostics/endpoint-healthchecks.test.ts b/tests/api-resources/diagnostics/endpoint-healthchecks.test.ts index 0f501fea66..bc4c46903b 100644 --- a/tests/api-resources/diagnostics/endpoint-healthchecks.test.ts +++ b/tests/api-resources/diagnostics/endpoint-healthchecks.test.ts @@ -37,7 +37,11 @@ describe('resource endpointHealthchecks', () => { test('update: only required params', async () => { const responsePromise = client.diagnostics.endpointHealthchecks.update( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', check_type: 'icmp', endpoint: '203.0.113.1' }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + check_type: 'icmp', + endpoint: '203.0.113.1', + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/diagnostics/traceroutes.test.ts b/tests/api-resources/diagnostics/traceroutes.test.ts index 0c3b153b25..bf8e431421 100644 --- a/tests/api-resources/diagnostics/traceroutes.test.ts +++ b/tests/api-resources/diagnostics/traceroutes.test.ts @@ -29,7 +29,13 @@ describe('resource traceroutes', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', targets: ['203.0.113.1', 'cloudflare.com'], colos: ['den', 'sin'], - options: { max_ttl: 15, packet_type: 'icmp', packets_per_ttl: 0, port: 0, wait_time: 1 }, + options: { + max_ttl: 15, + packet_type: 'icmp', + packets_per_ttl: 0, + port: 0, + wait_time: 1, + }, }); }); }); diff --git a/tests/api-resources/dns/records.test.ts b/tests/api-resources/dns/records.test.ts index cc5f0d5d14..54ef0d0c93 100644 --- a/tests/api-resources/dns/records.test.ts +++ b/tests/api-resources/dns/records.test.ts @@ -98,7 +98,12 @@ describe('resource records', () => { present: 'present', startswith: 'Hello, w', }, - content: { contains: '7.0.0.', endswith: '.0.1', exact: '127.0.0.1', startswith: '127.0.' }, + content: { + contains: '7.0.0.', + endswith: '.0.1', + exact: '127.0.0.1', + startswith: '127.0.', + }, direction: 'asc', match: 'any', name: { @@ -309,7 +314,10 @@ describe('resource records', () => { }); test('scan: required and optional params', async () => { - const response = await client.dns.records.scan({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', body: {} }); + const response = await client.dns.records.scan({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + body: {}, + }); }); test('scanList: only required params', async () => { diff --git a/tests/api-resources/dns/settings/account/views.test.ts b/tests/api-resources/dns/settings/account/views.test.ts index 7ff1790569..7dc29c0a00 100644 --- a/tests/api-resources/dns/settings/account/views.test.ts +++ b/tests/api-resources/dns/settings/account/views.test.ts @@ -53,7 +53,12 @@ describe('resource views', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', direction: 'asc', match: 'any', - name: { contains: 'view', endswith: 'ew', exact: 'my view', startswith: 'my' }, + name: { + contains: 'view', + endswith: 'ew', + exact: 'my view', + startswith: 'my', + }, order: 'name', page: 1, per_page: 5, diff --git a/tests/api-resources/email-routing/rules/rules.test.ts b/tests/api-resources/email-routing/rules/rules.test.ts index 0d7c2269ac..275a861d4b 100644 --- a/tests/api-resources/email-routing/rules/rules.test.ts +++ b/tests/api-resources/email-routing/rules/rules.test.ts @@ -29,7 +29,13 @@ describe('resource rules', () => { const response = await client.emailRouting.rules.create({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', actions: [{ type: 'forward', value: ['destinationaddress@example.net'] }], - matchers: [{ type: 'literal', field: 'to', value: 'test@example.com' }], + matchers: [ + { + type: 'literal', + field: 'to', + value: 'test@example.com', + }, + ], enabled: true, name: 'Send to user@example.net rule.', priority: 0, @@ -55,7 +61,13 @@ describe('resource rules', () => { const response = await client.emailRouting.rules.update('a7e6fb77503c41d8a7f3113c6918f10c', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', actions: [{ type: 'forward', value: ['destinationaddress@example.net'] }], - matchers: [{ type: 'literal', field: 'to', value: 'test@example.com' }], + matchers: [ + { + type: 'literal', + field: 'to', + value: 'test@example.com', + }, + ], enabled: true, name: 'Send to user@example.net rule.', priority: 0, diff --git a/tests/api-resources/email-security/investigate/move.test.ts b/tests/api-resources/email-security/investigate/move.test.ts index bcc4da09cf..4406046174 100644 --- a/tests/api-resources/email-security/investigate/move.test.ts +++ b/tests/api-resources/email-security/investigate/move.test.ts @@ -35,7 +35,6 @@ describe('resource move', () => { const responsePromise = client.emailSecurity.investigate.move.bulk({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', destination: 'Inbox', - postfix_ids: ['4Njp3P0STMz2c02Q'], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -50,6 +49,7 @@ describe('resource move', () => { const response = await client.emailSecurity.investigate.move.bulk({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', destination: 'Inbox', + ids: ['string'], postfix_ids: ['4Njp3P0STMz2c02Q'], }); }); diff --git a/tests/api-resources/fraud.test.ts b/tests/api-resources/fraud.test.ts new file mode 100644 index 0000000000..b5d729887f --- /dev/null +++ b/tests/api-resources/fraud.test.ts @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource fraud', () => { + test('update: only required params', async () => { + const responsePromise = client.fraud.update({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('update: required and optional params', async () => { + const response = await client.fraud.update({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + user_profiles: 'disabled', + username_expressions: ['string'], + }); + }); + + test('get: only required params', async () => { + const responsePromise = client.fraud.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('get: required and optional params', async () => { + const response = await client.fraud.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); + }); +}); diff --git a/tests/api-resources/hyperdrive/configs.test.ts b/tests/api-resources/hyperdrive/configs.test.ts index 846fae447d..fb36aaaef5 100644 --- a/tests/api-resources/hyperdrive/configs.test.ts +++ b/tests/api-resources/hyperdrive/configs.test.ts @@ -163,7 +163,12 @@ describe('resource configs', () => { sslmode: 'verify-full', }, name: 'example-hyperdrive', - origin: { database: 'postgres', password: 'password', scheme: 'postgres', user: 'postgres' }, + origin: { + database: 'postgres', + password: 'password', + scheme: 'postgres', + user: 'postgres', + }, origin_connection_limit: 60, }); }); diff --git a/tests/api-resources/images/v1/variants.test.ts b/tests/api-resources/images/v1/variants.test.ts index 50a1c3bc03..895f3bc6b6 100644 --- a/tests/api-resources/images/v1/variants.test.ts +++ b/tests/api-resources/images/v1/variants.test.ts @@ -14,7 +14,12 @@ describe('resource variants', () => { const responsePromise = client.images.v1.variants.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'hero', - options: { fit: 'scale-down', height: 768, metadata: 'none', width: 1366 }, + options: { + fit: 'scale-down', + height: 768, + metadata: 'none', + width: 1366, + }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,7 +34,12 @@ describe('resource variants', () => { const response = await client.images.v1.variants.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'hero', - options: { fit: 'scale-down', height: 768, metadata: 'none', width: 1366 }, + options: { + fit: 'scale-down', + height: 768, + metadata: 'none', + width: 1366, + }, neverRequireSignedURLs: true, }); }); @@ -73,7 +83,12 @@ describe('resource variants', () => { test('edit: only required params', async () => { const responsePromise = client.images.v1.variants.edit('hero', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - options: { fit: 'scale-down', height: 768, metadata: 'none', width: 1366 }, + options: { + fit: 'scale-down', + height: 768, + metadata: 'none', + width: 1366, + }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -87,7 +102,12 @@ describe('resource variants', () => { test('edit: required and optional params', async () => { const response = await client.images.v1.variants.edit('hero', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - options: { fit: 'scale-down', height: 768, metadata: 'none', width: 1366 }, + options: { + fit: 'scale-down', + height: 768, + metadata: 'none', + width: 1366, + }, neverRequireSignedURLs: true, }); }); diff --git a/tests/api-resources/images/v2/v2.test.ts b/tests/api-resources/images/v2/v2.test.ts index f024297c79..b6b16da9c6 100644 --- a/tests/api-resources/images/v2/v2.test.ts +++ b/tests/api-resources/images/v2/v2.test.ts @@ -26,6 +26,7 @@ describe('resource v2', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', continuation_token: 'continuation_token', creator: 'creator', + meta: { '[]': '[]' }, per_page: 10, sort_order: 'asc', }); diff --git a/tests/api-resources/intel/ip-lists.test.ts b/tests/api-resources/intel/ip-lists.test.ts deleted file mode 100644 index 25f4e35796..0000000000 --- a/tests/api-resources/intel/ip-lists.test.ts +++ /dev/null @@ -1,27 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Cloudflare from 'cloudflare'; -import { Response } from 'node-fetch'; - -const client = new Cloudflare({ - apiKey: '144c9defac04969c7bfad8efaa8ea194', - apiEmail: 'user@example.com', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource ipLists', () => { - test('get: only required params', async () => { - const responsePromise = client.intel.ipLists.get({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' }); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - test('get: required and optional params', async () => { - const response = await client.intel.ipLists.get({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' }); - }); -}); diff --git a/tests/api-resources/load-balancers/monitor-groups.test.ts b/tests/api-resources/load-balancers/monitor-groups.test.ts index 01d9ebeff3..f987edb7db 100644 --- a/tests/api-resources/load-balancers/monitor-groups.test.ts +++ b/tests/api-resources/load-balancers/monitor-groups.test.ts @@ -15,7 +15,14 @@ describe('resource monitorGroups', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'id', description: 'Primary datacenter monitors', - members: [{ enabled: true, monitor_id: 'monitor_id', monitoring_only: false, must_be_healthy: true }], + members: [ + { + enabled: true, + monitor_id: 'monitor_id', + monitoring_only: false, + must_be_healthy: true, + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -31,7 +38,14 @@ describe('resource monitorGroups', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'id', description: 'Primary datacenter monitors', - members: [{ enabled: true, monitor_id: 'monitor_id', monitoring_only: false, must_be_healthy: true }], + members: [ + { + enabled: true, + monitor_id: 'monitor_id', + monitoring_only: false, + must_be_healthy: true, + }, + ], }); }); @@ -40,7 +54,14 @@ describe('resource monitorGroups', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'id', description: 'Primary datacenter monitors', - members: [{ enabled: true, monitor_id: 'monitor_id', monitoring_only: false, must_be_healthy: true }], + members: [ + { + enabled: true, + monitor_id: 'monitor_id', + monitoring_only: false, + must_be_healthy: true, + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -56,7 +77,14 @@ describe('resource monitorGroups', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'id', description: 'Primary datacenter monitors', - members: [{ enabled: true, monitor_id: 'monitor_id', monitoring_only: false, must_be_healthy: true }], + members: [ + { + enabled: true, + monitor_id: 'monitor_id', + monitoring_only: false, + must_be_healthy: true, + }, + ], }); }); @@ -103,7 +131,14 @@ describe('resource monitorGroups', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'id', description: 'Primary datacenter monitors', - members: [{ enabled: true, monitor_id: 'monitor_id', monitoring_only: false, must_be_healthy: true }], + members: [ + { + enabled: true, + monitor_id: 'monitor_id', + monitoring_only: false, + must_be_healthy: true, + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -119,7 +154,14 @@ describe('resource monitorGroups', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'id', description: 'Primary datacenter monitors', - members: [{ enabled: true, monitor_id: 'monitor_id', monitoring_only: false, must_be_healthy: true }], + members: [ + { + enabled: true, + monitor_id: 'monitor_id', + monitoring_only: false, + must_be_healthy: true, + }, + ], }); }); diff --git a/tests/api-resources/magic-cloud-networking/on-ramps/on-ramps.test.ts b/tests/api-resources/magic-cloud-networking/on-ramps/on-ramps.test.ts index 4668a9492d..7fe3a4766b 100644 --- a/tests/api-resources/magic-cloud-networking/on-ramps/on-ramps.test.ts +++ b/tests/api-resources/magic-cloud-networking/on-ramps/on-ramps.test.ts @@ -122,7 +122,11 @@ describe('resource onRamps', () => { test('delete: required and optional params', async () => { const response = await client.magicCloudNetworking.onRamps.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { account_id: 'account_id', destroy: true, force: true }, + { + account_id: 'account_id', + destroy: true, + force: true, + }, ); }); diff --git a/tests/api-resources/magic-network-monitoring/configs/configs.test.ts b/tests/api-resources/magic-network-monitoring/configs/configs.test.ts index d8491914f4..9cd29c2178 100644 --- a/tests/api-resources/magic-network-monitoring/configs/configs.test.ts +++ b/tests/api-resources/magic-network-monitoring/configs/configs.test.ts @@ -32,7 +32,11 @@ describe('resource configs', () => { name: "cloudflare user's account", router_ips: ['203.0.113.1'], warp_devices: [ - { id: '5360368d-b351-4791-abe1-93550dabd351', name: 'My warp device', router_ip: '203.0.113.1' }, + { + id: '5360368d-b351-4791-abe1-93550dabd351', + name: 'My warp device', + router_ip: '203.0.113.1', + }, ], }); }); @@ -59,7 +63,11 @@ describe('resource configs', () => { name: "cloudflare user's account", router_ips: ['203.0.113.1'], warp_devices: [ - { id: '5360368d-b351-4791-abe1-93550dabd351', name: 'My warp device', router_ip: '203.0.113.1' }, + { + id: '5360368d-b351-4791-abe1-93550dabd351', + name: 'My warp device', + router_ip: '203.0.113.1', + }, ], }); }); @@ -103,7 +111,11 @@ describe('resource configs', () => { name: "cloudflare user's account", router_ips: ['203.0.113.1'], warp_devices: [ - { id: '5360368d-b351-4791-abe1-93550dabd351', name: 'My warp device', router_ip: '203.0.113.1' }, + { + id: '5360368d-b351-4791-abe1-93550dabd351', + name: 'My warp device', + router_ip: '203.0.113.1', + }, ], }); }); diff --git a/tests/api-resources/magic-network-monitoring/rules/advertisements.test.ts b/tests/api-resources/magic-network-monitoring/rules/advertisements.test.ts index 09ae871307..610ea11c06 100644 --- a/tests/api-resources/magic-network-monitoring/rules/advertisements.test.ts +++ b/tests/api-resources/magic-network-monitoring/rules/advertisements.test.ts @@ -13,7 +13,10 @@ describe('resource advertisements', () => { test('edit: only required params', async () => { const responsePromise = client.magicNetworkMonitoring.rules.advertisements.edit( '2890e6fa406311ed9b5a23f70f6fb8cf', - { account_id: '6f91088a406011ed95aed352566e8d4c', body: {} }, + { + account_id: '6f91088a406011ed95aed352566e8d4c', + body: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -27,7 +30,10 @@ describe('resource advertisements', () => { test('edit: required and optional params', async () => { const response = await client.magicNetworkMonitoring.rules.advertisements.edit( '2890e6fa406311ed9b5a23f70f6fb8cf', - { account_id: '6f91088a406011ed95aed352566e8d4c', body: {} }, + { + account_id: '6f91088a406011ed95aed352566e8d4c', + body: {}, + }, ); }); }); diff --git a/tests/api-resources/magic-transit/cf-interconnects.test.ts b/tests/api-resources/magic-transit/cf-interconnects.test.ts index 3a9c0d280f..efa45bc00e 100644 --- a/tests/api-resources/magic-transit/cf-interconnects.test.ts +++ b/tests/api-resources/magic-transit/cf-interconnects.test.ts @@ -31,7 +31,12 @@ describe('resource cfInterconnects', () => { automatic_return_routing: true, description: 'Tunnel for Interconnect to ORD', gre: { cloudflare_endpoint: '203.0.113.1' }, - health_check: { enabled: true, rate: 'low', target: { saved: '203.0.113.1' }, type: 'request' }, + health_check: { + enabled: true, + rate: 'low', + target: { saved: '203.0.113.1' }, + type: 'request', + }, interface_address: '192.0.2.0/31', interface_address6: '2606:54c1:7:0:a9fe:12d2:1:200/127', mtu: 0, diff --git a/tests/api-resources/magic-transit/connectors/connectors.test.ts b/tests/api-resources/magic-transit/connectors/connectors.test.ts index 83051604e2..08f11f5657 100644 --- a/tests/api-resources/magic-transit/connectors/connectors.test.ts +++ b/tests/api-resources/magic-transit/connectors/connectors.test.ts @@ -29,7 +29,11 @@ describe('resource connectors', () => { test.skip('create: required and optional params', async () => { const response = await client.magicTransit.connectors.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', - device: { id: 'id', provision_license: true, serial_number: 'serial_number' }, + device: { + id: 'id', + provision_license: true, + serial_number: 'serial_number', + }, activated: true, interrupt_window_duration_hours: 0, interrupt_window_hour_of_day: 0, diff --git a/tests/api-resources/magic-transit/gre-tunnels.test.ts b/tests/api-resources/magic-transit/gre-tunnels.test.ts index 3ba06a7509..c31e43e1be 100644 --- a/tests/api-resources/magic-transit/gre-tunnels.test.ts +++ b/tests/api-resources/magic-transit/gre-tunnels.test.ts @@ -37,7 +37,11 @@ describe('resource greTunnels', () => { interface_address: '192.0.2.0/31', name: 'GRE_1', automatic_return_routing: true, - bgp: { customer_asn: 0, extra_prefixes: ['string'], md5_key: 'md5_key' }, + bgp: { + customer_asn: 0, + extra_prefixes: ['string'], + md5_key: 'md5_key', + }, description: 'Tunnel for ISP X', health_check: { direction: 'bidirectional', diff --git a/tests/api-resources/magic-transit/ipsec-tunnels.test.ts b/tests/api-resources/magic-transit/ipsec-tunnels.test.ts index 21f89ccf2b..63a5ec78bc 100644 --- a/tests/api-resources/magic-transit/ipsec-tunnels.test.ts +++ b/tests/api-resources/magic-transit/ipsec-tunnels.test.ts @@ -33,7 +33,11 @@ describe('resource ipsecTunnels', () => { interface_address: '192.0.2.0/31', name: 'IPsec_1', automatic_return_routing: true, - bgp: { customer_asn: 0, extra_prefixes: ['string'], md5_key: 'md5_key' }, + bgp: { + customer_asn: 0, + extra_prefixes: ['string'], + md5_key: 'md5_key', + }, custom_remote_identities: { fqdn_id: 'fqdn_id' }, customer_endpoint: '203.0.113.1', description: 'Tunnel for ISP X', @@ -76,7 +80,11 @@ describe('resource ipsecTunnels', () => { interface_address: '192.0.2.0/31', name: 'IPsec_1', automatic_return_routing: true, - bgp: { customer_asn: 0, extra_prefixes: ['string'], md5_key: 'md5_key' }, + bgp: { + customer_asn: 0, + extra_prefixes: ['string'], + md5_key: 'md5_key', + }, custom_remote_identities: { fqdn_id: 'fqdn_id' }, customer_endpoint: '203.0.113.1', description: 'Tunnel for ISP X', diff --git a/tests/api-resources/magic-transit/sites/lans.test.ts b/tests/api-resources/magic-transit/sites/lans.test.ts index f08d86029b..39bea521cc 100644 --- a/tests/api-resources/magic-transit/sites/lans.test.ts +++ b/tests/api-resources/magic-transit/sites/lans.test.ts @@ -13,7 +13,6 @@ describe('resource lans', () => { test('create: only required params', async () => { const responsePromise = client.magicTransit.sites.lans.create('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - physport: 1, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -27,12 +26,17 @@ describe('resource lans', () => { test('create: required and optional params', async () => { const response = await client.magicTransit.sites.lans.create('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - physport: 1, + bond_id: 2, ha_link: true, name: 'name', nat: { static_prefix: '192.0.2.0/24' }, + physport: 1, routed_subnets: [ - { next_hop: '192.0.2.1', prefix: '192.0.2.0/24', nat: { static_prefix: '192.0.2.0/24' } }, + { + next_hop: '192.0.2.1', + prefix: '192.0.2.0/24', + nat: { static_prefix: '192.0.2.0/24' }, + }, ], static_addressing: { address: '192.0.2.0/24', @@ -72,11 +76,16 @@ describe('resource lans', () => { '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', + bond_id: 2, name: 'name', nat: { static_prefix: '192.0.2.0/24' }, physport: 1, routed_subnets: [ - { next_hop: '192.0.2.1', prefix: '192.0.2.0/24', nat: { static_prefix: '192.0.2.0/24' } }, + { + next_hop: '192.0.2.1', + prefix: '192.0.2.0/24', + nat: { static_prefix: '192.0.2.0/24' }, + }, ], static_addressing: { address: '192.0.2.0/24', @@ -159,11 +168,16 @@ describe('resource lans', () => { '023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', + bond_id: 2, name: 'name', nat: { static_prefix: '192.0.2.0/24' }, physport: 1, routed_subnets: [ - { next_hop: '192.0.2.1', prefix: '192.0.2.0/24', nat: { static_prefix: '192.0.2.0/24' } }, + { + next_hop: '192.0.2.1', + prefix: '192.0.2.0/24', + nat: { static_prefix: '192.0.2.0/24' }, + }, ], static_addressing: { address: '192.0.2.0/24', diff --git a/tests/api-resources/network-interconnects/cnis.test.ts b/tests/api-resources/network-interconnects/cnis.test.ts index 6c374ea251..03b226526d 100644 --- a/tests/api-resources/network-interconnects/cnis.test.ts +++ b/tests/api-resources/network-interconnects/cnis.test.ts @@ -15,7 +15,11 @@ describe('resource cnis', () => { account_id: 'account_id', account: 'account', interconnect: 'interconnect', - magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, + magic: { + conduit_name: 'conduit_name', + description: 'description', + mtu: 0, + }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -31,8 +35,16 @@ describe('resource cnis', () => { account_id: 'account_id', account: 'account', interconnect: 'interconnect', - magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, - bgp: { customer_asn: 0, extra_prefixes: ['string'], md5_key: 'md5_key' }, + magic: { + conduit_name: 'conduit_name', + description: 'description', + mtu: 0, + }, + bgp: { + customer_asn: 0, + extra_prefixes: ['string'], + md5_key: 'md5_key', + }, }); }); @@ -43,7 +55,11 @@ describe('resource cnis', () => { account: 'account', cust_ip: '192.168.3.4/31', interconnect: 'interconnect', - magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, + magic: { + conduit_name: 'conduit_name', + description: 'description', + mtu: 0, + }, p2p_ip: '192.168.3.4/31', }); const rawResponse = await responsePromise.asResponse(); @@ -62,9 +78,17 @@ describe('resource cnis', () => { account: 'account', cust_ip: '192.168.3.4/31', interconnect: 'interconnect', - magic: { conduit_name: 'conduit_name', description: 'description', mtu: 0 }, + magic: { + conduit_name: 'conduit_name', + description: 'description', + mtu: 0, + }, p2p_ip: '192.168.3.4/31', - bgp: { customer_asn: 0, extra_prefixes: ['string'], md5_key: 'md5_key' }, + bgp: { + customer_asn: 0, + extra_prefixes: ['string'], + md5_key: 'md5_key', + }, }); }); diff --git a/tests/api-resources/organizations/organizations.test.ts b/tests/api-resources/organizations/organizations.test.ts index 8f918319cb..cded1a82d2 100644 --- a/tests/api-resources/organizations/organizations.test.ts +++ b/tests/api-resources/organizations/organizations.test.ts @@ -84,8 +84,16 @@ describe('resource organizations', () => { client.organizations.list( { id: ['a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8'], - containing: { account: 'account', organization: 'organization', user: 'user' }, - name: { contains: 'contains', endsWith: 'endsWith', startsWith: 'startsWith' }, + containing: { + account: 'account', + organization: 'organization', + user: 'user', + }, + name: { + contains: 'contains', + endsWith: 'endsWith', + startsWith: 'startsWith', + }, page_size: 0, page_token: 'page_token', parent: { id: 'a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8' }, diff --git a/tests/api-resources/origin-tls-client-auth/hostnames/certificates.test.ts b/tests/api-resources/origin-tls-client-auth/hostname-certificates.test.ts similarity index 92% rename from tests/api-resources/origin-tls-client-auth/hostnames/certificates.test.ts rename to tests/api-resources/origin-tls-client-auth/hostname-certificates.test.ts index bb97d30459..584022c98c 100644 --- a/tests/api-resources/origin-tls-client-auth/hostnames/certificates.test.ts +++ b/tests/api-resources/origin-tls-client-auth/hostname-certificates.test.ts @@ -9,9 +9,9 @@ const client = new Cloudflare({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); -describe('resource certificates', () => { +describe('resource hostnameCertificates', () => { test('create: only required params', async () => { - const responsePromise = client.originTLSClientAuth.hostnames.certificates.create({ + const responsePromise = client.originTLSClientAuth.hostnameCertificates.create({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', certificate: '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n', @@ -28,7 +28,7 @@ describe('resource certificates', () => { }); test('create: required and optional params', async () => { - const response = await client.originTLSClientAuth.hostnames.certificates.create({ + const response = await client.originTLSClientAuth.hostnameCertificates.create({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', certificate: '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n', @@ -38,7 +38,7 @@ describe('resource certificates', () => { }); test('list: only required params', async () => { - const responsePromise = client.originTLSClientAuth.hostnames.certificates.list({ + const responsePromise = client.originTLSClientAuth.hostnameCertificates.list({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); const rawResponse = await responsePromise.asResponse(); @@ -51,13 +51,13 @@ describe('resource certificates', () => { }); test('list: required and optional params', async () => { - const response = await client.originTLSClientAuth.hostnames.certificates.list({ + const response = await client.originTLSClientAuth.hostnameCertificates.list({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', }); }); test('delete: only required params', async () => { - const responsePromise = client.originTLSClientAuth.hostnames.certificates.delete( + const responsePromise = client.originTLSClientAuth.hostnameCertificates.delete( '023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); @@ -71,14 +71,14 @@ describe('resource certificates', () => { }); test('delete: required and optional params', async () => { - const response = await client.originTLSClientAuth.hostnames.certificates.delete( + const response = await client.originTLSClientAuth.hostnameCertificates.delete( '023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); }); test('get: only required params', async () => { - const responsePromise = client.originTLSClientAuth.hostnames.certificates.get( + const responsePromise = client.originTLSClientAuth.hostnameCertificates.get( '023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); @@ -92,7 +92,7 @@ describe('resource certificates', () => { }); test('get: required and optional params', async () => { - const response = await client.originTLSClientAuth.hostnames.certificates.get( + const response = await client.originTLSClientAuth.hostnameCertificates.get( '023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); diff --git a/tests/api-resources/origin-tls-client-auth/hostnames/hostnames.test.ts b/tests/api-resources/origin-tls-client-auth/hostnames.test.ts similarity index 93% rename from tests/api-resources/origin-tls-client-auth/hostnames/hostnames.test.ts rename to tests/api-resources/origin-tls-client-auth/hostnames.test.ts index b62511e00b..c428bc16ae 100644 --- a/tests/api-resources/origin-tls-client-auth/hostnames/hostnames.test.ts +++ b/tests/api-resources/origin-tls-client-auth/hostnames.test.ts @@ -28,7 +28,11 @@ describe('resource hostnames', () => { const response = await client.originTLSClientAuth.hostnames.update({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', config: [ - { cert_id: '2458ce5a-0c35-4c7f-82c7-8e9487d3ff60', enabled: true, hostname: 'app.example.com' }, + { + cert_id: '2458ce5a-0c35-4c7f-82c7-8e9487d3ff60', + enabled: true, + hostname: 'app.example.com', + }, ], }); }); diff --git a/tests/api-resources/origin-tls-client-auth/zone-certificates.test.ts b/tests/api-resources/origin-tls-client-auth/zone-certificates.test.ts new file mode 100644 index 0000000000..bd6d5f67b6 --- /dev/null +++ b/tests/api-resources/origin-tls-client-auth/zone-certificates.test.ts @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource zoneCertificates', () => { + test('create: only required params', async () => { + const responsePromise = client.originTLSClientAuth.zoneCertificates.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + certificate: + '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n', + private_key: + '-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await client.originTLSClientAuth.zoneCertificates.create({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + certificate: + '-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n', + private_key: + '-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n', + }); + }); + + test('list: only required params', async () => { + const responsePromise = client.originTLSClientAuth.zoneCertificates.list({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('list: required and optional params', async () => { + const response = await client.originTLSClientAuth.zoneCertificates.list({ + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + }); + }); + + test('delete: only required params', async () => { + const responsePromise = client.originTLSClientAuth.zoneCertificates.delete( + '023e105f4ecef8ad9ca31a8372d0c353', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('delete: required and optional params', async () => { + const response = await client.originTLSClientAuth.zoneCertificates.delete( + '023e105f4ecef8ad9ca31a8372d0c353', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); + + test('get: only required params', async () => { + const responsePromise = client.originTLSClientAuth.zoneCertificates.get( + '023e105f4ecef8ad9ca31a8372d0c353', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('get: required and optional params', async () => { + const response = await client.originTLSClientAuth.zoneCertificates.get( + '023e105f4ecef8ad9ca31a8372d0c353', + { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }, + ); + }); +}); diff --git a/tests/api-resources/page-rules.test.ts b/tests/api-resources/page-rules.test.ts index 8b14236352..29b697d1ce 100644 --- a/tests/api-resources/page-rules.test.ts +++ b/tests/api-resources/page-rules.test.ts @@ -15,7 +15,12 @@ describe('resource pageRules', () => { const responsePromise = client.pageRules.create({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', actions: [{ id: 'browser_check' }], - targets: [{ constraint: { operator: 'matches', value: '*example.com/images/*' }, target: 'url' }], + targets: [ + { + constraint: { operator: 'matches', value: '*example.com/images/*' }, + target: 'url', + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -31,7 +36,12 @@ describe('resource pageRules', () => { const response = await client.pageRules.create({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', actions: [{ id: 'browser_check', value: 'on' }], - targets: [{ constraint: { operator: 'matches', value: '*example.com/images/*' }, target: 'url' }], + targets: [ + { + constraint: { operator: 'matches', value: '*example.com/images/*' }, + target: 'url', + }, + ], priority: 0, status: 'active', }); @@ -42,7 +52,12 @@ describe('resource pageRules', () => { const responsePromise = client.pageRules.update('023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', actions: [{ id: 'browser_check' }], - targets: [{ constraint: { operator: 'matches', value: '*example.com/images/*' }, target: 'url' }], + targets: [ + { + constraint: { operator: 'matches', value: '*example.com/images/*' }, + target: 'url', + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -58,7 +73,12 @@ describe('resource pageRules', () => { const response = await client.pageRules.update('023e105f4ecef8ad9ca31a8372d0c353', { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', actions: [{ id: 'browser_check', value: 'on' }], - targets: [{ constraint: { operator: 'matches', value: '*example.com/images/*' }, target: 'url' }], + targets: [ + { + constraint: { operator: 'matches', value: '*example.com/images/*' }, + target: 'url', + }, + ], priority: 0, status: 'active', }); @@ -123,7 +143,12 @@ describe('resource pageRules', () => { actions: [{ id: 'browser_check', value: 'on' }], priority: 0, status: 'active', - targets: [{ constraint: { operator: 'matches', value: '*example.com/images/*' }, target: 'url' }], + targets: [ + { + constraint: { operator: 'matches', value: '*example.com/images/*' }, + target: 'url', + }, + ], }); }); diff --git a/tests/api-resources/pipelines/pipelines.test.ts b/tests/api-resources/pipelines/pipelines.test.ts index 9a567adf6d..e64028f183 100644 --- a/tests/api-resources/pipelines/pipelines.test.ts +++ b/tests/api-resources/pipelines/pipelines.test.ts @@ -41,7 +41,11 @@ describe('resource pipelines', () => { const response = await client.pipelines.create({ account_id: '0123105f4ecef8ad9ca31a8372d0c353', destination: { - batch: { max_bytes: 1000, max_duration_s: 0.25, max_rows: 100 }, + batch: { + max_bytes: 1000, + max_duration_s: 0.25, + max_rows: 100, + }, compression: { type: 'gzip' }, credentials: { access_key_id: '', @@ -58,14 +62,27 @@ describe('resource pipelines', () => { type: 'r2', }, name: 'sample_pipeline', - source: [{ format: 'json', type: 'type', authentication: true, cors: { origins: ['*'] } }], + source: [ + { + format: 'json', + type: 'type', + authentication: true, + cors: { origins: ['*'] }, + }, + ], }); }); test('update: only required params', async () => { const responsePromise = client.pipelines.update('sample_pipeline', { account_id: '0123105f4ecef8ad9ca31a8372d0c353', - destination: { batch: {}, compression: {}, format: 'json', path: { bucket: 'bucket' }, type: 'r2' }, + destination: { + batch: {}, + compression: {}, + format: 'json', + path: { bucket: 'bucket' }, + type: 'r2', + }, name: 'sample_pipeline', source: [{ format: 'json', type: 'type' }], }); @@ -82,7 +99,11 @@ describe('resource pipelines', () => { const response = await client.pipelines.update('sample_pipeline', { account_id: '0123105f4ecef8ad9ca31a8372d0c353', destination: { - batch: { max_bytes: 1000, max_duration_s: 0.25, max_rows: 100 }, + batch: { + max_bytes: 1000, + max_duration_s: 0.25, + max_rows: 100, + }, compression: { type: 'gzip' }, format: 'json', path: { @@ -99,7 +120,14 @@ describe('resource pipelines', () => { }, }, name: 'sample_pipeline', - source: [{ format: 'json', type: 'type', authentication: true, cors: { origins: ['*'] } }], + source: [ + { + format: 'json', + type: 'type', + authentication: true, + cors: { origins: ['*'] }, + }, + ], }); }); diff --git a/tests/api-resources/pipelines/sinks.test.ts b/tests/api-resources/pipelines/sinks.test.ts index 8341ec4c16..05a79057ec 100644 --- a/tests/api-resources/pipelines/sinks.test.ts +++ b/tests/api-resources/pipelines/sinks.test.ts @@ -34,18 +34,42 @@ describe('resource sinks', () => { account_id: 'account_id', bucket: 'bucket', credentials: { access_key_id: 'access_key_id', secret_access_key: 'secret_access_key' }, - file_naming: { prefix: 'prefix', strategy: 'serial', suffix: 'suffix' }, + file_naming: { + prefix: 'prefix', + strategy: 'serial', + suffix: 'suffix', + }, jurisdiction: 'jurisdiction', partitioning: { time_pattern: 'year=%Y/month=%m/day=%d/hour=%H' }, path: 'path', - rolling_policy: { file_size_bytes: 0, inactivity_seconds: 1, interval_seconds: 1 }, + rolling_policy: { + file_size_bytes: 0, + inactivity_seconds: 1, + interval_seconds: 1, + }, + }, + format: { + type: 'json', + decimal_encoding: 'number', + timestamp_format: 'rfc3339', + unstructured: true, }, - format: { type: 'json', decimal_encoding: 'number', timestamp_format: 'rfc3339', unstructured: true }, schema: { fields: [ - { type: 'int32', metadata_key: 'metadata_key', name: 'name', required: true, sql_name: 'sql_name' }, + { + type: 'int32', + metadata_key: 'metadata_key', + name: 'name', + required: true, + sql_name: 'sql_name', + }, ], - format: { type: 'json', decimal_encoding: 'number', timestamp_format: 'rfc3339', unstructured: true }, + format: { + type: 'json', + decimal_encoding: 'number', + timestamp_format: 'rfc3339', + unstructured: true, + }, inferred: true, }, }); diff --git a/tests/api-resources/pipelines/streams.test.ts b/tests/api-resources/pipelines/streams.test.ts index e117f28d05..a344416ed2 100644 --- a/tests/api-resources/pipelines/streams.test.ts +++ b/tests/api-resources/pipelines/streams.test.ts @@ -28,13 +28,33 @@ describe('resource streams', () => { const response = await client.pipelines.streams.create({ account_id: '0123105f4ecef8ad9ca31a8372d0c353', name: 'my_stream', - format: { type: 'json', decimal_encoding: 'number', timestamp_format: 'rfc3339', unstructured: true }, - http: { authentication: false, enabled: true, cors: { origins: ['string'] } }, + format: { + type: 'json', + decimal_encoding: 'number', + timestamp_format: 'rfc3339', + unstructured: true, + }, + http: { + authentication: false, + enabled: true, + cors: { origins: ['string'] }, + }, schema: { fields: [ - { type: 'int32', metadata_key: 'metadata_key', name: 'name', required: true, sql_name: 'sql_name' }, + { + type: 'int32', + metadata_key: 'metadata_key', + name: 'name', + required: true, + sql_name: 'sql_name', + }, ], - format: { type: 'json', decimal_encoding: 'number', timestamp_format: 'rfc3339', unstructured: true }, + format: { + type: 'json', + decimal_encoding: 'number', + timestamp_format: 'rfc3339', + unstructured: true, + }, inferred: true, }, worker_binding: { enabled: true }, @@ -57,7 +77,11 @@ describe('resource streams', () => { test('update: required and optional params', async () => { const response = await client.pipelines.streams.update('033e105f4ecef8ad9ca31a8372d0c353', { account_id: '0123105f4ecef8ad9ca31a8372d0c353', - http: { authentication: false, enabled: true, cors: { origins: ['string'] } }, + http: { + authentication: false, + enabled: true, + cors: { origins: ['string'] }, + }, worker_binding: { enabled: true }, }); }); diff --git a/tests/api-resources/queues/messages.test.ts b/tests/api-resources/queues/messages.test.ts index 1e4b58a9d3..ff2bba11cb 100644 --- a/tests/api-resources/queues/messages.test.ts +++ b/tests/api-resources/queues/messages.test.ts @@ -59,7 +59,13 @@ describe('resource messages', () => { const response = await client.queues.messages.bulkPush('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', delay_seconds: 0, - messages: [{ body: 'body', content_type: 'text', delay_seconds: 0 }], + messages: [ + { + body: 'body', + content_type: 'text', + delay_seconds: 0, + }, + ], }); }); diff --git a/tests/api-resources/queues/queues.test.ts b/tests/api-resources/queues/queues.test.ts index 0c290603e1..83ba023403 100644 --- a/tests/api-resources/queues/queues.test.ts +++ b/tests/api-resources/queues/queues.test.ts @@ -48,7 +48,11 @@ describe('resource queues', () => { const response = await client.queues.update('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', queue_name: 'example-queue', - settings: { delivery_delay: 5, delivery_paused: true, message_retention_period: 345600 }, + settings: { + delivery_delay: 5, + delivery_paused: true, + message_retention_period: 345600, + }, }); }); @@ -103,7 +107,11 @@ describe('resource queues', () => { const response = await client.queues.edit('023e105f4ecef8ad9ca31a8372d0c353', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', queue_name: 'example-queue', - settings: { delivery_delay: 5, delivery_paused: true, message_retention_period: 345600 }, + settings: { + delivery_delay: 5, + delivery_paused: true, + message_retention_period: 345600, + }, }); }); diff --git a/tests/api-resources/r2-data-catalog/maintenance-configs.test.ts b/tests/api-resources/r2-data-catalog/maintenance-configs.test.ts index a531dd81af..6e9953d898 100644 --- a/tests/api-resources/r2-data-catalog/maintenance-configs.test.ts +++ b/tests/api-resources/r2-data-catalog/maintenance-configs.test.ts @@ -27,7 +27,11 @@ describe('resource maintenanceConfigs', () => { const response = await client.r2DataCatalog.maintenanceConfigs.update('my-data-bucket', { account_id: '0123456789abcdef0123456789abcdef', compaction: { state: 'enabled', target_size_mb: '256' }, - snapshot_expiration: { max_snapshot_age: '14d', min_snapshots_to_keep: 5, state: 'enabled' }, + snapshot_expiration: { + max_snapshot_age: '14d', + min_snapshots_to_keep: 5, + state: 'enabled', + }, }); }); diff --git a/tests/api-resources/r2-data-catalog/namespaces/tables/maintenance-configs.test.ts b/tests/api-resources/r2-data-catalog/namespaces/tables/maintenance-configs.test.ts index 10fe2c38a6..55b0665c92 100644 --- a/tests/api-resources/r2-data-catalog/namespaces/tables/maintenance-configs.test.ts +++ b/tests/api-resources/r2-data-catalog/namespaces/tables/maintenance-configs.test.ts @@ -34,7 +34,11 @@ describe('resource maintenanceConfigs', () => { { account_id: '0123456789abcdef0123456789abcdef', compaction: { state: 'enabled', target_size_mb: '256' }, - snapshot_expiration: { max_snapshot_age: '14d', min_snapshots_to_keep: 5, state: 'enabled' }, + snapshot_expiration: { + max_snapshot_age: '14d', + min_snapshots_to_keep: 5, + state: 'enabled', + }, }, ); }); diff --git a/tests/api-resources/r2/buckets/cors.test.ts b/tests/api-resources/r2/buckets/cors.test.ts index 89d09e9d8e..fa5c722933 100644 --- a/tests/api-resources/r2/buckets/cors.test.ts +++ b/tests/api-resources/r2/buckets/cors.test.ts @@ -30,7 +30,11 @@ describe('resource cors', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', rules: [ { - allowed: { methods: ['GET'], origins: ['http://localhost:3000'], headers: ['x-requested-by'] }, + allowed: { + methods: ['GET'], + origins: ['http://localhost:3000'], + headers: ['x-requested-by'], + }, id: 'Allow Local Development', exposeHeaders: ['Content-Encoding'], maxAgeSeconds: 3600, diff --git a/tests/api-resources/r2/buckets/lifecycle.test.ts b/tests/api-resources/r2/buckets/lifecycle.test.ts index 5f6392a496..b820202ad2 100644 --- a/tests/api-resources/r2/buckets/lifecycle.test.ts +++ b/tests/api-resources/r2/buckets/lifecycle.test.ts @@ -36,7 +36,10 @@ describe('resource lifecycle', () => { abortMultipartUploadsTransition: { condition: { maxAge: 0, type: 'Age' } }, deleteObjectsTransition: { condition: { maxAge: 0, type: 'Age' } }, storageClassTransitions: [ - { condition: { maxAge: 0, type: 'Age' }, storageClass: 'InfrequentAccess' }, + { + condition: { maxAge: 0, type: 'Age' }, + storageClass: 'InfrequentAccess', + }, ], }, ], diff --git a/tests/api-resources/r2/buckets/sippy.test.ts b/tests/api-resources/r2/buckets/sippy.test.ts index 0b9a8df818..2cc80ee372 100644 --- a/tests/api-resources/r2/buckets/sippy.test.ts +++ b/tests/api-resources/r2/buckets/sippy.test.ts @@ -28,7 +28,11 @@ describe('resource sippy', () => { test.skip('update: required and optional params', async () => { const response = await client.r2.buckets.sippy.update('example-bucket', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - destination: { accessKeyId: 'accessKeyId', provider: 'r2', secretAccessKey: 'secretAccessKey' }, + destination: { + accessKeyId: 'accessKeyId', + provider: 'r2', + secretAccessKey: 'secretAccessKey', + }, source: { accessKeyId: 'accessKeyId', bucket: 'bucket', diff --git a/tests/api-resources/radar/bgp/hijacks/events.test.ts b/tests/api-resources/radar/bgp/hijacks/events.test.ts index 9bf58fa8dc..a520764b2f 100644 --- a/tests/api-resources/radar/bgp/hijacks/events.test.ts +++ b/tests/api-resources/radar/bgp/hijacks/events.test.ts @@ -40,7 +40,7 @@ describe('resource events', () => { format: 'JSON', hijackerAsn: 0, involvedAsn: 0, - involvedCountry: 'involvedCountry', + involvedCountry: 'PT', maxConfidence: 0, minConfidence: 0, page: 1, diff --git a/tests/api-resources/radar/bgp/leaks/events.test.ts b/tests/api-resources/radar/bgp/leaks/events.test.ts index f9d9030493..52e7549bd1 100644 --- a/tests/api-resources/radar/bgp/leaks/events.test.ts +++ b/tests/api-resources/radar/bgp/leaks/events.test.ts @@ -39,7 +39,7 @@ describe('resource events', () => { eventId: 0, format: 'JSON', involvedAsn: 0, - involvedCountry: 'involvedCountry', + involvedCountry: 'PT', leakAsn: 0, page: 1, per_page: 1, diff --git a/tests/api-resources/radar/bgp/routes.test.ts b/tests/api-resources/radar/bgp/routes.test.ts index f9f49ec583..da3da19638 100644 --- a/tests/api-resources/radar/bgp/routes.test.ts +++ b/tests/api-resources/radar/bgp/routes.test.ts @@ -32,7 +32,13 @@ describe('resource routes', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.bgp.routes.ases( - { format: 'JSON', limit: 1, location: 'US', sortBy: 'ipv4', sortOrder: 'ASC' }, + { + format: 'JSON', + limit: 1, + location: 'US', + sortBy: 'ipv4', + sortOrder: 'ASC', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); @@ -60,7 +66,12 @@ describe('resource routes', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.bgp.routes.moas( - { format: 'JSON', invalid_only: true, origin: 0, prefix: '1.1.1.0/24' }, + { + format: 'JSON', + invalid_only: true, + origin: 0, + prefix: '1.1.1.0/24', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); @@ -88,7 +99,13 @@ describe('resource routes', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.bgp.routes.pfx2as( - { format: 'JSON', longestPrefixMatch: true, origin: 0, prefix: '1.1.1.0/24', rpkiStatus: 'INVALID' }, + { + format: 'JSON', + longestPrefixMatch: true, + origin: 0, + prefix: '1.1.1.0/24', + rpkiStatus: 'INVALID', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); @@ -144,7 +161,11 @@ describe('resource routes', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.bgp.routes.stats( - { asn: 174, format: 'JSON', location: 'US' }, + { + asn: 174, + format: 'JSON', + location: 'US', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/bgp/top/ases.test.ts b/tests/api-resources/radar/bgp/top/ases.test.ts index 1484984389..707edaf677 100644 --- a/tests/api-resources/radar/bgp/top/ases.test.ts +++ b/tests/api-resources/radar/bgp/top/ases.test.ts @@ -70,7 +70,11 @@ describe('resource ases', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.bgp.top.ases.prefixes( - { country: 'NZ', format: 'JSON', limit: 10 }, + { + country: 'NZ', + format: 'JSON', + limit: 10, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/ct/authorities.test.ts b/tests/api-resources/radar/ct/authorities.test.ts index 3894aaa430..f3a6457168 100644 --- a/tests/api-resources/radar/ct/authorities.test.ts +++ b/tests/api-resources/radar/ct/authorities.test.ts @@ -32,7 +32,11 @@ describe('resource authorities', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.ct.authorities.list( - { format: 'JSON', limit: 1, offset: 0 }, + { + format: 'JSON', + limit: 1, + offset: 0, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/ct/logs.test.ts b/tests/api-resources/radar/ct/logs.test.ts index baa0a3a9c4..79a8fbc3b1 100644 --- a/tests/api-resources/radar/ct/logs.test.ts +++ b/tests/api-resources/radar/ct/logs.test.ts @@ -32,7 +32,11 @@ describe('resource logs', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.ct.logs.list( - { format: 'JSON', limit: 1, offset: 0 }, + { + format: 'JSON', + limit: 1, + offset: 0, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/datasets.test.ts b/tests/api-resources/radar/datasets.test.ts index 129dfef556..e23b7c1713 100644 --- a/tests/api-resources/radar/datasets.test.ts +++ b/tests/api-resources/radar/datasets.test.ts @@ -32,7 +32,13 @@ describe('resource datasets', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.datasets.list( - { datasetType: 'RANKING_BUCKET', date: '2024-09-19', format: 'JSON', limit: 1, offset: 0 }, + { + datasetType: 'RANKING_BUCKET', + date: '2024-09-19', + format: 'JSON', + limit: 1, + offset: 0, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/entities/asns.test.ts b/tests/api-resources/radar/entities/asns.test.ts index bb0bfdf042..891c80d149 100644 --- a/tests/api-resources/radar/entities/asns.test.ts +++ b/tests/api-resources/radar/entities/asns.test.ts @@ -32,7 +32,14 @@ describe('resource asns', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.entities.asns.list( - { asn: '174,7922', format: 'JSON', limit: 1, location: 'US', offset: 0, orderBy: 'ASN' }, + { + asn: '174,7922', + format: 'JSON', + limit: 1, + location: 'US', + offset: 0, + orderBy: 'ASN', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/entities/locations.test.ts b/tests/api-resources/radar/entities/locations.test.ts index 76fd4e6fb9..54db80ce34 100644 --- a/tests/api-resources/radar/entities/locations.test.ts +++ b/tests/api-resources/radar/entities/locations.test.ts @@ -32,7 +32,12 @@ describe('resource locations', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.entities.locations.list( - { format: 'JSON', limit: 1, location: 'US,CA', offset: 0 }, + { + format: 'JSON', + limit: 1, + location: 'US,CA', + offset: 0, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/geolocations.test.ts b/tests/api-resources/radar/geolocations.test.ts index ce5ff99c3c..82c0fe602a 100644 --- a/tests/api-resources/radar/geolocations.test.ts +++ b/tests/api-resources/radar/geolocations.test.ts @@ -32,7 +32,13 @@ describe('resource geolocations', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.geolocations.list( - { format: 'JSON', geoId: '3190509,360689', limit: 1, location: 'US,CA', offset: 0 }, + { + format: 'JSON', + geoId: '3190509,360689', + limit: 1, + location: 'US,CA', + offset: 0, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/ranking/internet-services.test.ts b/tests/api-resources/radar/ranking/internet-services.test.ts index 5d1247c2eb..2a296ed138 100644 --- a/tests/api-resources/radar/ranking/internet-services.test.ts +++ b/tests/api-resources/radar/ranking/internet-services.test.ts @@ -32,7 +32,12 @@ describe('resource internetServices', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.ranking.internetServices.categories( - { date: ['2019-12-27'], format: 'JSON', limit: 5, name: ['main_series'] }, + { + date: ['2019-12-27'], + format: 'JSON', + limit: 5, + name: ['main_series'], + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/radar/robots-txt/top/top.test.ts b/tests/api-resources/radar/robots-txt/top/top.test.ts index 539977b28d..5007bbd12b 100644 --- a/tests/api-resources/radar/robots-txt/top/top.test.ts +++ b/tests/api-resources/radar/robots-txt/top/top.test.ts @@ -32,7 +32,13 @@ describe('resource top', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.radar.robotsTXT.top.domainCategories( - { date: ['2019-12-27'], format: 'JSON', limit: 1, name: ['main_series'], userAgentCategory: 'AI' }, + { + date: ['2019-12-27'], + format: 'JSON', + limit: 1, + name: ['main_series'], + userAgentCategory: 'AI', + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/rate-limits.test.ts b/tests/api-resources/rate-limits.test.ts index ed633db972..f006770ad8 100644 --- a/tests/api-resources/rate-limits.test.ts +++ b/tests/api-resources/rate-limits.test.ts @@ -38,8 +38,18 @@ describe('resource rateLimits', () => { timeout: 86400, }, match: { - headers: [{ name: 'Cf-Cache-Status', op: 'ne', value: 'HIT' }], - request: { methods: ['GET', 'POST'], schemes: ['HTTP', 'HTTPS'], url: '*.example.org/path*' }, + headers: [ + { + name: 'Cf-Cache-Status', + op: 'ne', + value: 'HIT', + }, + ], + request: { + methods: ['GET', 'POST'], + schemes: ['HTTP', 'HTTPS'], + url: '*.example.org/path*', + }, response: { origin_traffic: true }, }, period: 900, @@ -113,8 +123,18 @@ describe('resource rateLimits', () => { timeout: 86400, }, match: { - headers: [{ name: 'Cf-Cache-Status', op: 'ne', value: 'HIT' }], - request: { methods: ['GET', 'POST'], schemes: ['HTTP', 'HTTPS'], url: '*.example.org/path*' }, + headers: [ + { + name: 'Cf-Cache-Status', + op: 'ne', + value: 'HIT', + }, + ], + request: { + methods: ['GET', 'POST'], + schemes: ['HTTP', 'HTTPS'], + url: '*.example.org/path*', + }, response: { origin_traffic: true }, }, period: 900, diff --git a/tests/api-resources/realtime-kit/livestreams.test.ts b/tests/api-resources/realtime-kit/livestreams.test.ts index c175132390..1605152c0c 100644 --- a/tests/api-resources/realtime-kit/livestreams.test.ts +++ b/tests/api-resources/realtime-kit/livestreams.test.ts @@ -154,7 +154,11 @@ describe('resource livestreams', () => { const response = await client.realtimeKit.livestreams.getLivestreamSessionForLivestreamId( 'app_id', 'livestream_id', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', page_no: 0, per_page: 0 }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + page_no: 0, + per_page: 0, + }, ); }); diff --git a/tests/api-resources/realtime-kit/meetings.test.ts b/tests/api-resources/realtime-kit/meetings.test.ts index 06a2fbde1f..b1622a2911 100644 --- a/tests/api-resources/realtime-kit/meetings.test.ts +++ b/tests/api-resources/realtime-kit/meetings.test.ts @@ -29,14 +29,26 @@ describe('resource meetings', () => { const response = await client.realtimeKit.meetings.create('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', ai_config: { - summarization: { summary_type: 'general', text_format: 'plain_text', word_limit: 150 }, - transcription: { keywords: ['string'], language: 'en-US', profanity_filter: true }, + summarization: { + summary_type: 'general', + text_format: 'plain_text', + word_limit: 150, + }, + transcription: { + keywords: ['string'], + language: 'en-US', + profanity_filter: true, + }, }, live_stream_on_start: true, persist_chat: true, record_on_start: true, recording_config: { - audio_config: { channel: 'mono', codec: 'MP3', export_file: true }, + audio_config: { + channel: 'mono', + codec: 'MP3', + export_file: true, + }, file_name_prefix: 'file_name_prefix', live_streaming_config: { rtmp_url: 'rtmp://a.rtmp.youtube.com/live2' }, max_seconds: 60, @@ -59,7 +71,11 @@ describe('resource meetings', () => { codec: 'H264', export_file: true, height: 720, - watermark: { position: 'left top', size: { height: 1, width: 1 }, url: 'https://example.com' }, + watermark: { + position: 'left top', + size: { height: 1, width: 1 }, + url: 'https://example.com', + }, width: 1280, }, }, @@ -262,7 +278,11 @@ describe('resource meetings', () => { const response = await client.realtimeKit.meetings.getMeetingParticipants( 'app_id', '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', page_no: 0, per_page: 0 }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + page_no: 0, + per_page: 0, + }, ); }); @@ -317,14 +337,26 @@ describe('resource meetings', () => { { account_id: '023e105f4ecef8ad9ca31a8372d0c353', ai_config: { - summarization: { summary_type: 'general', text_format: 'plain_text', word_limit: 150 }, - transcription: { keywords: ['string'], language: 'en-US', profanity_filter: true }, + summarization: { + summary_type: 'general', + text_format: 'plain_text', + word_limit: 150, + }, + transcription: { + keywords: ['string'], + language: 'en-US', + profanity_filter: true, + }, }, live_stream_on_start: true, persist_chat: true, record_on_start: true, recording_config: { - audio_config: { channel: 'mono', codec: 'MP3', export_file: true }, + audio_config: { + channel: 'mono', + codec: 'MP3', + export_file: true, + }, file_name_prefix: 'file_name_prefix', live_streaming_config: { rtmp_url: 'rtmp://a.rtmp.youtube.com/live2' }, max_seconds: 60, @@ -347,7 +379,11 @@ describe('resource meetings', () => { codec: 'H264', export_file: true, height: 720, - watermark: { position: 'left top', size: { height: 1, width: 1 }, url: 'https://example.com' }, + watermark: { + position: 'left top', + size: { height: 1, width: 1 }, + url: 'https://example.com', + }, width: 1280, }, }, @@ -382,8 +418,16 @@ describe('resource meetings', () => { { account_id: '023e105f4ecef8ad9ca31a8372d0c353', ai_config: { - summarization: { summary_type: 'general', text_format: 'plain_text', word_limit: 150 }, - transcription: { keywords: ['string'], language: 'en-US', profanity_filter: true }, + summarization: { + summary_type: 'general', + text_format: 'plain_text', + word_limit: 150, + }, + transcription: { + keywords: ['string'], + language: 'en-US', + profanity_filter: true, + }, }, live_stream_on_start: true, persist_chat: true, diff --git a/tests/api-resources/realtime-kit/presets.test.ts b/tests/api-resources/realtime-kit/presets.test.ts index 79df025dca..bc332b6f6a 100644 --- a/tests/api-resources/realtime-kit/presets.test.ts +++ b/tests/api-resources/realtime-kit/presets.test.ts @@ -17,7 +17,10 @@ describe('resource presets', () => { config: { max_screenshare_count: 0, max_video_streams: { desktop: 0, mobile: 0 }, - media: { screenshare: { frame_rate: 0, quality: 'hd' }, video: { frame_rate: 30, quality: 'hd' } }, + media: { + screenshare: { frame_rate: 0, quality: 'hd' }, + video: { frame_rate: 30, quality: 'hd' }, + }, view_type: 'GROUP_CALL', }, name: 'name', @@ -26,8 +29,20 @@ describe('resource presets', () => { border_radius: 'rounded', border_width: 'thin', colors: { - background: { '600': '600', '700': '700', '800': '800', '900': '900', '1000': '1000' }, - brand: { '300': '300', '400': '400', '500': '500', '600': '600', '700': '700' }, + background: { + '600': '600', + '700': '700', + '800': '800', + '900': '900', + '1000': '1000', + }, + brand: { + '300': '300', + '400': '400', + '500': '500', + '600': '600', + '700': '700', + }, danger: 'danger', success: 'success', text: 'text', @@ -70,8 +85,20 @@ describe('resource presets', () => { border_radius: 'rounded', border_width: 'thin', colors: { - background: { '600': '600', '700': '700', '800': '800', '900': '900', '1000': '1000' }, - brand: { '300': '300', '400': '400', '500': '500', '600': '600', '700': '700' }, + background: { + '600': '600', + '700': '700', + '800': '800', + '900': '900', + '1000': '1000', + }, + brand: { + '300': '300', + '400': '400', + '500': '500', + '600': '600', + '700': '700', + }, danger: 'danger', success: 'success', text: 'text', @@ -94,8 +121,17 @@ describe('resource presets', () => { can_record: true, can_spotlight: true, chat: { - private: { can_receive: true, can_send: true, files: true, text: true }, - public: { can_send: true, files: true, text: true }, + private: { + can_receive: true, + can_send: true, + files: true, + text: true, + }, + public: { + can_send: true, + files: true, + text: true, + }, }, connected_meetings: { can_alter_connected_meetings: true, @@ -119,7 +155,11 @@ describe('resource presets', () => { can_start: true, config: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }, - polls: { can_create: true, can_view: true, can_vote: true }, + polls: { + can_create: true, + can_view: true, + can_vote: true, + }, recorder_type: 'RECORDER', show_participant_list: true, waiting_room_type: 'SKIP', @@ -149,7 +189,10 @@ describe('resource presets', () => { config: { max_screenshare_count: 0, max_video_streams: { desktop: 0, mobile: 0 }, - media: { screenshare: { frame_rate: 0, quality: 'hd' }, video: { frame_rate: 30, quality: 'hd' } }, + media: { + screenshare: { frame_rate: 0, quality: 'hd' }, + video: { frame_rate: 30, quality: 'hd' }, + }, view_type: 'GROUP_CALL', }, name: 'name', @@ -162,8 +205,17 @@ describe('resource presets', () => { can_record: true, can_spotlight: true, chat: { - private: { can_receive: true, can_send: true, files: true, text: true }, - public: { can_send: true, files: true, text: true }, + private: { + can_receive: true, + can_send: true, + files: true, + text: true, + }, + public: { + can_send: true, + files: true, + text: true, + }, }, connected_meetings: { can_alter_connected_meetings: true, @@ -188,7 +240,11 @@ describe('resource presets', () => { can_start: true, config: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', }, - polls: { can_create: true, can_view: true, can_vote: true }, + polls: { + can_create: true, + can_view: true, + can_vote: true, + }, recorder_type: 'RECORDER', show_participant_list: true, waiting_room_type: 'SKIP', @@ -199,8 +255,20 @@ describe('resource presets', () => { border_radius: 'rounded', border_width: 'thin', colors: { - background: { '600': '600', '700': '700', '800': '800', '900': '900', '1000': '1000' }, - brand: { '300': '300', '400': '400', '500': '500', '600': '600', '700': '700' }, + background: { + '600': '600', + '700': '700', + '800': '800', + '900': '900', + '1000': '1000', + }, + brand: { + '300': '300', + '400': '400', + '500': '500', + '600': '600', + '700': '700', + }, danger: 'danger', success: 'success', text: 'text', diff --git a/tests/api-resources/realtime-kit/recordings.test.ts b/tests/api-resources/realtime-kit/recordings.test.ts index 5920b10a90..eb0f3dc588 100644 --- a/tests/api-resources/realtime-kit/recordings.test.ts +++ b/tests/api-resources/realtime-kit/recordings.test.ts @@ -127,7 +127,11 @@ describe('resource recordings', () => { const response = await client.realtimeKit.recordings.startRecordings('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', allow_multiple_recordings: false, - audio_config: { channel: 'stereo', codec: 'AAC', export_file: true }, + audio_config: { + channel: 'stereo', + codec: 'AAC', + export_file: true, + }, file_name_prefix: 'string', interactive_config: { type: 'ID3' }, max_seconds: 60, @@ -153,7 +157,11 @@ describe('resource recordings', () => { codec: 'H264', export_file: true, height: 720, - watermark: { position: 'left top', size: { height: 1, width: 1 }, url: 'http://example.com' }, + watermark: { + position: 'left top', + size: { height: 1, width: 1 }, + url: 'http://example.com', + }, width: 1280, }, }); @@ -163,7 +171,10 @@ describe('resource recordings', () => { test.skip('startTrackRecording: only required params', async () => { const responsePromise = client.realtimeKit.recordings.startTrackRecording('app_id', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', - layers: { default: {}, 'default-video': {} }, + layers: { + default: {}, + 'default-video': {}, + }, meeting_id: 'string', }); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/realtime-kit/sessions.test.ts b/tests/api-resources/realtime-kit/sessions.test.ts index f1894de5be..5362ed8754 100644 --- a/tests/api-resources/realtime-kit/sessions.test.ts +++ b/tests/api-resources/realtime-kit/sessions.test.ts @@ -119,7 +119,11 @@ describe('resource sessions', () => { 'app_id', 'session_id', 'participant_id', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', filters: 'device_info', include_peer_events: true }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + filters: 'device_info', + include_peer_events: true, + }, ); }); diff --git a/tests/api-resources/request-tracers/traces.test.ts b/tests/api-resources/request-tracers/traces.test.ts index 7737f43dd3..56d6363709 100644 --- a/tests/api-resources/request-tracers/traces.test.ts +++ b/tests/api-resources/request-tracers/traces.test.ts @@ -30,7 +30,11 @@ describe('resource traces', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', method: 'PUT', url: 'https://some.zone/some_path', - body: { base64: 'c29tZV9yZXF1ZXN0X2JvZHk=', json: {}, plain_text: 'plain_text' }, + body: { + base64: 'c29tZV9yZXF1ZXN0X2JvZHk=', + json: {}, + plain_text: 'plain_text', + }, context: { bot_score: 0, geoloc: { diff --git a/tests/api-resources/resource-sharing/resources.test.ts b/tests/api-resources/resource-sharing/resources.test.ts index 615c5d60ec..1cd6e092f9 100644 --- a/tests/api-resources/resource-sharing/resources.test.ts +++ b/tests/api-resources/resource-sharing/resources.test.ts @@ -41,7 +41,10 @@ describe('resource resources', () => { const responsePromise = client.resourceSharing.resources.update( '3fd85f74b32742f1bff64a85009dda07', '023e105f4ecef8ad9ca31a8372d0c353', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', meta: {} }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + meta: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -56,7 +59,10 @@ describe('resource resources', () => { const response = await client.resourceSharing.resources.update( '3fd85f74b32742f1bff64a85009dda07', '023e105f4ecef8ad9ca31a8372d0c353', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', meta: {} }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + meta: {}, + }, ); }); diff --git a/tests/api-resources/schema-validation/settings/operations.test.ts b/tests/api-resources/schema-validation/settings/operations.test.ts index a2d22b51d6..5b60089e82 100644 --- a/tests/api-resources/schema-validation/settings/operations.test.ts +++ b/tests/api-resources/schema-validation/settings/operations.test.ts @@ -76,7 +76,10 @@ describe('resource operations', () => { test('bulkEdit: only required params', async () => { const responsePromise = client.schemaValidation.settings.operations.bulkEdit({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: { '3818d821-5901-4147-a474-f5f5aec1d54e': {}, 'b17c8043-99a0-4202-b7d9-8f7cdbee02cd': {} }, + body: { + '3818d821-5901-4147-a474-f5f5aec1d54e': {}, + 'b17c8043-99a0-4202-b7d9-8f7cdbee02cd': {}, + }, }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/spectrum/apps.test.ts b/tests/api-resources/spectrum/apps.test.ts index 2ec3cad068..a0eb7bc824 100644 --- a/tests/api-resources/spectrum/apps.test.ts +++ b/tests/api-resources/spectrum/apps.test.ts @@ -38,7 +38,11 @@ describe('resource apps', () => { edge_ips: { connectivity: 'all', type: 'dynamic' }, ip_firewall: false, origin_direct: ['tcp://127.0.0.1:8080'], - origin_dns: { name: 'origin.example.com', ttl: 600, type: '' }, + origin_dns: { + name: 'origin.example.com', + ttl: 600, + type: '', + }, origin_port: 22, proxy_protocol: 'off', tls: 'off', @@ -73,7 +77,11 @@ describe('resource apps', () => { edge_ips: { connectivity: 'all', type: 'dynamic' }, ip_firewall: false, origin_direct: ['tcp://127.0.0.1:8080'], - origin_dns: { name: 'origin.example.com', ttl: 600, type: '' }, + origin_dns: { + name: 'origin.example.com', + ttl: 600, + type: '', + }, origin_port: 22, proxy_protocol: 'off', tls: 'off', diff --git a/tests/api-resources/stream/audio-tracks.test.ts b/tests/api-resources/stream/audio-tracks.test.ts index 5d85ec55d4..8a9d5a80b9 100644 --- a/tests/api-resources/stream/audio-tracks.test.ts +++ b/tests/api-resources/stream/audio-tracks.test.ts @@ -74,7 +74,11 @@ describe('resource audioTracks', () => { const response = await client.stream.audioTracks.edit( 'ea95132c15732412d22c1476fa83f27a', 'ea95132c15732412d22c1476fa83f27a', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', default: true, label: 'director commentary' }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + default: true, + label: 'director commentary', + }, ); }); diff --git a/tests/api-resources/stream/token.test.ts b/tests/api-resources/stream/token.test.ts index 9e6739b341..1357888358 100644 --- a/tests/api-resources/stream/token.test.ts +++ b/tests/api-resources/stream/token.test.ts @@ -28,9 +28,24 @@ describe('resource token', () => { account_id: '023e105f4ecef8ad9ca31a8372d0c353', id: 'ab0d4ef71g4425f8dcba9041231813000', accessRules: [ - { action: 'block', country: ['US', 'MX'], ip: ['string'], type: 'ip.geoip.country' }, - { action: 'allow', country: ['string'], ip: ['93.184.216.0/24', '2400:cb00::/32'], type: 'ip.src' }, - { action: 'block', country: ['string'], ip: ['string'], type: 'any' }, + { + action: 'block', + country: ['US', 'MX'], + ip: ['string'], + type: 'ip.geoip.country', + }, + { + action: 'allow', + country: ['string'], + ip: ['93.184.216.0/24', '2400:cb00::/32'], + type: 'ip.src', + }, + { + action: 'block', + country: ['string'], + ip: ['string'], + type: 'any', + }, ], downloadable: true, exp: 0, diff --git a/tests/api-resources/url-scanner/scans.test.ts b/tests/api-resources/url-scanner/scans.test.ts index 81532e2cdb..a57bf0b6fb 100644 --- a/tests/api-resources/url-scanner/scans.test.ts +++ b/tests/api-resources/url-scanner/scans.test.ts @@ -49,7 +49,11 @@ describe('resource scans', () => { }); test('list: required and optional params', async () => { - const response = await client.urlScanner.scans.list({ account_id: 'account_id', q: 'q', size: 100 }); + const response = await client.urlScanner.scans.list({ + account_id: 'account_id', + q: 'q', + size: 100, + }); }); test('bulkCreate: only required params', async () => { diff --git a/tests/api-resources/user/tokens/tokens.test.ts b/tests/api-resources/user/tokens/tokens.test.ts index 6daec91f23..e3abb9347d 100644 --- a/tests/api-resources/user/tokens/tokens.test.ts +++ b/tests/api-resources/user/tokens/tokens.test.ts @@ -42,8 +42,14 @@ describe('resource tokens', () => { { effect: 'allow', permission_groups: [ - { id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } }, - { id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } }, + { + id: 'c8fed203ed3043cba015a93ad1616f1f', + meta: { key: 'key', value: 'value' }, + }, + { + id: '82e64a83756745bbbb1c9c2701bf816b', + meta: { key: 'key', value: 'value' }, + }, ], resources: { foo: 'string' }, }, @@ -91,8 +97,14 @@ describe('resource tokens', () => { { effect: 'allow', permission_groups: [ - { id: 'c8fed203ed3043cba015a93ad1616f1f', meta: { key: 'key', value: 'value' } }, - { id: '82e64a83756745bbbb1c9c2701bf816b', meta: { key: 'key', value: 'value' } }, + { + id: 'c8fed203ed3043cba015a93ad1616f1f', + meta: { key: 'key', value: 'value' }, + }, + { + id: '82e64a83756745bbbb1c9c2701bf816b', + meta: { key: 'key', value: 'value' }, + }, ], resources: { foo: 'string' }, }, @@ -134,7 +146,11 @@ describe('resource tokens', () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( client.user.tokens.list( - { direction: 'desc', page: 1, per_page: 5 }, + { + direction: 'desc', + page: 1, + per_page: 5, + }, { path: '/_stainless_unknown_path' }, ), ).rejects.toThrow(Cloudflare.NotFoundError); diff --git a/tests/api-resources/vectorize/indexes/indexes.test.ts b/tests/api-resources/vectorize/indexes/indexes.test.ts index 5df0df7211..bd3240fa6f 100644 --- a/tests/api-resources/vectorize/indexes/indexes.test.ts +++ b/tests/api-resources/vectorize/indexes/indexes.test.ts @@ -209,7 +209,10 @@ describe('resource indexes', () => { const response = await client.vectorize.indexes.query('example-index', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', vector: [0.5, 0.5, 0.5], - filter: { has_viewed: { $ne: true }, streaming_platform: 'netflix' }, + filter: { + has_viewed: { $ne: true }, + streaming_platform: 'netflix', + }, returnMetadata: 'none', returnValues: true, topK: 5, diff --git a/tests/api-resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.test.ts b/tests/api-resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.test.ts index 819581adec..633b212fed 100644 --- a/tests/api-resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.test.ts +++ b/tests/api-resources/web3/hostnames/ipfs-universal-paths/content-lists/content-lists.test.ts @@ -13,7 +13,11 @@ describe('resource contentLists', () => { test('update: only required params', async () => { const responsePromise = client.web3.hostnames.ipfsUniversalPaths.contentLists.update( '023e105f4ecef8ad9ca31a8372d0c353', - { zone_id: '023e105f4ecef8ad9ca31a8372d0c353', action: 'block', entries: [{}] }, + { + zone_id: '023e105f4ecef8ad9ca31a8372d0c353', + action: 'block', + entries: [{}], + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/asset-upload.test.ts b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/asset-upload.test.ts index cc390adcf9..5710c996f6 100644 --- a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/asset-upload.test.ts +++ b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/asset-upload.test.ts @@ -14,7 +14,10 @@ describe('resource assetUpload', () => { const responsePromise = client.workersForPlatforms.dispatch.namespaces.scripts.assetUpload.create( 'my-dispatch-namespace', 'this-is_my_script-01', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', manifest: { foo: { hash: 'hash', size: 0 } } }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + manifest: { foo: { hash: 'hash', size: 0 } }, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,7 +32,10 @@ describe('resource assetUpload', () => { const response = await client.workersForPlatforms.dispatch.namespaces.scripts.assetUpload.create( 'my-dispatch-namespace', 'this-is_my_script-01', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', manifest: { foo: { hash: 'hash', size: 0 } } }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + manifest: { foo: { hash: 'hash', size: 0 } }, + }, ); }); }); diff --git a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/content.test.ts b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/content.test.ts index 054fcff10a..614c47d606 100644 --- a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/content.test.ts +++ b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/content.test.ts @@ -15,7 +15,10 @@ describe('resource content', () => { const responsePromise = client.workersForPlatforms.dispatch.namespaces.scripts.content.update( 'my-dispatch-namespace', 'this-is_my_script-01', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', metadata: {} }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + metadata: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.test.ts b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.test.ts index 8a0215fb84..41308a3bd8 100644 --- a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.test.ts +++ b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/scripts.test.ts @@ -15,7 +15,10 @@ describe('resource scripts', () => { const responsePromise = client.workersForPlatforms.dispatch.namespaces.scripts.update( 'my-dispatch-namespace', 'this-is_my_script-01', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', metadata: {} }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + metadata: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -45,7 +48,13 @@ describe('resource scripts', () => { }, jwt: 'jwt', }, - bindings: [{ name: 'MY_ENV_VAR', text: 'my_data', type: 'plain_text' }], + bindings: [ + { + name: 'MY_ENV_VAR', + text: 'my_data', + type: 'plain_text', + }, + ], body_part: 'worker.js', compatibility_date: '2021-01-01', compatibility_flags: ['nodejs_compat'], @@ -61,7 +70,13 @@ describe('resource scripts', () => { new_tag: 'v2', old_tag: 'v1', renamed_classes: [{ from: 'from', to: 'to' }], - transferred_classes: [{ from: 'from', from_script: 'from_script', to: 'to' }], + transferred_classes: [ + { + from: 'from', + from_script: 'from_script', + to: 'to', + }, + ], }, observability: { enabled: true, @@ -77,7 +92,11 @@ describe('resource scripts', () => { placement: { mode: 'smart' }, tags: ['string'], tail_consumers: [ - { service: 'my-log-consumer', environment: 'production', namespace: 'my-namespace' }, + { + service: 'my-log-consumer', + environment: 'production', + namespace: 'my-namespace', + }, ], usage_model: 'standard', }, diff --git a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/settings.test.ts b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/settings.test.ts index 180d6326e5..cb5dcef1aa 100644 --- a/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/settings.test.ts +++ b/tests/api-resources/workers-for-platforms/dispatch/namespaces/scripts/settings.test.ts @@ -34,7 +34,13 @@ describe('resource settings', () => { { account_id: '023e105f4ecef8ad9ca31a8372d0c353', settings: { - bindings: [{ name: 'MY_ENV_VAR', text: 'my_data', type: 'plain_text' }], + bindings: [ + { + name: 'MY_ENV_VAR', + text: 'my_data', + type: 'plain_text', + }, + ], compatibility_date: '2021-01-01', compatibility_flags: ['nodejs_compat'], limits: { cpu_ms: 50 }, @@ -46,7 +52,13 @@ describe('resource settings', () => { new_tag: 'v2', old_tag: 'v1', renamed_classes: [{ from: 'from', to: 'to' }], - transferred_classes: [{ from: 'from', from_script: 'from_script', to: 'to' }], + transferred_classes: [ + { + from: 'from', + from_script: 'from_script', + to: 'to', + }, + ], }, observability: { enabled: true, @@ -62,7 +74,11 @@ describe('resource settings', () => { placement: { mode: 'smart' }, tags: ['my-team', 'my-public-api'], tail_consumers: [ - { service: 'my-log-consumer', environment: 'production', namespace: 'my-namespace' }, + { + service: 'my-log-consumer', + environment: 'production', + namespace: 'my-namespace', + }, ], usage_model: 'standard', }, diff --git a/tests/api-resources/workers/beta/workers/versions.test.ts b/tests/api-resources/workers/beta/workers/versions.test.ts index 0054fe3c38..75055e62ad 100644 --- a/tests/api-resources/workers/beta/workers/versions.test.ts +++ b/tests/api-resources/workers/beta/workers/versions.test.ts @@ -36,7 +36,13 @@ describe('resource versions', () => { }, jwt: 'jwt', }, - bindings: [{ name: 'MY_ENV_VAR', text: 'my_data', type: 'plain_text' }], + bindings: [ + { + name: 'MY_ENV_VAR', + text: 'my_data', + type: 'plain_text', + }, + ], compatibility_date: '2021-01-01', compatibility_flags: ['nodejs_compat'], limits: { cpu_ms: 50 }, @@ -48,7 +54,13 @@ describe('resource versions', () => { new_tag: 'v2', old_tag: 'v1', renamed_classes: [{ from: 'from', to: 'to' }], - transferred_classes: [{ from: 'from', from_script: 'from_script', to: 'to' }], + transferred_classes: [ + { + from: 'from', + from_script: 'from_script', + to: 'to', + }, + ], }, modules: [ { diff --git a/tests/api-resources/workers/beta/workers/workers.test.ts b/tests/api-resources/workers/beta/workers/workers.test.ts index f5673de726..829c1517ff 100644 --- a/tests/api-resources/workers/beta/workers/workers.test.ts +++ b/tests/api-resources/workers/beta/workers/workers.test.ts @@ -37,7 +37,11 @@ describe('resource workers', () => { observability: { enabled: true, head_sampling_rate: 1, - logs: { enabled: true, head_sampling_rate: 1, invocation_logs: true }, + logs: { + enabled: true, + head_sampling_rate: 1, + invocation_logs: true, + }, }, subdomain: { enabled: true, previews_enabled: true }, tags: ['my-team', 'my-public-api'], @@ -72,7 +76,11 @@ describe('resource workers', () => { observability: { enabled: true, head_sampling_rate: 1, - logs: { enabled: true, head_sampling_rate: 1, invocation_logs: true }, + logs: { + enabled: true, + head_sampling_rate: 1, + invocation_logs: true, + }, }, subdomain: { enabled: true, previews_enabled: true }, tags: ['my-team', 'my-public-api'], @@ -147,7 +155,11 @@ describe('resource workers', () => { observability: { enabled: true, head_sampling_rate: 1, - logs: { enabled: true, head_sampling_rate: 1, invocation_logs: true }, + logs: { + enabled: true, + head_sampling_rate: 1, + invocation_logs: true, + }, }, subdomain: { enabled: true, previews_enabled: true }, tags: ['my-team', 'my-public-api'], diff --git a/tests/api-resources/workers/observability/telemetry.test.ts b/tests/api-resources/workers/observability/telemetry.test.ts index 6a588f3d5e..5a6b589b86 100644 --- a/tests/api-resources/workers/observability/telemetry.test.ts +++ b/tests/api-resources/workers/observability/telemetry.test.ts @@ -25,11 +25,26 @@ describe('resource telemetry', () => { const response = await client.workers.observability.telemetry.keys({ account_id: 'account_id', datasets: ['string'], - filters: [{ key: 'key', operation: 'includes', type: 'string', value: 'string' }], + filters: [ + { + key: 'key', + operation: 'includes', + type: 'string', + value: 'string', + }, + ], from: 0, - keyNeedle: { value: 'string', isRegex: true, matchCase: true }, + keyNeedle: { + value: 'string', + isRegex: true, + matchCase: true, + }, limit: 0, - needle: { value: 'string', isRegex: true, matchCase: true }, + needle: { + value: 'string', + isRegex: true, + matchCase: true, + }, to: 0, }); }); @@ -64,14 +79,38 @@ describe('resource telemetry', () => { offsetBy: 0, offsetDirection: 'offsetDirection', parameters: { - calculations: [{ operator: 'uniq', alias: 'alias', key: 'key', keyType: 'string' }], + calculations: [ + { + operator: 'uniq', + alias: 'alias', + key: 'key', + keyType: 'string', + }, + ], datasets: ['string'], filterCombination: 'and', - filters: [{ key: 'key', operation: 'includes', type: 'string', value: 'string' }], + filters: [ + { + key: 'key', + operation: 'includes', + type: 'string', + value: 'string', + }, + ], groupBys: [{ type: 'string', value: 'value' }], - havings: [{ key: 'key', operation: 'eq', value: 0 }], + havings: [ + { + key: 'key', + operation: 'eq', + value: 0, + }, + ], limit: 0, - needle: { value: 'string', isRegex: true, matchCase: true }, + needle: { + value: 'string', + isRegex: true, + matchCase: true, + }, orderBy: { value: 'value', order: 'asc' }, }, patternType: 'message', @@ -103,9 +142,20 @@ describe('resource telemetry', () => { key: 'key', timeframe: { from: 0, to: 0 }, type: 'string', - filters: [{ key: 'key', operation: 'includes', type: 'string', value: 'string' }], + filters: [ + { + key: 'key', + operation: 'includes', + type: 'string', + value: 'string', + }, + ], limit: 0, - needle: { value: 'string', isRegex: true, matchCase: true }, + needle: { + value: 'string', + isRegex: true, + matchCase: true, + }, }); }); }); diff --git a/tests/api-resources/workers/scripts/script-and-version-settings.test.ts b/tests/api-resources/workers/scripts/script-and-version-settings.test.ts index 1f4df6cf8d..bf2c7bfc8f 100644 --- a/tests/api-resources/workers/scripts/script-and-version-settings.test.ts +++ b/tests/api-resources/workers/scripts/script-and-version-settings.test.ts @@ -29,7 +29,13 @@ describe('resource scriptAndVersionSettings', () => { const response = await client.workers.scripts.scriptAndVersionSettings.edit('this-is_my_script-01', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', settings: { - bindings: [{ name: 'MY_ENV_VAR', text: 'my_data', type: 'plain_text' }], + bindings: [ + { + name: 'MY_ENV_VAR', + text: 'my_data', + type: 'plain_text', + }, + ], compatibility_date: '2021-01-01', compatibility_flags: ['nodejs_compat'], limits: { cpu_ms: 50 }, @@ -41,7 +47,13 @@ describe('resource scriptAndVersionSettings', () => { new_tag: 'v2', old_tag: 'v1', renamed_classes: [{ from: 'from', to: 'to' }], - transferred_classes: [{ from: 'from', from_script: 'from_script', to: 'to' }], + transferred_classes: [ + { + from: 'from', + from_script: 'from_script', + to: 'to', + }, + ], }, observability: { enabled: true, @@ -57,7 +69,11 @@ describe('resource scriptAndVersionSettings', () => { placement: { mode: 'smart' }, tags: ['my-team', 'my-public-api'], tail_consumers: [ - { service: 'my-log-consumer', environment: 'production', namespace: 'my-namespace' }, + { + service: 'my-log-consumer', + environment: 'production', + namespace: 'my-namespace', + }, ], usage_model: 'standard', }, diff --git a/tests/api-resources/workers/scripts/script-upload.test.ts b/tests/api-resources/workers/scripts/script-upload.test.ts new file mode 100644 index 0000000000..37f25d61c8 --- /dev/null +++ b/tests/api-resources/workers/scripts/script-upload.test.ts @@ -0,0 +1,568 @@ +import Cloudflare from 'cloudflare'; +import { Response } from 'node-fetch'; + +const client = new Cloudflare({ + apiKey: '144c9defac04969c7bfad8efaa8ea194', + apiEmail: 'user@example.com', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +const accountId = '023e105f4ecef8ad9ca31a8372d0c353'; + +describe('script upload', () => { + describe('simple script upload', () => { + test('upload script with minimal configuration', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const responsePromise = client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('upload script with bindings', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response(env.MESSAGE, { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'plain_text', + name: 'MESSAGE', + text: 'Hello from binding!', + }, + ], + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload script with multiple modules', async () => { + const mainScript = ` + import { helper } from './utils.js'; + export default { + async fetch(request, env, ctx) { + return new Response(helper(), { status: 200 }); + }, + }`.trim(); + + const utilsScript = ` + export function helper() { + return 'Hello from module!'; + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'index.mjs', + compatibility_date: '2024-01-01', + modules: [ + { + name: 'index.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(mainScript).toString('base64'), + }, + { + name: 'utils.js', + content_type: 'application/javascript+module', + content_base64: Buffer.from(utilsScript).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload script with compatibility flags', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + compatibility_flags: ['nodejs_compat', 'streams_enable_constructors'], + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload script with limits', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + limits: { + cpu_ms: 50, + }, + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + }); + + describe('script upload with bindings', () => { + test('upload with KV namespace binding', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + const value = await env.MY_KV.get('key'); + return new Response(value || 'Not found', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'kv_namespace', + name: 'MY_KV', + namespace_id: 'namespace-id-123', + }, + ], + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload with R2 bucket binding', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + const object = await env.MY_BUCKET.get('file.txt'); + return new Response(object?.body || 'Not found', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'r2_bucket', + name: 'MY_BUCKET', + bucket_name: 'my-bucket', + }, + ], + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload with service binding', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return env.MY_SERVICE.fetch(request); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'service', + name: 'MY_SERVICE', + service: 'other-worker', + environment: 'production', + }, + ], + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload with multiple binding types', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + const message = env.MESSAGE; + const kvValue = await env.MY_KV.get('key'); + return new Response(\`\${message}: \${kvValue}\`, { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'plain_text', + name: 'MESSAGE', + text: 'Hello', + }, + { + type: 'kv_namespace', + name: 'MY_KV', + namespace_id: 'namespace-id-123', + }, + ], + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + }); + + describe('script upload with assets', () => { + test('upload script with assets configuration', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return env.ASSETS.fetch(request); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'assets', + name: 'ASSETS', + }, + ], + assets: { + jwt: 'asset-jwt-token', + }, + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload script with assets and custom config', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + const url = new URL(request.url); + if (url.pathname === '/api') { + return new Response('API response', { status: 200 }); + } + return env.ASSETS.fetch(request); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'assets', + name: 'ASSETS', + }, + ], + assets: { + jwt: 'asset-jwt-token', + config: { + html_handling: 'auto-trailing-slash', + not_found_handling: '404-page', + run_worker_first: ['/api/*'], + }, + }, + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + }); + + describe('script upload with deployment', () => { + test('upload script and deploy immediately', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + deploy: true, + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload script with annotations', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + annotations: { + 'workers/message': 'Initial deployment', + 'workers/tag': 'v1.0.0', + }, + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + }); + + describe('script upload with advanced features', () => { + test('upload script with durable object migrations', async () => { + const scriptContent = ` + export class MyDurableObject { + constructor(state, env) { + this.state = state; + } + async fetch(request) { + return new Response('Hello from DO!', { status: 200 }); + } + } + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + migrations: { + new_tag: 'v2', + old_tag: 'v1', + new_classes: ['MyDurableObject'], + }, + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload script with usage model', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + usage_model: 'bundled', + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + + test('upload script with placement mode', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response('Hello World!', { status: 200 }); + }, + }`.trim(); + + const response = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + placement: { + mode: 'smart', + }, + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(response).toBeDefined(); + }); + }); + + describe('complete workflow', () => { + test('create version and deployment', async () => { + const scriptContent = ` + export default { + async fetch(request, env, ctx) { + return new Response(env.MESSAGE, { status: 200 }); + }, + }`.trim(); + + const versionResponse = await client.workers.beta.workers.versions.create('test-worker-id', { + account_id: accountId, + main_module: 'worker.mjs', + compatibility_date: '2024-01-01', + bindings: [ + { + type: 'plain_text', + name: 'MESSAGE', + text: 'Hello World!', + }, + ], + modules: [ + { + name: 'worker.mjs', + content_type: 'application/javascript+module', + content_base64: Buffer.from(scriptContent).toString('base64'), + }, + ], + }); + + expect(versionResponse).toBeDefined(); + expect(versionResponse.id).toBeDefined(); + + const deploymentResponse = await client.workers.scripts.deployments.create('test-worker', { + account_id: accountId, + strategy: 'percentage', + versions: [ + { + percentage: 100, + version_id: versionResponse.id, + }, + ], + }); + + expect(deploymentResponse).toBeDefined(); + }); + }); +}); diff --git a/tests/api-resources/workers/scripts/scripts.test.ts b/tests/api-resources/workers/scripts/scripts.test.ts index 87f309af5f..f2dc476049 100644 --- a/tests/api-resources/workers/scripts/scripts.test.ts +++ b/tests/api-resources/workers/scripts/scripts.test.ts @@ -41,7 +41,13 @@ describe('resource scripts', () => { }, jwt: 'jwt', }, - bindings: [{ name: 'MY_ENV_VAR', text: 'my_data', type: 'plain_text' }], + bindings: [ + { + name: 'MY_ENV_VAR', + text: 'my_data', + type: 'plain_text', + }, + ], body_part: 'worker.js', compatibility_date: '2021-01-01', compatibility_flags: ['nodejs_compat'], @@ -57,7 +63,13 @@ describe('resource scripts', () => { new_tag: 'v2', old_tag: 'v1', renamed_classes: [{ from: 'from', to: 'to' }], - transferred_classes: [{ from: 'from', from_script: 'from_script', to: 'to' }], + transferred_classes: [ + { + from: 'from', + from_script: 'from_script', + to: 'to', + }, + ], }, observability: { enabled: true, @@ -73,7 +85,11 @@ describe('resource scripts', () => { placement: { mode: 'smart' }, tags: ['string'], tail_consumers: [ - { service: 'my-log-consumer', environment: 'production', namespace: 'my-namespace' }, + { + service: 'my-log-consumer', + environment: 'production', + namespace: 'my-namespace', + }, ], usage_model: 'standard', }, diff --git a/tests/api-resources/workers/scripts/settings.test.ts b/tests/api-resources/workers/scripts/settings.test.ts index 12054dc26e..5070186e40 100644 --- a/tests/api-resources/workers/scripts/settings.test.ts +++ b/tests/api-resources/workers/scripts/settings.test.ts @@ -39,7 +39,13 @@ describe('resource settings', () => { }, }, tags: ['my-team', 'my-public-api'], - tail_consumers: [{ service: 'my-log-consumer', environment: 'production', namespace: 'my-namespace' }], + tail_consumers: [ + { + service: 'my-log-consumer', + environment: 'production', + namespace: 'my-namespace', + }, + ], }); }); diff --git a/tests/api-resources/workers/scripts/versions.test.ts b/tests/api-resources/workers/scripts/versions.test.ts index 437f382fd7..7be37ce5ad 100644 --- a/tests/api-resources/workers/scripts/versions.test.ts +++ b/tests/api-resources/workers/scripts/versions.test.ts @@ -36,7 +36,13 @@ describe('resource versions', () => { 'workers/message': 'Fixed worker code.', 'workers/tag': 'workers/tag', }, - bindings: [{ name: 'MY_ENV_VAR', text: 'my_data', type: 'plain_text' }], + bindings: [ + { + name: 'MY_ENV_VAR', + text: 'my_data', + type: 'plain_text', + }, + ], compatibility_date: '2021-01-01', compatibility_flags: ['nodejs_compat'], keep_bindings: ['string'], diff --git a/tests/api-resources/zaraz/config.test.ts b/tests/api-resources/zaraz/config.test.ts index 502f5712fa..84948b818f 100644 --- a/tests/api-resources/zaraz/config.test.ts +++ b/tests/api-resources/zaraz/config.test.ts @@ -30,12 +30,32 @@ describe('resource config', () => { }, triggers: { foo: { - excludeRules: [{ id: 'id', match: 'match', op: 'CONTAINS', value: 'value' }], - loadRules: [{ id: 'id', match: 'match', op: 'CONTAINS', value: 'value' }], + excludeRules: [ + { + id: 'id', + match: 'match', + op: 'CONTAINS', + value: 'value', + }, + ], + loadRules: [ + { + id: 'id', + match: 'match', + op: 'CONTAINS', + value: 'value', + }, + ], + name: 'name', + }, + }, + variables: { + foo: { name: 'name', + type: 'string', + value: 'value', }, }, - variables: { foo: { name: 'name', type: 'string', value: 'value' } }, zarazVersion: 0, }); const rawResponse = await responsePromise.asResponse(); @@ -88,7 +108,12 @@ describe('resource config', () => { }, defaultPurpose: 'defaultPurpose', neoEvents: [ - { actionType: 'actionType', blockingTriggers: ['string'], data: {}, firingTriggers: ['string'] }, + { + actionType: 'actionType', + blockingTriggers: ['string'], + data: {}, + firingTriggers: ['string'], + }, ], vendorName: 'vendorName', vendorPolicyUrl: 'vendorPolicyUrl', @@ -96,16 +121,40 @@ describe('resource config', () => { }, triggers: { foo: { - excludeRules: [{ id: 'id', match: 'match', op: 'CONTAINS', value: 'value' }], - loadRules: [{ id: 'id', match: 'match', op: 'CONTAINS', value: 'value' }], + excludeRules: [ + { + id: 'id', + match: 'match', + op: 'CONTAINS', + value: 'value', + }, + ], + loadRules: [ + { + id: 'id', + match: 'match', + op: 'CONTAINS', + value: 'value', + }, + ], name: 'name', description: 'description', system: 'pageload', }, }, - variables: { foo: { name: 'name', type: 'string', value: 'value' } }, + variables: { + foo: { + name: 'name', + type: 'string', + value: 'value', + }, + }, zarazVersion: 0, - analytics: { defaultPurpose: 'defaultPurpose', enabled: true, sessionExpTime: 60 }, + analytics: { + defaultPurpose: 'defaultPurpose', + enabled: true, + sessionExpTime: 60, + }, consent: { enabled: true, buttonTextTranslations: { @@ -125,7 +174,11 @@ describe('resource config', () => { hideModal: true, purposes: { foo: { description: 'description', name: 'name' } }, purposesWithTranslations: { - foo: { description: { foo: 'string' }, name: { foo: 'string' }, order: 0 }, + foo: { + description: { foo: 'string' }, + name: { foo: 'string' }, + order: 0, + }, }, tcfCompliant: true, }, diff --git a/tests/api-resources/zero-trust/access/ai-controls/mcp/portals.test.ts b/tests/api-resources/zero-trust/access/ai-controls/mcp/portals.test.ts index e3fdaa8fad..35c02e383a 100644 --- a/tests/api-resources/zero-trust/access/ai-controls/mcp/portals.test.ts +++ b/tests/api-resources/zero-trust/access/ai-controls/mcp/portals.test.ts @@ -33,13 +33,26 @@ describe('resource portals', () => { hostname: 'exmaple.com', name: 'My MCP Portal', description: 'This is my custom MCP Portal', + secure_web_gateway: false, servers: [ { server_id: 'my-mcp-server', default_disabled: true, on_behalf: true, - updated_prompts: [{ name: 'name', description: 'description', enabled: true }], - updated_tools: [{ name: 'name', description: 'description', enabled: true }], + updated_prompts: [ + { + name: 'name', + description: 'description', + enabled: true, + }, + ], + updated_tools: [ + { + name: 'name', + description: 'description', + enabled: true, + }, + ], }, ], }); @@ -64,13 +77,26 @@ describe('resource portals', () => { description: 'This is my custom MCP Portal', hostname: 'exmaple.com', name: 'My MCP Portal', + secure_web_gateway: false, servers: [ { server_id: 'my-mcp-server', default_disabled: true, on_behalf: true, - updated_prompts: [{ name: 'name', description: 'description', enabled: true }], - updated_tools: [{ name: 'name', description: 'description', enabled: true }], + updated_prompts: [ + { + name: 'name', + description: 'description', + enabled: true, + }, + ], + updated_tools: [ + { + name: 'name', + description: 'description', + enabled: true, + }, + ], }, ], }); diff --git a/tests/api-resources/zero-trust/access/applications/applications.test.ts b/tests/api-resources/zero-trust/access/applications/applications.test.ts index 12a35ba34b..140f77e7fd 100644 --- a/tests/api-resources/zero-trust/access/applications/applications.test.ts +++ b/tests/api-resources/zero-trust/access/applications/applications.test.ts @@ -92,7 +92,11 @@ describe('resource applications', () => { scim_config: { idp_uid: 'idp_uid', remote_uri: 'remote_uri', - authentication: { password: 'password', scheme: 'httpbasic', user: 'user' }, + authentication: { + password: 'password', + scheme: 'httpbasic', + user: 'user', + }, deactivate_on_delete: true, enabled: true, mappings: [ @@ -100,7 +104,11 @@ describe('resource applications', () => { schema: 'urn:ietf:params:scim:schemas:core:2.0:User', enabled: true, filter: 'title pr or userType eq "Intern"', - operations: { create: true, delete: true, update: true }, + operations: { + create: true, + delete: true, + update: true, + }, strictness: 'strict', transform_jsonata: "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", @@ -112,6 +120,7 @@ describe('resource applications', () => { session_duration: '24h', skip_interstitial: true, tags: ['engineers'], + use_clientless_isolation_app_launcher_url: false, }); }); @@ -197,7 +206,11 @@ describe('resource applications', () => { scim_config: { idp_uid: 'idp_uid', remote_uri: 'remote_uri', - authentication: { password: 'password', scheme: 'httpbasic', user: 'user' }, + authentication: { + password: 'password', + scheme: 'httpbasic', + user: 'user', + }, deactivate_on_delete: true, enabled: true, mappings: [ @@ -205,7 +218,11 @@ describe('resource applications', () => { schema: 'urn:ietf:params:scim:schemas:core:2.0:User', enabled: true, filter: 'title pr or userType eq "Intern"', - operations: { create: true, delete: true, update: true }, + operations: { + create: true, + delete: true, + update: true, + }, strictness: 'strict', transform_jsonata: "$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])", @@ -217,6 +234,7 @@ describe('resource applications', () => { session_duration: '24h', skip_interstitial: true, tags: ['engineers'], + use_clientless_isolation_app_launcher_url: false, }); }); diff --git a/tests/api-resources/zero-trust/access/applications/policy-tests/users.test.ts b/tests/api-resources/zero-trust/access/applications/policy-tests/users.test.ts index 5efdd2cfec..8ad51c054c 100755 --- a/tests/api-resources/zero-trust/access/applications/policy-tests/users.test.ts +++ b/tests/api-resources/zero-trust/access/applications/policy-tests/users.test.ts @@ -27,7 +27,12 @@ describe('resource users', () => { test('list: required and optional params', async () => { const response = await client.zeroTrust.access.applications.policyTests.users.list( 'f1a8b3c9d4e5f6789a0b1c2d3e4f5678a9b0c1d2e3f4a5b67890c1d2e3f4b5a6', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', page: 0, per_page: 0, status: 'success' }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + page: 0, + per_page: 0, + status: 'success', + }, ); }); }); diff --git a/tests/api-resources/zero-trust/access/certificates/certificates.test.ts b/tests/api-resources/zero-trust/access/certificates/certificates.test.ts index 4719f42f71..a004ee116a 100644 --- a/tests/api-resources/zero-trust/access/certificates/certificates.test.ts +++ b/tests/api-resources/zero-trust/access/certificates/certificates.test.ts @@ -57,7 +57,11 @@ describe('resource certificates', () => { test.skip('update: required and optional params', async () => { const response = await client.zeroTrust.access.certificates.update( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { associated_hostnames: ['admin.example.com'], account_id: 'account_id', name: 'Allow devs' }, + { + associated_hostnames: ['admin.example.com'], + account_id: 'account_id', + name: 'Allow devs', + }, ); }); diff --git a/tests/api-resources/zero-trust/access/certificates/settings.test.ts b/tests/api-resources/zero-trust/access/certificates/settings.test.ts index e7481b6ff8..404f7a6948 100644 --- a/tests/api-resources/zero-trust/access/certificates/settings.test.ts +++ b/tests/api-resources/zero-trust/access/certificates/settings.test.ts @@ -14,7 +14,11 @@ describe('resource settings', () => { test.skip('update: only required params', async () => { const responsePromise = client.zeroTrust.access.certificates.settings.update({ settings: [ - { china_network: false, client_certificate_forwarding: true, hostname: 'admin.example.com' }, + { + china_network: false, + client_certificate_forwarding: true, + hostname: 'admin.example.com', + }, ], account_id: 'account_id', }); @@ -31,7 +35,11 @@ describe('resource settings', () => { test.skip('update: required and optional params', async () => { const response = await client.zeroTrust.access.certificates.settings.update({ settings: [ - { china_network: false, client_certificate_forwarding: true, hostname: 'admin.example.com' }, + { + china_network: false, + client_certificate_forwarding: true, + hostname: 'admin.example.com', + }, ], account_id: 'account_id', }); diff --git a/tests/api-resources/zero-trust/access/infrastructure/targets.test.ts b/tests/api-resources/zero-trust/access/infrastructure/targets.test.ts index 553fe580e2..e55b4d4ff0 100644 --- a/tests/api-resources/zero-trust/access/infrastructure/targets.test.ts +++ b/tests/api-resources/zero-trust/access/infrastructure/targets.test.ts @@ -42,7 +42,11 @@ describe('resource targets', () => { test('update: only required params', async () => { const responsePromise = client.zeroTrust.access.infrastructure.targets.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { account_id: '023e105f4ecef8ad9ca31a8372d0c353', hostname: 'infra-access-target', ip: {} }, + { + account_id: '023e105f4ecef8ad9ca31a8372d0c353', + hostname: 'infra-access-target', + ip: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -173,7 +177,12 @@ describe('resource targets', () => { test('bulkUpdate: only required params', async () => { const responsePromise = client.zeroTrust.access.infrastructure.targets.bulkUpdate({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', - body: [{ hostname: 'infra-access-target', ip: {} }], + body: [ + { + hostname: 'infra-access-target', + ip: {}, + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/zero-trust/devices/dex-tests.test.ts b/tests/api-resources/zero-trust/devices/dex-tests.test.ts index 246e9b7961..34bf6c64ad 100644 --- a/tests/api-resources/zero-trust/devices/dex-tests.test.ts +++ b/tests/api-resources/zero-trust/devices/dex-tests.test.ts @@ -30,12 +30,22 @@ describe('resource dexTests', () => { test('create: required and optional params', async () => { const response = await client.zeroTrust.devices.dexTests.create({ account_id: '01a7362d577a6c3019a474fd6f485823', - data: { host: 'https://dash.cloudflare.com', kind: 'http', method: 'GET' }, + data: { + host: 'https://dash.cloudflare.com', + kind: 'http', + method: 'GET', + }, enabled: true, interval: '30m', name: 'HTTP dash health check', description: 'Checks the dash endpoint every 30 minutes', - target_policies: [{ id: 'id', default: true, name: 'name' }], + target_policies: [ + { + id: 'id', + default: true, + name: 'name', + }, + ], targeted: true, }); }); @@ -60,12 +70,22 @@ describe('resource dexTests', () => { test('update: required and optional params', async () => { const response = await client.zeroTrust.devices.dexTests.update('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '01a7362d577a6c3019a474fd6f485823', - data: { host: 'https://dash.cloudflare.com', kind: 'http', method: 'GET' }, + data: { + host: 'https://dash.cloudflare.com', + kind: 'http', + method: 'GET', + }, enabled: true, interval: '30m', name: 'HTTP dash health check', description: 'Checks the dash endpoint every 30 minutes', - target_policies: [{ id: 'id', default: true, name: 'name' }], + target_policies: [ + { + id: 'id', + default: true, + name: 'name', + }, + ], targeted: true, }); }); diff --git a/tests/api-resources/zero-trust/dex/commands/commands.test.ts b/tests/api-resources/zero-trust/dex/commands/commands.test.ts index aee782be0d..84d4e45bc1 100644 --- a/tests/api-resources/zero-trust/dex/commands/commands.test.ts +++ b/tests/api-resources/zero-trust/dex/commands/commands.test.ts @@ -13,7 +13,13 @@ describe('resource commands', () => { test('create: only required params', async () => { const responsePromise = client.zeroTrust.dex.commands.create({ account_id: '01a7362d577a6c3019a474fd6f485823', - commands: [{ command_type: 'pcap', device_id: 'device_id', user_email: 'user_email' }], + commands: [ + { + command_type: 'pcap', + device_id: 'device_id', + user_email: 'user_email', + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/zero-trust/dlp/datasets/versions/versions.test.ts b/tests/api-resources/zero-trust/dlp/datasets/versions/versions.test.ts index 5314fdfc9b..cbc56632c3 100755 --- a/tests/api-resources/zero-trust/dlp/datasets/versions/versions.test.ts +++ b/tests/api-resources/zero-trust/dlp/datasets/versions/versions.test.ts @@ -34,7 +34,11 @@ describe('resource versions', () => { { account_id: 'account_id', body: [ - { entry_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', header_name: 'header_name', num_cells: 0 }, + { + entry_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + header_name: 'header_name', + num_cells: 0, + }, ], }, ); diff --git a/tests/api-resources/zero-trust/dlp/email/rules.test.ts b/tests/api-resources/zero-trust/dlp/email/rules.test.ts index 42fcf1e4a0..ccbcb78e5f 100644 --- a/tests/api-resources/zero-trust/dlp/email/rules.test.ts +++ b/tests/api-resources/zero-trust/dlp/email/rules.test.ts @@ -14,7 +14,13 @@ describe('resource rules', () => { const responsePromise = client.zeroTrust.dlp.email.rules.create({ account_id: 'account_id', action: { action: 'Block' }, - conditions: [{ operator: 'InList', selector: 'Recipients', value: ['string'] }], + conditions: [ + { + operator: 'InList', + selector: 'Recipients', + value: ['string'], + }, + ], enabled: true, name: 'name', }); @@ -31,7 +37,13 @@ describe('resource rules', () => { const response = await client.zeroTrust.dlp.email.rules.create({ account_id: 'account_id', action: { action: 'Block', message: 'message' }, - conditions: [{ operator: 'InList', selector: 'Recipients', value: ['string'] }], + conditions: [ + { + operator: 'InList', + selector: 'Recipients', + value: ['string'], + }, + ], enabled: true, name: 'name', description: 'description', @@ -42,7 +54,13 @@ describe('resource rules', () => { const responsePromise = client.zeroTrust.dlp.email.rules.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', action: { action: 'Block' }, - conditions: [{ operator: 'InList', selector: 'Recipients', value: ['string'] }], + conditions: [ + { + operator: 'InList', + selector: 'Recipients', + value: ['string'], + }, + ], enabled: true, name: 'name', }); @@ -59,7 +77,13 @@ describe('resource rules', () => { const response = await client.zeroTrust.dlp.email.rules.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id', action: { action: 'Block', message: 'message' }, - conditions: [{ operator: 'InList', selector: 'Recipients', value: ['string'] }], + conditions: [ + { + operator: 'InList', + selector: 'Recipients', + value: ['string'], + }, + ], enabled: true, name: 'name', description: 'description', diff --git a/tests/api-resources/zero-trust/dlp/entries/custom.test.ts b/tests/api-resources/zero-trust/dlp/entries/custom.test.ts index a07726b8c7..82f631eec0 100644 --- a/tests/api-resources/zero-trust/dlp/entries/custom.test.ts +++ b/tests/api-resources/zero-trust/dlp/entries/custom.test.ts @@ -40,7 +40,12 @@ describe('resource custom', () => { test.skip('update: only required params', async () => { const responsePromise = client.zeroTrust.dlp.entries.custom.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { account_id: 'account_id', enabled: true, name: 'name', pattern: { regex: 'regex' } }, + { + account_id: 'account_id', + enabled: true, + name: 'name', + pattern: { regex: 'regex' }, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/zero-trust/dlp/profiles/custom.test.ts b/tests/api-resources/zero-trust/dlp/profiles/custom.test.ts index ff5f5592e7..164d7933c7 100644 --- a/tests/api-resources/zero-trust/dlp/profiles/custom.test.ts +++ b/tests/api-resources/zero-trust/dlp/profiles/custom.test.ts @@ -31,9 +31,18 @@ describe('resource custom', () => { ai_context_enabled: true, allowed_match_count: 5, confidence_threshold: 'confidence_threshold', - context_awareness: { enabled: true, skip: { files: true } }, + context_awareness: { + enabled: true, + skip: { files: true }, + }, description: 'description', - entries: [{ enabled: true, name: 'name', pattern: { regex: 'regex', validation: 'luhn' } }], + entries: [ + { + enabled: true, + name: 'name', + pattern: { regex: 'regex', validation: 'luhn' }, + }, + ], ocr_enabled: true, shared_entries: [{ enabled: true, entry_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }], }); @@ -62,7 +71,10 @@ describe('resource custom', () => { ai_context_enabled: true, allowed_match_count: 0, confidence_threshold: 'confidence_threshold', - context_awareness: { enabled: true, skip: { files: true } }, + context_awareness: { + enabled: true, + skip: { files: true }, + }, description: 'description', entries: [ { diff --git a/tests/api-resources/zero-trust/gateway/certificates.test.ts b/tests/api-resources/zero-trust/gateway/certificates.test.ts index 07e3af88ae..b6fc36b08f 100644 --- a/tests/api-resources/zero-trust/gateway/certificates.test.ts +++ b/tests/api-resources/zero-trust/gateway/certificates.test.ts @@ -73,7 +73,10 @@ describe('resource certificates', () => { test('activate: only required params', async () => { const responsePromise = client.zeroTrust.gateway.certificates.activate( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + { + account_id: '699d98642c564d2e855e9661899b7252', + body: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -87,14 +90,20 @@ describe('resource certificates', () => { test('activate: required and optional params', async () => { const response = await client.zeroTrust.gateway.certificates.activate( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + { + account_id: '699d98642c564d2e855e9661899b7252', + body: {}, + }, ); }); test('deactivate: only required params', async () => { const responsePromise = client.zeroTrust.gateway.certificates.deactivate( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + { + account_id: '699d98642c564d2e855e9661899b7252', + body: {}, + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -108,7 +117,10 @@ describe('resource certificates', () => { test('deactivate: required and optional params', async () => { const response = await client.zeroTrust.gateway.certificates.deactivate( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { account_id: '699d98642c564d2e855e9661899b7252', body: {} }, + { + account_id: '699d98642c564d2e855e9661899b7252', + body: {}, + }, ); }); diff --git a/tests/api-resources/zero-trust/gateway/locations.test.ts b/tests/api-resources/zero-trust/gateway/locations.test.ts index 31cae0e471..8ba8c5380d 100644 --- a/tests/api-resources/zero-trust/gateway/locations.test.ts +++ b/tests/api-resources/zero-trust/gateway/locations.test.ts @@ -32,7 +32,11 @@ describe('resource locations', () => { dns_destination_ips_id: '0e4a32c6-6fb8-4858-9296-98f51631e8e6', ecs_support: false, endpoints: { - doh: { enabled: true, networks: [{ network: '2001:85a3::/64' }], require_token: true }, + doh: { + enabled: true, + networks: [{ network: '2001:85a3::/64' }], + require_token: true, + }, dot: { enabled: true, networks: [{ network: '2001:85a3::/64' }] }, ipv4: { enabled: true }, ipv6: { enabled: true, networks: [{ network: '2001:85a3::/64' }] }, @@ -63,7 +67,11 @@ describe('resource locations', () => { dns_destination_ips_id: '0e4a32c6-6fb8-4858-9296-98f51631e8e6', ecs_support: false, endpoints: { - doh: { enabled: true, networks: [{ network: '2001:85a3::/64' }], require_token: true }, + doh: { + enabled: true, + networks: [{ network: '2001:85a3::/64' }], + require_token: true, + }, dot: { enabled: true, networks: [{ network: '2001:85a3::/64' }] }, ipv4: { enabled: true }, ipv6: { enabled: true, networks: [{ network: '2001:85a3::/64' }] }, diff --git a/tests/api-resources/zero-trust/gateway/rules.test.ts b/tests/api-resources/zero-trust/gateway/rules.test.ts index 07eceabbb3..2859be18aa 100644 --- a/tests/api-resources/zero-trust/gateway/rules.test.ts +++ b/tests/api-resources/zero-trust/gateway/rules.test.ts @@ -78,7 +78,11 @@ describe('resource rules', () => { }, ], }, - egress: { ipv4: '192.0.2.2', ipv4_fallback: '192.0.2.3', ipv6: '2001:DB8::/64' }, + egress: { + ipv4: '192.0.2.2', + ipv4_fallback: '192.0.2.3', + ipv6: '2001:DB8::/64', + }, forensic_copy: { enabled: true }, ignore_cname_category_matches: true, insecure_disable_dnssec_validation: false, @@ -95,7 +99,11 @@ describe('resource rules', () => { override_ips: ['1.1.1.1', '2.2.2.2'], payload_log: { enabled: true }, quarantine: { file_types: ['exe'] }, - redirect: { target_uri: 'https://example.com', include_context: true, preserve_path_and_query: true }, + redirect: { + target_uri: 'https://example.com', + include_context: true, + preserve_path_and_query: true, + }, resolve_dns_internally: { fallback: 'none', view_id: 'view_id' }, resolve_dns_through_cloudflare: true, untrusted_cert: { action: 'error' }, @@ -183,7 +191,11 @@ describe('resource rules', () => { }, ], }, - egress: { ipv4: '192.0.2.2', ipv4_fallback: '192.0.2.3', ipv6: '2001:DB8::/64' }, + egress: { + ipv4: '192.0.2.2', + ipv4_fallback: '192.0.2.3', + ipv6: '2001:DB8::/64', + }, forensic_copy: { enabled: true }, ignore_cname_category_matches: true, insecure_disable_dnssec_validation: false, @@ -200,7 +212,11 @@ describe('resource rules', () => { override_ips: ['1.1.1.1', '2.2.2.2'], payload_log: { enabled: true }, quarantine: { file_types: ['exe'] }, - redirect: { target_uri: 'https://example.com', include_context: true, preserve_path_and_query: true }, + redirect: { + target_uri: 'https://example.com', + include_context: true, + preserve_path_and_query: true, + }, resolve_dns_internally: { fallback: 'none', view_id: 'view_id' }, resolve_dns_through_cloudflare: true, untrusted_cert: { action: 'error' }, diff --git a/tests/api-resources/zero-trust/identity-providers/identity-providers.test.ts b/tests/api-resources/zero-trust/identity-providers/identity-providers.test.ts index 9d0aee3fe6..64e3727786 100644 --- a/tests/api-resources/zero-trust/identity-providers/identity-providers.test.ts +++ b/tests/api-resources/zero-trust/identity-providers/identity-providers.test.ts @@ -56,7 +56,12 @@ describe('resource identityProviders', () => { test.skip('update: only required params', async () => { const responsePromise = client.zeroTrust.identityProviders.update( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', - { config: {}, name: 'Widget Corps IDP', type: 'onetimepin', account_id: 'account_id' }, + { + config: {}, + name: 'Widget Corps IDP', + type: 'onetimepin', + account_id: 'account_id', + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/zero-trust/organizations/organizations.test.ts b/tests/api-resources/zero-trust/organizations/organizations.test.ts index b8abfc2a9e..0e3e6e79ed 100644 --- a/tests/api-resources/zero-trust/organizations/organizations.test.ts +++ b/tests/api-resources/zero-trust/organizations/organizations.test.ts @@ -34,6 +34,8 @@ describe('resource organizations', () => { account_id: 'account_id', allow_authenticate_via_warp: true, auto_redirect_to_identity: true, + deny_unmatched_requests: true, + deny_unmatched_requests_exempted_zone_names: ['example.com'], is_ui_read_only: true, login_design: { background_color: '#c5ed1b', diff --git a/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts b/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts index a14a613ca3..0e68378f18 100644 --- a/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts +++ b/tests/api-resources/zero-trust/risk-scoring/integrations/integrations.test.ts @@ -37,7 +37,11 @@ describe('resource integrations', () => { test('update: only required params', async () => { const responsePromise = client.zeroTrust.riskScoring.integrations.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - { account_id: 'account_id', active: true, tenant_url: 'https://example.com' }, + { + account_id: 'account_id', + active: true, + tenant_url: 'https://example.com', + }, ); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); diff --git a/tests/api-resources/zero-trust/seats.test.ts b/tests/api-resources/zero-trust/seats.test.ts index 52fe459416..494576b1c8 100644 --- a/tests/api-resources/zero-trust/seats.test.ts +++ b/tests/api-resources/zero-trust/seats.test.ts @@ -14,7 +14,13 @@ describe('resource seats', () => { test.skip('edit: only required params', async () => { const responsePromise = client.zeroTrust.seats.edit({ account_id: '699d98642c564d2e855e9661899b7252', - body: [{ access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }], + body: [ + { + access_seat: false, + gateway_seat: false, + seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + }, + ], }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,7 +35,13 @@ describe('resource seats', () => { test.skip('edit: required and optional params', async () => { const response = await client.zeroTrust.seats.edit({ account_id: '699d98642c564d2e855e9661899b7252', - body: [{ access_seat: false, gateway_seat: false, seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415' }], + body: [ + { + access_seat: false, + gateway_seat: false, + seat_uid: 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', + }, + ], }); }); }); diff --git a/tests/api-resources/zero-trust/tunnels/cloudflared/configurations.test.ts b/tests/api-resources/zero-trust/tunnels/cloudflared/configurations.test.ts index e8e8609506..044e968204 100644 --- a/tests/api-resources/zero-trust/tunnels/cloudflared/configurations.test.ts +++ b/tests/api-resources/zero-trust/tunnels/cloudflared/configurations.test.ts @@ -35,7 +35,11 @@ describe('resource configurations', () => { hostname: 'tunnel.example.com', service: 'https://localhost:8001', originRequest: { - access: { audTag: ['string'], teamName: 'zero-trust-organization-name', required: false }, + access: { + audTag: ['string'], + teamName: 'zero-trust-organization-name', + required: false, + }, caPool: 'caPool', connectTimeout: 10, disableChunkedEncoding: true, @@ -55,7 +59,11 @@ describe('resource configurations', () => { }, ], originRequest: { - access: { audTag: ['string'], teamName: 'zero-trust-organization-name', required: false }, + access: { + audTag: ['string'], + teamName: 'zero-trust-organization-name', + required: false, + }, caPool: 'caPool', connectTimeout: 10, disableChunkedEncoding: true, diff --git a/tests/api-resources/zones/zones.test.ts b/tests/api-resources/zones/zones.test.ts index b429da2682..a804625a79 100644 --- a/tests/api-resources/zones/zones.test.ts +++ b/tests/api-resources/zones/zones.test.ts @@ -11,7 +11,10 @@ const client = new Cloudflare({ describe('resource zones', () => { test('create: only required params', async () => { - const responsePromise = client.zones.create({ account: {}, name: 'example.com' }); + const responsePromise = client.zones.create({ + account: {}, + name: 'example.com', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; diff --git a/tsconfig.build.json b/tsconfig.build.json index 9a9cfdfa2a..ba2d973a3e 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -6,7 +6,7 @@ "rootDir": "./dist/src", "paths": { "cloudflare/*": ["./dist/src/*"], - "cloudflare": ["./dist/src/index.ts"] + "cloudflare": ["./dist/src/index.ts"], }, "noEmit": false, "declaration": true, diff --git a/tsconfig.json b/tsconfig.json index 46ecf7dc1e..79801679ea 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,7 +31,7 @@ "noUncheckedIndexedAccess": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, - "isolatedModules": false, + "isolatedModules": false, "skipLibCheck": true } diff --git a/yarn.lock b/yarn.lock index 2bcc59e9b3..d6c83fe331 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,163 +7,119 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" - integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.28.6.tgz#72499312ec58b1e2245ba4a4f550c132be4982f7" + integrity sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q== dependencies: - "@babel/highlight" "^7.23.4" - chalk "^2.4.2" + "@babel/helper-validator-identifier" "^7.28.5" + js-tokens "^4.0.0" + picocolors "^1.1.1" -"@babel/compat-data@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" - integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== +"@babel/compat-data@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.6.tgz#103f466803fa0f059e82ccac271475470570d74c" + integrity sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg== "@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.6.tgz#8be77cd77c55baadcc1eae1c33df90ab6d2151d4" - integrity sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.23.6" - "@babel/parser" "^7.23.6" - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.6" - "@babel/types" "^7.23.6" + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.6.tgz#531bf883a1126e53501ba46eb3bb414047af507f" + integrity sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-compilation-targets" "^7.28.6" + "@babel/helper-module-transforms" "^7.28.6" + "@babel/helpers" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" + "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.23.6", "@babel/generator@^7.7.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.6.tgz#9e1fca4811c77a10580d17d26b57b036133f3c2e" - integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== +"@babel/generator@^7.28.6", "@babel/generator@^7.7.2": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.6.tgz#48dcc65d98fcc8626a48f72b62e263d25fc3c3f1" + integrity sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw== + dependencies: + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + +"@babel/helper-compilation-targets@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25" + integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA== + dependencies: + "@babel/compat-data" "^7.28.6" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== + +"@babel/helper-module-imports@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c" + integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw== dependencies: - "@babel/types" "^7.23.6" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" -"@babel/helper-compilation-targets@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" - integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== +"@babel/helper-module-transforms@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e" + integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA== dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" - browserslist "^4.22.2" - lru-cache "^5.1.1" - semver "^6.3.1" + "@babel/helper-module-imports" "^7.28.6" + "@babel/helper-validator-identifier" "^7.28.5" + "@babel/traverse" "^7.28.6" -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== - dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" - integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== - dependencies: - "@babel/types" "^7.22.15" - -"@babel/helper-module-transforms@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" - integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== - dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.20" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== - -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-string-parser@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" - integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== - -"@babel/helper-validator-identifier@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" - integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== - -"@babel/helper-validator-option@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" - integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== - -"@babel/helpers@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.6.tgz#d03af2ee5fb34691eec0cda90f5ecbb4d4da145a" - integrity sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA== - dependencies: - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.6" - "@babel/types" "^7.23.6" - -"@babel/highlight@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" - integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== - dependencies: - "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.28.6", "@babel/helper-plugin-utils@^7.8.0": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" + integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== + +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== + +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.6.tgz#ba1c9e512bda72a47e285ae42aff9d2a635a9e3b" - integrity sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ== +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== + +"@babel/helpers@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.6.tgz#fca903a313ae675617936e8998b814c415cbf5d7" + integrity sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw== + dependencies: + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" + +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.6.tgz#f01a8885b7fa1e56dd8a155130226cd698ef13fd" + integrity sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ== + dependencies: + "@babel/types" "^7.28.6" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -179,14 +135,28 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-import-meta@^7.8.3": +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-import-attributes@^7.24.7": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz#b71d5914665f60124e133696f17cd7669062c503" + integrity sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw== + dependencies: + "@babel/helper-plugin-utils" "^7.28.6" + +"@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -201,13 +171,13 @@ "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" - integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz#f8ca28bbd84883b5fea0e447c635b81ba73997ee" + integrity sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.28.6" -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -221,7 +191,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -249,7 +219,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-private-property-in-object@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== @@ -257,45 +234,41 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz#24f460c85dbbc983cd2b9c4994178bcc01df958f" - integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/template@^7.22.15", "@babel/template@^7.3.3": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" - integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" - -"@babel/traverse@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.6.tgz#b53526a2367a0dd6edc423637f3d2d0f2521abc5" - integrity sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.6" - "@babel/types" "^7.23.6" + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz#c7b2ddf1d0a811145b1de800d1abd146af92e3a2" + integrity sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A== + dependencies: + "@babel/helper-plugin-utils" "^7.28.6" + +"@babel/template@^7.28.6", "@babel/template@^7.3.3": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" + integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + +"@babel/traverse@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.6.tgz#871ddc79a80599a5030c53b1cc48cbe3a5583c2e" + integrity sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" debug "^4.3.1" - globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.3.3": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.6.tgz#be33fdb151e1f5a56877d704492c240fc71c7ccd" - integrity sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.28.6", "@babel/types@^7.3.3": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.6.tgz#c3e9377f1b155005bcc4c46020e7e394e13089df" + integrity sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg== dependencies: - "@babel/helper-string-parser" "^7.23.4" - "@babel/helper-validator-identifier" "^7.22.20" - to-fast-properties "^2.0.0" + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" @@ -585,31 +558,38 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== +"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": +"@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18": version "0.3.20" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== @@ -617,6 +597,14 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1045,13 +1033,6 @@ ansi-regex@^5.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -1134,22 +1115,25 @@ babel-plugin-jest-hoist@^29.6.3: "@types/babel__traverse" "^7.0.6" babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + version "1.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz#20730d6cdc7dda5d89401cab10ac6a32067acde6" + integrity sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" babel-preset-jest@^29.6.3: version "29.6.3" @@ -1164,6 +1148,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +baseline-browser-mapping@^2.9.0: + version "2.9.14" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.14.tgz#3b6af0bc032445bca04de58caa9a87cfe921cbb3" + integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg== + big-integer@^1.6.44: version "1.6.52" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85" @@ -1177,17 +1166,17 @@ bplist-parser@^0.2.0: big-integer "^1.6.44" brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + version "1.1.12" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" + integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + version "2.0.2" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" + integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== dependencies: balanced-match "^1.0.0" @@ -1198,15 +1187,16 @@ braces@^3.0.3: dependencies: fill-range "^7.1.1" -browserslist@^4.22.2: - version "4.22.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.2.tgz#704c4943072bd81ea18997f3bd2180e89c77874b" - integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== +browserslist@^4.24.0: + version "4.28.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95" + integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA== dependencies: - caniuse-lite "^1.0.30001565" - electron-to-chromium "^1.4.601" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" + baseline-browser-mapping "^2.9.0" + caniuse-lite "^1.0.30001759" + electron-to-chromium "^1.5.263" + node-releases "^2.0.27" + update-browserslist-db "^1.2.0" bs-logger@0.x: version "0.2.6" @@ -1257,19 +1247,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001565: - version "1.0.30001570" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz#b4e5c1fa786f733ab78fc70f592df6b3f23244ca" - integrity sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw== - -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" +caniuse-lite@^1.0.30001759: + version "1.0.30001764" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz#03206c56469f236103b90f9ae10bcb8b9e1f6005" + integrity sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g== chalk@^4.0.0: version "4.1.2" @@ -1318,13 +1299,6 @@ collect-v8-coverage@^1.0.0: resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -1332,11 +1306,6 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" @@ -1486,10 +1455,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.4.601: - version "1.4.614" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.614.tgz#2fe789d61fa09cb875569f37c309d0c2701f91c0" - integrity sha512-X4ze/9Sc3QWs6h92yerwqv7aB/uU8vCjZcrMjA8N9R1pjMFRe44dLsck5FzLilOYvcXuDn93B+bpGYyufc70gQ== +electron-to-chromium@^1.5.263: + version "1.5.267" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz#5d84f2df8cdb6bfe7e873706bb21bd4bfb574dc7" + integrity sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw== emittery@^0.13.1: version "0.13.1" @@ -1540,10 +1509,10 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-string-regexp@^2.0.0: version "2.0.0" @@ -1933,11 +1902,6 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - globals@^13.19.0: version "13.20.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" @@ -1972,11 +1936,6 @@ graphemer@^1.4.0: resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -2581,24 +2540,24 @@ js-tokens@^4.0.0: integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + version "3.14.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0" + integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg== dependencies: argparse "^1.0.7" esprima "^4.0.0" js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== dependencies: argparse "^2.0.1" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== json-parse-even-better-errors@^2.3.0: version "2.3.1" @@ -2801,10 +2760,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.27: + version "2.0.27" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== normalize-path@^3.0.0: version "3.0.0" @@ -2967,6 +2926,11 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" @@ -3256,13 +3220,6 @@ superstruct@^1.0.3: resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-1.0.3.tgz#de626a5b49c6641ff4d37da3c7598e7a87697046" integrity sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg== -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -3314,11 +3271,6 @@ tmpl@1.0.5: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -3441,13 +3393,13 @@ untildify@^4.0.0: resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== +update-browserslist-db@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" + integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" + escalade "^3.2.0" + picocolors "^1.1.1" uri-js@^4.2.2: version "4.4.1"