diff --git a/.eslintcache b/.eslintcache
deleted file mode 100644
index cd44813307..0000000000
--- a/.eslintcache
+++ /dev/null
@@ -1 +0,0 @@
-[{"/home/tempuser-z687wq/run/codegen-output/cloudflare/cloudflare-node/src/resources/ai/to-markdown.ts":"1"},{"size":1733,"mtime":1759266822909}]
\ No newline at end of file
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b5e9157309..ce65b73e4d 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "5.2.0"
+ ".": "5.3.0"
}
diff --git a/.stats.yml b/.stats.yml
index 5637fc3e0e..9bee3557de 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 1822
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca8fbfa82d19dca400ec61b8c93392de1acd157860e435419f9a5e9ec8c586e0.yml
-openapi_spec_hash: 77d55c70bc3824ac61bd056e2319ee18
-config_hash: 107e0f1f8a98b007260b319226b88b3c
+configured_endpoints: 1891
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7e4d0f06a14e00e1fded122c6e363b955753c19f529887d691584630b9625544.yml
+openapi_spec_hash: f04905b36443a3e136496c9dc28ea51d
+config_hash: f8ad41a1e87119e46c6452f8f1ea0440
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa438cce21..d704742854 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,80 @@
# Changelog
+## 5.3.0 (2025-11-07)
+
+Full Changelog: [v5.2.0...v5.3.0](https://github.com/cloudflare/cloudflare-typescript/compare/v5.2.0...v5.3.0)
+
+### Features
+
+* chore(abuse): rename path parameter ([d38b204](https://github.com/cloudflare/cloudflare-typescript/commit/d38b204b917199ea795e27fc9a86bd71d930cf03))
+* docs: WC-4152 Expose subdomain delete for workers ([0b67525](https://github.com/cloudflare/cloudflare-typescript/commit/0b67525400e702029492048b6916d1ed3844030d))
+* docs(zero_trust_gateway_policy): add /rules/tenants endpoint to Gateway API docs ([32e5a34](https://github.com/cloudflare/cloudflare-typescript/commit/32e5a342f56237f866f4b5570550f12f90a3f451))
+* feat: add connectivity directory service APIs to openapi.stainless.yml ([9cd117b](https://github.com/cloudflare/cloudflare-typescript/commit/9cd117b4aae7940f892ef798f5936e4720e0d7c5))
+* feat: Add token validation to stainless config ([a991204](https://github.com/cloudflare/cloudflare-typescript/commit/a991204a2834034fd42df2d19a4af2e28f4dff3a))
+* feat: SDKs for Organizations and OrganizationsProfile ([f7c1373](https://github.com/cloudflare/cloudflare-typescript/commit/f7c13739fbbba7b9d9ff9c259b37bea92ac6688a))
+* feat(abuse_reports): Expose new abuse report endpoints. GET and LIST. ([454ad3d](https://github.com/cloudflare/cloudflare-typescript/commit/454ad3d717070dbb84a38b3a702e2f1ab1cb1ffd))
+* feat(api): add mcp portals endpoints ([dd447c7](https://github.com/cloudflare/cloudflare-typescript/commit/dd447c75a9ceca80f10ede613723b26aff88dedf))
+* feat(iam): Add SSO Connectors resource to SDKs ([b951900](https://github.com/cloudflare/cloudflare-typescript/commit/b951900426c5ab86ca20deedc5a2aa46ab863ac0))
+* feat(mcp_portals): enable sdks generation ([7760aed](https://github.com/cloudflare/cloudflare-typescript/commit/7760aed7f9af23376a49279230b6f8cd95fe555f))
+* feat(radar): add new group by dimension endpoints; deprecate to_markdown endpoint ([59c3fa8](https://github.com/cloudflare/cloudflare-typescript/commit/59c3fa82a30a74e24e0c95515fca67ba06d5cd14))
+* fix: Correctly reflect schema validation model <-> openapi mapping ([e453fd1](https://github.com/cloudflare/cloudflare-typescript/commit/e453fd193ae133a345fb40741b3751dbbc5643fd))
+* fix: move wvpc ([a61668d](https://github.com/cloudflare/cloudflare-typescript/commit/a61668d9c4fa7ce5c15bc553a9b2911c7bcd29cf))
+* fix: tabbing on realtime-kit api resources ([ff1e8b4](https://github.com/cloudflare/cloudflare-typescript/commit/ff1e8b489d2b0ca868520a6a4ac6859fc6ce5e9c))
+* fix(ai_controls): incorrect use of standalone_api ([fb85a07](https://github.com/cloudflare/cloudflare-typescript/commit/fb85a079dd30e8959bf2af44784e32a0b4303a61))
+
+
+### Chores
+
+* **api:** update composite API spec ([e2e9bbd](https://github.com/cloudflare/cloudflare-typescript/commit/e2e9bbd12d72aacc27f47ee3fa3cb8c437fc2e8d))
+* **api:** update composite API spec ([7c20bfe](https://github.com/cloudflare/cloudflare-typescript/commit/7c20bfeb548a7a0c741e9ae4ff8a49140ddeaf71))
+* **api:** update composite API spec ([d68f4df](https://github.com/cloudflare/cloudflare-typescript/commit/d68f4dfc4096c20a524a8dabb45f758e38543cb7))
+* **api:** update composite API spec ([6b8dbe0](https://github.com/cloudflare/cloudflare-typescript/commit/6b8dbe03a3aa0b8df1b046f0c90fc85647b63231))
+* **api:** update composite API spec ([33459bb](https://github.com/cloudflare/cloudflare-typescript/commit/33459bb95326fad56ed321352ef96e7ae31327d3))
+* **api:** update composite API spec ([c614eb3](https://github.com/cloudflare/cloudflare-typescript/commit/c614eb3a0032e15b6032a055bb6df6455841240c))
+* **api:** update composite API spec ([080b997](https://github.com/cloudflare/cloudflare-typescript/commit/080b997a3c7429e6e209ecdec65cb472ea06aefa))
+* **api:** update composite API spec ([5ee80f5](https://github.com/cloudflare/cloudflare-typescript/commit/5ee80f5a28eb4a4c8a43c09eca7a6786e186a678))
+* **api:** update composite API spec ([edf8c4d](https://github.com/cloudflare/cloudflare-typescript/commit/edf8c4dd3e6244d735a28480b619c73cc9062ead))
+* **api:** update composite API spec ([4746f0e](https://github.com/cloudflare/cloudflare-typescript/commit/4746f0e7c8d9e0573def789cfc0e5d2430812ba0))
+* **api:** update composite API spec ([6e4418f](https://github.com/cloudflare/cloudflare-typescript/commit/6e4418fa78ddffd6090a4d4419edb9f64f555677))
+* **api:** update composite API spec ([a016b30](https://github.com/cloudflare/cloudflare-typescript/commit/a016b30d909fef4ce1ce86e7d96167cf6cdcaaf3))
+* **api:** update composite API spec ([4451ae3](https://github.com/cloudflare/cloudflare-typescript/commit/4451ae3e85482dca6cd10d0d85e34d8c592b1d1a))
+* **api:** update composite API spec ([87c840c](https://github.com/cloudflare/cloudflare-typescript/commit/87c840c084f476fef4a830132cf108e755665c0f))
+* **api:** update composite API spec ([4f1a8d8](https://github.com/cloudflare/cloudflare-typescript/commit/4f1a8d86f4db60c109aad7bd203f9df75a135239))
+* **api:** update composite API spec ([bd2264c](https://github.com/cloudflare/cloudflare-typescript/commit/bd2264c643fcce5dd3ab2e52caac3c1adf64c4da))
+* **api:** update composite API spec ([994da03](https://github.com/cloudflare/cloudflare-typescript/commit/994da0333c9cc3c399f4f4c885dc97e55b249729))
+* **api:** update composite API spec ([6321a5b](https://github.com/cloudflare/cloudflare-typescript/commit/6321a5beb1f0ffcd69eed07a8c3bb6c521b31bf1))
+* **api:** update composite API spec ([4ca5332](https://github.com/cloudflare/cloudflare-typescript/commit/4ca5332758542583cecdb4e706d90e76d513d89e))
+* **api:** update composite API spec ([0ddfa1e](https://github.com/cloudflare/cloudflare-typescript/commit/0ddfa1ebeafa8c0cfb8f04d3137ab1816e764f91))
+* **api:** update composite API spec ([a9dbbab](https://github.com/cloudflare/cloudflare-typescript/commit/a9dbbab91ed23481128baca5785c687b117e379a))
+* **api:** update composite API spec ([82a3693](https://github.com/cloudflare/cloudflare-typescript/commit/82a3693b53d6825ae840f409119edd7173aab485))
+* **api:** update composite API spec ([46eaacd](https://github.com/cloudflare/cloudflare-typescript/commit/46eaacd72908ed2f6e940313790fc1225b9c1f6c))
+* **api:** update composite API spec ([98a7c59](https://github.com/cloudflare/cloudflare-typescript/commit/98a7c59b9d8627400dc6870a9f2d6ddecfe7b785))
+* **api:** update composite API spec ([d204f90](https://github.com/cloudflare/cloudflare-typescript/commit/d204f90bc2a60e1cf7be22fb12a7853bfe46037a))
+* **api:** update composite API spec ([ec38fec](https://github.com/cloudflare/cloudflare-typescript/commit/ec38fec79f59dba36fbdaf1fd7d15927b524fb93))
+* **api:** update composite API spec ([9ca4049](https://github.com/cloudflare/cloudflare-typescript/commit/9ca404941e20d7c353377264a46582ceb9c0b5bf))
+* **api:** update composite API spec ([14411b3](https://github.com/cloudflare/cloudflare-typescript/commit/14411b37b7750f07b7988d6dd1e7b80fcf212978))
+* **api:** update composite API spec ([0df6de0](https://github.com/cloudflare/cloudflare-typescript/commit/0df6de0cbb5be238ba0daf8e7b90ff6f7f7179d5))
+* **api:** update composite API spec ([611bc8c](https://github.com/cloudflare/cloudflare-typescript/commit/611bc8ccbf6b04bb336d8a1981efc7c9c9dee297))
+* **api:** update composite API spec ([f8a8648](https://github.com/cloudflare/cloudflare-typescript/commit/f8a8648843c5419968acdc8c7d15bb077dd59a62))
+* **api:** update composite API spec ([1a2d99f](https://github.com/cloudflare/cloudflare-typescript/commit/1a2d99f9b7daed21785d9470d6da42e7005cd4cd))
+* **api:** update composite API spec ([0e54b6d](https://github.com/cloudflare/cloudflare-typescript/commit/0e54b6d8871fbf936633021ddddbb5415c569f85))
+* **api:** update composite API spec ([4ac69f7](https://github.com/cloudflare/cloudflare-typescript/commit/4ac69f7b79452feea2da6e96a8f255057c869f72))
+* **api:** update composite API spec ([9fd9cb7](https://github.com/cloudflare/cloudflare-typescript/commit/9fd9cb77c33102309695e0dae321f0bef5ad3ac7))
+* **api:** update composite API spec ([0866bd5](https://github.com/cloudflare/cloudflare-typescript/commit/0866bd5974efd4a70ff5dcacb681a53ba5189649))
+* **api:** update composite API spec ([af77baf](https://github.com/cloudflare/cloudflare-typescript/commit/af77bafb9ed83802f3f969296371a478ce5cff4d))
+* **api:** update composite API spec ([5c3d38c](https://github.com/cloudflare/cloudflare-typescript/commit/5c3d38cd8be1fce01449fccc9ebf0c3cd3cb81b6))
+* **api:** update composite API spec ([ea4b26d](https://github.com/cloudflare/cloudflare-typescript/commit/ea4b26d15f872f5e64d4036f90394a6f8169c0ce))
+* **api:** update composite API spec ([cf99249](https://github.com/cloudflare/cloudflare-typescript/commit/cf99249750a1bb749bca04fc0b1d3fbd9db619bd))
+* **api:** update composite API spec ([e295d75](https://github.com/cloudflare/cloudflare-typescript/commit/e295d753ba47b7313e5a3c24afa7b00f7d8d295e))
+* **api:** update composite API spec ([712399c](https://github.com/cloudflare/cloudflare-typescript/commit/712399c843de06b97a2a2c49e0ed943d3a7042f8))
+* **api:** update composite API spec ([20039c7](https://github.com/cloudflare/cloudflare-typescript/commit/20039c7a4103a32e44b771390875f68e4cbf3bb9))
+* **api:** update composite API spec ([599d75f](https://github.com/cloudflare/cloudflare-typescript/commit/599d75f03a3da06005d6d4d13dcdf03e88664b53))
+* **api:** update composite API spec ([a4e3d37](https://github.com/cloudflare/cloudflare-typescript/commit/a4e3d3770f26422cd2fdee4ae4168192448c4638))
+* **api:** update composite API spec ([61ca22a](https://github.com/cloudflare/cloudflare-typescript/commit/61ca22ac466f1a9c1bd35d85dfa9a17b4a5726c1))
+* **api:** update composite API spec ([634be45](https://github.com/cloudflare/cloudflare-typescript/commit/634be4563031b41bd259a1fd91deb9c39ac817dd))
+* **api:** update composite API spec ([7e1d515](https://github.com/cloudflare/cloudflare-typescript/commit/7e1d5150cfbd56965d074185cefb12ea21fbef1b))
+* **internal:** use npm pack for build uploads ([44c693f](https://github.com/cloudflare/cloudflare-typescript/commit/44c693f57db12c1f9650e92060d0e8dcb90adb5f))
+
## 5.2.0 (2025-09-30)
Full Changelog: [v5.1.0...v5.2.0](https://github.com/cloudflare/cloudflare-typescript/compare/v5.1.0...v5.2.0)
diff --git a/api.md b/api.md
index 7ffb0aa433..f858f28ed7 100644
--- a/api.md
+++ b/api.md
@@ -124,6 +124,32 @@ Methods:
- client.accounts.logs.audit.list({ ...params }) -> AuditListResponsesCursorPaginationAfter
+# Organizations
+
+Types:
+
+- Organization
+- OrganizationDeleteResponse
+
+Methods:
+
+- client.organizations.create({ ...params }) -> Organization
+- client.organizations.update(organizationId, { ...params }) -> Organization
+- client.organizations.list({ ...params }) -> OrganizationsSinglePage
+- client.organizations.delete(organizationId) -> OrganizationDeleteResponse
+- client.organizations.get(organizationId) -> Organization
+
+## OrganizationProfile
+
+Types:
+
+- OrganizationProfile
+
+Methods:
+
+- client.organizations.organizationProfile.update(organizationId, { ...params }) -> void
+- client.organizations.organizationProfile.get(organizationId) -> unnamed_schema_0.Result
+
# OriginCACertificates
Types:
@@ -2082,6 +2108,7 @@ Types:
- Script
- ScriptSetting
- ScriptUpdateResponse
+- ScriptListResponse
- ScriptDeleteResponse
- ScriptGetResponse
- ScriptSearchResponse
@@ -2089,7 +2116,7 @@ Types:
Methods:
- client.workers.scripts.update(scriptName, { ...params }) -> ScriptUpdateResponse
-- client.workers.scripts.list({ ...params }) -> ScriptsSinglePage
+- client.workers.scripts.list({ ...params }) -> ScriptListResponsesSinglePage
- client.workers.scripts.delete(scriptName, { ...params }) -> ScriptDeleteResponse | null
- client.workers.scripts.get(scriptName, { ...params }) -> string
- client.workers.scripts.search({ ...params }) -> ScriptSearchResponse
@@ -2253,6 +2280,7 @@ Types:
Methods:
- client.workers.subdomains.update({ ...params }) -> SubdomainUpdateResponse
+- client.workers.subdomains.delete({ ...params }) -> void
- client.workers.subdomains.get({ ...params }) -> SubdomainGetResponse
## Observability
@@ -2421,6 +2449,7 @@ Types:
- SubscriptionUpdateResponse
- SubscriptionListResponse
- SubscriptionDeleteResponse
+- SubscriptionGetResponse
Methods:
@@ -2428,6 +2457,7 @@ Methods:
- client.queues.subscriptions.update(subscriptionId, { ...params }) -> SubscriptionUpdateResponse
- client.queues.subscriptions.list({ ...params }) -> SubscriptionListResponsesV4PagePaginationArray
- client.queues.subscriptions.delete(subscriptionId, { ...params }) -> SubscriptionDeleteResponse
+- client.queues.subscriptions.get(subscriptionId, { ...params }) -> SubscriptionGetResponse
# APIGateway
@@ -2436,11 +2466,10 @@ Methods:
Types:
- Configuration
-- ConfigurationUpdateResponse
Methods:
-- client.apiGateway.configurations.update({ ...params }) -> ConfigurationUpdateResponse
+- client.apiGateway.configurations.update({ ...params }) -> Configuration
- client.apiGateway.configurations.get({ ...params }) -> Configuration
## Discovery
@@ -2492,14 +2521,14 @@ Methods:
Types:
-- SettingsMultipleRequest
- SchemaValidationUpdateResponse
+- SchemaValidationEditResponse
- SchemaValidationGetResponse
Methods:
- client.apiGateway.operations.schemaValidation.update(operationId, { ...params }) -> SchemaValidationUpdateResponse
-- client.apiGateway.operations.schemaValidation.edit({ ...params }) -> SettingsMultipleRequest
+- client.apiGateway.operations.schemaValidation.edit({ ...params }) -> SchemaValidationEditResponse
- client.apiGateway.operations.schemaValidation.get(operationId, { ...params }) -> SchemaValidationGetResponse
## Schemas
@@ -2514,34 +2543,36 @@ Methods:
## Settings
-Types:
+### SchemaValidation
-- Settings
+Types:
-### SchemaValidation
+- SchemaValidationUpdateResponse
+- SchemaValidationEditResponse
+- SchemaValidationGetResponse
Methods:
-- client.apiGateway.settings.schemaValidation.update({ ...params }) -> Settings
-- client.apiGateway.settings.schemaValidation.edit({ ...params }) -> Settings
-- client.apiGateway.settings.schemaValidation.get({ ...params }) -> Settings
+- client.apiGateway.settings.schemaValidation.update({ ...params }) -> SchemaValidationUpdateResponse
+- client.apiGateway.settings.schemaValidation.edit({ ...params }) -> SchemaValidationEditResponse
+- client.apiGateway.settings.schemaValidation.get({ ...params }) -> SchemaValidationGetResponse
## UserSchemas
Types:
- Message
-- PublicSchema
-- SchemaUpload
+- OldPublicSchema
+- UserSchemaCreateResponse
- UserSchemaDeleteResponse
Methods:
-- client.apiGateway.userSchemas.create({ ...params }) -> SchemaUpload
-- client.apiGateway.userSchemas.list({ ...params }) -> PublicSchemasV4PagePaginationArray
+- client.apiGateway.userSchemas.create({ ...params }) -> UserSchemaCreateResponse
+- client.apiGateway.userSchemas.list({ ...params }) -> OldPublicSchemasV4PagePaginationArray
- client.apiGateway.userSchemas.delete(schemaId, { ...params }) -> UserSchemaDeleteResponse
-- client.apiGateway.userSchemas.edit(schemaId, { ...params }) -> PublicSchema
-- client.apiGateway.userSchemas.get(schemaId, { ...params }) -> PublicSchema
+- client.apiGateway.userSchemas.edit(schemaId, { ...params }) -> OldPublicSchema
+- client.apiGateway.userSchemas.get(schemaId, { ...params }) -> OldPublicSchema
### Operations
@@ -2918,13 +2949,8 @@ Methods:
## LOADocuments
-Types:
-
-- LOADocumentCreateResponse
-
Methods:
-- client.addressing.loaDocuments.create({ ...params }) -> LOADocumentCreateResponse
- client.addressing.loaDocuments.get(loaDocumentId, { ...params }) -> Response
## Prefixes
@@ -3925,7 +3951,7 @@ Types:
Methods:
- client.pages.projects.create({ ...params }) -> Project
-- client.pages.projects.list({ ...params }) -> DeploymentsSinglePage
+- client.pages.projects.list({ ...params }) -> DeploymentsV4PagePaginationArray
- client.pages.projects.delete(projectName, { ...params }) -> ProjectDeleteResponse | null
- client.pages.projects.edit(projectName, { ...params }) -> Project
- client.pages.projects.get(projectName, { ...params }) -> Project
@@ -3940,7 +3966,7 @@ Types:
Methods:
- client.pages.projects.deployments.create(projectName, { ...params }) -> Deployment
-- client.pages.projects.deployments.list(projectName, { ...params }) -> DeploymentsSinglePage
+- client.pages.projects.deployments.list(projectName, { ...params }) -> DeploymentsV4PagePaginationArray
- client.pages.projects.deployments.delete(projectName, deploymentId, { ...params }) -> DeploymentDeleteResponse | null
- client.pages.projects.deployments.get(projectName, deploymentId, { ...params }) -> Deployment
- client.pages.projects.deployments.retry(projectName, deploymentId, { ...params }) -> Deployment
@@ -5021,6 +5047,48 @@ Methods:
## Access
+### AIControls
+
+#### Mcp
+
+##### Portals
+
+Types:
+
+- PortalCreateResponse
+- PortalUpdateResponse
+- PortalListResponse
+- PortalDeleteResponse
+- PortalReadResponse
+
+Methods:
+
+- client.zeroTrust.access.aiControls.mcp.portals.create({ ...params }) -> PortalCreateResponse
+- client.zeroTrust.access.aiControls.mcp.portals.update(id, { ...params }) -> PortalUpdateResponse
+- client.zeroTrust.access.aiControls.mcp.portals.list({ ...params }) -> PortalListResponsesV4PagePaginationArray
+- client.zeroTrust.access.aiControls.mcp.portals.delete(id, { ...params }) -> PortalDeleteResponse
+- client.zeroTrust.access.aiControls.mcp.portals.read(id, { ...params }) -> PortalReadResponse
+
+##### Servers
+
+Types:
+
+- ServerCreateResponse
+- ServerUpdateResponse
+- ServerListResponse
+- ServerDeleteResponse
+- ServerReadResponse
+- ServerSyncResponse
+
+Methods:
+
+- client.zeroTrust.access.aiControls.mcp.servers.create({ ...params }) -> ServerCreateResponse
+- client.zeroTrust.access.aiControls.mcp.servers.update(id, { ...params }) -> ServerUpdateResponse
+- client.zeroTrust.access.aiControls.mcp.servers.list({ ...params }) -> ServerListResponsesV4PagePaginationArray
+- client.zeroTrust.access.aiControls.mcp.servers.delete(id, { ...params }) -> ServerDeleteResponse
+- client.zeroTrust.access.aiControls.mcp.servers.read(id, { ...params }) -> ServerReadResponse
+- client.zeroTrust.access.aiControls.mcp.servers.sync(id, { ...params }) -> ServerSyncResponse
+
### GatewayCA
Types:
@@ -5578,21 +5646,13 @@ Methods:
### Cloudflared
-Types:
-
-- CloudflaredCreateResponse
-- CloudflaredListResponse
-- CloudflaredDeleteResponse
-- CloudflaredEditResponse
-- CloudflaredGetResponse
-
Methods:
-- client.zeroTrust.tunnels.cloudflared.create({ ...params }) -> CloudflaredCreateResponse
-- client.zeroTrust.tunnels.cloudflared.list({ ...params }) -> CloudflaredListResponsesV4PagePaginationArray
-- client.zeroTrust.tunnels.cloudflared.delete(tunnelId, { ...params }) -> CloudflaredDeleteResponse
-- client.zeroTrust.tunnels.cloudflared.edit(tunnelId, { ...params }) -> CloudflaredEditResponse
-- client.zeroTrust.tunnels.cloudflared.get(tunnelId, { ...params }) -> CloudflaredGetResponse
+- client.zeroTrust.tunnels.cloudflared.create({ ...params }) -> CloudflareTunnel
+- client.zeroTrust.tunnels.cloudflared.list({ ...params }) -> CloudflareTunnelsV4PagePaginationArray
+- client.zeroTrust.tunnels.cloudflared.delete(tunnelId, { ...params }) -> CloudflareTunnel
+- client.zeroTrust.tunnels.cloudflared.edit(tunnelId, { ...params }) -> CloudflareTunnel
+- client.zeroTrust.tunnels.cloudflared.get(tunnelId, { ...params }) -> CloudflareTunnel
#### Configurations
@@ -6061,10 +6121,10 @@ Types:
Methods:
- client.zeroTrust.gateway.proxyEndpoints.create({ ...params }) -> ProxyEndpoint
-- client.zeroTrust.gateway.proxyEndpoints.list({ ...params }) -> ProxyEndpoint
+- client.zeroTrust.gateway.proxyEndpoints.list({ ...params }) -> ProxyEndpointsSinglePage
- client.zeroTrust.gateway.proxyEndpoints.delete(proxyEndpointId, { ...params }) -> ProxyEndpointDeleteResponse
- client.zeroTrust.gateway.proxyEndpoints.edit(proxyEndpointId, { ...params }) -> ProxyEndpoint
-- client.zeroTrust.gateway.proxyEndpoints.get(proxyEndpointId, { ...params }) -> ProxyEndpointsSinglePage
+- client.zeroTrust.gateway.proxyEndpoints.get(proxyEndpointId, { ...params }) -> ProxyEndpoint
### Rules
@@ -6085,6 +6145,7 @@ Methods:
- client.zeroTrust.gateway.rules.list({ ...params }) -> GatewayRulesSinglePage
- client.zeroTrust.gateway.rules.delete(ruleId, { ...params }) -> RuleDeleteResponse
- client.zeroTrust.gateway.rules.get(ruleId, { ...params }) -> GatewayRule
+- client.zeroTrust.gateway.rules.listTenant({ ...params }) -> GatewayRulesSinglePage
- client.zeroTrust.gateway.rules.resetExpiration(ruleId, { ...params }) -> GatewayRule
### Certificates
@@ -6268,6 +6329,27 @@ Methods:
- client.turnstile.widgets.get(sitekey, { ...params }) -> Widget
- client.turnstile.widgets.rotateSecret(sitekey, { ...params }) -> Widget
+# Connectivity
+
+## Directory
+
+### Services
+
+Types:
+
+- ServiceCreateResponse
+- ServiceUpdateResponse
+- ServiceListResponse
+- ServiceGetResponse
+
+Methods:
+
+- client.connectivity.directory.services.create({ ...params }) -> ServiceCreateResponse
+- client.connectivity.directory.services.update(serviceId, { ...params }) -> ServiceUpdateResponse
+- client.connectivity.directory.services.list({ ...params }) -> ServiceListResponsesV4PagePaginationArray
+- client.connectivity.directory.services.delete(serviceId, { ...params }) -> void
+- client.connectivity.directory.services.get(serviceId, { ...params }) -> ServiceGetResponse
+
# Hyperdrive
Types:
@@ -6427,6 +6509,16 @@ Methods:
### Inference
+Types:
+
+- InferenceSummaryV2Response
+- InferenceTimeseriesGroupsV2Response
+
+Methods:
+
+- client.radar.ai.inference.summaryV2(dimension, { ...params }) -> InferenceSummaryV2Response
+- client.radar.ai.inference.timeseriesGroupsV2(dimension, { ...params }) -> InferenceTimeseriesGroupsV2Response
+
#### Summary
Types:
@@ -6455,6 +6547,18 @@ Methods:
### Bots
+Types:
+
+- BotSummaryV2Response
+- BotTimeseriesResponse
+- BotTimeseriesGroupsResponse
+
+Methods:
+
+- client.radar.ai.bots.summaryV2(dimension, { ...params }) -> BotSummaryV2Response
+- client.radar.ai.bots.timeseries({ ...params }) -> BotTimeseriesResponse
+- client.radar.ai.bots.timeseriesGroups(dimension, { ...params }) -> BotTimeseriesGroupsResponse
+
#### Summary
Types:
@@ -6673,11 +6777,15 @@ Methods:
Types:
+- DNSSummaryV2Response
- DNSTimeseriesResponse
+- DNSTimeseriesGroupsV2Response
Methods:
+- client.radar.dns.summaryV2(dimension, { ...params }) -> DNSSummaryV2Response
- client.radar.dns.timeseries({ ...params }) -> DNSTimeseriesResponse
+- client.radar.dns.timeseriesGroupsV2(dimension, { ...params }) -> DNSTimeseriesGroupsV2Response
### Top
@@ -6752,12 +6860,16 @@ Methods:
Types:
- NetflowSummaryResponse
+- NetflowSummaryV2Response
- NetflowTimeseriesResponse
+- NetflowTimeseriesGroupsResponse
Methods:
- client.radar.netflows.summary({ ...params }) -> NetflowSummaryResponse
+- client.radar.netflows.summaryV2(dimension, { ...params }) -> NetflowSummaryV2Response
- client.radar.netflows.timeseries({ ...params }) -> NetflowTimeseriesResponse
+- client.radar.netflows.timeseriesGroups(dimension, { ...params }) -> NetflowTimeseriesGroupsResponse
### Top
@@ -6799,11 +6911,15 @@ Methods:
Types:
+- AS112SummaryV2Response
- AS112TimeseriesResponse
+- AS112TimeseriesGroupsV2Response
Methods:
+- client.radar.as112.summaryV2(dimension, { ...params }) -> AS112SummaryV2Response
- client.radar.as112.timeseries({ ...params }) -> AS112TimeseriesResponse
+- client.radar.as112.timeseriesGroupsV2(dimension, { ...params }) -> AS112TimeseriesGroupsV2Response
### Summary
@@ -6870,6 +6986,16 @@ Types:
### Routing
+Types:
+
+- RoutingSummaryV2Response
+- RoutingTimeseriesGroupsV2Response
+
+Methods:
+
+- client.radar.email.routing.summaryV2(dimension, { ...params }) -> RoutingSummaryV2Response
+- client.radar.email.routing.timeseriesGroupsV2(dimension, { ...params }) -> RoutingTimeseriesGroupsV2Response
+
#### Summary
Types:
@@ -6912,6 +7038,16 @@ Methods:
### Security
+Types:
+
+- SecuritySummaryV2Response
+- SecurityTimeseriesGroupsV2Response
+
+Methods:
+
+- client.radar.email.security.summaryV2(dimension, { ...params }) -> SecuritySummaryV2Response
+- client.radar.email.security.timeseriesGroupsV2(dimension, { ...params }) -> SecurityTimeseriesGroupsV2Response
+
#### Top
##### Tlds
@@ -7012,11 +7148,15 @@ Methods:
Types:
+- Layer3SummaryV2Response
- Layer3TimeseriesResponse
+- Layer3TimeseriesGroupsV2Response
Methods:
+- client.radar.attacks.layer3.summaryV2(dimension, { ...params }) -> Layer3SummaryV2Response
- client.radar.attacks.layer3.timeseries({ ...params }) -> Layer3TimeseriesResponse
+- client.radar.attacks.layer3.timeseriesGroupsV2(dimension, { ...params }) -> Layer3TimeseriesGroupsV2Response
#### Summary
@@ -7092,11 +7232,15 @@ Methods:
Types:
+- Layer7SummaryV2Response
- Layer7TimeseriesResponse
+- Layer7TimeseriesGroupsV2Response
Methods:
+- client.radar.attacks.layer7.summaryV2(dimension, { ...params }) -> Layer7SummaryV2Response
- client.radar.attacks.layer7.timeseries({ ...params }) -> Layer7TimeseriesResponse
+- client.radar.attacks.layer7.timeseriesGroupsV2(dimension, { ...params }) -> Layer7TimeseriesGroupsV2Response
#### Summary
@@ -7218,15 +7362,31 @@ Methods:
- client.radar.entities.locations.list({ ...params }) -> LocationListResponse
- client.radar.entities.locations.get(location, { ...params }) -> LocationGetResponse
+## Geolocations
+
+Types:
+
+- GeolocationListResponse
+- GeolocationGetResponse
+
+Methods:
+
+- client.radar.geolocations.list({ ...params }) -> GeolocationListResponse
+- client.radar.geolocations.get(geoId, { ...params }) -> GeolocationGetResponse
+
## HTTP
Types:
+- HTTPSummaryV2Response
- HTTPTimeseriesResponse
+- HTTPTimeseriesGroupsV2Response
Methods:
+- client.radar.http.summaryV2(dimension, { ...params }) -> HTTPSummaryV2Response
- client.radar.http.timeseries({ ...params }) -> HTTPTimeseriesResponse
+- client.radar.http.timeseriesGroupsV2(dimension, { ...params }) -> HTTPTimeseriesGroupsV2Response
### Locations
@@ -7602,6 +7762,16 @@ Methods:
## LeakedCredentials
+Types:
+
+- LeakedCredentialSummaryV2Response
+- LeakedCredentialTimeseriesGroupsV2Response
+
+Methods:
+
+- client.radar.leakedCredentials.summaryV2(dimension, { ...params }) -> LeakedCredentialSummaryV2Response
+- client.radar.leakedCredentials.timeseriesGroupsV2(dimension, { ...params }) -> LeakedCredentialTimeseriesGroupsV2Response
+
### Summary
Types:
@@ -7851,6 +8021,8 @@ Methods:
- client.snippets.rules.list({ ...params }) -> RuleListResponsesSinglePage
- client.snippets.rules.delete({ ...params }) -> RuleDeleteResponsesSinglePage
+# RealtimeKit
+
# Calls
## SFU
@@ -8305,6 +8477,26 @@ Methods:
- client.iam.userGroups.members.list(userGroupId, { ...params }) -> MemberListResponsesV4PagePaginationArray
- client.iam.userGroups.members.delete(userGroupId, memberId, { ...params }) -> MemberDeleteResponse
+## SSO
+
+Types:
+
+- SSOCreateResponse
+- SSOUpdateResponse
+- SSOListResponse
+- SSODeleteResponse
+- SSOBeginVerificationResponse
+- SSOGetResponse
+
+Methods:
+
+- client.iam.sso.create({ ...params }) -> SSOCreateResponse
+- client.iam.sso.update(ssoConnectorId, { ...params }) -> SSOUpdateResponse
+- client.iam.sso.list({ ...params }) -> SSOListResponsesSinglePage
+- client.iam.sso.delete(ssoConnectorId, { ...params }) -> SSODeleteResponse | null
+- client.iam.sso.beginVerification(ssoConnectorId, { ...params }) -> SSOBeginVerificationResponse
+- client.iam.sso.get(ssoConnectorId, { ...params }) -> SSOGetResponse
+
# CloudConnector
## Rules
@@ -8509,13 +8701,19 @@ Methods:
Types:
+- ContentScanningCreateResponse
+- ContentScanningUpdateResponse
- ContentScanningDisableResponse
- ContentScanningEnableResponse
+- ContentScanningGetResponse
Methods:
+- client.contentScanning.create({ ...params }) -> ContentScanningCreateResponse
+- client.contentScanning.update({ ...params }) -> ContentScanningUpdateResponse
- client.contentScanning.disable({ ...params }) -> ContentScanningDisableResponse
- client.contentScanning.enable({ ...params }) -> ContentScanningEnableResponse
+- client.contentScanning.get({ ...params }) -> ContentScanningGetResponse
## Payloads
@@ -8546,10 +8744,14 @@ Methods:
Types:
- AbuseReportCreateResponse
+- AbuseReportListResponse
+- AbuseReportGetResponse
Methods:
-- client.abuseReports.create(reportType, { ...params }) -> AbuseReportCreateResponse
+- client.abuseReports.create(reportParam, { ...params }) -> AbuseReportCreateResponse
+- client.abuseReports.list({ ...params }) -> AbuseReportListResponsesV4PagePagination
+- client.abuseReports.get(reportParam, { ...params }) -> AbuseReportGetResponse
# AI
@@ -8850,19 +9052,16 @@ Methods:
Types:
-- SchemaCreateResponse
-- SchemaListResponse
+- PublicSchema
- SchemaDeleteResponse
-- SchemaEditResponse
-- SchemaGetResponse
Methods:
-- client.schemaValidation.schemas.create({ ...params }) -> SchemaCreateResponse
-- client.schemaValidation.schemas.list({ ...params }) -> SchemaListResponsesV4PagePaginationArray
+- client.schemaValidation.schemas.create({ ...params }) -> PublicSchema
+- client.schemaValidation.schemas.list({ ...params }) -> PublicSchemasV4PagePaginationArray
- client.schemaValidation.schemas.delete(schemaId, { ...params }) -> SchemaDeleteResponse
-- client.schemaValidation.schemas.edit(schemaId, { ...params }) -> SchemaEditResponse
-- client.schemaValidation.schemas.get(schemaId, { ...params }) -> SchemaGetResponse
+- client.schemaValidation.schemas.edit(schemaId, { ...params }) -> PublicSchema
+- client.schemaValidation.schemas.get(schemaId, { ...params }) -> PublicSchema
## Settings
@@ -8895,3 +9094,48 @@ Methods:
- client.schemaValidation.settings.operations.delete(operationId, { ...params }) -> OperationDeleteResponse
- client.schemaValidation.settings.operations.bulkEdit({ ...params }) -> OperationBulkEditResponse
- client.schemaValidation.settings.operations.get(operationId, { ...params }) -> OperationGetResponse
+
+# TokenValidation
+
+## Configuration
+
+Types:
+
+- TokenConfig
+- ConfigurationDeleteResponse
+- ConfigurationEditResponse
+
+Methods:
+
+- client.tokenValidation.configuration.create({ ...params }) -> TokenConfig
+- client.tokenValidation.configuration.list({ ...params }) -> TokenConfigsV4PagePaginationArray
+- client.tokenValidation.configuration.delete(configId, { ...params }) -> ConfigurationDeleteResponse
+- client.tokenValidation.configuration.edit(configId, { ...params }) -> ConfigurationEditResponse
+- client.tokenValidation.configuration.get(configId, { ...params }) -> TokenConfig
+
+### Credentials
+
+Types:
+
+- CredentialUpdateResponse
+
+Methods:
+
+- client.tokenValidation.configuration.credentials.update(configId, { ...params }) -> CredentialUpdateResponse
+
+## Rules
+
+Types:
+
+- TokenValidationRule
+- RuleDeleteResponse
+
+Methods:
+
+- client.tokenValidation.rules.create({ ...params }) -> TokenValidationRule
+- client.tokenValidation.rules.list({ ...params }) -> TokenValidationRulesV4PagePaginationArray
+- client.tokenValidation.rules.delete(ruleId, { ...params }) -> RuleDeleteResponse
+- client.tokenValidation.rules.bulkCreate([ ...body ]) -> TokenValidationRulesSinglePage
+- client.tokenValidation.rules.bulkEdit([ ...body ]) -> TokenValidationRulesSinglePage
+- client.tokenValidation.rules.edit(ruleId, { ...params }) -> TokenValidationRule
+- client.tokenValidation.rules.get(ruleId, { ...params }) -> TokenValidationRule
diff --git a/package.json b/package.json
index 254904983e..82f40f4fee 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cloudflare",
- "version": "5.2.0",
+ "version": "5.3.0",
"description": "The official TypeScript library for the Cloudflare API",
"author": "Cloudflare ",
"types": "dist/index.d.ts",
diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes
index 4580a22d2d..f7392ad1e8 100755
--- a/scripts/detect-breaking-changes
+++ b/scripts/detect-breaking-changes
@@ -16,6 +16,8 @@ TEST_PATHS=(
tests/api-resources/accounts/tokens/value.test.ts
tests/api-resources/accounts/logs/logs.test.ts
tests/api-resources/accounts/logs/audit.test.ts
+ tests/api-resources/organizations/organizations.test.ts
+ tests/api-resources/organizations/organization-profile.test.ts
tests/api-resources/origin-ca-certificates.test.ts
tests/api-resources/ips.test.ts
tests/api-resources/memberships.test.ts
@@ -430,6 +432,10 @@ TEST_PATHS=(
tests/api-resources/zero-trust/organizations/doh.test.ts
tests/api-resources/zero-trust/seats.test.ts
tests/api-resources/zero-trust/access/access.test.ts
+ tests/api-resources/zero-trust/access/ai-controls/ai-controls.test.ts
+ tests/api-resources/zero-trust/access/ai-controls/mcp/mcp.test.ts
+ tests/api-resources/zero-trust/access/ai-controls/mcp/portals.test.ts
+ tests/api-resources/zero-trust/access/ai-controls/mcp/servers.test.ts
tests/api-resources/zero-trust/access/gateway-ca.test.ts
tests/api-resources/zero-trust/access/infrastructure/infrastructure.test.ts
tests/api-resources/zero-trust/access/infrastructure/targets.test.ts
@@ -529,6 +535,9 @@ TEST_PATHS=(
tests/api-resources/zero-trust/risk-scoring/integrations/references.test.ts
tests/api-resources/turnstile/turnstile.test.ts
tests/api-resources/turnstile/widgets.test.ts
+ tests/api-resources/connectivity/connectivity.test.ts
+ tests/api-resources/connectivity/directory/directory.test.ts
+ tests/api-resources/connectivity/directory/services.test.ts
tests/api-resources/hyperdrive/hyperdrive.test.ts
tests/api-resources/hyperdrive/configs.test.ts
tests/api-resources/rum/rum.test.ts
@@ -607,6 +616,7 @@ TEST_PATHS=(
tests/api-resources/radar/entities/entities.test.ts
tests/api-resources/radar/entities/asns.test.ts
tests/api-resources/radar/entities/locations.test.ts
+ tests/api-resources/radar/geolocations.test.ts
tests/api-resources/radar/http/http.test.ts
tests/api-resources/radar/http/locations/locations.test.ts
tests/api-resources/radar/http/locations/bot-class.test.ts
@@ -701,6 +711,7 @@ TEST_PATHS=(
tests/api-resources/iam/resource-groups.test.ts
tests/api-resources/iam/user-groups/user-groups.test.ts
tests/api-resources/iam/user-groups/members.test.ts
+ tests/api-resources/iam/sso.test.ts
tests/api-resources/cloud-connector/cloud-connector.test.ts
tests/api-resources/cloud-connector/rules.test.ts
tests/api-resources/botnet-feed/botnet-feed.test.ts
@@ -755,6 +766,10 @@ TEST_PATHS=(
tests/api-resources/schema-validation/schemas.test.ts
tests/api-resources/schema-validation/settings/settings.test.ts
tests/api-resources/schema-validation/settings/operations.test.ts
+ tests/api-resources/token-validation/token-validation.test.ts
+ tests/api-resources/token-validation/configuration/configuration.test.ts
+ tests/api-resources/token-validation/configuration/credentials.test.ts
+ tests/api-resources/token-validation/rules.test.ts
tests/index.test.ts
)
diff --git a/src/index.ts b/src/index.ts
index e95a62b7e6..717929079c 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -37,6 +37,7 @@ import { OriginPostQuantumEncryption } from './resources/origin-post-quantum-enc
import { PageRules } from './resources/page-rules';
import { Pipelines } from './resources/pipelines';
import { RateLimits } from './resources/rate-limits';
+import { RealtimeKit } from './resources/realtime-kit';
import { SecurityTXT } from './resources/security-txt';
import { URLNormalization } from './resources/url-normalization';
import { Accounts } from './resources/accounts/accounts';
@@ -56,6 +57,7 @@ import { Calls } from './resources/calls/calls';
import { CertificateAuthorities } from './resources/certificate-authorities/certificate-authorities';
import { CloudConnector } from './resources/cloud-connector/cloud-connector';
import { CloudforceOne } from './resources/cloudforce-one/cloudforce-one';
+import { Connectivity } from './resources/connectivity/connectivity';
import { ContentScanning } from './resources/content-scanning/content-scanning';
import { CustomCertificates } from './resources/custom-certificates/custom-certificates';
import { CustomHostnames } from './resources/custom-hostnames/custom-hostnames';
@@ -83,6 +85,7 @@ import { MagicNetworkMonitoring } from './resources/magic-network-monitoring/mag
import { MagicTransit } from './resources/magic-transit/magic-transit';
import { MTLSCertificates } from './resources/mtls-certificates/mtls-certificates';
import { NetworkInterconnects } from './resources/network-interconnects/network-interconnects';
+import { Organizations } from './resources/organizations/organizations';
import { OriginTLSClientAuth } from './resources/origin-tls-client-auth/origin-tls-client-auth';
import { PageShield } from './resources/page-shield/page-shield';
import { Pages } from './resources/pages/pages';
@@ -103,6 +106,7 @@ import { Spectrum } from './resources/spectrum/spectrum';
import { Speed } from './resources/speed/speed';
import { SSL } from './resources/ssl/ssl';
import { Stream } from './resources/stream/stream';
+import { TokenValidation } from './resources/token-validation/token-validation';
import { Turnstile } from './resources/turnstile/turnstile';
import { URLScanner } from './resources/url-scanner/url-scanner';
import { User } from './resources/user/user';
@@ -266,6 +270,7 @@ export class Cloudflare extends Core.APIClient {
}
accounts: API.Accounts = new API.Accounts(this);
+ organizations: API.Organizations = new API.Organizations(this);
originCACertificates: API.OriginCACertificates = new API.OriginCACertificates(this);
ips: API.IPs = new API.IPs(this);
memberships: API.Memberships = new API.Memberships(this);
@@ -329,6 +334,7 @@ export class Cloudflare extends Core.APIClient {
workersForPlatforms: API.WorkersForPlatforms = new API.WorkersForPlatforms(this);
zeroTrust: API.ZeroTrust = new API.ZeroTrust(this);
turnstile: API.Turnstile = new API.Turnstile(this);
+ connectivity: API.Connectivity = new API.Connectivity(this);
hyperdrive: API.HyperdriveResource = new API.HyperdriveResource(this);
rum: API.RUM = new API.RUM(this);
vectorize: API.Vectorize = new API.Vectorize(this);
@@ -341,6 +347,7 @@ export class Cloudflare extends Core.APIClient {
dcvDelegation: API.DCVDelegation = new API.DCVDelegation(this);
hostnames: API.Hostnames = new API.Hostnames(this);
snippets: API.Snippets = new API.Snippets(this);
+ realtimeKit: API.RealtimeKit = new API.RealtimeKit(this);
calls: API.Calls = new API.Calls(this);
cloudforceOne: API.CloudforceOne = new API.CloudforceOne(this);
aiGateway: API.AIGateway = new API.AIGateway(this);
@@ -360,6 +367,7 @@ export class Cloudflare extends Core.APIClient {
secretsStore: API.SecretsStore = new API.SecretsStore(this);
pipelines: API.Pipelines = new API.Pipelines(this);
schemaValidation: API.SchemaValidation = new API.SchemaValidation(this);
+ tokenValidation: API.TokenValidation = new API.TokenValidation(this);
/**
* Check whether the base URL is set to its default.
@@ -503,6 +511,7 @@ export class Cloudflare extends Core.APIClient {
}
Cloudflare.Accounts = Accounts;
+Cloudflare.Organizations = Organizations;
Cloudflare.OriginCACertificates = OriginCACertificates;
Cloudflare.IPs = IPs;
Cloudflare.Memberships = Memberships;
@@ -566,6 +575,7 @@ Cloudflare.R2 = R2;
Cloudflare.WorkersForPlatforms = WorkersForPlatforms;
Cloudflare.ZeroTrust = ZeroTrust;
Cloudflare.Turnstile = Turnstile;
+Cloudflare.Connectivity = Connectivity;
Cloudflare.HyperdriveResource = HyperdriveResource;
Cloudflare.RUM = RUM;
Cloudflare.Vectorize = Vectorize;
@@ -578,6 +588,7 @@ Cloudflare.Speed = Speed;
Cloudflare.DCVDelegation = DCVDelegation;
Cloudflare.Hostnames = Hostnames;
Cloudflare.Snippets = Snippets;
+Cloudflare.RealtimeKit = RealtimeKit;
Cloudflare.Calls = Calls;
Cloudflare.CloudforceOne = CloudforceOne;
Cloudflare.AIGateway = AIGateway;
@@ -597,6 +608,7 @@ Cloudflare.CustomPages = CustomPages;
Cloudflare.SecretsStore = SecretsStore;
Cloudflare.Pipelines = Pipelines;
Cloudflare.SchemaValidation = SchemaValidation;
+Cloudflare.TokenValidation = TokenValidation;
export declare namespace Cloudflare {
export type RequestOptions = Core.RequestOptions;
@@ -636,6 +648,8 @@ export declare namespace Cloudflare {
export { Accounts as Accounts };
+ export { Organizations as Organizations };
+
export { OriginCACertificates as OriginCACertificates };
export { IPs as IPs };
@@ -762,6 +776,8 @@ export declare namespace Cloudflare {
export { Turnstile as Turnstile };
+ export { Connectivity as Connectivity };
+
export { HyperdriveResource as HyperdriveResource };
export { RUM as RUM };
@@ -786,6 +802,8 @@ export declare namespace Cloudflare {
export { Snippets as Snippets };
+ export { RealtimeKit as RealtimeKit };
+
export { Calls as Calls };
export { CloudforceOne as CloudforceOne };
@@ -824,6 +842,8 @@ export declare namespace Cloudflare {
export { SchemaValidation as SchemaValidation };
+ export { TokenValidation as TokenValidation };
+
export type ASN = API.ASN;
export type AuditLog = API.AuditLog;
export type CertificateCA = API.CertificateCA;
diff --git a/src/resources/abuse-reports.ts b/src/resources/abuse-reports.ts
index 451e42c504..a890c9539a 100644
--- a/src/resources/abuse-reports.ts
+++ b/src/resources/abuse-reports.ts
@@ -2,31 +2,201 @@
import { APIResource } from '../resource';
import * as Core from '../core';
+import { V4PagePagination, type V4PagePaginationParams } from '../pagination';
export class AbuseReports extends APIResource {
/**
* Submit the Abuse Report of a particular type
*/
create(
- reportType: string,
+ reportParam: string,
params: AbuseReportCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
const { account_id, ...body } = params;
return (
- this._client.post(`/accounts/${account_id}/abuse-reports/${reportType}`, {
+ this._client.post(`/accounts/${account_id}/abuse-reports/${reportParam}`, {
body,
...options,
}) as Core.APIPromise<{ result: AbuseReportCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * List the abuse reports for a given account
+ */
+ list(
+ params: AbuseReportListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/abuse-reports`,
+ AbuseReportListResponsesV4PagePagination,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Retrieve the details of an abuse report.
+ */
+ get(
+ reportParam: string,
+ params: AbuseReportGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(`/accounts/${account_id}/abuse-reports/${reportParam}`, options) as Core.APIPromise<{
+ result: AbuseReportGetResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
}
+export class AbuseReportListResponsesV4PagePagination extends V4PagePagination {}
+
/**
* The result should be 'success' for successful response
*/
export type AbuseReportCreateResponse = string;
+export interface AbuseReportListResponse {
+ reports: Array;
+}
+
+export namespace AbuseReportListResponse {
+ export interface Report {
+ /**
+ * Public facing ID of abuse report, aka abuse_rand.
+ */
+ id: string;
+
+ /**
+ * Creation date of report. Time in RFC 3339 format
+ * (https://www.rfc-editor.org/rfc/rfc3339.html)
+ */
+ cdate: string;
+
+ /**
+ * Domain that relates to the report.
+ */
+ domain: string;
+
+ /**
+ * A summary of the mitigations related to this report.
+ */
+ mitigation_summary: Report.MitigationSummary;
+
+ /**
+ * An enum value that represents the status of an abuse record
+ */
+ status: 'accepted' | 'in_review';
+
+ /**
+ * The abuse report type
+ */
+ type: 'PHISH' | 'GEN' | 'THREAT' | 'DMCA' | 'EMER' | 'TM' | 'REG_WHO' | 'NCSEI' | 'NETWORK';
+ }
+
+ export namespace Report {
+ /**
+ * A summary of the mitigations related to this report.
+ */
+ export interface MitigationSummary {
+ /**
+ * How many of the reported URLs were confirmed as abusive.
+ */
+ accepted_url_count: number;
+
+ /**
+ * How many mitigations are active.
+ */
+ active_count: number;
+
+ /**
+ * Whether the report has been forwarded to an external hosting provider.
+ */
+ external_host_notified: boolean;
+
+ /**
+ * How many mitigations are under review.
+ */
+ in_review_count: number;
+
+ /**
+ * How many mitigations are pending their effective date.
+ */
+ pending_count: number;
+ }
+ }
+}
+
+export interface AbuseReportGetResponse {
+ /**
+ * Public facing ID of abuse report, aka abuse_rand.
+ */
+ id: string;
+
+ /**
+ * Creation date of report. Time in RFC 3339 format
+ * (https://www.rfc-editor.org/rfc/rfc3339.html)
+ */
+ cdate: string;
+
+ /**
+ * Domain that relates to the report.
+ */
+ domain: string;
+
+ /**
+ * A summary of the mitigations related to this report.
+ */
+ mitigation_summary: AbuseReportGetResponse.MitigationSummary;
+
+ /**
+ * An enum value that represents the status of an abuse record
+ */
+ status: 'accepted' | 'in_review';
+
+ /**
+ * The abuse report type
+ */
+ type: 'PHISH' | 'GEN' | 'THREAT' | 'DMCA' | 'EMER' | 'TM' | 'REG_WHO' | 'NCSEI' | 'NETWORK';
+}
+
+export namespace AbuseReportGetResponse {
+ /**
+ * A summary of the mitigations related to this report.
+ */
+ export interface MitigationSummary {
+ /**
+ * How many of the reported URLs were confirmed as abusive.
+ */
+ accepted_url_count: number;
+
+ /**
+ * How many mitigations are active.
+ */
+ active_count: number;
+
+ /**
+ * Whether the report has been forwarded to an external hosting provider.
+ */
+ external_host_notified: boolean;
+
+ /**
+ * How many mitigations are under review.
+ */
+ in_review_count: number;
+
+ /**
+ * How many mitigations are pending their effective date.
+ */
+ pending_count: number;
+ }
+}
+
export type AbuseReportCreateParams =
| AbuseReportCreateParams.AbuseReportsDmcaReport
| AbuseReportCreateParams.AbuseReportsTrademarkReport
@@ -40,12 +210,12 @@ export type AbuseReportCreateParams =
export declare namespace AbuseReportCreateParams {
export interface AbuseReportsDmcaReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_dmca';
@@ -181,12 +351,12 @@ export declare namespace AbuseReportCreateParams {
export interface AbuseReportsTrademarkReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_trademark';
@@ -289,12 +459,12 @@ export declare namespace AbuseReportCreateParams {
export interface AbuseReportsGeneralReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_general';
@@ -404,12 +574,12 @@ export declare namespace AbuseReportCreateParams {
export interface AbuseReportsPhishingReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_phishing';
@@ -504,12 +674,12 @@ export declare namespace AbuseReportCreateParams {
export interface AbuseReportsCsamReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_children';
@@ -610,12 +780,12 @@ export declare namespace AbuseReportCreateParams {
export interface AbuseReportsThreatReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_threat';
@@ -703,12 +873,12 @@ export declare namespace AbuseReportCreateParams {
export interface AbuseReportsRegistrarWhoisReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_registrar_whois';
@@ -783,12 +953,12 @@ export declare namespace AbuseReportCreateParams {
export interface AbuseReportsNcseiReport {
/**
- * Path param: The account ID of the submitter.
+ * Path param: Cloudflare Account ID
*/
account_id: string;
/**
- * Body param: The abuse report type.
+ * Body param: The report type for submitted reports.
*/
act: 'abuse_ncsei';
@@ -881,9 +1051,66 @@ export declare namespace AbuseReportCreateParams {
}
}
+export interface AbuseReportListParams extends V4PagePaginationParams {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Query param: Returns reports created after the specified date
+ */
+ created_after?: string;
+
+ /**
+ * Query param: Returns reports created before the specified date
+ */
+ created_before?: string;
+
+ /**
+ * Query param: Filter by domain name related to the abuse report
+ */
+ domain?: string;
+
+ /**
+ * Query param: Filter reports that have any mitigations in the given status.
+ */
+ mitigation_status?: 'pending' | 'active' | 'in_review' | 'cancelled' | 'removed';
+
+ /**
+ * Query param: A property to sort by, followed by the order (id, cdate, domain,
+ * type, status)
+ */
+ sort?: string;
+
+ /**
+ * Query param: Filter by the status of the report.
+ */
+ status?: 'accepted' | 'in_review';
+
+ /**
+ * Query param: Filter by the type of the report.
+ */
+ type?: 'PHISH' | 'GEN' | 'THREAT' | 'DMCA' | 'EMER' | 'TM' | 'REG_WHO' | 'NCSEI' | 'NETWORK';
+}
+
+export interface AbuseReportGetParams {
+ /**
+ * Cloudflare Account ID
+ */
+ account_id: string;
+}
+
+AbuseReports.AbuseReportListResponsesV4PagePagination = AbuseReportListResponsesV4PagePagination;
+
export declare namespace AbuseReports {
export {
type AbuseReportCreateResponse as AbuseReportCreateResponse,
+ type AbuseReportListResponse as AbuseReportListResponse,
+ type AbuseReportGetResponse as AbuseReportGetResponse,
+ AbuseReportListResponsesV4PagePagination as AbuseReportListResponsesV4PagePagination,
type AbuseReportCreateParams as AbuseReportCreateParams,
+ type AbuseReportListParams as AbuseReportListParams,
+ type AbuseReportGetParams as AbuseReportGetParams,
};
}
diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts
index 1f17f46efb..332d3d488d 100644
--- a/src/resources/accounts/accounts.ts
+++ b/src/resources/accounts/accounts.ts
@@ -175,6 +175,11 @@ export interface Account {
*/
created_on?: string;
+ /**
+ * Parent container details
+ */
+ managed_by?: Account.ManagedBy;
+
/**
* Account settings
*/
@@ -182,6 +187,21 @@ export interface Account {
}
export namespace Account {
+ /**
+ * Parent container details
+ */
+ export interface ManagedBy {
+ /**
+ * ID of the parent Organization, if one exists
+ */
+ parent_org_id?: string;
+
+ /**
+ * Name of the parent Organization, if one exists
+ */
+ parent_org_name?: string;
+ }
+
/**
* Account settings
*/
@@ -257,6 +277,11 @@ export interface AccountUpdateParams {
*/
type: 'standard' | 'enterprise';
+ /**
+ * Body param: Parent container details
+ */
+ managed_by?: AccountUpdateParams.ManagedBy;
+
/**
* Body param: Account settings
*/
@@ -264,6 +289,11 @@ export interface AccountUpdateParams {
}
export namespace AccountUpdateParams {
+ /**
+ * Parent container details
+ */
+ export interface ManagedBy {}
+
/**
* Account settings
*/
diff --git a/src/resources/addressing/addressing.ts b/src/resources/addressing/addressing.ts
index 06599a8421..d38bac8b1f 100644
--- a/src/resources/addressing/addressing.ts
+++ b/src/resources/addressing/addressing.ts
@@ -2,12 +2,7 @@
import { APIResource } from '../../resource';
import * as LOADocumentsAPI from './loa-documents';
-import {
- LOADocumentCreateParams,
- LOADocumentCreateResponse,
- LOADocumentGetParams,
- LOADocuments,
-} from './loa-documents';
+import { LOADocumentGetParams, LOADocuments } from './loa-documents';
import * as ServicesAPI from './services';
import { ServiceListParams, ServiceListResponse, ServiceListResponsesSinglePage, Services } from './services';
import * as AddressMapsAPI from './address-maps/address-maps';
@@ -111,12 +106,7 @@ export declare namespace Addressing {
type AddressMapGetParams as AddressMapGetParams,
};
- export {
- LOADocuments as LOADocuments,
- type LOADocumentCreateResponse as LOADocumentCreateResponse,
- type LOADocumentCreateParams as LOADocumentCreateParams,
- type LOADocumentGetParams as LOADocumentGetParams,
- };
+ export { LOADocuments as LOADocuments, type LOADocumentGetParams as LOADocumentGetParams };
export {
Prefixes as Prefixes,
diff --git a/src/resources/addressing/index.ts b/src/resources/addressing/index.ts
index 6b64a96cdf..53a85afcca 100644
--- a/src/resources/addressing/index.ts
+++ b/src/resources/addressing/index.ts
@@ -15,12 +15,7 @@ export {
type AddressMapGetParams,
} from './address-maps/index';
export { Addressing } from './addressing';
-export {
- LOADocuments,
- type LOADocumentCreateResponse,
- type LOADocumentCreateParams,
- type LOADocumentGetParams,
-} from './loa-documents';
+export { LOADocuments, type LOADocumentGetParams } from './loa-documents';
export {
PrefixesSinglePage,
Prefixes,
diff --git a/src/resources/addressing/loa-documents.ts b/src/resources/addressing/loa-documents.ts
index dafacf0abb..b93c60afc5 100644
--- a/src/resources/addressing/loa-documents.ts
+++ b/src/resources/addressing/loa-documents.ts
@@ -5,31 +5,6 @@ import * as Core from '../../core';
import { type Response } from '../../_shims/index';
export class LOADocuments extends APIResource {
- /**
- * Submit LOA document (pdf format) under the account.
- *
- * @example
- * ```ts
- * const loaDocument =
- * await client.addressing.loaDocuments.create({
- * account_id: '258def64c72dae45f3e4c8516e2111f2',
- * loa_document: '@document.pdf',
- * });
- * ```
- */
- create(
- params: LOADocumentCreateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id, ...body } = params;
- return (
- this._client.post(
- `/accounts/${account_id}/addressing/loa_documents`,
- Core.multipartFormRequestOptions({ body, ...options }),
- ) as Core.APIPromise<{ result: LOADocumentCreateResponse }>
- )._thenUnwrap((obj) => obj.result);
- }
-
/**
* Download specified LOA document under the account.
*
@@ -59,52 +34,6 @@ export class LOADocuments extends APIResource {
}
}
-export interface LOADocumentCreateResponse {
- /**
- * Identifier for the uploaded LOA document.
- */
- id?: string | null;
-
- /**
- * Identifier of a Cloudflare account.
- */
- account_id?: string;
-
- created?: string;
-
- /**
- * Name of LOA document. Max file size 10MB, and supported filetype is pdf.
- */
- filename?: string;
-
- /**
- * File size of the uploaded LOA document.
- */
- size_bytes?: number;
-
- /**
- * Whether the LOA has been verified by Cloudflare staff.
- */
- verified?: boolean;
-
- /**
- * Timestamp of the moment the LOA was marked as validated.
- */
- verified_at?: string | null;
-}
-
-export interface LOADocumentCreateParams {
- /**
- * Path param: Identifier of a Cloudflare account.
- */
- account_id: string;
-
- /**
- * Body param: LOA document to upload.
- */
- loa_document: string;
-}
-
export interface LOADocumentGetParams {
/**
* Identifier of a Cloudflare account.
@@ -113,9 +42,5 @@ export interface LOADocumentGetParams {
}
export declare namespace LOADocuments {
- export {
- type LOADocumentCreateResponse as LOADocumentCreateResponse,
- type LOADocumentCreateParams as LOADocumentCreateParams,
- type LOADocumentGetParams as LOADocumentGetParams,
- };
+ export { type LOADocumentGetParams as LOADocumentGetParams };
}
diff --git a/src/resources/addressing/prefixes/bgp-prefixes.ts b/src/resources/addressing/prefixes/bgp-prefixes.ts
index 1945d1a5b1..f8cd80f52e 100644
--- a/src/resources/addressing/prefixes/bgp-prefixes.ts
+++ b/src/resources/addressing/prefixes/bgp-prefixes.ts
@@ -15,7 +15,10 @@ export class BGPPrefixes extends APIResource {
* const bgpPrefix =
* await client.addressing.prefixes.bgpPrefixes.create(
* '2af39739cc4e3b5910c918468bb89828',
- * { account_id: '258def64c72dae45f3e4c8516e2111f2' },
+ * {
+ * account_id: '258def64c72dae45f3e4c8516e2111f2',
+ * cidr: '192.0.2.0/24',
+ * },
* );
* ```
*/
@@ -196,7 +199,7 @@ export namespace BGPPrefix {
on_demand_enabled?: boolean;
/**
- * Whether advertisement status of the prefix is locked, meaning it cannot be
+ * Whether the advertisement status of the prefix is locked, meaning it cannot be
* changed.
*/
on_demand_locked?: boolean;
@@ -212,7 +215,7 @@ export interface BGPPrefixCreateParams {
/**
* Body param: IP Prefix in Classless Inter-Domain Routing format.
*/
- cidr?: string;
+ cidr: string;
}
export interface BGPPrefixListParams {
diff --git a/src/resources/addressing/prefixes/prefixes.ts b/src/resources/addressing/prefixes/prefixes.ts
index a965d93b86..51124a3677 100644
--- a/src/resources/addressing/prefixes/prefixes.ts
+++ b/src/resources/addressing/prefixes/prefixes.ts
@@ -56,9 +56,8 @@ export class Prefixes extends APIResource {
* ```ts
* const prefix = await client.addressing.prefixes.create({
* account_id: '258def64c72dae45f3e4c8516e2111f2',
- * asn: 209242,
+ * asn: 13335,
* cidr: '192.0.2.0/24',
- * loa_document_id: 'd933b1530bc56c9953cf8ce166da8004',
* });
* ```
*/
@@ -200,7 +199,7 @@ export interface Prefix {
/**
* Autonomous System Number (ASN) the prefix will be advertised under.
*/
- asn?: number | null;
+ asn?: number;
/**
* IP Prefix in Classless Inter-Domain Routing format.
@@ -209,11 +208,22 @@ export interface Prefix {
created_at?: string;
+ /**
+ * Whether Cloudflare is allowed to generate the LOA document on behalf of the
+ * prefix owner.
+ */
+ delegate_loa_creation?: boolean;
+
/**
* Description of the prefix.
*/
description?: string;
+ /**
+ * State of one kind of validation for an IP prefix.
+ */
+ irr_validation_state?: string;
+
/**
* Identifier for the uploaded LOA document.
*/
@@ -236,6 +246,21 @@ export interface Prefix {
* Prefix.
*/
on_demand_locked?: boolean;
+
+ /**
+ * State of one kind of validation for an IP prefix.
+ */
+ ownership_validation_state?: string;
+
+ /**
+ * Token provided to demonstrate ownership of the prefix.
+ */
+ ownership_validation_token?: string;
+
+ /**
+ * State of one kind of validation for an IP prefix.
+ */
+ rpki_validation_state?: string;
}
export interface PrefixDeleteResponse {
@@ -247,8 +272,6 @@ export interface PrefixDeleteResponse {
* Whether the API call was successful.
*/
success: true;
-
- result_info?: PrefixDeleteResponse.ResultInfo;
}
export namespace PrefixDeleteResponse {
@@ -283,28 +306,6 @@ export namespace PrefixDeleteResponse {
pointer?: string;
}
}
-
- export interface ResultInfo {
- /**
- * Total number of results for the requested service.
- */
- count?: number;
-
- /**
- * Current page within paginated list of results.
- */
- page?: number;
-
- /**
- * Number of results per page of results.
- */
- per_page?: number;
-
- /**
- * Total results available without any search parameters.
- */
- total_count?: number;
- }
}
export interface PrefixCreateParams {
@@ -316,7 +317,7 @@ export interface PrefixCreateParams {
/**
* Body param: Autonomous System Number (ASN) the prefix will be advertised under.
*/
- asn: number | null;
+ asn: number;
/**
* Body param: IP Prefix in Classless Inter-Domain Routing format.
@@ -324,9 +325,15 @@ export interface PrefixCreateParams {
cidr: string;
/**
- * Body param: Identifier for the uploaded LOA document.
+ * Body param: Whether Cloudflare is allowed to generate the LOA document on behalf
+ * of the prefix owner.
*/
- loa_document_id: string | null;
+ delegate_loa_creation?: boolean;
+
+ /**
+ * Body param: Description of the prefix.
+ */
+ description?: string;
}
export interface PrefixListParams {
diff --git a/src/resources/addressing/prefixes/service-bindings.ts b/src/resources/addressing/prefixes/service-bindings.ts
index 5ef9365d41..a12783f519 100644
--- a/src/resources/addressing/prefixes/service-bindings.ts
+++ b/src/resources/addressing/prefixes/service-bindings.ts
@@ -7,17 +7,22 @@ import { SinglePage } from '../../../pagination';
export class ServiceBindings extends APIResource {
/**
* Creates a new Service Binding, routing traffic to IPs within the given CIDR to a
- * service running on Cloudflare's network. **Note:** This API may only be used on
- * prefixes currently configured with a Magic Transit/Cloudflare CDN/Cloudflare
- * Spectrum service binding, and only allows creating upgrade service bindings for
- * the Cloudflare CDN or Cloudflare Spectrum.
+ * service running on Cloudflare's network. **NOTE:** The first Service Binding
+ * created for an IP Prefix must exactly match the IP Prefix's CIDR. Subsequent
+ * Service Bindings may be created with a more-specific CIDR. Refer to the
+ * [Service Bindings Documentation](https://developers.cloudflare.com/byoip/service-bindings/)
+ * for compatibility details.
*
* @example
* ```ts
* const serviceBinding =
* await client.addressing.prefixes.serviceBindings.create(
* '2af39739cc4e3b5910c918468bb89828',
- * { account_id: '258def64c72dae45f3e4c8516e2111f2' },
+ * {
+ * account_id: '258def64c72dae45f3e4c8516e2111f2',
+ * cidr: '192.0.2.0/24',
+ * service_id: '2db684ee7ca04e159946fd05b99e1bcd',
+ * },
* );
* ```
*/
@@ -219,13 +224,13 @@ export interface ServiceBindingCreateParams {
/**
* Body param: IP Prefix in Classless Inter-Domain Routing format.
*/
- cidr?: string;
+ cidr: string;
/**
* Body param: Identifier of a Service on the Cloudflare network. Available
* services and their IDs may be found in the **List Services** endpoint.
*/
- service_id?: string;
+ service_id: string;
}
export interface ServiceBindingListParams {
diff --git a/src/resources/alerting/destinations/webhooks.ts b/src/resources/alerting/destinations/webhooks.ts
index 279c67d0bf..605e015ae3 100644
--- a/src/resources/alerting/destinations/webhooks.ts
+++ b/src/resources/alerting/destinations/webhooks.ts
@@ -35,7 +35,7 @@ export class Webhooks extends APIResource {
* ```ts
* const webhook =
* await client.alerting.destinations.webhooks.update(
- * 'b115d5ec-15c6-41ee-8b76-92c449b5227b',
+ * 'b115d5ec15c641ee8b7692c449b5227b',
* {
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* name: 'Slack Webhook',
@@ -90,7 +90,7 @@ export class Webhooks extends APIResource {
* ```ts
* const webhook =
* await client.alerting.destinations.webhooks.delete(
- * 'b115d5ec-15c6-41ee-8b76-92c449b5227b',
+ * 'b115d5ec15c641ee8b7692c449b5227b',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
@@ -114,7 +114,7 @@ export class Webhooks extends APIResource {
* ```ts
* const webhooks =
* await client.alerting.destinations.webhooks.get(
- * 'b115d5ec-15c6-41ee-8b76-92c449b5227b',
+ * 'b115d5ec15c641ee8b7692c449b5227b',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
diff --git a/src/resources/alerting/policies.ts b/src/resources/alerting/policies.ts
index c2caed4005..7e22a6cc36 100644
--- a/src/resources/alerting/policies.ts
+++ b/src/resources/alerting/policies.ts
@@ -35,7 +35,7 @@ export class Policies extends APIResource {
* @example
* ```ts
* const policy = await client.alerting.policies.update(
- * '0da2b59e-f118-439d-8097-bdfb215203c9',
+ * '0da2b59ef118439d8097bdfb215203c9',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
@@ -85,7 +85,7 @@ export class Policies extends APIResource {
* @example
* ```ts
* const policy = await client.alerting.policies.delete(
- * '0da2b59e-f118-439d-8097-bdfb215203c9',
+ * '0da2b59ef118439d8097bdfb215203c9',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
@@ -105,7 +105,7 @@ export class Policies extends APIResource {
* @example
* ```ts
* const policy = await client.alerting.policies.get(
- * '0da2b59e-f118-439d-8097-bdfb215203c9',
+ * '0da2b59ef118439d8097bdfb215203c9',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
@@ -211,6 +211,7 @@ export interface Policy {
* possible values.
*/
alert_type?:
+ | 'abuse_report_alert'
| 'access_custom_certificate_expiration_type'
| 'advanced_ddos_attack_l4_alert'
| 'advanced_ddos_attack_l7_alert'
@@ -520,6 +521,11 @@ export interface PolicyFilter {
*/
tunnel_name?: Array;
+ /**
+ * Usage depends on specific alert type
+ */
+ type?: Array;
+
/**
* Usage depends on specific alert type
*/
@@ -739,6 +745,11 @@ export interface PolicyFilterParam {
*/
tunnel_name?: Array;
+ /**
+ * Usage depends on specific alert type
+ */
+ type?: Array;
+
/**
* Usage depends on specific alert type
*/
@@ -825,6 +836,7 @@ export interface PolicyCreateParams {
* possible values.
*/
alert_type:
+ | 'abuse_report_alert'
| 'access_custom_certificate_expiration_type'
| 'advanced_ddos_attack_l4_alert'
| 'advanced_ddos_attack_l7_alert'
@@ -946,6 +958,7 @@ export interface PolicyUpdateParams {
* possible values.
*/
alert_type?:
+ | 'abuse_report_alert'
| 'access_custom_certificate_expiration_type'
| 'advanced_ddos_attack_l4_alert'
| 'advanced_ddos_attack_l7_alert'
diff --git a/src/resources/api-gateway/api-gateway.ts b/src/resources/api-gateway/api-gateway.ts
index 1f9fb727e9..44b4380eba 100644
--- a/src/resources/api-gateway/api-gateway.ts
+++ b/src/resources/api-gateway/api-gateway.ts
@@ -6,7 +6,6 @@ import {
Configuration,
ConfigurationGetParams,
ConfigurationUpdateParams,
- ConfigurationUpdateResponse,
Configurations,
} from './configurations';
import * as SchemasAPI from './schemas';
@@ -44,10 +43,10 @@ import { Settings } from './settings/settings';
import * as UserSchemasAPI from './user-schemas/user-schemas';
import {
Message,
- PublicSchema,
- PublicSchemasV4PagePaginationArray,
- SchemaUpload,
+ OldPublicSchema,
+ OldPublicSchemasV4PagePaginationArray,
UserSchemaCreateParams,
+ UserSchemaCreateResponse,
UserSchemaDeleteParams,
UserSchemaDeleteResponse,
UserSchemaEditParams,
@@ -74,15 +73,15 @@ APIGateway.Operations = Operations;
APIGateway.OperationListResponsesV4PagePaginationArray = OperationListResponsesV4PagePaginationArray;
APIGateway.OperationBulkCreateResponsesSinglePage = OperationBulkCreateResponsesSinglePage;
APIGateway.Schemas = Schemas;
+APIGateway.Settings = Settings;
APIGateway.UserSchemas = UserSchemas;
-APIGateway.PublicSchemasV4PagePaginationArray = PublicSchemasV4PagePaginationArray;
+APIGateway.OldPublicSchemasV4PagePaginationArray = OldPublicSchemasV4PagePaginationArray;
APIGateway.ExpressionTemplate = ExpressionTemplate;
export declare namespace APIGateway {
export {
Configurations as Configurations,
type Configuration as Configuration,
- type ConfigurationUpdateResponse as ConfigurationUpdateResponse,
type ConfigurationUpdateParams as ConfigurationUpdateParams,
type ConfigurationGetParams as ConfigurationGetParams,
};
@@ -119,15 +118,15 @@ export declare namespace APIGateway {
type SchemaListParams as SchemaListParams,
};
- export { type Settings as Settings };
+ export { Settings as Settings };
export {
UserSchemas as UserSchemas,
type Message as Message,
- type PublicSchema as PublicSchema,
- type SchemaUpload as SchemaUpload,
+ type OldPublicSchema as OldPublicSchema,
+ type UserSchemaCreateResponse as UserSchemaCreateResponse,
type UserSchemaDeleteResponse as UserSchemaDeleteResponse,
- PublicSchemasV4PagePaginationArray as PublicSchemasV4PagePaginationArray,
+ OldPublicSchemasV4PagePaginationArray as OldPublicSchemasV4PagePaginationArray,
type UserSchemaCreateParams as UserSchemaCreateParams,
type UserSchemaListParams as UserSchemaListParams,
type UserSchemaDeleteParams as UserSchemaDeleteParams,
diff --git a/src/resources/api-gateway/configurations.ts b/src/resources/api-gateway/configurations.ts
index 5659e51452..5082ea818a 100644
--- a/src/resources/api-gateway/configurations.ts
+++ b/src/resources/api-gateway/configurations.ts
@@ -2,11 +2,10 @@
import { APIResource } from '../../resource';
import * as Core from '../../core';
-import * as UserSchemasAPI from './user-schemas/user-schemas';
export class Configurations extends APIResource {
/**
- * Set configuration properties
+ * Update configuration properties
*
* @example
* ```ts
@@ -19,12 +18,14 @@ export class Configurations extends APIResource {
* });
* ```
*/
- update(
- params: ConfigurationUpdateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ update(params: ConfigurationUpdateParams, options?: Core.RequestOptions): Core.APIPromise {
const { zone_id, ...body } = params;
- return this._client.put(`/zones/${zone_id}/api_gateway/configuration`, { body, ...options });
+ return (
+ this._client.put(`/zones/${zone_id}/api_gateway/configuration`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: Configuration }>
+ )._thenUnwrap((obj) => obj.result);
}
/**
@@ -39,12 +40,11 @@ export class Configurations extends APIResource {
* ```
*/
get(params: ConfigurationGetParams, options?: Core.RequestOptions): Core.APIPromise {
- const { zone_id, ...query } = params;
+ const { zone_id } = params;
return (
- this._client.get(`/zones/${zone_id}/api_gateway/configuration`, {
- query,
- ...options,
- }) as Core.APIPromise<{ result: Configuration }>
+ this._client.get(`/zones/${zone_id}/api_gateway/configuration`, options) as Core.APIPromise<{
+ result: Configuration;
+ }>
)._thenUnwrap((obj) => obj.result);
}
}
@@ -93,17 +93,6 @@ export namespace Configuration {
}
}
-export interface ConfigurationUpdateResponse {
- errors: UserSchemasAPI.Message;
-
- messages: UserSchemasAPI.Message;
-
- /**
- * Whether the API call was successful.
- */
- success: true;
-}
-
export interface ConfigurationUpdateParams {
/**
* Path param: Identifier.
@@ -159,20 +148,14 @@ export namespace ConfigurationUpdateParams {
export interface ConfigurationGetParams {
/**
- * Path param: Identifier.
+ * Identifier.
*/
zone_id: string;
-
- /**
- * Query param: Requests information about certain properties.
- */
- properties?: Array<'auth_id_characteristics'>;
}
export declare namespace Configurations {
export {
type Configuration as Configuration,
- type ConfigurationUpdateResponse as ConfigurationUpdateResponse,
type ConfigurationUpdateParams as ConfigurationUpdateParams,
type ConfigurationGetParams as ConfigurationGetParams,
};
diff --git a/src/resources/api-gateway/index.ts b/src/resources/api-gateway/index.ts
index 5941af87f3..494074729b 100644
--- a/src/resources/api-gateway/index.ts
+++ b/src/resources/api-gateway/index.ts
@@ -4,7 +4,6 @@ export { APIGateway } from './api-gateway';
export {
Configurations,
type Configuration,
- type ConfigurationUpdateResponse,
type ConfigurationUpdateParams,
type ConfigurationGetParams,
} from './configurations';
@@ -16,6 +15,19 @@ export {
type DiscoveryGetParams,
} from './discovery/index';
export { ExpressionTemplate } from './expression-template/index';
+export {
+ OldPublicSchemasV4PagePaginationArray,
+ UserSchemas,
+ type Message,
+ type OldPublicSchema,
+ type UserSchemaCreateResponse,
+ type UserSchemaDeleteResponse,
+ type UserSchemaCreateParams,
+ type UserSchemaListParams,
+ type UserSchemaDeleteParams,
+ type UserSchemaEditParams,
+ type UserSchemaGetParams,
+} from './user-schemas/index';
export {
OperationListResponsesV4PagePaginationArray,
OperationBulkCreateResponsesSinglePage,
@@ -34,18 +46,5 @@ export {
type OperationBulkDeleteParams,
type OperationGetParams,
} from './operations/index';
-export {
- PublicSchemasV4PagePaginationArray,
- UserSchemas,
- type Message,
- type PublicSchema,
- type SchemaUpload,
- type UserSchemaDeleteResponse,
- type UserSchemaCreateParams,
- type UserSchemaListParams,
- type UserSchemaDeleteParams,
- type UserSchemaEditParams,
- type UserSchemaGetParams,
-} from './user-schemas/index';
export { Schemas, type SchemaListResponse, type SchemaListParams } from './schemas';
export { Settings } from './settings/index';
diff --git a/src/resources/api-gateway/operations/index.ts b/src/resources/api-gateway/operations/index.ts
index 312dd5fe1e..41346972b3 100644
--- a/src/resources/api-gateway/operations/index.ts
+++ b/src/resources/api-gateway/operations/index.ts
@@ -20,8 +20,8 @@ export {
} from './operations';
export {
SchemaValidation,
- type SettingsMultipleRequest,
type SchemaValidationUpdateResponse,
+ type SchemaValidationEditResponse,
type SchemaValidationGetResponse,
type SchemaValidationUpdateParams,
type SchemaValidationEditParams,
diff --git a/src/resources/api-gateway/operations/operations.ts b/src/resources/api-gateway/operations/operations.ts
index 44afc92131..3db9ed07bf 100644
--- a/src/resources/api-gateway/operations/operations.ts
+++ b/src/resources/api-gateway/operations/operations.ts
@@ -6,11 +6,11 @@ import * as SchemaValidationAPI from './schema-validation';
import {
SchemaValidation,
SchemaValidationEditParams,
+ SchemaValidationEditResponse,
SchemaValidationGetParams,
SchemaValidationGetResponse,
SchemaValidationUpdateParams,
SchemaValidationUpdateResponse,
- SettingsMultipleRequest,
} from './schema-validation';
import * as UserSchemasAPI from '../user-schemas/user-schemas';
import { SinglePage, V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination';
@@ -1490,8 +1490,8 @@ export declare namespace Operations {
export {
SchemaValidation as SchemaValidation,
- type SettingsMultipleRequest as SettingsMultipleRequest,
type SchemaValidationUpdateResponse as SchemaValidationUpdateResponse,
+ type SchemaValidationEditResponse as SchemaValidationEditResponse,
type SchemaValidationGetResponse as SchemaValidationGetResponse,
type SchemaValidationUpdateParams as SchemaValidationUpdateParams,
type SchemaValidationEditParams as SchemaValidationEditParams,
diff --git a/src/resources/api-gateway/operations/schema-validation.ts b/src/resources/api-gateway/operations/schema-validation.ts
index 19466e0d9f..2bfda168e6 100644
--- a/src/resources/api-gateway/operations/schema-validation.ts
+++ b/src/resources/api-gateway/operations/schema-validation.ts
@@ -29,13 +29,13 @@ export class SchemaValidation extends APIResource {
edit(
params: SchemaValidationEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { zone_id, settings_multiple_request } = params;
+ ): Core.APIPromise {
+ const { zone_id, body } = params;
return (
this._client.patch(`/zones/${zone_id}/api_gateway/operations/schema_validation`, {
- body: settings_multiple_request,
+ body: body,
...options,
- }) as Core.APIPromise<{ result: SettingsMultipleRequest }>
+ }) as Core.APIPromise<{ result: SchemaValidationEditResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -57,30 +57,28 @@ export class SchemaValidation extends APIResource {
}
}
-export type SettingsMultipleRequest = { [key: string]: SettingsMultipleRequest.item };
+export interface SchemaValidationUpdateResponse {
+ /**
+ * When set, this applies a mitigation action to this operation
+ *
+ * - `log` log request when request does not conform to schema for this operation
+ * - `block` deny access to the site when request does not conform to schema for
+ * this operation
+ * - `none` will skip mitigation for this operation
+ * - `null` indicates that no operation level mitigation is in place, see Zone
+ * Level Schema Validation Settings for mitigation action that will be applied
+ */
+ mitigation_action?: 'log' | 'block' | 'none' | null;
-export namespace SettingsMultipleRequest {
/**
- * Operation ID to mitigation action mappings
+ * UUID.
*/
- export interface item {
- /**
- * When set, this applies a mitigation action to this operation
- *
- * - `log` log request when request does not conform to schema for this operation
- * - `block` deny access to the site when request does not conform to schema for
- * this operation
- * - `none` will skip mitigation for this operation
- * - `null` indicates that no operation level mitigation is in place, see Zone
- * Level Schema Validation Settings for mitigation action that will be applied
- */
- mitigation_action?: 'log' | 'block' | 'none' | null;
- }
+ operation_id?: string;
}
-export type SettingsMultipleRequestParam = { [key: string]: SettingsMultipleRequestParam.item };
+export type SchemaValidationEditResponse = { [key: string]: SchemaValidationEditResponse.item };
-export namespace SettingsMultipleRequestParam {
+export namespace SchemaValidationEditResponse {
/**
* Operation ID to mitigation action mappings
*/
@@ -99,25 +97,6 @@ export namespace SettingsMultipleRequestParam {
}
}
-export interface SchemaValidationUpdateResponse {
- /**
- * When set, this applies a mitigation action to this operation
- *
- * - `log` log request when request does not conform to schema for this operation
- * - `block` deny access to the site when request does not conform to schema for
- * this operation
- * - `none` will skip mitigation for this operation
- * - `null` indicates that no operation level mitigation is in place, see Zone
- * Level Schema Validation Settings for mitigation action that will be applied
- */
- mitigation_action?: 'log' | 'block' | 'none' | null;
-
- /**
- * UUID.
- */
- operation_id?: string;
-}
-
export interface SchemaValidationGetResponse {
/**
* When set, this applies a mitigation action to this operation
@@ -165,7 +144,26 @@ export interface SchemaValidationEditParams {
/**
* Body param:
*/
- settings_multiple_request: SettingsMultipleRequestParam;
+ body: { [key: string]: SchemaValidationEditParams.Body };
+}
+
+export namespace SchemaValidationEditParams {
+ /**
+ * Operation ID to mitigation action mappings
+ */
+ export interface Body {
+ /**
+ * When set, this applies a mitigation action to this operation
+ *
+ * - `log` log request when request does not conform to schema for this operation
+ * - `block` deny access to the site when request does not conform to schema for
+ * this operation
+ * - `none` will skip mitigation for this operation
+ * - `null` indicates that no operation level mitigation is in place, see Zone
+ * Level Schema Validation Settings for mitigation action that will be applied
+ */
+ mitigation_action?: 'log' | 'block' | 'none' | null;
+ }
}
export interface SchemaValidationGetParams {
@@ -177,8 +175,8 @@ export interface SchemaValidationGetParams {
export declare namespace SchemaValidation {
export {
- type SettingsMultipleRequest as SettingsMultipleRequest,
type SchemaValidationUpdateResponse as SchemaValidationUpdateResponse,
+ type SchemaValidationEditResponse as SchemaValidationEditResponse,
type SchemaValidationGetResponse as SchemaValidationGetResponse,
type SchemaValidationUpdateParams as SchemaValidationUpdateParams,
type SchemaValidationEditParams as SchemaValidationEditParams,
diff --git a/src/resources/api-gateway/settings/index.ts b/src/resources/api-gateway/settings/index.ts
index 086f66ad01..091b4c6421 100644
--- a/src/resources/api-gateway/settings/index.ts
+++ b/src/resources/api-gateway/settings/index.ts
@@ -2,6 +2,9 @@
export {
SchemaValidation,
+ type SchemaValidationUpdateResponse,
+ type SchemaValidationEditResponse,
+ type SchemaValidationGetResponse,
type SchemaValidationUpdateParams,
type SchemaValidationEditParams,
type SchemaValidationGetParams,
diff --git a/src/resources/api-gateway/settings/schema-validation.ts b/src/resources/api-gateway/settings/schema-validation.ts
index 8b3dbc93f7..88293ab668 100644
--- a/src/resources/api-gateway/settings/schema-validation.ts
+++ b/src/resources/api-gateway/settings/schema-validation.ts
@@ -2,7 +2,6 @@
import { APIResource } from '../../../resource';
import * as Core from '../../../core';
-import * as SettingsAPI from './settings';
export class SchemaValidation extends APIResource {
/**
@@ -13,7 +12,7 @@ export class SchemaValidation extends APIResource {
update(
params: SchemaValidationUpdateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { zone_id, ...body } = params;
return this._client.put(`/zones/${zone_id}/api_gateway/settings/schema_validation`, { body, ...options });
}
@@ -26,7 +25,7 @@ export class SchemaValidation extends APIResource {
edit(
params: SchemaValidationEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/api_gateway/settings/schema_validation`, {
body,
@@ -42,12 +41,84 @@ export class SchemaValidation extends APIResource {
get(
params: SchemaValidationGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/api_gateway/settings/schema_validation`, options);
}
}
+export interface SchemaValidationUpdateResponse {
+ /**
+ * The default mitigation action used when there is no mitigation action defined on
+ * the operation
+ *
+ * Mitigation actions are as follows:
+ *
+ * - `log` - log request when request does not conform to schema
+ * - `block` - deny access to the site when request does not conform to schema
+ *
+ * A special value of of `none` will skip running schema validation entirely for
+ * the request when there is no mitigation action defined on the operation
+ */
+ validation_default_mitigation_action?: 'none' | 'log' | 'block';
+
+ /**
+ * When set, this overrides both zone level and operation level mitigation actions.
+ *
+ * - `none` will skip running schema validation entirely for the request
+ * - `null` indicates that no override is in place
+ */
+ validation_override_mitigation_action?: 'none' | null;
+}
+
+export interface SchemaValidationEditResponse {
+ /**
+ * The default mitigation action used when there is no mitigation action defined on
+ * the operation
+ *
+ * Mitigation actions are as follows:
+ *
+ * - `log` - log request when request does not conform to schema
+ * - `block` - deny access to the site when request does not conform to schema
+ *
+ * A special value of of `none` will skip running schema validation entirely for
+ * the request when there is no mitigation action defined on the operation
+ */
+ validation_default_mitigation_action?: 'none' | 'log' | 'block';
+
+ /**
+ * When set, this overrides both zone level and operation level mitigation actions.
+ *
+ * - `none` will skip running schema validation entirely for the request
+ * - `null` indicates that no override is in place
+ */
+ validation_override_mitigation_action?: 'none' | null;
+}
+
+export interface SchemaValidationGetResponse {
+ /**
+ * The default mitigation action used when there is no mitigation action defined on
+ * the operation
+ *
+ * Mitigation actions are as follows:
+ *
+ * - `log` - log request when request does not conform to schema
+ * - `block` - deny access to the site when request does not conform to schema
+ *
+ * A special value of of `none` will skip running schema validation entirely for
+ * the request when there is no mitigation action defined on the operation
+ */
+ validation_default_mitigation_action?: 'none' | 'log' | 'block';
+
+ /**
+ * When set, this overrides both zone level and operation level mitigation actions.
+ *
+ * - `none` will skip running schema validation entirely for the request
+ * - `null` indicates that no override is in place
+ */
+ validation_override_mitigation_action?: 'none' | null;
+}
+
export interface SchemaValidationUpdateParams {
/**
* Path param: Identifier.
@@ -122,6 +193,9 @@ export interface SchemaValidationGetParams {
export declare namespace SchemaValidation {
export {
+ type SchemaValidationUpdateResponse as SchemaValidationUpdateResponse,
+ type SchemaValidationEditResponse as SchemaValidationEditResponse,
+ type SchemaValidationGetResponse as SchemaValidationGetResponse,
type SchemaValidationUpdateParams as SchemaValidationUpdateParams,
type SchemaValidationEditParams as SchemaValidationEditParams,
type SchemaValidationGetParams as SchemaValidationGetParams,
diff --git a/src/resources/api-gateway/settings/settings.ts b/src/resources/api-gateway/settings/settings.ts
index 9c7236a309..3404409098 100644
--- a/src/resources/api-gateway/settings/settings.ts
+++ b/src/resources/api-gateway/settings/settings.ts
@@ -5,8 +5,11 @@ import * as SchemaValidationAPI from './schema-validation';
import {
SchemaValidation,
SchemaValidationEditParams,
+ SchemaValidationEditResponse,
SchemaValidationGetParams,
+ SchemaValidationGetResponse,
SchemaValidationUpdateParams,
+ SchemaValidationUpdateResponse,
} from './schema-validation';
export class Settings extends APIResource {
@@ -15,37 +18,14 @@ export class Settings extends APIResource {
);
}
-export interface Settings {
- /**
- * The default mitigation action used when there is no mitigation action defined on
- * the operation
- *
- * Mitigation actions are as follows:
- *
- * - `log` - log request when request does not conform to schema
- * - `block` - deny access to the site when request does not conform to schema
- *
- * A special value of of `none` will skip running schema validation entirely for
- * the request when there is no mitigation action defined on the operation
- */
- validation_default_mitigation_action?: 'none' | 'log' | 'block';
-
- /**
- * When set, this overrides both zone level and operation level mitigation actions.
- *
- * - `none` will skip running schema validation entirely for the request
- * - `null` indicates that no override is in place
- */
- validation_override_mitigation_action?: 'none' | null;
-}
-
Settings.SchemaValidation = SchemaValidation;
export declare namespace Settings {
- export { type Settings as Settings };
-
export {
SchemaValidation as SchemaValidation,
+ type SchemaValidationUpdateResponse as SchemaValidationUpdateResponse,
+ type SchemaValidationEditResponse as SchemaValidationEditResponse,
+ type SchemaValidationGetResponse as SchemaValidationGetResponse,
type SchemaValidationUpdateParams as SchemaValidationUpdateParams,
type SchemaValidationEditParams as SchemaValidationEditParams,
type SchemaValidationGetParams as SchemaValidationGetParams,
diff --git a/src/resources/api-gateway/user-schemas/index.ts b/src/resources/api-gateway/user-schemas/index.ts
index 867f9925f7..73dd44c925 100644
--- a/src/resources/api-gateway/user-schemas/index.ts
+++ b/src/resources/api-gateway/user-schemas/index.ts
@@ -7,17 +7,11 @@ export {
type HostListParams,
} from './hosts';
export {
- OperationListResponsesV4PagePaginationArray,
- Operations,
- type OperationListResponse,
- type OperationListParams,
-} from './operations';
-export {
- PublicSchemasV4PagePaginationArray,
+ OldPublicSchemasV4PagePaginationArray,
UserSchemas,
type Message,
- type PublicSchema,
- type SchemaUpload,
+ type OldPublicSchema,
+ type UserSchemaCreateResponse,
type UserSchemaDeleteResponse,
type UserSchemaCreateParams,
type UserSchemaListParams,
@@ -25,3 +19,9 @@ export {
type UserSchemaEditParams,
type UserSchemaGetParams,
} from './user-schemas';
+export {
+ OperationListResponsesV4PagePaginationArray,
+ Operations,
+ type OperationListResponse,
+ type OperationListParams,
+} from './operations';
diff --git a/src/resources/api-gateway/user-schemas/user-schemas.ts b/src/resources/api-gateway/user-schemas/user-schemas.ts
index f143c9c67d..3b93a8f984 100644
--- a/src/resources/api-gateway/user-schemas/user-schemas.ts
+++ b/src/resources/api-gateway/user-schemas/user-schemas.ts
@@ -22,13 +22,16 @@ export class UserSchemas extends APIResource {
*
* @deprecated Use [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/) instead.
*/
- create(params: UserSchemaCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ create(
+ params: UserSchemaCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
const { zone_id, ...body } = params;
return (
this._client.post(
`/zones/${zone_id}/api_gateway/user_schemas`,
Core.multipartFormRequestOptions({ body, ...options }),
- ) as Core.APIPromise<{ result: SchemaUpload }>
+ ) as Core.APIPromise<{ result: UserSchemaCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -40,11 +43,11 @@ export class UserSchemas extends APIResource {
list(
params: UserSchemaListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
const { zone_id, ...query } = params;
return this._client.getAPIList(
`/zones/${zone_id}/api_gateway/user_schemas`,
- PublicSchemasV4PagePaginationArray,
+ OldPublicSchemasV4PagePaginationArray,
{ query, ...options },
);
}
@@ -72,13 +75,13 @@ export class UserSchemas extends APIResource {
schemaId: string,
params: UserSchemaEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { zone_id, ...body } = params;
return (
this._client.patch(`/zones/${zone_id}/api_gateway/user_schemas/${schemaId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: PublicSchema }>
+ }) as Core.APIPromise<{ result: OldPublicSchema }>
)._thenUnwrap((obj) => obj.result);
}
@@ -91,18 +94,18 @@ export class UserSchemas extends APIResource {
schemaId: string,
params: UserSchemaGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { zone_id, ...query } = params;
return (
this._client.get(`/zones/${zone_id}/api_gateway/user_schemas/${schemaId}`, {
query,
...options,
- }) as Core.APIPromise<{ result: PublicSchema }>
+ }) as Core.APIPromise<{ result: OldPublicSchema }>
)._thenUnwrap((obj) => obj.result);
}
}
-export class PublicSchemasV4PagePaginationArray extends V4PagePaginationArray {}
+export class OldPublicSchemasV4PagePaginationArray extends V4PagePaginationArray {}
export type Message = Array;
@@ -124,7 +127,7 @@ export namespace Message {
}
}
-export interface PublicSchema {
+export interface OldPublicSchema {
created_at: string;
/**
@@ -153,13 +156,13 @@ export interface PublicSchema {
validation_enabled?: boolean;
}
-export interface SchemaUpload {
- schema: PublicSchema;
+export interface UserSchemaCreateResponse {
+ schema: OldPublicSchema;
- upload_details?: SchemaUpload.UploadDetails;
+ upload_details?: UserSchemaCreateResponse.UploadDetails;
}
-export namespace SchemaUpload {
+export namespace UserSchemaCreateResponse {
export interface UploadDetails {
/**
* Diagnostic warning events that occurred during processing. These events are
@@ -276,7 +279,7 @@ export interface UserSchemaGetParams {
omit_source?: boolean;
}
-UserSchemas.PublicSchemasV4PagePaginationArray = PublicSchemasV4PagePaginationArray;
+UserSchemas.OldPublicSchemasV4PagePaginationArray = OldPublicSchemasV4PagePaginationArray;
UserSchemas.Operations = Operations;
UserSchemas.OperationListResponsesV4PagePaginationArray = OperationListResponsesV4PagePaginationArray;
UserSchemas.Hosts = Hosts;
@@ -285,10 +288,10 @@ UserSchemas.HostListResponsesV4PagePaginationArray = HostListResponsesV4PagePagi
export declare namespace UserSchemas {
export {
type Message as Message,
- type PublicSchema as PublicSchema,
- type SchemaUpload as SchemaUpload,
+ type OldPublicSchema as OldPublicSchema,
+ type UserSchemaCreateResponse as UserSchemaCreateResponse,
type UserSchemaDeleteResponse as UserSchemaDeleteResponse,
- PublicSchemasV4PagePaginationArray as PublicSchemasV4PagePaginationArray,
+ OldPublicSchemasV4PagePaginationArray as OldPublicSchemasV4PagePaginationArray,
type UserSchemaCreateParams as UserSchemaCreateParams,
type UserSchemaListParams as UserSchemaListParams,
type UserSchemaDeleteParams as UserSchemaDeleteParams,
diff --git a/src/resources/client-certificates.ts b/src/resources/client-certificates.ts
index 67289dfae7..a7842e54dd 100644
--- a/src/resources/client-certificates.ts
+++ b/src/resources/client-certificates.ts
@@ -102,12 +102,12 @@ export class ClientCertificates extends APIResource {
params: ClientCertificateEditParams,
options?: Core.RequestOptions,
): Core.APIPromise {
- const { zone_id } = params;
+ const { zone_id, ...body } = params;
return (
- this._client.patch(
- `/zones/${zone_id}/client_certificates/${clientCertificateId}`,
- options,
- ) as Core.APIPromise<{ result: ClientCertificate }>
+ this._client.patch(`/zones/${zone_id}/client_certificates/${clientCertificateId}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ClientCertificate }>
)._thenUnwrap((obj) => obj.result);
}
@@ -293,9 +293,14 @@ export interface ClientCertificateDeleteParams {
export interface ClientCertificateEditParams {
/**
- * Identifier.
+ * Path param: Identifier.
*/
zone_id: string;
+
+ /**
+ * Body param:
+ */
+ reactivate?: boolean;
}
export interface ClientCertificateGetParams {
diff --git a/src/resources/cloudforce-one/threat-events/attackers.ts b/src/resources/cloudforce-one/threat-events/attackers.ts
index 8e7254e8cf..30395b7c9f 100644
--- a/src/resources/cloudforce-one/threat-events/attackers.ts
+++ b/src/resources/cloudforce-one/threat-events/attackers.ts
@@ -5,7 +5,7 @@ import * as Core from '../../../core';
export class Attackers extends APIResource {
/**
- * Lists attackers
+ * Lists attackers across multiple datasets
*
* @example
* ```ts
@@ -16,8 +16,8 @@ export class Attackers extends APIResource {
* ```
*/
list(params: AttackerListParams, options?: Core.RequestOptions): Core.APIPromise {
- const { account_id } = params;
- return this._client.get(`/accounts/${account_id}/cloudforce-one/events/attackers`, options);
+ const { account_id, ...query } = params;
+ return this._client.get(`/accounts/${account_id}/cloudforce-one/events/attackers`, { query, ...options });
}
}
@@ -35,9 +35,15 @@ export namespace AttackerListResponse {
export interface AttackerListParams {
/**
- * Account ID.
+ * Path param: Account ID.
*/
account_id: string;
+
+ /**
+ * Query param: Array of dataset IDs to query attackers from. If not provided,
+ * returns all attackers from Event DO tables.
+ */
+ datasetIds?: Array;
}
export declare namespace Attackers {
diff --git a/src/resources/cloudforce-one/threat-events/categories.ts b/src/resources/cloudforce-one/threat-events/categories.ts
index 9b19bc008e..8dd433202d 100644
--- a/src/resources/cloudforce-one/threat-events/categories.ts
+++ b/src/resources/cloudforce-one/threat-events/categories.ts
@@ -31,7 +31,7 @@ export class Categories extends APIResource {
}
/**
- * Lists categories
+ * Lists categories across multiple datasets
*
* @example
* ```ts
@@ -42,8 +42,11 @@ export class Categories extends APIResource {
* ```
*/
list(params: CategoryListParams, options?: Core.RequestOptions): Core.APIPromise {
- const { account_id } = params;
- return this._client.get(`/accounts/${account_id}/cloudforce-one/events/categories`, options);
+ const { account_id, ...query } = params;
+ return this._client.get(`/accounts/${account_id}/cloudforce-one/events/categories`, {
+ query,
+ ...options,
+ });
}
/**
@@ -204,9 +207,15 @@ export interface CategoryCreateParams {
export interface CategoryListParams {
/**
- * Account ID.
+ * Path param: Account ID.
*/
account_id: string;
+
+ /**
+ * Query param: Array of dataset IDs to query categories from. If not provided,
+ * returns all categories from D1 database.
+ */
+ datasetIds?: Array;
}
export interface CategoryDeleteParams {
diff --git a/src/resources/cloudforce-one/threat-events/indicator-types.ts b/src/resources/cloudforce-one/threat-events/indicator-types.ts
index 7fa1b77a16..030839110f 100644
--- a/src/resources/cloudforce-one/threat-events/indicator-types.ts
+++ b/src/resources/cloudforce-one/threat-events/indicator-types.ts
@@ -5,15 +5,10 @@ import * as Core from '../../../core';
export class IndicatorTypes extends APIResource {
/**
- * Lists all indicator types
+ * This Method is deprecated. Please use /events/dataset/:dataset_id/indicatorTypes
+ * instead.
*
- * @example
- * ```ts
- * const indicatorTypes =
- * await client.cloudforceOne.threatEvents.indicatorTypes.list(
- * { account_id: 'account_id' },
- * );
- * ```
+ * @deprecated
*/
list(
params: IndicatorTypeListParams,
diff --git a/src/resources/cloudforce-one/threat-events/target-industries.ts b/src/resources/cloudforce-one/threat-events/target-industries.ts
index 06a6f38e30..682c3cda17 100644
--- a/src/resources/cloudforce-one/threat-events/target-industries.ts
+++ b/src/resources/cloudforce-one/threat-events/target-industries.ts
@@ -5,7 +5,7 @@ import * as Core from '../../../core';
export class TargetIndustries extends APIResource {
/**
- * Lists all target industries
+ * Lists target industries across multiple datasets
*
* @example
* ```ts
@@ -19,8 +19,11 @@ export class TargetIndustries extends APIResource {
params: TargetIndustryListParams,
options?: Core.RequestOptions,
): Core.APIPromise {
- const { account_id } = params;
- return this._client.get(`/accounts/${account_id}/cloudforce-one/events/targetIndustries`, options);
+ const { account_id, ...query } = params;
+ return this._client.get(`/accounts/${account_id}/cloudforce-one/events/targetIndustries`, {
+ query,
+ ...options,
+ });
}
}
@@ -38,9 +41,15 @@ export namespace TargetIndustryListResponse {
export interface TargetIndustryListParams {
/**
- * Account ID.
+ * Path param: Account ID.
*/
account_id: string;
+
+ /**
+ * Query param: Array of dataset IDs to query target industries from. If not
+ * provided, returns all target industries from Event tables across all datasets.
+ */
+ datasetIds?: Array;
}
export declare namespace TargetIndustries {
diff --git a/src/resources/cloudforce-one/threat-events/threat-events.ts b/src/resources/cloudforce-one/threat-events/threat-events.ts
index 119f0b95d8..8ad50fe4a8 100644
--- a/src/resources/cloudforce-one/threat-events/threat-events.ts
+++ b/src/resources/cloudforce-one/threat-events/threat-events.ts
@@ -209,15 +209,10 @@ export class ThreatEvents extends APIResource {
}
/**
- * Reads an event
+ * This Method is deprecated. Please use
+ * /events/dataset/:dataset_id/events/:event_id instead.
*
- * @example
- * ```ts
- * const threatEvent =
- * await client.cloudforceOne.threatEvents.get('event_id', {
- * account_id: 'account_id',
- * });
- * ```
+ * @deprecated
*/
get(
eventId: string,
diff --git a/src/resources/connectivity.ts b/src/resources/connectivity.ts
new file mode 100644
index 0000000000..341db75965
--- /dev/null
+++ b/src/resources/connectivity.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './connectivity/index';
diff --git a/src/resources/connectivity/connectivity.ts b/src/resources/connectivity/connectivity.ts
new file mode 100644
index 0000000000..5b5cdd89eb
--- /dev/null
+++ b/src/resources/connectivity/connectivity.ts
@@ -0,0 +1,15 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as DirectoryAPI from './directory/directory';
+import { Directory } from './directory/directory';
+
+export class Connectivity extends APIResource {
+ directory: DirectoryAPI.Directory = new DirectoryAPI.Directory(this._client);
+}
+
+Connectivity.Directory = Directory;
+
+export declare namespace Connectivity {
+ export { Directory as Directory };
+}
diff --git a/src/resources/connectivity/directory.ts b/src/resources/connectivity/directory.ts
new file mode 100644
index 0000000000..2756bf16f7
--- /dev/null
+++ b/src/resources/connectivity/directory.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './directory/index';
diff --git a/src/resources/connectivity/directory/directory.ts b/src/resources/connectivity/directory/directory.ts
new file mode 100644
index 0000000000..2966ea7f0f
--- /dev/null
+++ b/src/resources/connectivity/directory/directory.ts
@@ -0,0 +1,40 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../resource';
+import * as ServicesAPI from './services';
+import {
+ ServiceCreateParams,
+ ServiceCreateResponse,
+ ServiceDeleteParams,
+ ServiceGetParams,
+ ServiceGetResponse,
+ ServiceListParams,
+ ServiceListResponse,
+ ServiceListResponsesV4PagePaginationArray,
+ ServiceUpdateParams,
+ ServiceUpdateResponse,
+ Services,
+} from './services';
+
+export class Directory extends APIResource {
+ services: ServicesAPI.Services = new ServicesAPI.Services(this._client);
+}
+
+Directory.Services = Services;
+Directory.ServiceListResponsesV4PagePaginationArray = ServiceListResponsesV4PagePaginationArray;
+
+export declare namespace Directory {
+ export {
+ Services as Services,
+ type ServiceCreateResponse as ServiceCreateResponse,
+ type ServiceUpdateResponse as ServiceUpdateResponse,
+ type ServiceListResponse as ServiceListResponse,
+ type ServiceGetResponse as ServiceGetResponse,
+ ServiceListResponsesV4PagePaginationArray as ServiceListResponsesV4PagePaginationArray,
+ type ServiceCreateParams as ServiceCreateParams,
+ type ServiceUpdateParams as ServiceUpdateParams,
+ type ServiceListParams as ServiceListParams,
+ type ServiceDeleteParams as ServiceDeleteParams,
+ type ServiceGetParams as ServiceGetParams,
+ };
+}
diff --git a/src/resources/connectivity/directory/index.ts b/src/resources/connectivity/directory/index.ts
new file mode 100644
index 0000000000..2d94b5e566
--- /dev/null
+++ b/src/resources/connectivity/directory/index.ts
@@ -0,0 +1,16 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export { Directory } from './directory';
+export {
+ ServiceListResponsesV4PagePaginationArray,
+ Services,
+ type ServiceCreateResponse,
+ type ServiceUpdateResponse,
+ type ServiceListResponse,
+ type ServiceGetResponse,
+ type ServiceCreateParams,
+ type ServiceUpdateParams,
+ type ServiceListParams,
+ type ServiceDeleteParams,
+ type ServiceGetParams,
+} from './services';
diff --git a/src/resources/connectivity/directory/services.ts b/src/resources/connectivity/directory/services.ts
new file mode 100644
index 0000000000..65079e2c04
--- /dev/null
+++ b/src/resources/connectivity/directory/services.ts
@@ -0,0 +1,669 @@
+// 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 Services extends APIResource {
+ /**
+ * Create connectivity service
+ *
+ * @example
+ * ```ts
+ * const service =
+ * await client.connectivity.directory.services.create({
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * host: {
+ * hostname: 'api.example.com',
+ * resolver_network: {
+ * tunnel_id: '0191dce4-9ab4-7fce-b660-8e5dec5172da',
+ * },
+ * },
+ * name: 'web-server',
+ * type: 'http',
+ * });
+ * ```
+ */
+ create(params: ServiceCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/connectivity/directory/services`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ServiceCreateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Update connectivity service
+ *
+ * @example
+ * ```ts
+ * const service =
+ * await client.connectivity.directory.services.update(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * {
+ * account_id: 'account_id',
+ * host: {
+ * ipv4: '10.0.0.1',
+ * network: {
+ * tunnel_id: '0191dce4-9ab4-7fce-b660-8e5dec5172da',
+ * },
+ * },
+ * name: 'web-app',
+ * type: 'http',
+ * },
+ * );
+ * ```
+ */
+ update(
+ serviceId: string,
+ params: ServiceUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.put(`/accounts/${account_id}/connectivity/directory/services/${serviceId}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ServiceUpdateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List connectivity services
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const serviceListResponse of client.connectivity.directory.services.list(
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ params: ServiceListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/connectivity/directory/services`,
+ ServiceListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Delete connectivity service
+ *
+ * @example
+ * ```ts
+ * await client.connectivity.directory.services.delete(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * { account_id: 'account_id' },
+ * );
+ * ```
+ */
+ delete(
+ serviceId: string,
+ params: ServiceDeleteParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return this._client.delete(`/accounts/${account_id}/connectivity/directory/services/${serviceId}`, {
+ ...options,
+ headers: { Accept: '*/*', ...options?.headers },
+ });
+ }
+
+ /**
+ * Get connectivity service
+ *
+ * @example
+ * ```ts
+ * const service =
+ * await client.connectivity.directory.services.get(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * { account_id: 'account_id' },
+ * );
+ * ```
+ */
+ get(
+ serviceId: string,
+ params: ServiceGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/connectivity/directory/services/${serviceId}`,
+ options,
+ ) as Core.APIPromise<{ result: ServiceGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class ServiceListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export interface ServiceCreateResponse {
+ host:
+ | ServiceCreateResponse.InfraIPv4Host
+ | ServiceCreateResponse.InfraIPv6Host
+ | ServiceCreateResponse.InfraDualStackHost
+ | ServiceCreateResponse.InfraHostnameHost;
+
+ name: string;
+
+ type: 'http';
+
+ created_at?: string;
+
+ http_port?: number | null;
+
+ https_port?: number | null;
+
+ service_id?: string;
+
+ updated_at?: string;
+}
+
+export namespace ServiceCreateResponse {
+ export interface InfraIPv4Host {
+ ipv4: string;
+
+ network: InfraIPv4Host.Network;
+ }
+
+ export namespace InfraIPv4Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraIPv6Host {
+ ipv6: string;
+
+ network: InfraIPv6Host.Network;
+ }
+
+ export namespace InfraIPv6Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraDualStackHost {
+ ipv4: string;
+
+ ipv6: string;
+
+ network: InfraDualStackHost.Network;
+ }
+
+ export namespace InfraDualStackHost {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraHostnameHost {
+ hostname: string;
+
+ resolver_network: InfraHostnameHost.ResolverNetwork;
+ }
+
+ export namespace InfraHostnameHost {
+ export interface ResolverNetwork {
+ tunnel_id: string;
+
+ resolver_ips?: Array | null;
+ }
+ }
+}
+
+export interface ServiceUpdateResponse {
+ host:
+ | ServiceUpdateResponse.InfraIPv4Host
+ | ServiceUpdateResponse.InfraIPv6Host
+ | ServiceUpdateResponse.InfraDualStackHost
+ | ServiceUpdateResponse.InfraHostnameHost;
+
+ name: string;
+
+ type: 'http';
+
+ created_at?: string;
+
+ http_port?: number | null;
+
+ https_port?: number | null;
+
+ service_id?: string;
+
+ updated_at?: string;
+}
+
+export namespace ServiceUpdateResponse {
+ export interface InfraIPv4Host {
+ ipv4: string;
+
+ network: InfraIPv4Host.Network;
+ }
+
+ export namespace InfraIPv4Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraIPv6Host {
+ ipv6: string;
+
+ network: InfraIPv6Host.Network;
+ }
+
+ export namespace InfraIPv6Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraDualStackHost {
+ ipv4: string;
+
+ ipv6: string;
+
+ network: InfraDualStackHost.Network;
+ }
+
+ export namespace InfraDualStackHost {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraHostnameHost {
+ hostname: string;
+
+ resolver_network: InfraHostnameHost.ResolverNetwork;
+ }
+
+ export namespace InfraHostnameHost {
+ export interface ResolverNetwork {
+ tunnel_id: string;
+
+ resolver_ips?: Array | null;
+ }
+ }
+}
+
+export interface ServiceListResponse {
+ host:
+ | ServiceListResponse.InfraIPv4Host
+ | ServiceListResponse.InfraIPv6Host
+ | ServiceListResponse.InfraDualStackHost
+ | ServiceListResponse.InfraHostnameHost;
+
+ name: string;
+
+ type: 'http';
+
+ created_at?: string;
+
+ http_port?: number | null;
+
+ https_port?: number | null;
+
+ service_id?: string;
+
+ updated_at?: string;
+}
+
+export namespace ServiceListResponse {
+ export interface InfraIPv4Host {
+ ipv4: string;
+
+ network: InfraIPv4Host.Network;
+ }
+
+ export namespace InfraIPv4Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraIPv6Host {
+ ipv6: string;
+
+ network: InfraIPv6Host.Network;
+ }
+
+ export namespace InfraIPv6Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraDualStackHost {
+ ipv4: string;
+
+ ipv6: string;
+
+ network: InfraDualStackHost.Network;
+ }
+
+ export namespace InfraDualStackHost {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraHostnameHost {
+ hostname: string;
+
+ resolver_network: InfraHostnameHost.ResolverNetwork;
+ }
+
+ export namespace InfraHostnameHost {
+ export interface ResolverNetwork {
+ tunnel_id: string;
+
+ resolver_ips?: Array | null;
+ }
+ }
+}
+
+export interface ServiceGetResponse {
+ host:
+ | ServiceGetResponse.InfraIPv4Host
+ | ServiceGetResponse.InfraIPv6Host
+ | ServiceGetResponse.InfraDualStackHost
+ | ServiceGetResponse.InfraHostnameHost;
+
+ name: string;
+
+ type: 'http';
+
+ created_at?: string;
+
+ http_port?: number | null;
+
+ https_port?: number | null;
+
+ service_id?: string;
+
+ updated_at?: string;
+}
+
+export namespace ServiceGetResponse {
+ export interface InfraIPv4Host {
+ ipv4: string;
+
+ network: InfraIPv4Host.Network;
+ }
+
+ export namespace InfraIPv4Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraIPv6Host {
+ ipv6: string;
+
+ network: InfraIPv6Host.Network;
+ }
+
+ export namespace InfraIPv6Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraDualStackHost {
+ ipv4: string;
+
+ ipv6: string;
+
+ network: InfraDualStackHost.Network;
+ }
+
+ export namespace InfraDualStackHost {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraHostnameHost {
+ hostname: string;
+
+ resolver_network: InfraHostnameHost.ResolverNetwork;
+ }
+
+ export namespace InfraHostnameHost {
+ export interface ResolverNetwork {
+ tunnel_id: string;
+
+ resolver_ips?: Array | null;
+ }
+ }
+}
+
+export interface ServiceCreateParams {
+ /**
+ * Path param: Account identifier
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ host:
+ | ServiceCreateParams.InfraIPv4Host
+ | ServiceCreateParams.InfraIPv6Host
+ | ServiceCreateParams.InfraDualStackHost
+ | ServiceCreateParams.InfraHostnameHost;
+
+ /**
+ * Body param:
+ */
+ name: string;
+
+ /**
+ * Body param:
+ */
+ type: 'http';
+
+ /**
+ * Body param:
+ */
+ http_port?: number | null;
+
+ /**
+ * Body param:
+ */
+ https_port?: number | null;
+}
+
+export namespace ServiceCreateParams {
+ export interface InfraIPv4Host {
+ ipv4: string;
+
+ network: InfraIPv4Host.Network;
+ }
+
+ export namespace InfraIPv4Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraIPv6Host {
+ ipv6: string;
+
+ network: InfraIPv6Host.Network;
+ }
+
+ export namespace InfraIPv6Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraDualStackHost {
+ ipv4: string;
+
+ ipv6: string;
+
+ network: InfraDualStackHost.Network;
+ }
+
+ export namespace InfraDualStackHost {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraHostnameHost {
+ hostname: string;
+
+ resolver_network: InfraHostnameHost.ResolverNetwork;
+ }
+
+ export namespace InfraHostnameHost {
+ export interface ResolverNetwork {
+ tunnel_id: string;
+
+ resolver_ips?: Array | null;
+ }
+ }
+}
+
+export interface ServiceUpdateParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ host:
+ | ServiceUpdateParams.InfraIPv4Host
+ | ServiceUpdateParams.InfraIPv6Host
+ | ServiceUpdateParams.InfraDualStackHost
+ | ServiceUpdateParams.InfraHostnameHost;
+
+ /**
+ * Body param:
+ */
+ name: string;
+
+ /**
+ * Body param:
+ */
+ type: 'http';
+
+ /**
+ * Body param:
+ */
+ http_port?: number | null;
+
+ /**
+ * Body param:
+ */
+ https_port?: number | null;
+}
+
+export namespace ServiceUpdateParams {
+ export interface InfraIPv4Host {
+ ipv4: string;
+
+ network: InfraIPv4Host.Network;
+ }
+
+ export namespace InfraIPv4Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraIPv6Host {
+ ipv6: string;
+
+ network: InfraIPv6Host.Network;
+ }
+
+ export namespace InfraIPv6Host {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraDualStackHost {
+ ipv4: string;
+
+ ipv6: string;
+
+ network: InfraDualStackHost.Network;
+ }
+
+ export namespace InfraDualStackHost {
+ export interface Network {
+ tunnel_id: string;
+ }
+ }
+
+ export interface InfraHostnameHost {
+ hostname: string;
+
+ resolver_network: InfraHostnameHost.ResolverNetwork;
+ }
+
+ export namespace InfraHostnameHost {
+ export interface ResolverNetwork {
+ tunnel_id: string;
+
+ resolver_ips?: Array | null;
+ }
+ }
+}
+
+export interface ServiceListParams extends V4PagePaginationArrayParams {
+ /**
+ * Path param: Account identifier
+ */
+ account_id: string;
+
+ /**
+ * Query param:
+ */
+ type?: 'http' | null;
+}
+
+export interface ServiceDeleteParams {
+ account_id: string;
+}
+
+export interface ServiceGetParams {
+ account_id: string;
+}
+
+Services.ServiceListResponsesV4PagePaginationArray = ServiceListResponsesV4PagePaginationArray;
+
+export declare namespace Services {
+ export {
+ type ServiceCreateResponse as ServiceCreateResponse,
+ type ServiceUpdateResponse as ServiceUpdateResponse,
+ type ServiceListResponse as ServiceListResponse,
+ type ServiceGetResponse as ServiceGetResponse,
+ ServiceListResponsesV4PagePaginationArray as ServiceListResponsesV4PagePaginationArray,
+ type ServiceCreateParams as ServiceCreateParams,
+ type ServiceUpdateParams as ServiceUpdateParams,
+ type ServiceListParams as ServiceListParams,
+ type ServiceDeleteParams as ServiceDeleteParams,
+ type ServiceGetParams as ServiceGetParams,
+ };
+}
diff --git a/src/resources/connectivity/index.ts b/src/resources/connectivity/index.ts
new file mode 100644
index 0000000000..6672dc60e6
--- /dev/null
+++ b/src/resources/connectivity/index.ts
@@ -0,0 +1,4 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export { Connectivity } from './connectivity';
+export { Directory } from './directory/index';
diff --git a/src/resources/content-scanning/content-scanning.ts b/src/resources/content-scanning/content-scanning.ts
index 18f79cbd0a..49130883ac 100644
--- a/src/resources/content-scanning/content-scanning.ts
+++ b/src/resources/content-scanning/content-scanning.ts
@@ -22,8 +22,67 @@ export class ContentScanning extends APIResource {
payloads: PayloadsAPI.Payloads = new PayloadsAPI.Payloads(this._client);
settings: SettingsAPI.Settings = new SettingsAPI.Settings(this._client);
+ /**
+ * Update the Content Scanning status.
+ *
+ * @example
+ * ```ts
+ * const contentScanning = await client.contentScanning.create(
+ * {
+ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * value: 'enabled',
+ * },
+ * );
+ * ```
+ */
+ create(
+ params: ContentScanningCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { zone_id, ...body } = params;
+ return (
+ this._client.put(`/zones/${zone_id}/content-upload-scan/settings`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ContentScanningCreateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Update the Content Scanning status.
+ *
+ * @example
+ * ```ts
+ * const contentScanning = await client.contentScanning.update(
+ * {
+ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * value: 'enabled',
+ * },
+ * );
+ * ```
+ */
+ update(
+ params: ContentScanningUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { zone_id, ...body } = params;
+ return (
+ this._client.put(`/zones/${zone_id}/content-upload-scan/settings`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ContentScanningUpdateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
/**
* Disable Content Scanning.
+ *
+ * @example
+ * ```ts
+ * const response = await client.contentScanning.disable({
+ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * });
+ * ```
*/
disable(
params: ContentScanningDisableParams,
@@ -39,6 +98,13 @@ export class ContentScanning extends APIResource {
/**
* Enable Content Scanning.
+ *
+ * @example
+ * ```ts
+ * const response = await client.contentScanning.enable({
+ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * });
+ * ```
*/
enable(
params: ContentScanningEnableParams,
@@ -51,12 +117,103 @@ export class ContentScanning extends APIResource {
}>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * Retrieve the current status of Content Scanning.
+ *
+ * @example
+ * ```ts
+ * const contentScanning = await client.contentScanning.get({
+ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * });
+ * ```
+ */
+ get(
+ params: ContentScanningGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { zone_id } = params;
+ return (
+ this._client.get(`/zones/${zone_id}/content-upload-scan/settings`, options) as Core.APIPromise<{
+ result: ContentScanningGetResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+/**
+ * Defines the status for Content Scanning.
+ */
+export interface ContentScanningCreateResponse {
+ /**
+ * Defines the last modification date (ISO 8601) of the Content Scanning status.
+ */
+ modified?: string;
+
+ /**
+ * Defines the status of Content Scanning.
+ */
+ value?: string;
+}
+
+/**
+ * Defines the status for Content Scanning.
+ */
+export interface ContentScanningUpdateResponse {
+ /**
+ * Defines the last modification date (ISO 8601) of the Content Scanning status.
+ */
+ modified?: string;
+
+ /**
+ * Defines the status of Content Scanning.
+ */
+ value?: string;
}
export type ContentScanningDisableResponse = unknown;
export type ContentScanningEnableResponse = unknown;
+/**
+ * Defines the status for Content Scanning.
+ */
+export interface ContentScanningGetResponse {
+ /**
+ * Defines the last modification date (ISO 8601) of the Content Scanning status.
+ */
+ modified?: string;
+
+ /**
+ * Defines the status of Content Scanning.
+ */
+ value?: string;
+}
+
+export interface ContentScanningCreateParams {
+ /**
+ * Path param: Defines an identifier.
+ */
+ zone_id: string;
+
+ /**
+ * Body param: The status value for Content Scanning.
+ */
+ value: 'enabled' | 'disabled';
+}
+
+export interface ContentScanningUpdateParams {
+ /**
+ * Path param: Defines an identifier.
+ */
+ zone_id: string;
+
+ /**
+ * Body param: The status value for Content Scanning.
+ */
+ value: 'enabled' | 'disabled';
+}
+
export interface ContentScanningDisableParams {
/**
* Defines an identifier.
@@ -71,6 +228,13 @@ export interface ContentScanningEnableParams {
zone_id: string;
}
+export interface ContentScanningGetParams {
+ /**
+ * Defines an identifier.
+ */
+ zone_id: string;
+}
+
ContentScanning.Payloads = Payloads;
ContentScanning.PayloadCreateResponsesSinglePage = PayloadCreateResponsesSinglePage;
ContentScanning.PayloadListResponsesSinglePage = PayloadListResponsesSinglePage;
@@ -79,10 +243,16 @@ ContentScanning.Settings = Settings;
export declare namespace ContentScanning {
export {
+ type ContentScanningCreateResponse as ContentScanningCreateResponse,
+ type ContentScanningUpdateResponse as ContentScanningUpdateResponse,
type ContentScanningDisableResponse as ContentScanningDisableResponse,
type ContentScanningEnableResponse as ContentScanningEnableResponse,
+ type ContentScanningGetResponse as ContentScanningGetResponse,
+ type ContentScanningCreateParams as ContentScanningCreateParams,
+ type ContentScanningUpdateParams as ContentScanningUpdateParams,
type ContentScanningDisableParams as ContentScanningDisableParams,
type ContentScanningEnableParams as ContentScanningEnableParams,
+ type ContentScanningGetParams as ContentScanningGetParams,
};
export {
diff --git a/src/resources/content-scanning/payloads.ts b/src/resources/content-scanning/payloads.ts
index d3fad16a42..12c7fa4b8e 100644
--- a/src/resources/content-scanning/payloads.ts
+++ b/src/resources/content-scanning/payloads.ts
@@ -7,6 +7,24 @@ import { SinglePage } from '../../pagination';
export class Payloads extends APIResource {
/**
* Add custom scan expressions for Content Scanning.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const payloadCreateResponse of client.contentScanning.payloads.create(
+ * {
+ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * body: [
+ * {
+ * payload:
+ * 'lookup_json_string(http.request.body.raw, "file")',
+ * },
+ * ],
+ * },
+ * )) {
+ * // ...
+ * }
+ * ```
*/
create(
params: PayloadCreateParams,
@@ -22,6 +40,16 @@ export class Payloads extends APIResource {
/**
* Get a list of existing custom scan expressions for Content Scanning.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const payloadListResponse of client.contentScanning.payloads.list(
+ * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
+ * // ...
+ * }
+ * ```
*/
list(
params: PayloadListParams,
@@ -37,6 +65,17 @@ export class Payloads extends APIResource {
/**
* Delete a Content Scan Custom Expression.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const payloadDeleteResponse of client.contentScanning.payloads.delete(
+ * 'a350a054caa840c9becd89c3b4f0195b',
+ * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
+ * // ...
+ * }
+ * ```
*/
delete(
expressionId: string,
diff --git a/src/resources/content-scanning/settings.ts b/src/resources/content-scanning/settings.ts
index 8d5958e68a..4f1eaef4f5 100644
--- a/src/resources/content-scanning/settings.ts
+++ b/src/resources/content-scanning/settings.ts
@@ -6,6 +6,13 @@ import * as Core from '../../core';
export class Settings extends APIResource {
/**
* Retrieve the current status of Content Scanning.
+ *
+ * @example
+ * ```ts
+ * const setting = await client.contentScanning.settings.get({
+ * zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * });
+ * ```
*/
get(params: SettingGetParams, options?: Core.RequestOptions): Core.APIPromise {
const { zone_id } = params;
diff --git a/src/resources/custom-pages.ts b/src/resources/custom-pages.ts
index 6bd1b13cf7..4c861b1e41 100644
--- a/src/resources/custom-pages.ts
+++ b/src/resources/custom-pages.ts
@@ -24,13 +24,15 @@ export class CustomPages extends APIResource {
*/
update(
identifier:
- | 'waf_block'
- | 'ip_block'
- | 'country_challenge'
- | '500_errors'
| '1000_errors'
+ | '500_errors'
+ | 'basic_challenge'
+ | 'country_challenge'
+ | 'ip_block'
| 'managed_challenge'
- | 'ratelimit_block',
+ | 'ratelimit_block'
+ | 'under_attack'
+ | 'waf_block',
params: CustomPageUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise {
@@ -123,36 +125,42 @@ export class CustomPages extends APIResource {
*/
get(
identifier:
- | 'waf_block'
- | 'ip_block'
- | 'country_challenge'
- | '500_errors'
| '1000_errors'
+ | '500_errors'
+ | 'basic_challenge'
+ | 'country_challenge'
+ | 'ip_block'
| 'managed_challenge'
- | 'ratelimit_block',
+ | 'ratelimit_block'
+ | 'under_attack'
+ | 'waf_block',
params?: CustomPageGetParams,
options?: Core.RequestOptions,
): Core.APIPromise;
get(
identifier:
- | 'waf_block'
- | 'ip_block'
- | 'country_challenge'
- | '500_errors'
| '1000_errors'
+ | '500_errors'
+ | 'basic_challenge'
+ | 'country_challenge'
+ | 'ip_block'
| 'managed_challenge'
- | 'ratelimit_block',
+ | 'ratelimit_block'
+ | 'under_attack'
+ | 'waf_block',
options?: Core.RequestOptions,
): Core.APIPromise;
get(
identifier:
- | 'waf_block'
- | 'ip_block'
- | 'country_challenge'
- | '500_errors'
| '1000_errors'
+ | '500_errors'
+ | 'basic_challenge'
+ | 'country_challenge'
+ | 'ip_block'
| 'managed_challenge'
- | 'ratelimit_block',
+ | 'ratelimit_block'
+ | 'under_attack'
+ | 'waf_block',
params: CustomPageGetParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.APIPromise {
diff --git a/src/resources/d1/database.ts b/src/resources/d1/database.ts
index 905848c187..8489b4555e 100644
--- a/src/resources/d1/database.ts
+++ b/src/resources/d1/database.ts
@@ -658,6 +658,12 @@ export interface DatabaseCreateParams {
*/
name: string;
+ /**
+ * Body param: Specify the location to restrict the D1 database to run and store
+ * data. If this option is present, the location hint is ignored.
+ */
+ jurisdiction?: 'eu' | 'fedramp';
+
/**
* Body param: Specify the region to create the D1 primary, if available. If this
* option is omitted, the D1 will be created as close as possible to the current
@@ -856,40 +862,102 @@ export declare namespace DatabaseImportParams {
}
}
-export interface DatabaseQueryParams {
- /**
- * Path param: Account identifier tag.
- */
- account_id: string;
+export type DatabaseQueryParams = DatabaseQueryParams.D1SingleQuery | DatabaseQueryParams.MultipleQueries;
- /**
- * Body param: Your SQL query. Supports multiple statements, joined by semicolons,
- * which will be executed as a batch.
- */
- sql: string;
+export declare namespace DatabaseQueryParams {
+ export interface D1SingleQuery {
+ /**
+ * Path param: Account identifier tag.
+ */
+ account_id: string;
- /**
- * Body param:
- */
- params?: Array;
+ /**
+ * Body param: Your SQL query. Supports multiple statements, joined by semicolons,
+ * which will be executed as a batch.
+ */
+ sql: string;
+
+ /**
+ * Body param:
+ */
+ params?: Array;
+ }
+
+ export interface MultipleQueries {
+ /**
+ * Path param: Account identifier tag.
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ batch?: Array;
+ }
+
+ export namespace MultipleQueries {
+ /**
+ * A single query with or without parameters
+ */
+ export interface Batch {
+ /**
+ * Your SQL query. Supports multiple statements, joined by semicolons, which will
+ * be executed as a batch.
+ */
+ sql: string;
+
+ params?: Array;
+ }
+ }
}
-export interface DatabaseRawParams {
- /**
- * Path param: Account identifier tag.
- */
- account_id: string;
+export type DatabaseRawParams = DatabaseRawParams.D1SingleQuery | DatabaseRawParams.MultipleQueries;
- /**
- * Body param: Your SQL query. Supports multiple statements, joined by semicolons,
- * which will be executed as a batch.
- */
- sql: string;
+export declare namespace DatabaseRawParams {
+ export interface D1SingleQuery {
+ /**
+ * Path param: Account identifier tag.
+ */
+ account_id: string;
- /**
- * Body param:
- */
- params?: Array;
+ /**
+ * Body param: Your SQL query. Supports multiple statements, joined by semicolons,
+ * which will be executed as a batch.
+ */
+ sql: string;
+
+ /**
+ * Body param:
+ */
+ params?: Array;
+ }
+
+ export interface MultipleQueries {
+ /**
+ * Path param: Account identifier tag.
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ batch?: Array;
+ }
+
+ export namespace MultipleQueries {
+ /**
+ * A single query with or without parameters
+ */
+ export interface Batch {
+ /**
+ * Your SQL query. Supports multiple statements, joined by semicolons, which will
+ * be executed as a batch.
+ */
+ sql: string;
+
+ params?: Array;
+ }
+ }
}
Database.DatabaseListResponsesV4PagePaginationArray = DatabaseListResponsesV4PagePaginationArray;
diff --git a/src/resources/dns/records.ts b/src/resources/dns/records.ts
index 0a09cf3cb4..b3eb5c6bb2 100644
--- a/src/resources/dns/records.ts
+++ b/src/resources/dns/records.ts
@@ -3701,30 +3701,30 @@ export namespace Record {
}
export type RecordResponse =
- | RecordResponse.ARecord
- | RecordResponse.AAAARecord
- | RecordResponse.CNAMERecord
- | RecordResponse.MXRecord
- | RecordResponse.NSRecord
- | RecordResponse.OpenpgpkeyRecord
- | RecordResponse.PTRRecord
- | RecordResponse.TXTRecord
- | RecordResponse.CAARecord
- | RecordResponse.CERTRecord
- | RecordResponse.DNSKEYRecord
- | RecordResponse.DSRecord
- | RecordResponse.HTTPSRecord
- | RecordResponse.LOCRecord
- | RecordResponse.NAPTRRecord
- | RecordResponse.SMIMEARecord
- | RecordResponse.SRVRecord
- | RecordResponse.SSHFPRecord
- | RecordResponse.SVCBRecord
- | RecordResponse.TLSARecord
- | RecordResponse.URIRecord;
+ | RecordResponse.A
+ | RecordResponse.AAAA
+ | RecordResponse.CNAME
+ | RecordResponse.MX
+ | RecordResponse.NS
+ | RecordResponse.Openpgpkey
+ | RecordResponse.PTR
+ | RecordResponse.TXT
+ | RecordResponse.CAA
+ | RecordResponse.CERT
+ | RecordResponse.DNSKEY
+ | RecordResponse.DS
+ | RecordResponse.HTTPS
+ | RecordResponse.LOC
+ | RecordResponse.NAPTR
+ | RecordResponse.SMIMEA
+ | RecordResponse.SRV
+ | RecordResponse.SSHFP
+ | RecordResponse.SVCB
+ | RecordResponse.TLSA
+ | RecordResponse.URI;
export namespace RecordResponse {
- export interface ARecord extends RecordsAPI.ARecord {
+ export interface A extends RecordsAPI.ARecord {
/**
* Identifier.
*/
@@ -3761,7 +3761,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface AAAARecord extends RecordsAPI.AAAARecord {
+ export interface AAAA extends RecordsAPI.AAAARecord {
/**
* Identifier.
*/
@@ -3798,7 +3798,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface CNAMERecord extends RecordsAPI.CNAMERecord {
+ export interface CNAME extends RecordsAPI.CNAMERecord {
/**
* Identifier.
*/
@@ -3835,7 +3835,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface MXRecord extends RecordsAPI.MXRecord {
+ export interface MX extends RecordsAPI.MXRecord {
/**
* Identifier.
*/
@@ -3872,7 +3872,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface NSRecord extends RecordsAPI.NSRecord {
+ export interface NS extends RecordsAPI.NSRecord {
/**
* Identifier.
*/
@@ -3909,7 +3909,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface OpenpgpkeyRecord {
+ export interface Openpgpkey {
/**
* Identifier.
*/
@@ -3960,7 +3960,7 @@ export namespace RecordResponse {
/**
* Settings for the DNS record.
*/
- settings: OpenpgpkeyRecord.Settings;
+ settings: Openpgpkey.Settings;
/**
* Custom tags for the DNS record. This field has no effect on DNS responses.
@@ -3990,7 +3990,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export namespace OpenpgpkeyRecord {
+ export namespace Openpgpkey {
/**
* Settings for the DNS record.
*/
@@ -4013,7 +4013,7 @@ export namespace RecordResponse {
}
}
- export interface PTRRecord extends RecordsAPI.PTRRecord {
+ export interface PTR extends RecordsAPI.PTRRecord {
/**
* Identifier.
*/
@@ -4050,7 +4050,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface TXTRecord extends RecordsAPI.TXTRecord {
+ export interface TXT extends RecordsAPI.TXTRecord {
/**
* Identifier.
*/
@@ -4087,7 +4087,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface CAARecord extends RecordsAPI.CAARecord {
+ export interface CAA extends RecordsAPI.CAARecord {
/**
* Identifier.
*/
@@ -4124,7 +4124,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface CERTRecord extends RecordsAPI.CERTRecord {
+ export interface CERT extends RecordsAPI.CERTRecord {
/**
* Identifier.
*/
@@ -4161,7 +4161,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface DNSKEYRecord extends RecordsAPI.DNSKEYRecord {
+ export interface DNSKEY extends RecordsAPI.DNSKEYRecord {
/**
* Identifier.
*/
@@ -4198,7 +4198,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface DSRecord extends RecordsAPI.DSRecord {
+ export interface DS extends RecordsAPI.DSRecord {
/**
* Identifier.
*/
@@ -4235,7 +4235,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface HTTPSRecord extends RecordsAPI.HTTPSRecord {
+ export interface HTTPS extends RecordsAPI.HTTPSRecord {
/**
* Identifier.
*/
@@ -4272,7 +4272,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface LOCRecord extends RecordsAPI.LOCRecord {
+ export interface LOC extends RecordsAPI.LOCRecord {
/**
* Identifier.
*/
@@ -4309,7 +4309,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface NAPTRRecord extends RecordsAPI.NAPTRRecord {
+ export interface NAPTR extends RecordsAPI.NAPTRRecord {
/**
* Identifier.
*/
@@ -4346,7 +4346,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface SMIMEARecord extends RecordsAPI.SMIMEARecord {
+ export interface SMIMEA extends RecordsAPI.SMIMEARecord {
/**
* Identifier.
*/
@@ -4383,7 +4383,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface SRVRecord extends RecordsAPI.SRVRecord {
+ export interface SRV extends RecordsAPI.SRVRecord {
/**
* Identifier.
*/
@@ -4420,7 +4420,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface SSHFPRecord extends RecordsAPI.SSHFPRecord {
+ export interface SSHFP extends RecordsAPI.SSHFPRecord {
/**
* Identifier.
*/
@@ -4457,7 +4457,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface SVCBRecord extends RecordsAPI.SVCBRecord {
+ export interface SVCB extends RecordsAPI.SVCBRecord {
/**
* Identifier.
*/
@@ -4494,7 +4494,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface TLSARecord extends RecordsAPI.TLSARecord {
+ export interface TLSA extends RecordsAPI.TLSARecord {
/**
* Identifier.
*/
@@ -4531,7 +4531,7 @@ export namespace RecordResponse {
tags_modified_on?: string;
}
- export interface URIRecord extends RecordsAPI.URIRecord {
+ export interface URI extends RecordsAPI.URIRecord {
/**
* Identifier.
*/
diff --git a/src/resources/email-security/investigate/investigate.ts b/src/resources/email-security/investigate/investigate.ts
index a15d9630ba..b7f32c860e 100644
--- a/src/resources/email-security/investigate/investigate.ts
+++ b/src/resources/email-security/investigate/investigate.ts
@@ -199,10 +199,33 @@ export namespace InvestigateListResponse {
}
export interface Finding {
+ attachment?: string | null;
+
detail?: string | null;
+ detection?:
+ | 'MALICIOUS'
+ | 'MALICIOUS-BEC'
+ | 'SUSPICIOUS'
+ | 'SPOOF'
+ | 'SPAM'
+ | 'BULK'
+ | 'ENCRYPTED'
+ | 'EXTERNAL'
+ | 'UNKNOWN'
+ | 'NONE'
+ | null;
+
+ field?: string | null;
+
name?: string | null;
+ portion?: string | null;
+
+ reason?: string | null;
+
+ score?: number | null;
+
value?: string | null;
}
@@ -321,10 +344,33 @@ export namespace InvestigateGetResponse {
}
export interface Finding {
+ attachment?: string | null;
+
detail?: string | null;
+ detection?:
+ | 'MALICIOUS'
+ | 'MALICIOUS-BEC'
+ | 'SUSPICIOUS'
+ | 'SPOOF'
+ | 'SPAM'
+ | 'BULK'
+ | 'ENCRYPTED'
+ | 'EXTERNAL'
+ | 'UNKNOWN'
+ | 'NONE'
+ | null;
+
+ field?: string | null;
+
name?: string | null;
+ portion?: string | null;
+
+ reason?: string | null;
+
+ score?: number | null;
+
value?: string | null;
}
@@ -355,6 +401,11 @@ export interface InvestigateListParams extends V4PagePaginationArrayParams {
*/
alert_id?: string;
+ /**
+ * Query param:
+ */
+ cursor?: string;
+
/**
* Query param: Determines if the search results will include detections or not.
*/
diff --git a/src/resources/iam/iam.ts b/src/resources/iam/iam.ts
index c8fef6d0b3..13cff578a1 100644
--- a/src/resources/iam/iam.ts
+++ b/src/resources/iam/iam.ts
@@ -25,6 +25,23 @@ import {
ResourceGroupUpdateResponse,
ResourceGroups,
} from './resource-groups';
+import * as SSOAPI from './sso';
+import {
+ SSO,
+ SSOBeginVerificationParams,
+ SSOBeginVerificationResponse,
+ SSOCreateParams,
+ SSOCreateResponse,
+ SSODeleteParams,
+ SSODeleteResponse,
+ SSOGetParams,
+ SSOGetResponse,
+ SSOListParams,
+ SSOListResponse,
+ SSOListResponsesSinglePage,
+ SSOUpdateParams,
+ SSOUpdateResponse,
+} from './sso';
import * as UserGroupsAPI from './user-groups/user-groups';
import {
UserGroupCreateParams,
@@ -47,6 +64,7 @@ export class IAM extends APIResource {
);
resourceGroups: ResourceGroupsAPI.ResourceGroups = new ResourceGroupsAPI.ResourceGroups(this._client);
userGroups: UserGroupsAPI.UserGroups = new UserGroupsAPI.UserGroups(this._client);
+ sso: SSOAPI.SSO = new SSOAPI.SSO(this._client);
}
IAM.PermissionGroups = PermissionGroups;
@@ -55,6 +73,8 @@ IAM.ResourceGroups = ResourceGroups;
IAM.ResourceGroupListResponsesSinglePage = ResourceGroupListResponsesSinglePage;
IAM.UserGroups = UserGroups;
IAM.UserGroupListResponsesV4PagePaginationArray = UserGroupListResponsesV4PagePaginationArray;
+IAM.SSO = SSO;
+IAM.SSOListResponsesSinglePage = SSOListResponsesSinglePage;
export declare namespace IAM {
export {
@@ -95,4 +115,21 @@ export declare namespace IAM {
type UserGroupDeleteParams as UserGroupDeleteParams,
type UserGroupGetParams as UserGroupGetParams,
};
+
+ export {
+ SSO as SSO,
+ type SSOCreateResponse as SSOCreateResponse,
+ type SSOUpdateResponse as SSOUpdateResponse,
+ type SSOListResponse as SSOListResponse,
+ type SSODeleteResponse as SSODeleteResponse,
+ type SSOBeginVerificationResponse as SSOBeginVerificationResponse,
+ type SSOGetResponse as SSOGetResponse,
+ SSOListResponsesSinglePage as SSOListResponsesSinglePage,
+ type SSOCreateParams as SSOCreateParams,
+ type SSOUpdateParams as SSOUpdateParams,
+ type SSOListParams as SSOListParams,
+ type SSODeleteParams as SSODeleteParams,
+ type SSOBeginVerificationParams as SSOBeginVerificationParams,
+ type SSOGetParams as SSOGetParams,
+ };
}
diff --git a/src/resources/iam/index.ts b/src/resources/iam/index.ts
index bdba3c5cd0..d4f22ccc30 100644
--- a/src/resources/iam/index.ts
+++ b/src/resources/iam/index.ts
@@ -23,6 +23,22 @@ export {
type ResourceGroupDeleteParams,
type ResourceGroupGetParams,
} from './resource-groups';
+export {
+ SSOListResponsesSinglePage,
+ SSO,
+ type SSOCreateResponse,
+ type SSOUpdateResponse,
+ type SSOListResponse,
+ type SSODeleteResponse,
+ type SSOBeginVerificationResponse,
+ type SSOGetResponse,
+ type SSOCreateParams,
+ type SSOUpdateParams,
+ type SSOListParams,
+ type SSODeleteParams,
+ type SSOBeginVerificationParams,
+ type SSOGetParams,
+} from './sso';
export {
UserGroupListResponsesV4PagePaginationArray,
UserGroups,
diff --git a/src/resources/iam/sso.ts b/src/resources/iam/sso.ts
new file mode 100644
index 0000000000..ecfbfb6028
--- /dev/null
+++ b/src/resources/iam/sso.ts
@@ -0,0 +1,465 @@
+// 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 SSO extends APIResource {
+ /**
+ * Initialize new SSO connector
+ *
+ * @example
+ * ```ts
+ * const sso = await client.iam.sso.create({
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * email_domain: 'example.com',
+ * });
+ * ```
+ */
+ create(params: SSOCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/sso_connectors`, { body, ...options }) as Core.APIPromise<{
+ result: SSOCreateResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Update SSO connector state
+ *
+ * @example
+ * ```ts
+ * const sso = await client.iam.sso.update(
+ * '023e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ update(
+ ssoConnectorId: string,
+ params: SSOUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.patch(`/accounts/${account_id}/sso_connectors/${ssoConnectorId}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: SSOUpdateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Get all SSO connectors
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const ssoListResponse of client.iam.sso.list({
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * })) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ params: SSOListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/sso_connectors`,
+ SSOListResponsesSinglePage,
+ options,
+ );
+ }
+
+ /**
+ * Delete SSO connector
+ *
+ * @example
+ * ```ts
+ * const sso = await client.iam.sso.delete(
+ * '023e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ delete(
+ ssoConnectorId: string,
+ params: SSODeleteParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.delete(
+ `/accounts/${account_id}/sso_connectors/${ssoConnectorId}`,
+ options,
+ ) as Core.APIPromise<{ result: SSODeleteResponse | null }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Begin SSO connector verification
+ *
+ * @example
+ * ```ts
+ * const response = await client.iam.sso.beginVerification(
+ * '023e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ beginVerification(
+ ssoConnectorId: string,
+ params: SSOBeginVerificationParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return this._client.post(
+ `/accounts/${account_id}/sso_connectors/${ssoConnectorId}/begin_verification`,
+ options,
+ );
+ }
+
+ /**
+ * Get single SSO connector
+ *
+ * @example
+ * ```ts
+ * const sso = await client.iam.sso.get(
+ * '023e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ get(
+ ssoConnectorId: string,
+ params: SSOGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/sso_connectors/${ssoConnectorId}`,
+ options,
+ ) as Core.APIPromise<{ result: SSOGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class SSOListResponsesSinglePage extends SinglePage {}
+
+export interface SSOCreateResponse {
+ /**
+ * SSO Connector identifier tag.
+ */
+ id?: string;
+
+ /**
+ * Timestamp for the creation of the SSO connector
+ */
+ created_on?: string;
+
+ email_domain?: string;
+
+ enabled?: boolean;
+
+ /**
+ * Timestamp for the last update of the SSO connector
+ */
+ updated_on?: string;
+
+ /**
+ * Controls the display of FedRAMP language to the user during SSO login
+ */
+ use_fedramp_language?: boolean;
+
+ verification?: SSOCreateResponse.Verification;
+}
+
+export namespace SSOCreateResponse {
+ export interface Verification {
+ /**
+ * DNS verification code. Add this entire string to the DNS TXT record of the email
+ * domain to validate ownership.
+ */
+ code?: string;
+
+ /**
+ * The status of the verification code from the verification process.
+ */
+ status?: 'awaiting' | 'pending' | 'failed' | 'verified';
+ }
+}
+
+export interface SSOUpdateResponse {
+ /**
+ * SSO Connector identifier tag.
+ */
+ id?: string;
+
+ /**
+ * Timestamp for the creation of the SSO connector
+ */
+ created_on?: string;
+
+ email_domain?: string;
+
+ enabled?: boolean;
+
+ /**
+ * Timestamp for the last update of the SSO connector
+ */
+ updated_on?: string;
+
+ /**
+ * Controls the display of FedRAMP language to the user during SSO login
+ */
+ use_fedramp_language?: boolean;
+
+ verification?: SSOUpdateResponse.Verification;
+}
+
+export namespace SSOUpdateResponse {
+ export interface Verification {
+ /**
+ * DNS verification code. Add this entire string to the DNS TXT record of the email
+ * domain to validate ownership.
+ */
+ code?: string;
+
+ /**
+ * The status of the verification code from the verification process.
+ */
+ status?: 'awaiting' | 'pending' | 'failed' | 'verified';
+ }
+}
+
+export interface SSOListResponse {
+ /**
+ * SSO Connector identifier tag.
+ */
+ id?: string;
+
+ /**
+ * Timestamp for the creation of the SSO connector
+ */
+ created_on?: string;
+
+ email_domain?: string;
+
+ enabled?: boolean;
+
+ /**
+ * Timestamp for the last update of the SSO connector
+ */
+ updated_on?: string;
+
+ /**
+ * Controls the display of FedRAMP language to the user during SSO login
+ */
+ use_fedramp_language?: boolean;
+
+ verification?: SSOListResponse.Verification;
+}
+
+export namespace SSOListResponse {
+ export interface Verification {
+ /**
+ * DNS verification code. Add this entire string to the DNS TXT record of the email
+ * domain to validate ownership.
+ */
+ code?: string;
+
+ /**
+ * The status of the verification code from the verification process.
+ */
+ status?: 'awaiting' | 'pending' | 'failed' | 'verified';
+ }
+}
+
+export interface SSODeleteResponse {
+ /**
+ * Identifier
+ */
+ id: string;
+}
+
+export interface SSOBeginVerificationResponse {
+ errors: Array;
+
+ messages: Array;
+
+ /**
+ * Whether the API call was successful.
+ */
+ success: true;
+}
+
+export namespace SSOBeginVerificationResponse {
+ export interface Error {
+ code: number;
+
+ message: string;
+
+ documentation_url?: string;
+
+ source?: Error.Source;
+ }
+
+ export namespace Error {
+ export interface Source {
+ pointer?: string;
+ }
+ }
+
+ export interface Message {
+ code: number;
+
+ message: string;
+
+ documentation_url?: string;
+
+ source?: Message.Source;
+ }
+
+ export namespace Message {
+ export interface Source {
+ pointer?: string;
+ }
+ }
+}
+
+export interface SSOGetResponse {
+ /**
+ * SSO Connector identifier tag.
+ */
+ id?: string;
+
+ /**
+ * Timestamp for the creation of the SSO connector
+ */
+ created_on?: string;
+
+ email_domain?: string;
+
+ enabled?: boolean;
+
+ /**
+ * Timestamp for the last update of the SSO connector
+ */
+ updated_on?: string;
+
+ /**
+ * Controls the display of FedRAMP language to the user during SSO login
+ */
+ use_fedramp_language?: boolean;
+
+ verification?: SSOGetResponse.Verification;
+}
+
+export namespace SSOGetResponse {
+ export interface Verification {
+ /**
+ * DNS verification code. Add this entire string to the DNS TXT record of the email
+ * domain to validate ownership.
+ */
+ code?: string;
+
+ /**
+ * The status of the verification code from the verification process.
+ */
+ status?: 'awaiting' | 'pending' | 'failed' | 'verified';
+ }
+}
+
+export interface SSOCreateParams {
+ /**
+ * Path param: Account identifier tag.
+ */
+ account_id: string;
+
+ /**
+ * Body param: Email domain of the new SSO connector
+ */
+ email_domain: string;
+
+ /**
+ * Body param: Begin the verification process after creation
+ */
+ begin_verification?: boolean;
+
+ /**
+ * Body param: Controls the display of FedRAMP language to the user during SSO
+ * login
+ */
+ use_fedramp_language?: boolean;
+}
+
+export interface SSOUpdateParams {
+ /**
+ * Path param: Account identifier tag.
+ */
+ account_id: string;
+
+ /**
+ * Body param: SSO Connector enabled state
+ */
+ enabled?: boolean;
+
+ /**
+ * Body param: Controls the display of FedRAMP language to the user during SSO
+ * login
+ */
+ use_fedramp_language?: boolean;
+}
+
+export interface SSOListParams {
+ /**
+ * Account identifier tag.
+ */
+ account_id: string;
+}
+
+export interface SSODeleteParams {
+ /**
+ * Account identifier tag.
+ */
+ account_id: string;
+}
+
+export interface SSOBeginVerificationParams {
+ /**
+ * Account identifier tag.
+ */
+ account_id: string;
+}
+
+export interface SSOGetParams {
+ /**
+ * Account identifier tag.
+ */
+ account_id: string;
+}
+
+SSO.SSOListResponsesSinglePage = SSOListResponsesSinglePage;
+
+export declare namespace SSO {
+ export {
+ type SSOCreateResponse as SSOCreateResponse,
+ type SSOUpdateResponse as SSOUpdateResponse,
+ type SSOListResponse as SSOListResponse,
+ type SSODeleteResponse as SSODeleteResponse,
+ type SSOBeginVerificationResponse as SSOBeginVerificationResponse,
+ type SSOGetResponse as SSOGetResponse,
+ SSOListResponsesSinglePage as SSOListResponsesSinglePage,
+ type SSOCreateParams as SSOCreateParams,
+ type SSOUpdateParams as SSOUpdateParams,
+ type SSOListParams as SSOListParams,
+ type SSODeleteParams as SSODeleteParams,
+ type SSOBeginVerificationParams as SSOBeginVerificationParams,
+ type SSOGetParams as SSOGetParams,
+ };
+}
diff --git a/src/resources/index.ts b/src/resources/index.ts
index ac499e1b7f..7047ef0fb0 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -22,6 +22,7 @@ export { CertificateAuthorities } from './certificate-authorities/certificate-au
export { ClientCertificates } from './client-certificates';
export { CloudConnector } from './cloud-connector/cloud-connector';
export { CloudforceOne } from './cloudforce-one/cloudforce-one';
+export { Connectivity } from './connectivity/connectivity';
export { ContentScanning } from './content-scanning/content-scanning';
export { CustomCertificates } from './custom-certificates/custom-certificates';
export { CustomHostnames } from './custom-hostnames/custom-hostnames';
@@ -57,6 +58,7 @@ export { MagicTransit } from './magic-transit/magic-transit';
export { ManagedTransforms } from './managed-transforms';
export { Memberships } from './memberships';
export { NetworkInterconnects } from './network-interconnects/network-interconnects';
+export { Organizations } from './organizations/organizations';
export { OriginCACertificates } from './origin-ca-certificates';
export { OriginPostQuantumEncryption } from './origin-post-quantum-encryption';
export { OriginTLSClientAuth } from './origin-tls-client-auth/origin-tls-client-auth';
@@ -69,6 +71,7 @@ export { R2 } from './r2/r2';
export { RUM } from './rum/rum';
export { Radar } from './radar/radar';
export { RateLimits } from './rate-limits';
+export { RealtimeKit } from './realtime-kit';
export { Registrar } from './registrar/registrar';
export { RequestTracers } from './request-tracers/request-tracers';
export { ResourceSharing } from './resource-sharing/resource-sharing';
@@ -83,6 +86,7 @@ export { Snippets } from './snippets/snippets';
export { Spectrum } from './spectrum/spectrum';
export { Speed } from './speed/speed';
export { Stream } from './stream/stream';
+export { TokenValidation } from './token-validation/token-validation';
export { Turnstile } from './turnstile/turnstile';
export { URLNormalization } from './url-normalization';
export { URLScanner } from './url-scanner/url-scanner';
diff --git a/src/resources/intel/attack-surface-report/issues.ts b/src/resources/intel/attack-surface-report/issues.ts
index 3e41e46003..a10956bec3 100644
--- a/src/resources/intel/attack-surface-report/issues.ts
+++ b/src/resources/intel/attack-surface-report/issues.ts
@@ -96,14 +96,16 @@ export type IssueType =
| 'email_security'
| 'exposed_infrastructure'
| 'insecure_configuration'
- | 'weak_authentication';
+ | 'weak_authentication'
+ | 'configuration_suggestion';
export type IssueTypeParam =
| 'compliance_violation'
| 'email_security'
| 'exposed_infrastructure'
| 'insecure_configuration'
- | 'weak_authentication';
+ | 'weak_authentication'
+ | 'configuration_suggestion';
export type SeverityQueryParam = 'low' | 'moderate' | 'critical';
@@ -138,7 +140,7 @@ export namespace IssueListResponse {
issue_type?: IssuesAPI.IssueType;
- payload?: unknown;
+ payload?: Issue.Payload;
resolve_link?: string;
@@ -152,6 +154,17 @@ export namespace IssueListResponse {
timestamp?: string;
}
+
+ export namespace Issue {
+ export interface Payload {
+ /**
+ * Method used to detect insight
+ */
+ detection_method?: string;
+
+ zone_tag?: string;
+ }
+ }
}
export type IssueClassResponse = Array;
diff --git a/src/resources/kv/namespaces/values.ts b/src/resources/kv/namespaces/values.ts
index a8de1f25b5..49566f425a 100644
--- a/src/resources/kv/namespaces/values.ts
+++ b/src/resources/kv/namespaces/values.ts
@@ -37,12 +37,8 @@ export class Values extends APIResource {
return (
this._client.put(
`/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/values/${keyName}`,
- Core.multipartFormRequestOptions({
- query: { expiration, expiration_ttl },
- body,
- __multipartSyntax: 'json',
- ...options,
- }),
+ Core.multipartFormRequestOptions({ query: { expiration, expiration_ttl }, body,
+ __multipartSyntax: 'json', ...options }),
) as Core.APIPromise<{ result: ValueUpdateResponse | null }>
)._thenUnwrap((obj) => obj.result);
}
diff --git a/src/resources/logpush/datasets/fields.ts b/src/resources/logpush/datasets/fields.ts
index 3ba1f069f7..f0a2086930 100644
--- a/src/resources/logpush/datasets/fields.ts
+++ b/src/resources/logpush/datasets/fields.ts
@@ -26,6 +26,8 @@ export class Fields extends APIResource {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -35,6 +37,7 @@ export class Fields extends APIResource {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -42,6 +45,8 @@ export class Fields extends APIResource {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
@@ -57,6 +62,8 @@ export class Fields extends APIResource {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -66,6 +73,7 @@ export class Fields extends APIResource {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -73,6 +81,8 @@ export class Fields extends APIResource {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
@@ -87,6 +97,8 @@ export class Fields extends APIResource {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -96,6 +108,7 @@ export class Fields extends APIResource {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -103,6 +116,8 @@ export class Fields extends APIResource {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
diff --git a/src/resources/logpush/datasets/jobs.ts b/src/resources/logpush/datasets/jobs.ts
index 90c7438608..e4a3921516 100644
--- a/src/resources/logpush/datasets/jobs.ts
+++ b/src/resources/logpush/datasets/jobs.ts
@@ -30,6 +30,8 @@ export class Jobs extends APIResource {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -39,6 +41,7 @@ export class Jobs extends APIResource {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -46,6 +49,8 @@ export class Jobs extends APIResource {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
@@ -61,6 +66,8 @@ export class Jobs extends APIResource {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -70,6 +77,7 @@ export class Jobs extends APIResource {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -77,6 +85,8 @@ export class Jobs extends APIResource {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
@@ -91,6 +101,8 @@ export class Jobs extends APIResource {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -100,6 +112,7 @@ export class Jobs extends APIResource {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -107,6 +120,8 @@ export class Jobs extends APIResource {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
diff --git a/src/resources/logpush/jobs.ts b/src/resources/logpush/jobs.ts
index 4b6fba4fa1..7a267dce43 100644
--- a/src/resources/logpush/jobs.ts
+++ b/src/resources/logpush/jobs.ts
@@ -292,6 +292,8 @@ export interface LogpushJob {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -301,6 +303,7 @@ export interface LogpushJob {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -308,6 +311,8 @@ export interface LogpushJob {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
@@ -601,6 +606,8 @@ export interface JobCreateParams {
| 'biso_user_actions'
| 'casb_findings'
| 'device_posture_results'
+ | 'dex_application_tests'
+ | 'dex_device_state_events'
| 'dlp_forensic_copies'
| 'dns_firewall_logs'
| 'dns_logs'
@@ -610,6 +617,7 @@ export interface JobCreateParams {
| 'gateway_http'
| 'gateway_network'
| 'http_requests'
+ | 'ipsec_logs'
| 'magic_ids_detections'
| 'nel_reports'
| 'network_analytics_logs'
@@ -617,6 +625,8 @@ export interface JobCreateParams {
| 'sinkhole_http_logs'
| 'spectrum_events'
| 'ssh_logs'
+ | 'warp_config_changes'
+ | 'warp_toggle_changes'
| 'workers_trace_events'
| 'zaraz_events'
| 'zero_trust_network_sessions'
diff --git a/src/resources/magic-transit/connectors/connectors.ts b/src/resources/magic-transit/connectors/connectors.ts
index c7f3bde0de..368ca729b7 100644
--- a/src/resources/magic-transit/connectors/connectors.ts
+++ b/src/resources/magic-transit/connectors/connectors.ts
@@ -49,7 +49,7 @@ export class Connectors extends APIResource {
}
/**
- * Replace Connector
+ * Replace Connector or Re-provision License Key
*
* @example
* ```ts
@@ -126,7 +126,7 @@ export class Connectors extends APIResource {
}
/**
- * Edit Connector to update specific properties
+ * Edit Connector to update specific properties or Re-provision License Key
*
* @example
* ```ts
@@ -198,6 +198,8 @@ export interface ConnectorCreateResponse {
last_heartbeat?: string;
last_seen_version?: string;
+
+ license_key?: string;
}
export namespace ConnectorCreateResponse {
@@ -228,6 +230,8 @@ export interface ConnectorUpdateResponse {
last_heartbeat?: string;
last_seen_version?: string;
+
+ license_key?: string;
}
export namespace ConnectorUpdateResponse {
@@ -258,6 +262,8 @@ export interface ConnectorListResponse {
last_heartbeat?: string;
last_seen_version?: string;
+
+ license_key?: string;
}
export namespace ConnectorListResponse {
@@ -288,6 +294,8 @@ export interface ConnectorDeleteResponse {
last_heartbeat?: string;
last_seen_version?: string;
+
+ license_key?: string;
}
export namespace ConnectorDeleteResponse {
@@ -318,6 +326,8 @@ export interface ConnectorEditResponse {
last_heartbeat?: string;
last_seen_version?: string;
+
+ license_key?: string;
}
export namespace ConnectorEditResponse {
@@ -348,6 +358,8 @@ export interface ConnectorGetResponse {
last_heartbeat?: string;
last_seen_version?: string;
+
+ license_key?: string;
}
export namespace ConnectorGetResponse {
@@ -365,7 +377,8 @@ export interface ConnectorCreateParams {
account_id: string;
/**
- * Body param:
+ * Body param: Exactly one of id, serial_number, or provision_license must be
+ * provided.
*/
device: ConnectorCreateParams.Device;
@@ -396,9 +409,17 @@ export interface ConnectorCreateParams {
}
export namespace ConnectorCreateParams {
+ /**
+ * Exactly one of id, serial_number, or provision_license must be provided.
+ */
export interface Device {
id?: string;
+ /**
+ * When true, create and provision a new licence key for the connector.
+ */
+ provision_license?: boolean;
+
serial_number?: string;
}
}
@@ -429,6 +450,11 @@ export interface ConnectorUpdateParams {
*/
notes?: string;
+ /**
+ * Body param: When true, regenerate license key for the connector.
+ */
+ provision_license?: boolean;
+
/**
* Body param:
*/
@@ -475,6 +501,11 @@ export interface ConnectorEditParams {
*/
notes?: string;
+ /**
+ * Body param: When true, regenerate license key for the connector.
+ */
+ provision_license?: boolean;
+
/**
* Body param:
*/
diff --git a/src/resources/magic-transit/connectors/snapshots/latest.ts b/src/resources/magic-transit/connectors/snapshots/latest.ts
index 16d9eaff01..c51d9f1abe 100644
--- a/src/resources/magic-transit/connectors/snapshots/latest.ts
+++ b/src/resources/magic-transit/connectors/snapshots/latest.ts
@@ -72,6 +72,8 @@ export namespace LatestListResponse {
*/
v: string;
+ bonds?: Array;
+
/**
* Count of processors/cores
*/
@@ -876,6 +878,21 @@ export namespace LatestListResponse {
}
export namespace Item {
+ /**
+ * Snapshot Bond
+ */
+ export interface Bond {
+ /**
+ * Name of the network interface
+ */
+ name: string;
+
+ /**
+ * Current status of the network interface
+ */
+ status: string;
+ }
+
/**
* Snapshot DHCP lease
*/
@@ -1279,6 +1296,11 @@ export namespace LatestListResponse {
* Connector identifier
*/
connector_id?: string;
+
+ /**
+ * MTU as measured between the two ends of the tunnel
+ */
+ probed_mtu?: number;
}
}
}
diff --git a/src/resources/magic-transit/connectors/snapshots/snapshots.ts b/src/resources/magic-transit/connectors/snapshots/snapshots.ts
index 69b5c098e5..a7d1e0d815 100644
--- a/src/resources/magic-transit/connectors/snapshots/snapshots.ts
+++ b/src/resources/magic-transit/connectors/snapshots/snapshots.ts
@@ -123,6 +123,8 @@ export interface SnapshotGetResponse {
*/
v: string;
+ bonds?: Array;
+
/**
* Count of processors/cores
*/
@@ -927,6 +929,21 @@ export interface SnapshotGetResponse {
}
export namespace SnapshotGetResponse {
+ /**
+ * Snapshot Bond
+ */
+ export interface Bond {
+ /**
+ * Name of the network interface
+ */
+ name: string;
+
+ /**
+ * Current status of the network interface
+ */
+ status: string;
+ }
+
/**
* Snapshot DHCP lease
*/
@@ -1330,6 +1347,11 @@ export namespace SnapshotGetResponse {
* Connector identifier
*/
connector_id?: string;
+
+ /**
+ * MTU as measured between the two ends of the tunnel
+ */
+ probed_mtu?: number;
}
}
diff --git a/src/resources/organizations.ts b/src/resources/organizations.ts
new file mode 100644
index 0000000000..61ddaf165e
--- /dev/null
+++ b/src/resources/organizations.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './organizations/index';
diff --git a/src/resources/organizations/index.ts b/src/resources/organizations/index.ts
new file mode 100644
index 0000000000..74e4c1078f
--- /dev/null
+++ b/src/resources/organizations/index.ts
@@ -0,0 +1,8 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export {
+ OrganizationProfileResource,
+ type OrganizationProfile,
+ type OrganizationProfileUpdateParams,
+} from './organization-profile';
+export { Organizations } from './organizations';
diff --git a/src/resources/organizations/organization-profile.ts b/src/resources/organizations/organization-profile.ts
new file mode 100644
index 0000000000..c1f64836a5
--- /dev/null
+++ b/src/resources/organizations/organization-profile.ts
@@ -0,0 +1,65 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+
+export class OrganizationProfileResource extends APIResource {
+ /**
+ * Modify organization profile. (Currently in Closed Beta - see
+ * https://developers.cloudflare.com/fundamentals/organizations/)
+ */
+ update(
+ organizationId: string,
+ body: OrganizationProfileUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return this._client.put(`/organizations/${organizationId}/profile`, {
+ body,
+ ...options,
+ headers: { Accept: '*/*', ...options?.headers },
+ });
+ }
+
+ /**
+ * Get an organizations profile if it exists. (Currently in Closed Beta - see
+ * https://developers.cloudflare.com/fundamentals/organizations/)
+ */
+ get(organizationId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.get(`/organizations/${organizationId}/profile`, options) as Core.APIPromise<{
+ result: unnamed_schema_0.Result;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface OrganizationProfile {
+ business_address: string;
+
+ business_email: string;
+
+ business_name: string;
+
+ business_phone: string;
+
+ external_metadata: string;
+}
+
+export interface OrganizationProfileUpdateParams {
+ business_address: string;
+
+ business_email: string;
+
+ business_name: string;
+
+ business_phone: string;
+
+ external_metadata: string;
+}
+
+export declare namespace OrganizationProfileResource {
+ export {
+ type OrganizationProfile as OrganizationProfile,
+ type OrganizationProfileUpdateParams as OrganizationProfileUpdateParams,
+ };
+}
diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts
new file mode 100644
index 0000000000..44b26476c0
--- /dev/null
+++ b/src/resources/organizations/organizations.ts
@@ -0,0 +1,315 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import { isRequestOptions } from '../../core';
+import * as Core from '../../core';
+import * as OrganizationProfileAPI from './organization-profile';
+import {
+ OrganizationProfile,
+ OrganizationProfileResource,
+ OrganizationProfileUpdateParams,
+} from './organization-profile';
+import { SinglePage } from '../../pagination';
+
+export class Organizations extends APIResource {
+ organizationProfile: OrganizationProfileAPI.OrganizationProfileResource =
+ new OrganizationProfileAPI.OrganizationProfileResource(this._client);
+
+ /**
+ * Create a new organization for a user. (Currently in Closed Beta - see
+ * https://developers.cloudflare.com/fundamentals/organizations/)
+ */
+ create(body: OrganizationCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.post('/organizations', { body, ...options }) as Core.APIPromise<{ result: Organization }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Modify organization. (Currently in Closed Beta - see
+ * https://developers.cloudflare.com/fundamentals/organizations/)
+ */
+ update(
+ organizationId: string,
+ body: OrganizationUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ return (
+ this._client.put(`/organizations/${organizationId}`, { body, ...options }) as Core.APIPromise<{
+ result: Organization;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Retrieve a list of organizations a particular user has access to. (Currently in
+ * Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
+ */
+ list(
+ query?: OrganizationListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise;
+ list(options?: Core.RequestOptions): Core.PagePromise;
+ list(
+ query: OrganizationListParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ if (isRequestOptions(query)) {
+ return this.list({}, query);
+ }
+ return this._client.getAPIList('/organizations', OrganizationsSinglePage, { query, ...options });
+ }
+
+ /**
+ * Delete an organization. The organization MUST be empty before deleting. It must
+ * not contain any sub-organizations, accounts, members or users. (Currently in
+ * Closed Beta - see https://developers.cloudflare.com/fundamentals/organizations/)
+ */
+ delete(organizationId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.delete(`/organizations/${organizationId}`, options) as Core.APIPromise<{
+ result: OrganizationDeleteResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Retrieve the details of a certain organization. (Currently in Closed Beta - see
+ * https://developers.cloudflare.com/fundamentals/organizations/)
+ */
+ get(organizationId: string, options?: Core.RequestOptions): Core.APIPromise {
+ return (
+ this._client.get(`/organizations/${organizationId}`, options) as Core.APIPromise<{
+ result: Organization;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class OrganizationsSinglePage extends SinglePage {}
+
+/**
+ * References an Organization in the Cloudflare data model.
+ */
+export interface Organization {
+ id: string;
+
+ create_time: string;
+
+ meta: Organization.Meta;
+
+ name: string;
+
+ parent?: Organization.Parent;
+
+ profile?: Organization.Profile;
+}
+
+export namespace Organization {
+ export interface Meta {
+ /**
+ * Enable features for Organizations.
+ */
+ flags?: Meta.Flags;
+
+ managed_by?: string;
+
+ [k: string]: unknown;
+ }
+
+ export namespace Meta {
+ /**
+ * Enable features for Organizations.
+ */
+ export interface Flags {
+ account_creation: string;
+
+ account_deletion: string;
+
+ account_migration: string;
+
+ account_mobility: string;
+
+ sub_org_creation: string;
+ }
+ }
+
+ export interface Parent {
+ id: string;
+
+ name: string;
+ }
+
+ export interface Profile {
+ business_address: string;
+
+ business_email: string;
+
+ business_name: string;
+
+ business_phone: string;
+
+ external_metadata: string;
+ }
+}
+
+export interface OrganizationDeleteResponse {
+ id: string;
+}
+
+export interface OrganizationCreateParams {
+ name: string;
+
+ parent?: OrganizationCreateParams.Parent;
+
+ profile?: OrganizationCreateParams.Profile;
+}
+
+export namespace OrganizationCreateParams {
+ export interface Parent {
+ id: string;
+ }
+
+ export interface Profile {
+ business_address: string;
+
+ business_email: string;
+
+ business_name: string;
+
+ business_phone: string;
+
+ external_metadata: string;
+ }
+}
+
+export interface OrganizationUpdateParams {
+ name: string;
+
+ parent?: OrganizationUpdateParams.Parent;
+
+ profile?: OrganizationUpdateParams.Profile;
+}
+
+export namespace OrganizationUpdateParams {
+ export interface Parent {
+ id: string;
+ }
+
+ export interface Profile {
+ business_address: string;
+
+ business_email: string;
+
+ business_name: string;
+
+ business_phone: string;
+
+ external_metadata: string;
+ }
+}
+
+export interface OrganizationListParams {
+ /**
+ * Only return organizations with the specified IDs (ex. id=foo&id=bar). Send
+ * multiple elements by repeating the query value.
+ */
+ id?: Array;
+
+ containing?: OrganizationListParams.Containing;
+
+ name?: OrganizationListParams.Name;
+
+ /**
+ * The amount of items to return. Defaults to 10.
+ */
+ page_size?: number;
+
+ /**
+ * An opaque token returned from the last list response that when provided will
+ * retrieve the next page.
+ *
+ * Parameters used to filter the retrieved list must remain in subsequent requests
+ * with a page token.
+ */
+ page_token?: string;
+
+ parent?: OrganizationListParams.Parent;
+}
+
+export namespace OrganizationListParams {
+ export interface Containing {
+ /**
+ * Filter the list of organizations to the ones that contain this particular
+ * account.
+ */
+ account?: string;
+
+ /**
+ * Filter the list of organizations to the ones that contain this particular
+ * organization.
+ */
+ organization?: string;
+
+ /**
+ * Filter the list of organizations to the ones that contain this particular user.
+ *
+ * IMPORTANT: Just because an organization "contains" a user is not a
+ * representation of any authorization or privilege to manage any resources
+ * therein. An organization "containing" a user simply means the user is managed by
+ * that organization.
+ */
+ user?: string;
+ }
+
+ export interface Name {
+ /**
+ * (case-insensitive) Filter the list of organizations to where the name contains a
+ * particular string.
+ */
+ contains?: string;
+
+ /**
+ * (case-insensitive) Filter the list of organizations to where the name ends with
+ * a particular string.
+ */
+ endsWith?: string;
+
+ /**
+ * (case-insensitive) Filter the list of organizations to where the name starts
+ * with a particular string.
+ */
+ startsWith?: string;
+ }
+
+ export interface Parent {
+ /**
+ * Filter the list of organizations to the ones that are a sub-organization of the
+ * specified organization.
+ *
+ * "null" is a valid value to provide for this parameter. It means "where an
+ * organization has no parent (i.e. it is a 'root' organization)."
+ */
+ id?: (string & {}) | 'null';
+ }
+}
+
+Organizations.OrganizationsSinglePage = OrganizationsSinglePage;
+Organizations.OrganizationProfileResource = OrganizationProfileResource;
+
+export declare namespace Organizations {
+ export {
+ type Organization as Organization,
+ type OrganizationDeleteResponse as OrganizationDeleteResponse,
+ OrganizationsSinglePage as OrganizationsSinglePage,
+ type OrganizationCreateParams as OrganizationCreateParams,
+ type OrganizationUpdateParams as OrganizationUpdateParams,
+ type OrganizationListParams as OrganizationListParams,
+ };
+
+ export {
+ OrganizationProfileResource as OrganizationProfileResource,
+ type OrganizationProfile as OrganizationProfile,
+ type OrganizationProfileUpdateParams as OrganizationProfileUpdateParams,
+ };
+}
diff --git a/src/resources/pages/index.ts b/src/resources/pages/index.ts
index 2b2862b5c1..94a789fe04 100644
--- a/src/resources/pages/index.ts
+++ b/src/resources/pages/index.ts
@@ -1,7 +1,7 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export {
- DeploymentsSinglePage,
+ DeploymentsV4PagePaginationArray,
Projects,
type Deployment,
type Project,
diff --git a/src/resources/pages/pages.ts b/src/resources/pages/pages.ts
index e92779690f..e0331f786f 100644
--- a/src/resources/pages/pages.ts
+++ b/src/resources/pages/pages.ts
@@ -4,7 +4,7 @@ import { APIResource } from '../../resource';
import * as ProjectsAPI from './projects/projects';
import {
Deployment,
- DeploymentsSinglePage,
+ DeploymentsV4PagePaginationArray,
Project,
ProjectCreateParams,
ProjectDeleteParams,
@@ -23,7 +23,7 @@ export class Pages extends APIResource {
}
Pages.Projects = Projects;
-Pages.DeploymentsSinglePage = DeploymentsSinglePage;
+Pages.DeploymentsV4PagePaginationArray = DeploymentsV4PagePaginationArray;
export declare namespace Pages {
export {
@@ -33,7 +33,7 @@ export declare namespace Pages {
type Stage as Stage,
type ProjectDeleteResponse as ProjectDeleteResponse,
type ProjectPurgeBuildCacheResponse as ProjectPurgeBuildCacheResponse,
- DeploymentsSinglePage as DeploymentsSinglePage,
+ DeploymentsV4PagePaginationArray as DeploymentsV4PagePaginationArray,
type ProjectCreateParams as ProjectCreateParams,
type ProjectListParams as ProjectListParams,
type ProjectDeleteParams as ProjectDeleteParams,
diff --git a/src/resources/pages/projects/deployments/deployments.ts b/src/resources/pages/projects/deployments/deployments.ts
index 97b2b41db9..f45cd3edd4 100644
--- a/src/resources/pages/projects/deployments/deployments.ts
+++ b/src/resources/pages/projects/deployments/deployments.ts
@@ -3,9 +3,10 @@
import { APIResource } from '../../../../resource';
import * as Core from '../../../../core';
import * as ProjectsAPI from '../projects';
-import { DeploymentsSinglePage } from '../projects';
+import { DeploymentsV4PagePaginationArray } from '../projects';
import * as HistoryAPI from './history/history';
import { History } from './history/history';
+import { type V4PagePaginationArrayParams } from '../../../../pagination';
export class Deployments extends APIResource {
history: HistoryAPI.History = new HistoryAPI.History(this._client);
@@ -55,11 +56,11 @@ export class Deployments extends APIResource {
projectName: string,
params: DeploymentListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
const { account_id, ...query } = params;
return this._client.getAPIList(
`/accounts/${account_id}/pages/projects/${projectName}/deployments`,
- DeploymentsSinglePage,
+ DeploymentsV4PagePaginationArray,
{ query, ...options },
);
}
@@ -192,14 +193,80 @@ export interface DeploymentCreateParams {
*/
account_id: string;
+ /**
+ * Body param: Headers configuration file for the deployment.
+ */
+ _headers?: Core.Uploadable;
+
+ /**
+ * Body param: Redirects configuration file for the deployment.
+ */
+ _redirects?: Core.Uploadable;
+
+ /**
+ * Body param: Routes configuration file defining routing rules.
+ */
+ '_routes.json'?: Core.Uploadable;
+
+ /**
+ * Body param: Worker bundle file in multipart/form-data format. Mutually exclusive
+ * with `_worker.js`. Cannot specify both `_worker.js` and `_worker.bundle` in the
+ * same request. Maximum size: 25 MiB.
+ */
+ '_worker.bundle'?: Core.Uploadable;
+
+ /**
+ * Body param: Worker JavaScript file. Mutually exclusive with `_worker.bundle`.
+ * Cannot specify both `_worker.js` and `_worker.bundle` in the same request.
+ */
+ '_worker.js'?: Core.Uploadable;
+
/**
* Body param: The branch to build the new deployment from. The `HEAD` of the
* branch will be used. If omitted, the production branch will be used by default.
*/
branch?: string;
+
+ /**
+ * Body param: Boolean string indicating if the working directory has uncommitted
+ * changes.
+ */
+ commit_dirty?: 'true' | 'false';
+
+ /**
+ * Body param: Git commit SHA associated with this deployment.
+ */
+ commit_hash?: string;
+
+ /**
+ * Body param: Git commit message associated with this deployment.
+ */
+ commit_message?: string;
+
+ /**
+ * Body param: Functions routing configuration file.
+ */
+ 'functions-filepath-routing-config.json'?: Core.Uploadable;
+
+ /**
+ * Body param: JSON string containing a manifest of files to deploy. Maps file
+ * paths to their content hashes. Required for direct upload deployments. Maximum
+ * 20,000 entries.
+ */
+ manifest?: string;
+
+ /**
+ * Body param: The build output directory path.
+ */
+ pages_build_output_dir?: string;
+
+ /**
+ * Body param: Hash of the Wrangler configuration file used for this deployment.
+ */
+ wrangler_config_hash?: string;
}
-export interface DeploymentListParams {
+export interface DeploymentListParams extends V4PagePaginationArrayParams {
/**
* Path param: Identifier
*/
@@ -265,4 +332,4 @@ export declare namespace Deployments {
export { History as History };
}
-export { DeploymentsSinglePage };
+export { DeploymentsV4PagePaginationArray };
diff --git a/src/resources/pages/projects/index.ts b/src/resources/pages/projects/index.ts
index a40f121ec5..35949ce346 100644
--- a/src/resources/pages/projects/index.ts
+++ b/src/resources/pages/projects/index.ts
@@ -11,7 +11,7 @@ export {
type DeploymentRollbackParams,
} from './deployments/index';
export {
- DeploymentsSinglePage,
+ DeploymentsV4PagePaginationArray,
Projects,
type Deployment,
type Project,
diff --git a/src/resources/pages/projects/projects.ts b/src/resources/pages/projects/projects.ts
index 01225591dc..d889e19765 100644
--- a/src/resources/pages/projects/projects.ts
+++ b/src/resources/pages/projects/projects.ts
@@ -28,7 +28,7 @@ import {
DeploymentRollbackParams,
Deployments,
} from './deployments/deployments';
-import { SinglePage } from '../../../pagination';
+import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination';
export class Projects extends APIResource {
deployments: DeploymentsAPI.Deployments = new DeploymentsAPI.Deployments(this._client);
@@ -41,6 +41,8 @@ export class Projects extends APIResource {
* ```ts
* const project = await client.pages.projects.create({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * name: 'my-pages-app',
+ * production_branch: 'main',
* });
* ```
*/
@@ -69,9 +71,13 @@ export class Projects extends APIResource {
list(
params: ProjectListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise {
- const { account_id } = params;
- return this._client.getAPIList(`/accounts/${account_id}/pages/projects`, DeploymentsSinglePage, options);
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/pages/projects`,
+ DeploymentsV4PagePaginationArray,
+ { query, ...options },
+ );
}
/**
@@ -107,7 +113,11 @@ export class Projects extends APIResource {
* ```ts
* const project = await client.pages.projects.edit(
* 'this-is-my-project-01',
- * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * {
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * name: 'my-pages-app',
+ * production_branch: 'main',
+ * },
* );
* ```
*/
@@ -176,7 +186,7 @@ export class Projects extends APIResource {
}
}
-export class DeploymentsSinglePage extends SinglePage {}
+export class DeploymentsV4PagePaginationArray extends V4PagePaginationArray {}
export interface Deployment {
/**
@@ -209,7 +219,7 @@ export interface Deployment {
*/
env_vars?: {
[key: string]: Deployment.PagesPlainTextEnvVar | null | Deployment.PagesSecretTextEnvVar | null;
- };
+ } | null;
/**
* Type of deploy.
@@ -359,31 +369,74 @@ export namespace Deployment {
export interface Source {
config?: Source.Config;
- type?: string;
+ /**
+ * The source control management provider.
+ */
+ type?: 'github' | 'gitlab';
}
export namespace Source {
export interface Config {
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
deployments_enabled?: boolean;
+ /**
+ * The owner of the repository.
+ */
owner?: string;
+ /**
+ * A list of paths that should be excluded from triggering a preview deployment.
+ * Wildcard syntax (`*`) is supported.
+ */
path_excludes?: Array;
+ /**
+ * A list of paths that should be watched to trigger a preview deployment. Wildcard
+ * syntax (`*`) is supported.
+ */
path_includes?: Array;
+ /**
+ * Whether to enable PR comments.
+ */
pr_comments_enabled?: boolean;
+ /**
+ * A list of branches that should not trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_excludes?: Array;
+ /**
+ * A list of branches that should trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_includes?: Array;
+ /**
+ * Controls whether commits to preview branches trigger a preview deployment.
+ */
preview_deployment_setting?: 'all' | 'none' | 'custom';
+ /**
+ * The production branch of the repository.
+ */
production_branch?: string;
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
production_deployments_enabled?: boolean;
+ /**
+ * The name of the repository.
+ */
repo_name?: string;
}
}
@@ -391,17 +444,27 @@ export namespace Deployment {
export interface Project {
/**
- * Id of the project.
+ * ID of the project.
*/
- id?: string;
+ id: string;
+
+ /**
+ * Name of the project.
+ */
+ name: string;
+
+ /**
+ * Production branch of the project. Used to identify production deployments.
+ */
+ production_branch: string;
/**
* Configs for the project build process.
*/
- build_config?: Project.BuildConfig;
+ build_config?: Project.BuildConfig | null;
/**
- * Most recent deployment to the repo.
+ * Most recent production deployment of the project.
*/
canonical_deployment?: Deployment | null;
@@ -413,7 +476,7 @@ export interface Project {
/**
* Configs for deployments in a project.
*/
- deployment_configs?: Project.DeploymentConfigs;
+ deployment_configs?: Project.DeploymentConfigs | null;
/**
* A list of associated custom domains for the project.
@@ -421,19 +484,29 @@ export interface Project {
domains?: Array;
/**
- * Most recent deployment to the repo.
+ * Framework the project is using.
+ */
+ framework?: string;
+
+ /**
+ * Version of the framework the project is using.
+ */
+ framework_version?: string;
+
+ /**
+ * Most recent deployment of the project.
*/
latest_deployment?: Deployment | null;
/**
- * Name of the project.
+ * Name of the preview script.
*/
- name?: string;
+ preview_script_name?: string;
/**
- * Production branch of the project. Used to identify production deployments.
+ * Name of the production script.
*/
- production_branch?: string;
+ production_script_name?: string;
source?: Project.Source;
@@ -441,6 +514,11 @@ export interface Project {
* The Cloudflare subdomain associated with the project.
*/
subdomain?: string;
+
+ /**
+ * Whether the project uses functions.
+ */
+ uses_functions?: boolean;
}
export namespace Project {
@@ -486,12 +564,12 @@ export namespace Project {
/**
* Configs for preview deploys.
*/
- preview?: DeploymentConfigs.Preview;
+ preview?: DeploymentConfigs.Preview | null;
/**
* Configs for production deploys.
*/
- production?: DeploymentConfigs.Production;
+ production?: DeploymentConfigs.Production | null;
}
export namespace DeploymentConfigs {
@@ -504,6 +582,11 @@ export namespace Project {
*/
ai_bindings?: { [key: string]: Preview.AIBindings | null } | null;
+ /**
+ * Whether to always use the latest compatibility date for Pages Functions.
+ */
+ always_use_latest_compatibility_date?: boolean;
+
/**
* Analytics Engine bindings used for Pages Functions.
*/
@@ -514,6 +597,11 @@ export namespace Project {
*/
browsers?: { [key: string]: Preview.Browsers | null } | null;
+ /**
+ * The major version of the build image to use for Pages Functions.
+ */
+ build_image_major_version?: number;
+
/**
* Compatibility date used for Pages Functions.
*/
@@ -522,7 +610,7 @@ export namespace Project {
/**
* Compatibility flags used for Pages Functions.
*/
- compatibility_flags?: Array;
+ compatibility_flags?: Array | null;
/**
* D1 databases used for Pages Functions.
@@ -539,7 +627,12 @@ export namespace Project {
*/
env_vars?: {
[key: string]: Preview.PagesPlainTextEnvVar | null | Preview.PagesSecretTextEnvVar | null;
- };
+ } | null;
+
+ /**
+ * Whether to fail open when the deployment config cannot be applied.
+ */
+ fail_open?: boolean;
/**
* Hyperdrive bindings used for Pages Functions.
@@ -551,6 +644,11 @@ export namespace Project {
*/
kv_namespaces?: { [key: string]: Preview.KVNamespaces | null } | null;
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Preview.Limits | null;
+
/**
* mTLS bindings used for Pages Functions.
*/
@@ -576,10 +674,20 @@ export namespace Project {
*/
services?: { [key: string]: Preview.Services | null } | null;
+ /**
+ * @deprecated All new projects now use the Standard usage model.
+ */
+ usage_model?: 'standard' | 'bundled' | 'unbound';
+
/**
* Vectorize bindings used for Pages Functions.
*/
vectorize_bindings?: { [key: string]: Preview.VectorizeBindings | null } | null;
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
}
export namespace Preview {
@@ -666,6 +774,16 @@ export namespace Project {
namespace_id?: string;
}
+ /**
+ * Limits for Pages Functions.
+ */
+ export interface Limits {
+ /**
+ * CPU time limit in milliseconds.
+ */
+ cpu_ms?: number;
+ }
+
/**
* mTLS binding.
*/
@@ -745,6 +863,11 @@ export namespace Project {
*/
ai_bindings?: { [key: string]: Production.AIBindings | null } | null;
+ /**
+ * Whether to always use the latest compatibility date for Pages Functions.
+ */
+ always_use_latest_compatibility_date?: boolean;
+
/**
* Analytics Engine bindings used for Pages Functions.
*/
@@ -755,6 +878,11 @@ export namespace Project {
*/
browsers?: { [key: string]: Production.Browsers | null } | null;
+ /**
+ * The major version of the build image to use for Pages Functions.
+ */
+ build_image_major_version?: number;
+
/**
* Compatibility date used for Pages Functions.
*/
@@ -763,7 +891,7 @@ export namespace Project {
/**
* Compatibility flags used for Pages Functions.
*/
- compatibility_flags?: Array;
+ compatibility_flags?: Array | null;
/**
* D1 databases used for Pages Functions.
@@ -780,7 +908,12 @@ export namespace Project {
*/
env_vars?: {
[key: string]: Production.PagesPlainTextEnvVar | null | Production.PagesSecretTextEnvVar | null;
- };
+ } | null;
+
+ /**
+ * Whether to fail open when the deployment config cannot be applied.
+ */
+ fail_open?: boolean;
/**
* Hyperdrive bindings used for Pages Functions.
@@ -792,6 +925,11 @@ export namespace Project {
*/
kv_namespaces?: { [key: string]: Production.KVNamespaces | null } | null;
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Production.Limits | null;
+
/**
* mTLS bindings used for Pages Functions.
*/
@@ -817,10 +955,20 @@ export namespace Project {
*/
services?: { [key: string]: Production.Services | null } | null;
+ /**
+ * @deprecated All new projects now use the Standard usage model.
+ */
+ usage_model?: 'standard' | 'bundled' | 'unbound';
+
/**
* Vectorize bindings used for Pages Functions.
*/
vectorize_bindings?: { [key: string]: Production.VectorizeBindings | null } | null;
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
}
export namespace Production {
@@ -907,6 +1055,16 @@ export namespace Project {
namespace_id?: string;
}
+ /**
+ * Limits for Pages Functions.
+ */
+ export interface Limits {
+ /**
+ * CPU time limit in milliseconds.
+ */
+ cpu_ms?: number;
+ }
+
/**
* mTLS binding.
*/
@@ -981,31 +1139,74 @@ export namespace Project {
export interface Source {
config?: Source.Config;
- type?: string;
+ /**
+ * The source control management provider.
+ */
+ type?: 'github' | 'gitlab';
}
export namespace Source {
export interface Config {
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
deployments_enabled?: boolean;
+ /**
+ * The owner of the repository.
+ */
owner?: string;
+ /**
+ * A list of paths that should be excluded from triggering a preview deployment.
+ * Wildcard syntax (`*`) is supported.
+ */
path_excludes?: Array;
+ /**
+ * A list of paths that should be watched to trigger a preview deployment. Wildcard
+ * syntax (`*`) is supported.
+ */
path_includes?: Array;
+ /**
+ * Whether to enable PR comments.
+ */
pr_comments_enabled?: boolean;
+ /**
+ * A list of branches that should not trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_excludes?: Array;
+ /**
+ * A list of branches that should trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_includes?: Array;
+ /**
+ * Controls whether commits to preview branches trigger a preview deployment.
+ */
preview_deployment_setting?: 'all' | 'none' | 'custom';
+ /**
+ * The production branch of the repository.
+ */
production_branch?: string;
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
production_deployments_enabled?: boolean;
+ /**
+ * The name of the repository.
+ */
repo_name?: string;
}
}
@@ -1047,25 +1248,25 @@ export interface ProjectCreateParams {
account_id: string;
/**
- * Body param: Configs for the project build process.
+ * Body param: Name of the project.
*/
- build_config?: ProjectCreateParams.BuildConfig;
+ name: string;
/**
- * Body param: Configs for deployments in a project.
+ * Body param: Production branch of the project. Used to identify production
+ * deployments.
*/
- deployment_configs?: ProjectCreateParams.DeploymentConfigs;
+ production_branch: string;
/**
- * Body param: Name of the project.
+ * Body param: Configs for the project build process.
*/
- name?: string;
+ build_config?: ProjectCreateParams.BuildConfig | null;
/**
- * Body param: Production branch of the project. Used to identify production
- * deployments.
+ * Body param: Configs for deployments in a project.
*/
- production_branch?: string;
+ deployment_configs?: ProjectCreateParams.DeploymentConfigs | null;
/**
* Body param:
@@ -1116,12 +1317,12 @@ export namespace ProjectCreateParams {
/**
* Configs for preview deploys.
*/
- preview?: DeploymentConfigs.Preview;
+ preview?: DeploymentConfigs.Preview | null;
/**
* Configs for production deploys.
*/
- production?: DeploymentConfigs.Production;
+ production?: DeploymentConfigs.Production | null;
}
export namespace DeploymentConfigs {
@@ -1134,6 +1335,11 @@ export namespace ProjectCreateParams {
*/
ai_bindings?: { [key: string]: Preview.AIBindings | null } | null;
+ /**
+ * Whether to always use the latest compatibility date for Pages Functions.
+ */
+ always_use_latest_compatibility_date?: boolean;
+
/**
* Analytics Engine bindings used for Pages Functions.
*/
@@ -1144,6 +1350,11 @@ export namespace ProjectCreateParams {
*/
browsers?: { [key: string]: Preview.Browsers | null } | null;
+ /**
+ * The major version of the build image to use for Pages Functions.
+ */
+ build_image_major_version?: number;
+
/**
* Compatibility date used for Pages Functions.
*/
@@ -1152,7 +1363,7 @@ export namespace ProjectCreateParams {
/**
* Compatibility flags used for Pages Functions.
*/
- compatibility_flags?: Array;
+ compatibility_flags?: Array | null;
/**
* D1 databases used for Pages Functions.
@@ -1169,7 +1380,12 @@ export namespace ProjectCreateParams {
*/
env_vars?: {
[key: string]: Preview.PagesPlainTextEnvVar | null | Preview.PagesSecretTextEnvVar | null;
- };
+ } | null;
+
+ /**
+ * Whether to fail open when the deployment config cannot be applied.
+ */
+ fail_open?: boolean;
/**
* Hyperdrive bindings used for Pages Functions.
@@ -1181,6 +1397,11 @@ export namespace ProjectCreateParams {
*/
kv_namespaces?: { [key: string]: Preview.KVNamespaces | null } | null;
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Preview.Limits | null;
+
/**
* mTLS bindings used for Pages Functions.
*/
@@ -1206,10 +1427,20 @@ export namespace ProjectCreateParams {
*/
services?: { [key: string]: Preview.Services | null } | null;
+ /**
+ * @deprecated All new projects now use the Standard usage model.
+ */
+ usage_model?: 'standard' | 'bundled' | 'unbound';
+
/**
* Vectorize bindings used for Pages Functions.
*/
vectorize_bindings?: { [key: string]: Preview.VectorizeBindings | null } | null;
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
}
export namespace Preview {
@@ -1296,6 +1527,16 @@ export namespace ProjectCreateParams {
namespace_id?: string;
}
+ /**
+ * Limits for Pages Functions.
+ */
+ export interface Limits {
+ /**
+ * CPU time limit in milliseconds.
+ */
+ cpu_ms?: number;
+ }
+
/**
* mTLS binding.
*/
@@ -1375,6 +1616,11 @@ export namespace ProjectCreateParams {
*/
ai_bindings?: { [key: string]: Production.AIBindings | null } | null;
+ /**
+ * Whether to always use the latest compatibility date for Pages Functions.
+ */
+ always_use_latest_compatibility_date?: boolean;
+
/**
* Analytics Engine bindings used for Pages Functions.
*/
@@ -1385,6 +1631,11 @@ export namespace ProjectCreateParams {
*/
browsers?: { [key: string]: Production.Browsers | null } | null;
+ /**
+ * The major version of the build image to use for Pages Functions.
+ */
+ build_image_major_version?: number;
+
/**
* Compatibility date used for Pages Functions.
*/
@@ -1393,7 +1644,7 @@ export namespace ProjectCreateParams {
/**
* Compatibility flags used for Pages Functions.
*/
- compatibility_flags?: Array;
+ compatibility_flags?: Array | null;
/**
* D1 databases used for Pages Functions.
@@ -1410,7 +1661,12 @@ export namespace ProjectCreateParams {
*/
env_vars?: {
[key: string]: Production.PagesPlainTextEnvVar | null | Production.PagesSecretTextEnvVar | null;
- };
+ } | null;
+
+ /**
+ * Whether to fail open when the deployment config cannot be applied.
+ */
+ fail_open?: boolean;
/**
* Hyperdrive bindings used for Pages Functions.
@@ -1422,6 +1678,11 @@ export namespace ProjectCreateParams {
*/
kv_namespaces?: { [key: string]: Production.KVNamespaces | null } | null;
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Production.Limits | null;
+
/**
* mTLS bindings used for Pages Functions.
*/
@@ -1447,10 +1708,20 @@ export namespace ProjectCreateParams {
*/
services?: { [key: string]: Production.Services | null } | null;
+ /**
+ * @deprecated All new projects now use the Standard usage model.
+ */
+ usage_model?: 'standard' | 'bundled' | 'unbound';
+
/**
* Vectorize bindings used for Pages Functions.
*/
vectorize_bindings?: { [key: string]: Production.VectorizeBindings | null } | null;
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
}
export namespace Production {
@@ -1537,6 +1808,16 @@ export namespace ProjectCreateParams {
namespace_id?: string;
}
+ /**
+ * Limits for Pages Functions.
+ */
+ export interface Limits {
+ /**
+ * CPU time limit in milliseconds.
+ */
+ cpu_ms?: number;
+ }
+
/**
* mTLS binding.
*/
@@ -1611,39 +1892,82 @@ export namespace ProjectCreateParams {
export interface Source {
config?: Source.Config;
- type?: string;
+ /**
+ * The source control management provider.
+ */
+ type?: 'github' | 'gitlab';
}
export namespace Source {
export interface Config {
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
deployments_enabled?: boolean;
+ /**
+ * The owner of the repository.
+ */
owner?: string;
+ /**
+ * A list of paths that should be excluded from triggering a preview deployment.
+ * Wildcard syntax (`*`) is supported.
+ */
path_excludes?: Array;
+ /**
+ * A list of paths that should be watched to trigger a preview deployment. Wildcard
+ * syntax (`*`) is supported.
+ */
path_includes?: Array;
+ /**
+ * Whether to enable PR comments.
+ */
pr_comments_enabled?: boolean;
+ /**
+ * A list of branches that should not trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_excludes?: Array;
+ /**
+ * A list of branches that should trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_includes?: Array;
+ /**
+ * Controls whether commits to preview branches trigger a preview deployment.
+ */
preview_deployment_setting?: 'all' | 'none' | 'custom';
+ /**
+ * The production branch of the repository.
+ */
production_branch?: string;
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
production_deployments_enabled?: boolean;
+ /**
+ * The name of the repository.
+ */
repo_name?: string;
}
}
}
-export interface ProjectListParams {
+export interface ProjectListParams extends V4PagePaginationArrayParams {
/**
- * Identifier
+ * Path param: Identifier
*/
account_id: string;
}
@@ -1662,25 +1986,25 @@ export interface ProjectEditParams {
account_id: string;
/**
- * Body param: Configs for the project build process.
+ * Body param: Name of the project.
*/
- build_config?: ProjectEditParams.BuildConfig;
+ name: string;
/**
- * Body param: Configs for deployments in a project.
+ * Body param: Production branch of the project. Used to identify production
+ * deployments.
*/
- deployment_configs?: ProjectEditParams.DeploymentConfigs;
+ production_branch: string;
/**
- * Body param: Name of the project.
+ * Body param: Configs for the project build process.
*/
- name?: string;
+ build_config?: ProjectEditParams.BuildConfig | null;
/**
- * Body param: Production branch of the project. Used to identify production
- * deployments.
+ * Body param: Configs for deployments in a project.
*/
- production_branch?: string;
+ deployment_configs?: ProjectEditParams.DeploymentConfigs | null;
/**
* Body param:
@@ -1731,12 +2055,12 @@ export namespace ProjectEditParams {
/**
* Configs for preview deploys.
*/
- preview?: DeploymentConfigs.Preview;
+ preview?: DeploymentConfigs.Preview | null;
/**
* Configs for production deploys.
*/
- production?: DeploymentConfigs.Production;
+ production?: DeploymentConfigs.Production | null;
}
export namespace DeploymentConfigs {
@@ -1749,6 +2073,11 @@ export namespace ProjectEditParams {
*/
ai_bindings?: { [key: string]: Preview.AIBindings | null } | null;
+ /**
+ * Whether to always use the latest compatibility date for Pages Functions.
+ */
+ always_use_latest_compatibility_date?: boolean;
+
/**
* Analytics Engine bindings used for Pages Functions.
*/
@@ -1759,6 +2088,11 @@ export namespace ProjectEditParams {
*/
browsers?: { [key: string]: Preview.Browsers | null } | null;
+ /**
+ * The major version of the build image to use for Pages Functions.
+ */
+ build_image_major_version?: number;
+
/**
* Compatibility date used for Pages Functions.
*/
@@ -1767,7 +2101,7 @@ export namespace ProjectEditParams {
/**
* Compatibility flags used for Pages Functions.
*/
- compatibility_flags?: Array;
+ compatibility_flags?: Array | null;
/**
* D1 databases used for Pages Functions.
@@ -1784,7 +2118,12 @@ export namespace ProjectEditParams {
*/
env_vars?: {
[key: string]: Preview.PagesPlainTextEnvVar | null | Preview.PagesSecretTextEnvVar | null;
- };
+ } | null;
+
+ /**
+ * Whether to fail open when the deployment config cannot be applied.
+ */
+ fail_open?: boolean;
/**
* Hyperdrive bindings used for Pages Functions.
@@ -1796,6 +2135,11 @@ export namespace ProjectEditParams {
*/
kv_namespaces?: { [key: string]: Preview.KVNamespaces | null } | null;
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Preview.Limits | null;
+
/**
* mTLS bindings used for Pages Functions.
*/
@@ -1821,10 +2165,20 @@ export namespace ProjectEditParams {
*/
services?: { [key: string]: Preview.Services | null } | null;
+ /**
+ * @deprecated All new projects now use the Standard usage model.
+ */
+ usage_model?: 'standard' | 'bundled' | 'unbound';
+
/**
* Vectorize bindings used for Pages Functions.
*/
vectorize_bindings?: { [key: string]: Preview.VectorizeBindings | null } | null;
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
}
export namespace Preview {
@@ -1911,6 +2265,16 @@ export namespace ProjectEditParams {
namespace_id?: string;
}
+ /**
+ * Limits for Pages Functions.
+ */
+ export interface Limits {
+ /**
+ * CPU time limit in milliseconds.
+ */
+ cpu_ms?: number;
+ }
+
/**
* mTLS binding.
*/
@@ -1990,6 +2354,11 @@ export namespace ProjectEditParams {
*/
ai_bindings?: { [key: string]: Production.AIBindings | null } | null;
+ /**
+ * Whether to always use the latest compatibility date for Pages Functions.
+ */
+ always_use_latest_compatibility_date?: boolean;
+
/**
* Analytics Engine bindings used for Pages Functions.
*/
@@ -2000,6 +2369,11 @@ export namespace ProjectEditParams {
*/
browsers?: { [key: string]: Production.Browsers | null } | null;
+ /**
+ * The major version of the build image to use for Pages Functions.
+ */
+ build_image_major_version?: number;
+
/**
* Compatibility date used for Pages Functions.
*/
@@ -2008,7 +2382,7 @@ export namespace ProjectEditParams {
/**
* Compatibility flags used for Pages Functions.
*/
- compatibility_flags?: Array;
+ compatibility_flags?: Array | null;
/**
* D1 databases used for Pages Functions.
@@ -2025,7 +2399,12 @@ export namespace ProjectEditParams {
*/
env_vars?: {
[key: string]: Production.PagesPlainTextEnvVar | null | Production.PagesSecretTextEnvVar | null;
- };
+ } | null;
+
+ /**
+ * Whether to fail open when the deployment config cannot be applied.
+ */
+ fail_open?: boolean;
/**
* Hyperdrive bindings used for Pages Functions.
@@ -2037,6 +2416,11 @@ export namespace ProjectEditParams {
*/
kv_namespaces?: { [key: string]: Production.KVNamespaces | null } | null;
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Production.Limits | null;
+
/**
* mTLS bindings used for Pages Functions.
*/
@@ -2062,10 +2446,20 @@ export namespace ProjectEditParams {
*/
services?: { [key: string]: Production.Services | null } | null;
+ /**
+ * @deprecated All new projects now use the Standard usage model.
+ */
+ usage_model?: 'standard' | 'bundled' | 'unbound';
+
/**
* Vectorize bindings used for Pages Functions.
*/
vectorize_bindings?: { [key: string]: Production.VectorizeBindings | null } | null;
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
}
export namespace Production {
@@ -2152,6 +2546,16 @@ export namespace ProjectEditParams {
namespace_id?: string;
}
+ /**
+ * Limits for Pages Functions.
+ */
+ export interface Limits {
+ /**
+ * CPU time limit in milliseconds.
+ */
+ cpu_ms?: number;
+ }
+
/**
* mTLS binding.
*/
@@ -2226,31 +2630,74 @@ export namespace ProjectEditParams {
export interface Source {
config?: Source.Config;
- type?: string;
+ /**
+ * The source control management provider.
+ */
+ type?: 'github' | 'gitlab';
}
export namespace Source {
export interface Config {
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
deployments_enabled?: boolean;
+ /**
+ * The owner of the repository.
+ */
owner?: string;
+ /**
+ * A list of paths that should be excluded from triggering a preview deployment.
+ * Wildcard syntax (`*`) is supported.
+ */
path_excludes?: Array;
+ /**
+ * A list of paths that should be watched to trigger a preview deployment. Wildcard
+ * syntax (`*`) is supported.
+ */
path_includes?: Array;
+ /**
+ * Whether to enable PR comments.
+ */
pr_comments_enabled?: boolean;
+ /**
+ * A list of branches that should not trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_excludes?: Array;
+ /**
+ * A list of branches that should trigger a preview deployment. Wildcard syntax
+ * (`*`) is supported. Must be used with `preview_deployment_setting` set to
+ * `custom`.
+ */
preview_branch_includes?: Array;
+ /**
+ * Controls whether commits to preview branches trigger a preview deployment.
+ */
preview_deployment_setting?: 'all' | 'none' | 'custom';
+ /**
+ * The production branch of the repository.
+ */
production_branch?: string;
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
production_deployments_enabled?: boolean;
+ /**
+ * The name of the repository.
+ */
repo_name?: string;
}
}
@@ -2270,7 +2717,7 @@ export interface ProjectPurgeBuildCacheParams {
account_id: string;
}
-Projects.DeploymentsSinglePage = DeploymentsSinglePage;
+Projects.DeploymentsV4PagePaginationArray = DeploymentsV4PagePaginationArray;
Projects.Deployments = Deployments;
Projects.Domains = Domains;
Projects.DomainListResponsesSinglePage = DomainListResponsesSinglePage;
@@ -2282,7 +2729,7 @@ export declare namespace Projects {
type Stage as Stage,
type ProjectDeleteResponse as ProjectDeleteResponse,
type ProjectPurgeBuildCacheResponse as ProjectPurgeBuildCacheResponse,
- DeploymentsSinglePage as DeploymentsSinglePage,
+ DeploymentsV4PagePaginationArray as DeploymentsV4PagePaginationArray,
type ProjectCreateParams as ProjectCreateParams,
type ProjectListParams as ProjectListParams,
type ProjectDeleteParams as ProjectDeleteParams,
diff --git a/src/resources/pipelines.ts b/src/resources/pipelines.ts
index 02e40368e4..cfc4b0add9 100644
--- a/src/resources/pipelines.ts
+++ b/src/resources/pipelines.ts
@@ -5,29 +5,10 @@ import * as Core from '../core';
export class Pipelines extends APIResource {
/**
- * Create a new pipeline.
+ * [DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint
+ * instead.
*
- * @example
- * ```ts
- * const pipeline = await client.pipelines.create({
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * destination: {
- * batch: {},
- * compression: {},
- * credentials: {
- * access_key_id: '',
- * endpoint:
- * 'https://123f8a8258064ed892a347f173372359.r2.cloudflarestorage.com',
- * secret_access_key: '',
- * },
- * format: 'json',
- * path: { bucket: 'bucket' },
- * type: 'r2',
- * },
- * name: 'sample_pipeline',
- * source: [{ format: 'json', type: 'type' }],
- * });
- * ```
+ * @deprecated
*/
create(
params: PipelineCreateParams,
@@ -42,26 +23,10 @@ export class Pipelines extends APIResource {
}
/**
- * Update an existing pipeline.
+ * [DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines
+ * endpoint instead.
*
- * @example
- * ```ts
- * const pipeline = await client.pipelines.update(
- * 'sample_pipeline',
- * {
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * destination: {
- * batch: {},
- * compression: {},
- * format: 'json',
- * path: { bucket: 'bucket' },
- * type: 'r2',
- * },
- * name: 'sample_pipeline',
- * source: [{ format: 'json', type: 'type' }],
- * },
- * );
- * ```
+ * @deprecated
*/
update(
pipelineName: string,
@@ -78,14 +43,10 @@ export class Pipelines extends APIResource {
}
/**
- * List, filter, and paginate pipelines in an account.
+ * [DEPRECATED] List, filter, and paginate pipelines in an account. Use the new
+ * /pipelines/v1/pipelines endpoint instead.
*
- * @example
- * ```ts
- * const pipelines = await client.pipelines.list({
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * });
- * ```
+ * @deprecated
*/
list(params: PipelineListParams, options?: Core.RequestOptions): Core.APIPromise {
const { account_id, ...query } = params;
@@ -93,14 +54,10 @@ export class Pipelines extends APIResource {
}
/**
- * Delete a pipeline.
+ * [DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint
+ * instead.
*
- * @example
- * ```ts
- * await client.pipelines.delete('sample_pipeline', {
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * });
- * ```
+ * @deprecated
*/
delete(
pipelineName: string,
@@ -115,15 +72,10 @@ export class Pipelines extends APIResource {
}
/**
- * Get configuration of a pipeline.
+ * [DEPRECATED] Get configuration of a pipeline. Use the new
+ * /pipelines/v1/pipelines endpoint instead.
*
- * @example
- * ```ts
- * const pipeline = await client.pipelines.get(
- * 'sample_pipeline',
- * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
- * );
- * ```
+ * @deprecated
*/
get(
pipelineName: string,
@@ -140,7 +92,8 @@ export class Pipelines extends APIResource {
}
/**
- * Describes the configuration of a pipeline.
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
*/
export interface PipelineCreateResponse {
/**
@@ -238,6 +191,10 @@ export namespace PipelineCreateResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
/**
* Specifies the format of source data.
@@ -263,6 +220,10 @@ export namespace PipelineCreateResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesBindingSource {
/**
* Specifies the format of source data.
@@ -274,7 +235,8 @@ export namespace PipelineCreateResponse {
}
/**
- * Describes the configuration of a pipeline.
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
*/
export interface PipelineUpdateResponse {
/**
@@ -372,6 +334,10 @@ export namespace PipelineUpdateResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
/**
* Specifies the format of source data.
@@ -397,6 +363,10 @@ export namespace PipelineUpdateResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesBindingSource {
/**
* Specifies the format of source data.
@@ -442,7 +412,8 @@ export namespace PipelineListResponse {
}
/**
- * Describes the configuration of a pipeline.
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
*/
export interface Result {
/**
@@ -540,6 +511,10 @@ export namespace PipelineListResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
/**
* Specifies the format of source data.
@@ -565,6 +540,10 @@ export namespace PipelineListResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesBindingSource {
/**
* Specifies the format of source data.
@@ -577,7 +556,8 @@ export namespace PipelineListResponse {
}
/**
- * Describes the configuration of a pipeline.
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
*/
export interface PipelineGetResponse {
/**
@@ -675,6 +655,10 @@ export namespace PipelineGetResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
/**
* Specifies the format of source data.
@@ -700,6 +684,10 @@ export namespace PipelineGetResponse {
}
}
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesBindingSource {
/**
* Specifies the format of source data.
@@ -821,6 +809,10 @@ export namespace PipelineCreateParams {
}
}
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
/**
* Specifies the format of source data.
@@ -846,6 +838,10 @@ export namespace PipelineCreateParams {
}
}
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesBindingSource {
/**
* Specifies the format of source data.
@@ -967,6 +963,10 @@ export namespace PipelineUpdateParams {
}
}
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
/**
* Specifies the format of source data.
@@ -992,6 +992,10 @@ export namespace PipelineUpdateParams {
}
}
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
export interface CloudflarePipelinesWorkersPipelinesBindingSource {
/**
* Specifies the format of source data.
diff --git a/src/resources/queues/index.ts b/src/resources/queues/index.ts
index ebf2923861..ab15d31aa7 100644
--- a/src/resources/queues/index.ts
+++ b/src/resources/queues/index.ts
@@ -31,8 +31,10 @@ export {
type SubscriptionUpdateResponse,
type SubscriptionListResponse,
type SubscriptionDeleteResponse,
+ type SubscriptionGetResponse,
type SubscriptionCreateParams,
type SubscriptionUpdateParams,
type SubscriptionListParams,
type SubscriptionDeleteParams,
+ type SubscriptionGetParams,
} from './subscriptions';
diff --git a/src/resources/queues/queues.ts b/src/resources/queues/queues.ts
index 667ab7a44a..836f42bd41 100644
--- a/src/resources/queues/queues.ts
+++ b/src/resources/queues/queues.ts
@@ -35,6 +35,8 @@ import {
SubscriptionCreateResponse,
SubscriptionDeleteParams,
SubscriptionDeleteResponse,
+ SubscriptionGetParams,
+ SubscriptionGetResponse,
SubscriptionListParams,
SubscriptionListResponse,
SubscriptionListResponsesV4PagePaginationArray,
@@ -399,10 +401,12 @@ export declare namespace Queues {
type SubscriptionUpdateResponse as SubscriptionUpdateResponse,
type SubscriptionListResponse as SubscriptionListResponse,
type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
+ type SubscriptionGetResponse as SubscriptionGetResponse,
SubscriptionListResponsesV4PagePaginationArray as SubscriptionListResponsesV4PagePaginationArray,
type SubscriptionCreateParams as SubscriptionCreateParams,
type SubscriptionUpdateParams as SubscriptionUpdateParams,
type SubscriptionListParams as SubscriptionListParams,
type SubscriptionDeleteParams as SubscriptionDeleteParams,
+ type SubscriptionGetParams as SubscriptionGetParams,
};
}
diff --git a/src/resources/queues/subscriptions.ts b/src/resources/queues/subscriptions.ts
index 3bb405e3fc..74c9b0e81f 100644
--- a/src/resources/queues/subscriptions.ts
+++ b/src/resources/queues/subscriptions.ts
@@ -105,6 +105,31 @@ export class Subscriptions extends APIResource {
) as Core.APIPromise<{ result: SubscriptionDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * Get details about an existing event subscription
+ *
+ * @example
+ * ```ts
+ * const subscription = await client.queues.subscriptions.get(
+ * '023e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ get(
+ subscriptionId: string,
+ params: SubscriptionGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/event_subscriptions/subscriptions/${subscriptionId}`,
+ options,
+ ) as Core.APIPromise<{ result: SubscriptionGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
}
export class SubscriptionListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
@@ -661,6 +686,144 @@ export namespace SubscriptionDeleteResponse {
}
}
+export interface SubscriptionGetResponse {
+ /**
+ * Unique identifier for the subscription
+ */
+ id: string;
+
+ /**
+ * When the subscription was created
+ */
+ created_at: string;
+
+ /**
+ * Destination configuration for the subscription
+ */
+ destination: SubscriptionGetResponse.Destination;
+
+ /**
+ * Whether the subscription is active
+ */
+ enabled: boolean;
+
+ /**
+ * List of event types this subscription handles
+ */
+ events: Array;
+
+ /**
+ * When the subscription was last modified
+ */
+ modified_at: string;
+
+ /**
+ * Name of the subscription
+ */
+ name: string;
+
+ /**
+ * Source configuration for the subscription
+ */
+ source:
+ | SubscriptionGetResponse.MqEventSourceImages
+ | SubscriptionGetResponse.MqEventSourceKV
+ | SubscriptionGetResponse.MqEventSourceR2
+ | SubscriptionGetResponse.MqEventSourceSuperSlurper
+ | SubscriptionGetResponse.MqEventSourceVectorize
+ | SubscriptionGetResponse.MqEventSourceWorkersAIModel
+ | SubscriptionGetResponse.MqEventSourceWorkersBuildsWorker
+ | SubscriptionGetResponse.MqEventSourceWorkflowsWorkflow;
+}
+
+export namespace SubscriptionGetResponse {
+ /**
+ * Destination configuration for the subscription
+ */
+ export interface Destination {
+ /**
+ * ID of the target queue
+ */
+ queue_id: string;
+
+ /**
+ * Type of destination
+ */
+ type: 'queues.queue';
+ }
+
+ export interface MqEventSourceImages {
+ /**
+ * Type of source
+ */
+ type?: 'images';
+ }
+
+ export interface MqEventSourceKV {
+ /**
+ * Type of source
+ */
+ type?: 'kv';
+ }
+
+ export interface MqEventSourceR2 {
+ /**
+ * Type of source
+ */
+ type?: 'r2';
+ }
+
+ export interface MqEventSourceSuperSlurper {
+ /**
+ * Type of source
+ */
+ type?: 'superSlurper';
+ }
+
+ export interface MqEventSourceVectorize {
+ /**
+ * Type of source
+ */
+ type?: 'vectorize';
+ }
+
+ export interface MqEventSourceWorkersAIModel {
+ /**
+ * Name of the Workers AI model
+ */
+ model_name?: string;
+
+ /**
+ * Type of source
+ */
+ type?: 'workersAi.model';
+ }
+
+ export interface MqEventSourceWorkersBuildsWorker {
+ /**
+ * Type of source
+ */
+ type?: 'workersBuilds.worker';
+
+ /**
+ * Name of the worker
+ */
+ worker_name?: string;
+ }
+
+ export interface MqEventSourceWorkflowsWorkflow {
+ /**
+ * Type of source
+ */
+ type?: 'workflows.workflow';
+
+ /**
+ * Name of the workflow
+ */
+ workflow_name?: string;
+ }
+}
+
export interface SubscriptionCreateParams {
/**
* Path param: A Resource identifier.
@@ -857,6 +1020,13 @@ export interface SubscriptionDeleteParams {
account_id: string;
}
+export interface SubscriptionGetParams {
+ /**
+ * A Resource identifier.
+ */
+ account_id: string;
+}
+
Subscriptions.SubscriptionListResponsesV4PagePaginationArray = SubscriptionListResponsesV4PagePaginationArray;
export declare namespace Subscriptions {
@@ -865,10 +1035,12 @@ export declare namespace Subscriptions {
type SubscriptionUpdateResponse as SubscriptionUpdateResponse,
type SubscriptionListResponse as SubscriptionListResponse,
type SubscriptionDeleteResponse as SubscriptionDeleteResponse,
+ type SubscriptionGetResponse as SubscriptionGetResponse,
SubscriptionListResponsesV4PagePaginationArray as SubscriptionListResponsesV4PagePaginationArray,
type SubscriptionCreateParams as SubscriptionCreateParams,
type SubscriptionUpdateParams as SubscriptionUpdateParams,
type SubscriptionListParams as SubscriptionListParams,
type SubscriptionDeleteParams as SubscriptionDeleteParams,
+ type SubscriptionGetParams as SubscriptionGetParams,
};
}
diff --git a/src/resources/r2/buckets/event-notifications.ts b/src/resources/r2/buckets/event-notifications.ts
index cb0ba791f0..b3f163f204 100644
--- a/src/resources/r2/buckets/event-notifications.ts
+++ b/src/resources/r2/buckets/event-notifications.ts
@@ -13,7 +13,10 @@ export class EventNotifications extends APIResource {
* await client.r2.buckets.eventNotifications.update(
* 'example-bucket',
* 'queue_id',
- * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * {
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * rules: [{ actions: ['PutObject', 'CopyObject'] }],
+ * },
* );
* ```
*/
@@ -275,7 +278,7 @@ export interface EventNotificationUpdateParams {
/**
* Body param: Array of rules to drive notifications.
*/
- rules?: Array;
+ rules: Array;
/**
* Header param: Jurisdiction where objects in this bucket are guaranteed to be
diff --git a/src/resources/r2/super-slurper/connectivity-precheck.ts b/src/resources/r2/super-slurper/connectivity-precheck.ts
index 654a8193d5..2283824388 100644
--- a/src/resources/r2/super-slurper/connectivity-precheck.ts
+++ b/src/resources/r2/super-slurper/connectivity-precheck.ts
@@ -13,6 +13,12 @@ export class ConnectivityPrecheck extends APIResource {
* const response =
* await client.r2.superSlurper.connectivityPrecheck.source({
* account_id: 'account_id',
+ * bucket: 'bucket',
+ * secret: {
+ * accessKeyId: 'accessKeyId',
+ * secretAccessKey: 'secretAccessKey',
+ * },
+ * vendor: 's3',
* });
* ```
*/
@@ -37,6 +43,12 @@ export class ConnectivityPrecheck extends APIResource {
* const response =
* await client.r2.superSlurper.connectivityPrecheck.target({
* account_id: 'account_id',
+ * bucket: 'bucket',
+ * secret: {
+ * accessKeyId: 'accessKeyId',
+ * secretAccessKey: 'secretAccessKey',
+ * },
+ * vendor: 'r2',
* });
* ```
*/
@@ -77,7 +89,17 @@ export declare namespace ConnectivityPrecheckSourceParams {
/**
* Body param:
*/
- bucket?: string;
+ bucket: string;
+
+ /**
+ * Body param:
+ */
+ secret: R2SlurperS3SourceSchema.Secret;
+
+ /**
+ * Body param:
+ */
+ vendor: 's3';
/**
* Body param:
@@ -87,19 +109,19 @@ export declare namespace ConnectivityPrecheckSourceParams {
/**
* Body param:
*/
- secret?: R2SlurperS3SourceSchema.Secret;
+ pathPrefix?: string | null;
/**
* Body param:
*/
- vendor?: 's3';
+ region?: string | null;
}
export namespace R2SlurperS3SourceSchema {
export interface Secret {
- accessKeyId?: string;
+ accessKeyId: string;
- secretAccessKey?: string;
+ secretAccessKey: string;
}
}
@@ -112,24 +134,29 @@ export declare namespace ConnectivityPrecheckSourceParams {
/**
* Body param:
*/
- bucket?: string;
+ bucket: string;
+
+ /**
+ * Body param:
+ */
+ secret: R2SlurperGcsSourceSchema.Secret;
/**
* Body param:
*/
- secret?: R2SlurperGcsSourceSchema.Secret;
+ vendor: 'gcs';
/**
* Body param:
*/
- vendor?: 'gcs';
+ pathPrefix?: string | null;
}
export namespace R2SlurperGcsSourceSchema {
export interface Secret {
- clientEmail?: string;
+ clientEmail: string;
- privateKey?: string;
+ privateKey: string;
}
}
@@ -142,29 +169,34 @@ export declare namespace ConnectivityPrecheckSourceParams {
/**
* Body param:
*/
- bucket?: string;
+ bucket: string;
/**
* Body param:
*/
- jurisdiction?: 'default' | 'eu' | 'fedramp';
+ secret: R2SlurperR2SourceSchema.Secret;
+
+ /**
+ * Body param:
+ */
+ vendor: SippyAPI.ProviderParam;
/**
* Body param:
*/
- secret?: R2SlurperR2SourceSchema.Secret;
+ jurisdiction?: 'default' | 'eu' | 'fedramp';
/**
* Body param:
*/
- vendor?: SippyAPI.ProviderParam;
+ pathPrefix?: string | null;
}
export namespace R2SlurperR2SourceSchema {
export interface Secret {
- accessKeyId?: string;
+ accessKeyId: string;
- secretAccessKey?: string;
+ secretAccessKey: string;
}
}
}
@@ -178,29 +210,29 @@ export interface ConnectivityPrecheckTargetParams {
/**
* Body param:
*/
- bucket?: string;
+ bucket: string;
/**
* Body param:
*/
- jurisdiction?: 'default' | 'eu' | 'fedramp';
+ secret: ConnectivityPrecheckTargetParams.Secret;
/**
* Body param:
*/
- secret?: ConnectivityPrecheckTargetParams.Secret;
+ vendor: SippyAPI.ProviderParam;
/**
* Body param:
*/
- vendor?: SippyAPI.ProviderParam;
+ jurisdiction?: 'default' | 'eu' | 'fedramp';
}
export namespace ConnectivityPrecheckTargetParams {
export interface Secret {
- accessKeyId?: string;
+ accessKeyId: string;
- secretAccessKey?: string;
+ secretAccessKey: string;
}
}
diff --git a/src/resources/r2/super-slurper/jobs/jobs.ts b/src/resources/r2/super-slurper/jobs/jobs.ts
index 0e70bb10e5..7732e944b1 100644
--- a/src/resources/r2/super-slurper/jobs/jobs.ts
+++ b/src/resources/r2/super-slurper/jobs/jobs.ts
@@ -360,72 +360,80 @@ export interface JobCreateParams {
export namespace JobCreateParams {
export interface R2SlurperS3SourceSchema {
- bucket?: string;
+ bucket: string;
+
+ secret: R2SlurperS3SourceSchema.Secret;
+
+ vendor: 's3';
endpoint?: string | null;
- secret?: R2SlurperS3SourceSchema.Secret;
+ pathPrefix?: string | null;
- vendor?: 's3';
+ region?: string | null;
}
export namespace R2SlurperS3SourceSchema {
export interface Secret {
- accessKeyId?: string;
+ accessKeyId: string;
- secretAccessKey?: string;
+ secretAccessKey: string;
}
}
export interface R2SlurperGcsSourceSchema {
- bucket?: string;
+ bucket: string;
- secret?: R2SlurperGcsSourceSchema.Secret;
+ secret: R2SlurperGcsSourceSchema.Secret;
- vendor?: 'gcs';
+ vendor: 'gcs';
+
+ pathPrefix?: string | null;
}
export namespace R2SlurperGcsSourceSchema {
export interface Secret {
- clientEmail?: string;
+ clientEmail: string;
- privateKey?: string;
+ privateKey: string;
}
}
export interface R2SlurperR2SourceSchema {
- bucket?: string;
+ bucket: string;
- jurisdiction?: 'default' | 'eu' | 'fedramp';
+ secret: R2SlurperR2SourceSchema.Secret;
- secret?: R2SlurperR2SourceSchema.Secret;
+ vendor: SippyAPI.ProviderParam;
+
+ jurisdiction?: 'default' | 'eu' | 'fedramp';
- vendor?: SippyAPI.ProviderParam;
+ pathPrefix?: string | null;
}
export namespace R2SlurperR2SourceSchema {
export interface Secret {
- accessKeyId?: string;
+ accessKeyId: string;
- secretAccessKey?: string;
+ secretAccessKey: string;
}
}
export interface Target {
- bucket?: string;
+ bucket: string;
- jurisdiction?: 'default' | 'eu' | 'fedramp';
+ secret: Target.Secret;
- secret?: Target.Secret;
+ vendor: SippyAPI.ProviderParam;
- vendor?: SippyAPI.ProviderParam;
+ jurisdiction?: 'default' | 'eu' | 'fedramp';
}
export namespace Target {
export interface Secret {
- accessKeyId?: string;
+ accessKeyId: string;
- secretAccessKey?: string;
+ secretAccessKey: string;
}
}
}
diff --git a/src/resources/radar/ai/ai.ts b/src/resources/radar/ai/ai.ts
index c4830c1214..b9f3118f5f 100755
--- a/src/resources/radar/ai/ai.ts
+++ b/src/resources/radar/ai/ai.ts
@@ -21,9 +21,23 @@ import {
ToMarkdownCreateResponsesSinglePage,
} from './to-markdown';
import * as BotsAPI from './bots/bots';
-import { Bots } from './bots/bots';
+import {
+ BotSummaryV2Params,
+ BotSummaryV2Response,
+ BotTimeseriesGroupsParams,
+ BotTimeseriesGroupsResponse,
+ BotTimeseriesParams,
+ BotTimeseriesResponse,
+ Bots,
+} from './bots/bots';
import * as InferenceAPI from './inference/inference';
-import { Inference } from './inference/inference';
+import {
+ Inference,
+ InferenceSummaryV2Params,
+ InferenceSummaryV2Response,
+ InferenceTimeseriesGroupsV2Params,
+ InferenceTimeseriesGroupsV2Response,
+} from './inference/inference';
export class AI extends APIResource {
toMarkdown: ToMarkdownAPI.ToMarkdown = new ToMarkdownAPI.ToMarkdown(this._client);
@@ -48,9 +62,23 @@ export declare namespace AI {
type ToMarkdownCreateParams as ToMarkdownCreateParams,
};
- export { Inference as Inference };
+ export {
+ Inference as Inference,
+ type InferenceSummaryV2Response as InferenceSummaryV2Response,
+ type InferenceTimeseriesGroupsV2Response as InferenceTimeseriesGroupsV2Response,
+ type InferenceSummaryV2Params as InferenceSummaryV2Params,
+ type InferenceTimeseriesGroupsV2Params as InferenceTimeseriesGroupsV2Params,
+ };
- export { Bots as Bots };
+ export {
+ Bots as Bots,
+ type BotSummaryV2Response as BotSummaryV2Response,
+ type BotTimeseriesResponse as BotTimeseriesResponse,
+ type BotTimeseriesGroupsResponse as BotTimeseriesGroupsResponse,
+ type BotSummaryV2Params as BotSummaryV2Params,
+ type BotTimeseriesParams as BotTimeseriesParams,
+ type BotTimeseriesGroupsParams as BotTimeseriesGroupsParams,
+ };
export {
TimeseriesGroups as TimeseriesGroups,
diff --git a/src/resources/radar/ai/bots/bots.ts b/src/resources/radar/ai/bots/bots.ts
index 865665cba6..6529350fe7 100644
--- a/src/resources/radar/ai/bots/bots.ts
+++ b/src/resources/radar/ai/bots/bots.ts
@@ -1,16 +1,688 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../../../resource';
+import { isRequestOptions } from '../../../../core';
+import * as Core from '../../../../core';
import * as SummaryAPI from './summary';
import { Summary, SummaryUserAgentParams, SummaryUserAgentResponse } from './summary';
export class Bots extends APIResource {
summary: SummaryAPI.Summary = new SummaryAPI.Summary(this._client);
+
+ /**
+ * Retrieves an aggregated summary of AI bots HTTP requests grouped by the
+ * specified dimension.
+ *
+ * @example
+ * ```ts
+ * const response = await client.radar.ai.bots.summaryV2(
+ * 'USER_AGENT',
+ * );
+ * ```
+ */
+ summaryV2(
+ dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
+ query?: BotSummaryV2Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ summaryV2(
+ dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ summaryV2(
+ dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
+ query: BotSummaryV2Params | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.summaryV2(dimension, {}, query);
+ }
+ return (
+ this._client.get(`/radar/ai/bots/summary/${dimension}`, { query, ...options }) as Core.APIPromise<{
+ result: BotSummaryV2Response;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Retrieves AI bots HTTP request volume over time.
+ *
+ * @example
+ * ```ts
+ * const response = await client.radar.ai.bots.timeseries();
+ * ```
+ */
+ timeseries(
+ query?: BotTimeseriesParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ timeseries(options?: Core.RequestOptions): Core.APIPromise;
+ timeseries(
+ query: BotTimeseriesParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.timeseries({}, query);
+ }
+ return (
+ this._client.get('/radar/ai/bots/timeseries', { query, ...options }) as Core.APIPromise<{
+ result: BotTimeseriesResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Retrieves the distribution of HTTP requests from AI bots, grouped by chosen the
+ * specified dimension over time.
+ *
+ * @example
+ * ```ts
+ * const response =
+ * await client.radar.ai.bots.timeseriesGroups('USER_AGENT');
+ * ```
+ */
+ timeseriesGroups(
+ dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
+ query?: BotTimeseriesGroupsParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ timeseriesGroups(
+ dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ timeseriesGroups(
+ dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
+ query: BotTimeseriesGroupsParams | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.timeseriesGroups(dimension, {}, query);
+ }
+ return (
+ this._client.get(`/radar/ai/bots/timeseries_groups/${dimension}`, {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: BotTimeseriesGroupsResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface BotSummaryV2Response {
+ /**
+ * Metadata for the results.
+ */
+ meta: BotSummaryV2Response.Meta;
+
+ summary_0: { [key: string]: string };
+}
+
+export namespace BotSummaryV2Response {
+ /**
+ * Metadata for the results.
+ */
+ export interface Meta {
+ confidenceInfo: Meta.ConfidenceInfo;
+
+ dateRange: Array;
+
+ /**
+ * Timestamp of the last dataset update.
+ */
+ lastUpdated: string;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization:
+ | 'PERCENTAGE'
+ | 'MIN0_MAX'
+ | 'MIN_MAX'
+ | 'RAW_VALUES'
+ | 'PERCENTAGE_CHANGE'
+ | 'ROLLING_AVERAGE'
+ | 'OVERLAPPED_PERCENTAGE'
+ | 'RATIO';
+
+ /**
+ * Measurement units for the results.
+ */
+ units: Array;
+ }
+
+ export namespace Meta {
+ export interface ConfidenceInfo {
+ annotations: Array;
+
+ /**
+ * Provides an indication of how much confidence Cloudflare has in the data.
+ */
+ level: number;
+ }
+
+ export namespace ConfidenceInfo {
+ /**
+ * Annotation associated with the result (e.g. outage or other type of event).
+ */
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ endDate: string;
+
+ eventType: string;
+
+ /**
+ * Whether event is a single point in time or a time range.
+ */
+ isInstantaneous: boolean;
+
+ linkedUrl: string;
+
+ startDate: string;
+ }
+ }
+
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface Unit {
+ name: string;
+
+ value: string;
+ }
+ }
+}
+
+export interface BotTimeseriesResponse {
+ /**
+ * Metadata for the results.
+ */
+ meta: BotTimeseriesResponse.Meta;
+
+ [k: string]:
+ | BotTimeseriesResponse.unnamed_schema_ref_75bae70cf28e6bcef364b9840db3bdeb
+ | BotTimeseriesResponse.Meta
+ | undefined;
+}
+
+export namespace BotTimeseriesResponse {
+ /**
+ * Metadata for the results.
+ */
+ export interface Meta {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval: 'FIFTEEN_MINUTES' | 'ONE_HOUR' | 'ONE_DAY' | 'ONE_WEEK' | 'ONE_MONTH';
+
+ confidenceInfo: Meta.ConfidenceInfo;
+
+ dateRange: Array;
+
+ /**
+ * Timestamp of the last dataset update.
+ */
+ lastUpdated: string;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization:
+ | 'PERCENTAGE'
+ | 'MIN0_MAX'
+ | 'MIN_MAX'
+ | 'RAW_VALUES'
+ | 'PERCENTAGE_CHANGE'
+ | 'ROLLING_AVERAGE'
+ | 'OVERLAPPED_PERCENTAGE'
+ | 'RATIO';
+
+ /**
+ * Measurement units for the results.
+ */
+ units: Array;
+ }
+
+ export namespace Meta {
+ export interface ConfidenceInfo {
+ annotations: Array;
+
+ /**
+ * Provides an indication of how much confidence Cloudflare has in the data.
+ */
+ level: number;
+ }
+
+ export namespace ConfidenceInfo {
+ /**
+ * Annotation associated with the result (e.g. outage or other type of event).
+ */
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ endDate: string;
+
+ eventType: string;
+
+ /**
+ * Whether event is a single point in time or a time range.
+ */
+ isInstantaneous: boolean;
+
+ linkedUrl: string;
+
+ startDate: string;
+ }
+ }
+
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface Unit {
+ name: string;
+
+ value: string;
+ }
+ }
+
+ export interface unnamed_schema_ref_75bae70cf28e6bcef364b9840db3bdeb {
+ timestamps: Array;
+
+ values: Array;
+ }
+}
+
+export interface BotTimeseriesGroupsResponse {
+ /**
+ * Metadata for the results.
+ */
+ meta: BotTimeseriesGroupsResponse.Meta;
+
+ serie_0: BotTimeseriesGroupsResponse.Serie0;
+}
+
+export namespace BotTimeseriesGroupsResponse {
+ /**
+ * Metadata for the results.
+ */
+ export interface Meta {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval: 'FIFTEEN_MINUTES' | 'ONE_HOUR' | 'ONE_DAY' | 'ONE_WEEK' | 'ONE_MONTH';
+
+ confidenceInfo: Meta.ConfidenceInfo;
+
+ dateRange: Array;
+
+ /**
+ * Timestamp of the last dataset update.
+ */
+ lastUpdated: string;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization:
+ | 'PERCENTAGE'
+ | 'MIN0_MAX'
+ | 'MIN_MAX'
+ | 'RAW_VALUES'
+ | 'PERCENTAGE_CHANGE'
+ | 'ROLLING_AVERAGE'
+ | 'OVERLAPPED_PERCENTAGE'
+ | 'RATIO';
+
+ /**
+ * Measurement units for the results.
+ */
+ units: Array;
+ }
+
+ export namespace Meta {
+ export interface ConfidenceInfo {
+ annotations: Array;
+
+ /**
+ * Provides an indication of how much confidence Cloudflare has in the data.
+ */
+ level: number;
+ }
+
+ export namespace ConfidenceInfo {
+ /**
+ * Annotation associated with the result (e.g. outage or other type of event).
+ */
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ endDate: string;
+
+ eventType: string;
+
+ /**
+ * Whether event is a single point in time or a time range.
+ */
+ isInstantaneous: boolean;
+
+ linkedUrl: string;
+
+ startDate: string;
+ }
+ }
+
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface Unit {
+ name: string;
+
+ value: string;
+ }
+ }
+
+ export interface Serie0 {
+ timestamps: Array;
+
+ [k: string]: Array | Array | undefined;
+ }
+}
+
+export interface BotSummaryV2Params {
+ /**
+ * Filters results by Autonomous System. Specify one or more Autonomous System
+ * Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ * results. For example, `-174, 3356` excludes results from AS174, but includes
+ * results from AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ * excludes results from EU, but includes results from NA.
+ */
+ continent?: Array;
+
+ /**
+ * Filters results by bot crawl purpose.
+ */
+ crawlPurpose?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ * this week with the previous week. Use this parameter or set specific start and
+ * end dates (`dateStart` and `dateEnd` parameters).
+ */
+ dateRange?: Array;
+
+ /**
+ * Start of the date range.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format in which results will be returned.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Filters results by industry.
+ */
+ industry?: Array;
+
+ /**
+ * Limits the number of objects per group to the top items within the specified
+ * time range. When item count exceeds the limit, extra items appear grouped under
+ * an "other" category.
+ */
+ limitPerGroup?: number;
+
+ /**
+ * Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ * excludes results from the US, but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names used to label the series in the response.
+ */
+ name?: Array;
+
+ /**
+ * Filters results by vertical.
+ */
+ vertical?: Array;
+}
+
+export interface BotTimeseriesParams {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval?: '15m' | '1h' | '1d' | '1w';
+
+ /**
+ * Filters results by Autonomous System. Specify one or more Autonomous System
+ * Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ * results. For example, `-174, 3356` excludes results from AS174, but includes
+ * results from AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ * excludes results from EU, but includes results from NA.
+ */
+ continent?: Array;
+
+ /**
+ * Filters results by bot crawl purpose.
+ */
+ crawlPurpose?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ * this week with the previous week. Use this parameter or set specific start and
+ * end dates (`dateStart` and `dateEnd` parameters).
+ */
+ dateRange?: Array;
+
+ /**
+ * Start of the date range.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format in which results will be returned.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Filters results by industry.
+ */
+ industry?: Array;
+
+ /**
+ * Limits the number of objects per group to the top items within the specified
+ * time range. When item count exceeds the limit, extra items appear grouped under
+ * an "other" category.
+ */
+ limitPerGroup?: number;
+
+ /**
+ * Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ * excludes results from the US, but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names used to label the series in the response.
+ */
+ name?: Array;
+
+ /**
+ * Filters results by user agent.
+ */
+ userAgent?: Array;
+
+ /**
+ * Filters results by vertical.
+ */
+ vertical?: Array;
+}
+
+export interface BotTimeseriesGroupsParams {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval?: '15m' | '1h' | '1d' | '1w';
+
+ /**
+ * Filters results by Autonomous System. Specify one or more Autonomous System
+ * Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ * results. For example, `-174, 3356` excludes results from AS174, but includes
+ * results from AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ * excludes results from EU, but includes results from NA.
+ */
+ continent?: Array;
+
+ /**
+ * Filters results by bot crawl purpose.
+ */
+ crawlPurpose?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ * this week with the previous week. Use this parameter or set specific start and
+ * end dates (`dateStart` and `dateEnd` parameters).
+ */
+ dateRange?: Array;
+
+ /**
+ * Start of the date range.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format in which results will be returned.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Filters results by industry.
+ */
+ industry?: Array;
+
+ /**
+ * Limits the number of objects per group to the top items within the specified
+ * time range. When item count exceeds the limit, extra items appear grouped under
+ * an "other" category.
+ */
+ limitPerGroup?: number;
+
+ /**
+ * Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ * excludes results from the US, but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names used to label the series in the response.
+ */
+ name?: Array;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization?: 'PERCENTAGE_CHANGE' | 'MIN0_MAX';
+
+ /**
+ * Filters results by vertical.
+ */
+ vertical?: Array;
}
Bots.Summary = Summary;
export declare namespace Bots {
+ export {
+ type BotSummaryV2Response as BotSummaryV2Response,
+ type BotTimeseriesResponse as BotTimeseriesResponse,
+ type BotTimeseriesGroupsResponse as BotTimeseriesGroupsResponse,
+ type BotSummaryV2Params as BotSummaryV2Params,
+ type BotTimeseriesParams as BotTimeseriesParams,
+ type BotTimeseriesGroupsParams as BotTimeseriesGroupsParams,
+ };
+
export {
Summary as Summary,
type SummaryUserAgentResponse as SummaryUserAgentResponse,
diff --git a/src/resources/radar/ai/bots/index.ts b/src/resources/radar/ai/bots/index.ts
index c94177cbcd..8d3512cf95 100644
--- a/src/resources/radar/ai/bots/index.ts
+++ b/src/resources/radar/ai/bots/index.ts
@@ -1,4 +1,12 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export { Bots } from './bots';
+export {
+ Bots,
+ type BotSummaryV2Response,
+ type BotTimeseriesResponse,
+ type BotTimeseriesGroupsResponse,
+ type BotSummaryV2Params,
+ type BotTimeseriesParams,
+ type BotTimeseriesGroupsParams,
+} from './bots';
export { Summary, type SummaryUserAgentResponse, type SummaryUserAgentParams } from './summary';
diff --git a/src/resources/radar/ai/bots/summary.ts b/src/resources/radar/ai/bots/summary.ts
index 75c99603d5..c9e77e1896 100644
--- a/src/resources/radar/ai/bots/summary.ts
+++ b/src/resources/radar/ai/bots/summary.ts
@@ -8,7 +8,7 @@ export class Summary extends APIResource {
/**
* Retrieves the distribution of traffic by AI user agent.
*
- * @deprecated
+ * @deprecated Use [Radar AI Bots Summary By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/bots/methods/summary_v2/) instead.
*/
userAgent(
query?: SummaryUserAgentParams,
diff --git a/src/resources/radar/ai/index.ts b/src/resources/radar/ai/index.ts
index d56384a99a..12a71ffebc 100755
--- a/src/resources/radar/ai/index.ts
+++ b/src/resources/radar/ai/index.ts
@@ -1,8 +1,22 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { AI } from './ai';
-export { Bots } from './bots/index';
-export { Inference } from './inference/index';
+export {
+ Bots,
+ type BotSummaryV2Response,
+ type BotTimeseriesResponse,
+ type BotTimeseriesGroupsResponse,
+ type BotSummaryV2Params,
+ type BotTimeseriesParams,
+ type BotTimeseriesGroupsParams,
+} from './bots/index';
+export {
+ Inference,
+ type InferenceSummaryV2Response,
+ type InferenceTimeseriesGroupsV2Response,
+ type InferenceSummaryV2Params,
+ type InferenceTimeseriesGroupsV2Params,
+} from './inference/index';
export {
TimeseriesGroups,
type TimeseriesGroupSummaryResponse,
diff --git a/src/resources/radar/ai/inference/index.ts b/src/resources/radar/ai/inference/index.ts
index a26b5943df..3e6766d9a6 100644
--- a/src/resources/radar/ai/inference/index.ts
+++ b/src/resources/radar/ai/inference/index.ts
@@ -1,6 +1,12 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export { Inference } from './inference';
+export {
+ Inference,
+ type InferenceSummaryV2Response,
+ type InferenceTimeseriesGroupsV2Response,
+ type InferenceSummaryV2Params,
+ type InferenceTimeseriesGroupsV2Params,
+} from './inference';
export {
Summary,
type SummaryModelResponse,
diff --git a/src/resources/radar/ai/inference/inference.ts b/src/resources/radar/ai/inference/inference.ts
index 7f31aa0ffb..2f55d10668 100644
--- a/src/resources/radar/ai/inference/inference.ts
+++ b/src/resources/radar/ai/inference/inference.ts
@@ -1,6 +1,8 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../../../resource';
+import { isRequestOptions } from '../../../../core';
+import * as Core from '../../../../core';
import * as SummaryAPI from './summary';
import {
Summary,
@@ -17,12 +19,427 @@ export class Inference extends APIResource {
timeseriesGroups: TimeseriesGroupsAPI.TimeseriesGroups = new TimeseriesGroupsAPI.TimeseriesGroups(
this._client,
);
+
+ /**
+ * Retrieves an aggregated summary of unique accounts using Workers AI inference
+ * grouped by the specified dimension.
+ *
+ * @example
+ * ```ts
+ * const response = await client.radar.ai.inference.summaryV2(
+ * 'MODEL',
+ * );
+ * ```
+ */
+ summaryV2(
+ dimension: 'MODEL' | 'TASK',
+ query?: InferenceSummaryV2Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ summaryV2(
+ dimension: 'MODEL' | 'TASK',
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ summaryV2(
+ dimension: 'MODEL' | 'TASK',
+ query: InferenceSummaryV2Params | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.summaryV2(dimension, {}, query);
+ }
+ return (
+ this._client.get(`/radar/ai/inference/summary/${dimension}`, { query, ...options }) as Core.APIPromise<{
+ result: InferenceSummaryV2Response;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Retrieves the distribution of unique accounts using Workers AI inference,
+ * grouped by the specified dimension over time.
+ *
+ * @example
+ * ```ts
+ * const response =
+ * await client.radar.ai.inference.timeseriesGroupsV2(
+ * 'MODEL',
+ * );
+ * ```
+ */
+ timeseriesGroupsV2(
+ dimension: 'MODEL' | 'TASK',
+ query?: InferenceTimeseriesGroupsV2Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ timeseriesGroupsV2(
+ dimension: 'MODEL' | 'TASK',
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ timeseriesGroupsV2(
+ dimension: 'MODEL' | 'TASK',
+ query: InferenceTimeseriesGroupsV2Params | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.timeseriesGroupsV2(dimension, {}, query);
+ }
+ return (
+ this._client.get(`/radar/ai/inference/timeseries_groups/${dimension}`, {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: InferenceTimeseriesGroupsV2Response }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface InferenceSummaryV2Response {
+ /**
+ * Metadata for the results.
+ */
+ meta: InferenceSummaryV2Response.Meta;
+
+ summary_0: { [key: string]: string };
+}
+
+export namespace InferenceSummaryV2Response {
+ /**
+ * Metadata for the results.
+ */
+ export interface Meta {
+ confidenceInfo: Meta.ConfidenceInfo;
+
+ dateRange: Array;
+
+ /**
+ * Timestamp of the last dataset update.
+ */
+ lastUpdated: string;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization:
+ | 'PERCENTAGE'
+ | 'MIN0_MAX'
+ | 'MIN_MAX'
+ | 'RAW_VALUES'
+ | 'PERCENTAGE_CHANGE'
+ | 'ROLLING_AVERAGE'
+ | 'OVERLAPPED_PERCENTAGE'
+ | 'RATIO';
+
+ /**
+ * Measurement units for the results.
+ */
+ units: Array;
+ }
+
+ export namespace Meta {
+ export interface ConfidenceInfo {
+ annotations: Array;
+
+ /**
+ * Provides an indication of how much confidence Cloudflare has in the data.
+ */
+ level: number;
+ }
+
+ export namespace ConfidenceInfo {
+ /**
+ * Annotation associated with the result (e.g. outage or other type of event).
+ */
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ endDate: string;
+
+ eventType: string;
+
+ /**
+ * Whether event is a single point in time or a time range.
+ */
+ isInstantaneous: boolean;
+
+ linkedUrl: string;
+
+ startDate: string;
+ }
+ }
+
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface Unit {
+ name: string;
+
+ value: string;
+ }
+ }
+}
+
+export interface InferenceTimeseriesGroupsV2Response {
+ /**
+ * Metadata for the results.
+ */
+ meta: InferenceTimeseriesGroupsV2Response.Meta;
+
+ serie_0: InferenceTimeseriesGroupsV2Response.Serie0;
+}
+
+export namespace InferenceTimeseriesGroupsV2Response {
+ /**
+ * Metadata for the results.
+ */
+ export interface Meta {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval: 'FIFTEEN_MINUTES' | 'ONE_HOUR' | 'ONE_DAY' | 'ONE_WEEK' | 'ONE_MONTH';
+
+ confidenceInfo: Meta.ConfidenceInfo;
+
+ dateRange: Array;
+
+ /**
+ * Timestamp of the last dataset update.
+ */
+ lastUpdated: string;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization:
+ | 'PERCENTAGE'
+ | 'MIN0_MAX'
+ | 'MIN_MAX'
+ | 'RAW_VALUES'
+ | 'PERCENTAGE_CHANGE'
+ | 'ROLLING_AVERAGE'
+ | 'OVERLAPPED_PERCENTAGE'
+ | 'RATIO';
+
+ /**
+ * Measurement units for the results.
+ */
+ units: Array;
+ }
+
+ export namespace Meta {
+ export interface ConfidenceInfo {
+ annotations: Array;
+
+ /**
+ * Provides an indication of how much confidence Cloudflare has in the data.
+ */
+ level: number;
+ }
+
+ export namespace ConfidenceInfo {
+ /**
+ * Annotation associated with the result (e.g. outage or other type of event).
+ */
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ endDate: string;
+
+ eventType: string;
+
+ /**
+ * Whether event is a single point in time or a time range.
+ */
+ isInstantaneous: boolean;
+
+ linkedUrl: string;
+
+ startDate: string;
+ }
+ }
+
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface Unit {
+ name: string;
+
+ value: string;
+ }
+ }
+
+ export interface Serie0 {
+ timestamps: Array;
+
+ [k: string]: Array | Array | undefined;
+ }
+}
+
+export interface InferenceSummaryV2Params {
+ /**
+ * Filters results by Autonomous System. Specify one or more Autonomous System
+ * Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ * results. For example, `-174, 3356` excludes results from AS174, but includes
+ * results from AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ * excludes results from EU, but includes results from NA.
+ */
+ continent?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ * this week with the previous week. Use this parameter or set specific start and
+ * end dates (`dateStart` and `dateEnd` parameters).
+ */
+ dateRange?: Array;
+
+ /**
+ * Start of the date range.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format in which results will be returned.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limits the number of objects per group to the top items within the specified
+ * time range. When item count exceeds the limit, extra items appear grouped under
+ * an "other" category.
+ */
+ limitPerGroup?: number;
+
+ /**
+ * Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ * excludes results from the US, but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names used to label the series in the response.
+ */
+ name?: Array;
+}
+
+export interface InferenceTimeseriesGroupsV2Params {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval?: '15m' | '1h' | '1d' | '1w';
+
+ /**
+ * Filters results by Autonomous System. Specify one or more Autonomous System
+ * Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from
+ * results. For example, `-174, 3356` excludes results from AS174, but includes
+ * results from AS3356.
+ */
+ asn?: Array;
+
+ /**
+ * Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ * excludes results from EU, but includes results from NA.
+ */
+ continent?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ * this week with the previous week. Use this parameter or set specific start and
+ * end dates (`dateStart` and `dateEnd` parameters).
+ */
+ dateRange?: Array;
+
+ /**
+ * Start of the date range.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format in which results will be returned.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limits the number of objects per group to the top items within the specified
+ * time range. When item count exceeds the limit, extra items appear grouped under
+ * an "other" category.
+ */
+ limitPerGroup?: number;
+
+ /**
+ * Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ * excludes results from the US, but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names used to label the series in the response.
+ */
+ name?: Array;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization?: 'PERCENTAGE_CHANGE' | 'MIN0_MAX';
}
Inference.Summary = Summary;
Inference.TimeseriesGroups = TimeseriesGroups;
export declare namespace Inference {
+ export {
+ type InferenceSummaryV2Response as InferenceSummaryV2Response,
+ type InferenceTimeseriesGroupsV2Response as InferenceTimeseriesGroupsV2Response,
+ type InferenceSummaryV2Params as InferenceSummaryV2Params,
+ type InferenceTimeseriesGroupsV2Params as InferenceTimeseriesGroupsV2Params,
+ };
+
export {
Summary as Summary,
type SummaryModelResponse as SummaryModelResponse,
diff --git a/src/resources/radar/ai/inference/summary.ts b/src/resources/radar/ai/inference/summary.ts
index a22b6f10e9..4b9b871ddc 100644
--- a/src/resources/radar/ai/inference/summary.ts
+++ b/src/resources/radar/ai/inference/summary.ts
@@ -8,7 +8,7 @@ export class Summary extends APIResource {
/**
* Retrieves the distribution of unique accounts by model.
*
- * @deprecated
+ * @deprecated Use [Radar AI Inference Summary By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/inference/methods/summary_v2/) instead.
*/
model(query?: SummaryModelParams, options?: Core.RequestOptions): Core.APIPromise;
model(options?: Core.RequestOptions): Core.APIPromise;
@@ -29,7 +29,7 @@ export class Summary extends APIResource {
/**
* Retrieves the distribution of unique accounts by task.
*
- * @deprecated
+ * @deprecated Use [Radar AI Inference Summary By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/inference/methods/summary_v2/) instead.
*/
task(query?: SummaryTaskParams, options?: Core.RequestOptions): Core.APIPromise;
task(options?: Core.RequestOptions): Core.APIPromise;
diff --git a/src/resources/radar/ai/inference/timeseries-groups/summary.ts b/src/resources/radar/ai/inference/timeseries-groups/summary.ts
index bf808d1b21..43edd89a6c 100644
--- a/src/resources/radar/ai/inference/timeseries-groups/summary.ts
+++ b/src/resources/radar/ai/inference/timeseries-groups/summary.ts
@@ -8,7 +8,7 @@ export class Summary extends APIResource {
/**
* Retrieves the distribution of unique accounts by model over time.
*
- * @deprecated
+ * @deprecated Use [Radar AI Inference Timeseries Groups By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/inference/methods/timeseries_groups_v2/) instead.
*/
model(query?: SummaryModelParams, options?: Core.RequestOptions): Core.APIPromise;
model(options?: Core.RequestOptions): Core.APIPromise;
@@ -30,7 +30,7 @@ export class Summary extends APIResource {
/**
* Retrieves the distribution of unique accounts by task over time.
*
- * @deprecated
+ * @deprecated Use [Radar AI Inference Timeseries Groups By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/inference/methods/timeseries_groups_v2/) instead.
*/
task(query?: SummaryTaskParams, options?: Core.RequestOptions): Core.APIPromise;
task(options?: Core.RequestOptions): Core.APIPromise;
diff --git a/src/resources/radar/ai/timeseries-groups.ts b/src/resources/radar/ai/timeseries-groups.ts
index 09ff1ff862..c516b5d812 100644
--- a/src/resources/radar/ai/timeseries-groups.ts
+++ b/src/resources/radar/ai/timeseries-groups.ts
@@ -9,13 +9,7 @@ export class TimeseriesGroups extends APIResource {
* Retrieves an aggregated summary of AI bots HTTP requests grouped by the
* specified dimension.
*
- * @example
- * ```ts
- * const response =
- * await client.radar.ai.timeseriesGroups.summary(
- * 'USER_AGENT',
- * );
- * ```
+ * @deprecated Use [Radar > AI > Bots > Summary](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/bots/methods/summary_v2/) instead.
*/
summary(
dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
@@ -44,11 +38,7 @@ export class TimeseriesGroups extends APIResource {
/**
* Retrieves AI bots HTTP request volume over time.
*
- * @example
- * ```ts
- * const response =
- * await client.radar.ai.timeseriesGroups.timeseries();
- * ```
+ * @deprecated Use [Radar > AI > Bots > Timeseries](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/bots/methods/timeseries/) instead.
*/
timeseries(
query?: TimeseriesGroupTimeseriesParams,
@@ -73,13 +63,7 @@ export class TimeseriesGroups extends APIResource {
* Retrieves the distribution of HTTP requests from AI bots, grouped by chosen the
* specified dimension over time.
*
- * @example
- * ```ts
- * const response =
- * await client.radar.ai.timeseriesGroups.timeseriesGroups(
- * 'USER_AGENT',
- * );
- * ```
+ * @deprecated Use [Radar > AI > Bots > Timeseries Groups](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/bots/methods/timeseries_groups/) instead.
*/
timeseriesGroups(
dimension: 'USER_AGENT' | 'CRAWL_PURPOSE' | 'INDUSTRY' | 'VERTICAL',
@@ -109,7 +93,7 @@ export class TimeseriesGroups extends APIResource {
/**
* Retrieves the distribution of traffic by AI user agent over time.
*
- * @deprecated
+ * @deprecated Use [Radar AI Bots Timeseries Groups By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/ai/subresources/bots/methods/timeseries_groups/) instead.
*/
userAgent(
query?: TimeseriesGroupUserAgentParams,
diff --git a/src/resources/radar/ai/to-markdown.ts b/src/resources/radar/ai/to-markdown.ts
index cc254c45c8..b3016565e9 100644
--- a/src/resources/radar/ai/to-markdown.ts
+++ b/src/resources/radar/ai/to-markdown.ts
@@ -9,16 +9,7 @@ export class ToMarkdown extends APIResource {
/**
* Convert Files into Markdown
*
- * @example
- * ```ts
- * // Automatically fetches more pages as needed.
- * for await (const toMarkdownCreateResponse of client.radar.ai.toMarkdown.create(
- * fs.createReadStream('path/to/file'),
- * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
- * )) {
- * // ...
- * }
- * ```
+ * @deprecated Use [AI > To Markdown](https://developers.cloudflare.com/api/resources/ai/subresources/to_markdown/) instead.
*/
create(
body: string | ArrayBufferView | ArrayBuffer | BlobLike,
diff --git a/src/resources/radar/as112/as112.ts b/src/resources/radar/as112/as112.ts
index 876d8d74aa..31b487f018 100644
--- a/src/resources/radar/as112/as112.ts
+++ b/src/resources/radar/as112/as112.ts
@@ -55,6 +55,40 @@ export class AS112 extends APIResource {
);
top: TopAPI.Top = new TopAPI.Top(this._client);
+ /**
+ * Retrieves the distribution of AS112 queries by the specified dimension.
+ *
+ * @example
+ * ```ts
+ * const response = await client.radar.as112.summaryV2(
+ * 'DNSSEC',
+ * );
+ * ```
+ */
+ summaryV2(
+ dimension: 'DNSSEC' | 'EDNS' | 'IP_VERSION' | 'PROTOCOL' | 'QUERY_TYPE' | 'RESPONSE_CODE',
+ query?: AS112SummaryV2Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ summaryV2(
+ dimension: 'DNSSEC' | 'EDNS' | 'IP_VERSION' | 'PROTOCOL' | 'QUERY_TYPE' | 'RESPONSE_CODE',
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ summaryV2(
+ dimension: 'DNSSEC' | 'EDNS' | 'IP_VERSION' | 'PROTOCOL' | 'QUERY_TYPE' | 'RESPONSE_CODE',
+ query: AS112SummaryV2Params | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.summaryV2(dimension, {}, query);
+ }
+ return (
+ this._client.get(`/radar/as112/summary/${dimension}`, { query, ...options }) as Core.APIPromise<{
+ result: AS112SummaryV2Response;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
/**
* Retrieves the AS112 DNS queries over time.
*
@@ -81,6 +115,137 @@ export class AS112 extends APIResource {
}>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * Retrieves the distribution of AS112 queries grouped by dimension over time.
+ *
+ * @example
+ * ```ts
+ * const response =
+ * await client.radar.as112.timeseriesGroupsV2('DNSSEC');
+ * ```
+ */
+ timeseriesGroupsV2(
+ dimension: 'DNSSEC' | 'EDNS' | 'IP_VERSION' | 'PROTOCOL' | 'QUERY_TYPE' | 'RESPONSE_CODE',
+ query?: AS112TimeseriesGroupsV2Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ timeseriesGroupsV2(
+ dimension: 'DNSSEC' | 'EDNS' | 'IP_VERSION' | 'PROTOCOL' | 'QUERY_TYPE' | 'RESPONSE_CODE',
+ options?: Core.RequestOptions,
+ ): Core.APIPromise;
+ timeseriesGroupsV2(
+ dimension: 'DNSSEC' | 'EDNS' | 'IP_VERSION' | 'PROTOCOL' | 'QUERY_TYPE' | 'RESPONSE_CODE',
+ query: AS112TimeseriesGroupsV2Params | Core.RequestOptions = {},
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ if (isRequestOptions(query)) {
+ return this.timeseriesGroupsV2(dimension, {}, query);
+ }
+ return (
+ this._client.get(`/radar/as112/timeseries_groups/${dimension}`, {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: AS112TimeseriesGroupsV2Response }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export interface AS112SummaryV2Response {
+ /**
+ * Metadata for the results.
+ */
+ meta: AS112SummaryV2Response.Meta;
+
+ summary_0: { [key: string]: string };
+}
+
+export namespace AS112SummaryV2Response {
+ /**
+ * Metadata for the results.
+ */
+ export interface Meta {
+ confidenceInfo: Meta.ConfidenceInfo;
+
+ dateRange: Array;
+
+ /**
+ * Timestamp of the last dataset update.
+ */
+ lastUpdated: string;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization:
+ | 'PERCENTAGE'
+ | 'MIN0_MAX'
+ | 'MIN_MAX'
+ | 'RAW_VALUES'
+ | 'PERCENTAGE_CHANGE'
+ | 'ROLLING_AVERAGE'
+ | 'OVERLAPPED_PERCENTAGE'
+ | 'RATIO';
+
+ /**
+ * Measurement units for the results.
+ */
+ units: Array;
+ }
+
+ export namespace Meta {
+ export interface ConfidenceInfo {
+ annotations: Array;
+
+ /**
+ * Provides an indication of how much confidence Cloudflare has in the data.
+ */
+ level: number;
+ }
+
+ export namespace ConfidenceInfo {
+ /**
+ * Annotation associated with the result (e.g. outage or other type of event).
+ */
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ endDate: string;
+
+ eventType: string;
+
+ /**
+ * Whether event is a single point in time or a time range.
+ */
+ isInstantaneous: boolean;
+
+ linkedUrl: string;
+
+ startDate: string;
+ }
+ }
+
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface Unit {
+ name: string;
+
+ value: string;
+ }
+ }
}
export interface AS112TimeseriesResponse {
@@ -196,14 +361,117 @@ export namespace AS112TimeseriesResponse {
}
}
-export interface AS112TimeseriesParams {
+export interface AS112TimeseriesGroupsV2Response {
/**
- * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
- * Refer to
- * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ * Metadata for the results.
*/
- aggInterval?: '15m' | '1h' | '1d' | '1w';
+ meta: AS112TimeseriesGroupsV2Response.Meta;
+
+ serie_0: AS112TimeseriesGroupsV2Response.Serie0;
+}
+
+export namespace AS112TimeseriesGroupsV2Response {
+ /**
+ * Metadata for the results.
+ */
+ export interface Meta {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval: 'FIFTEEN_MINUTES' | 'ONE_HOUR' | 'ONE_DAY' | 'ONE_WEEK' | 'ONE_MONTH';
+
+ confidenceInfo: Meta.ConfidenceInfo;
+
+ dateRange: Array;
+
+ /**
+ * Timestamp of the last dataset update.
+ */
+ lastUpdated: string;
+
+ /**
+ * Normalization method applied to the results. Refer to
+ * [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/).
+ */
+ normalization:
+ | 'PERCENTAGE'
+ | 'MIN0_MAX'
+ | 'MIN_MAX'
+ | 'RAW_VALUES'
+ | 'PERCENTAGE_CHANGE'
+ | 'ROLLING_AVERAGE'
+ | 'OVERLAPPED_PERCENTAGE'
+ | 'RATIO';
+
+ /**
+ * Measurement units for the results.
+ */
+ units: Array;
+ }
+
+ export namespace Meta {
+ export interface ConfidenceInfo {
+ annotations: Array;
+
+ /**
+ * Provides an indication of how much confidence Cloudflare has in the data.
+ */
+ level: number;
+ }
+
+ export namespace ConfidenceInfo {
+ /**
+ * Annotation associated with the result (e.g. outage or other type of event).
+ */
+ export interface Annotation {
+ dataSource: string;
+
+ description: string;
+
+ endDate: string;
+
+ eventType: string;
+
+ /**
+ * Whether event is a single point in time or a time range.
+ */
+ isInstantaneous: boolean;
+
+ linkedUrl: string;
+
+ startDate: string;
+ }
+ }
+
+ export interface DateRange {
+ /**
+ * Adjusted end of date range.
+ */
+ endTime: string;
+
+ /**
+ * Adjusted start of date range.
+ */
+ startTime: string;
+ }
+
+ export interface Unit {
+ name: string;
+
+ value: string;
+ }
+ }
+
+ export interface Serie0 {
+ timestamps: Array;
+
+ [k: string]: Array | Array | undefined;
+ }
+}
+export interface AS112SummaryV2Params {
/**
* Filters results by continent. Specify a comma-separated list of alpha-2 codes.
* Prefix with `-` to exclude continents from results. For example, `-EU,NA`
@@ -233,6 +501,370 @@ export interface AS112TimeseriesParams {
*/
format?: 'JSON' | 'CSV';
+ /**
+ * Limits the number of objects per group to the top items within the specified
+ * time range. When item count exceeds the limit, extra items appear grouped under
+ * an "other" category.
+ */
+ limitPerGroup?: number;
+
+ /**
+ * Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ * excludes results from the US, but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names used to label the series in the response.
+ */
+ name?: Array;
+
+ /**
+ * Filters results by DNS transport protocol.
+ */
+ protocol?: Array<'UDP' | 'TCP' | 'HTTPS' | 'TLS'>;
+
+ /**
+ * Filters results by DNS query type.
+ */
+ queryType?: Array<
+ | 'A'
+ | 'AAAA'
+ | 'A6'
+ | 'AFSDB'
+ | 'ANY'
+ | 'APL'
+ | 'ATMA'
+ | 'AXFR'
+ | 'CAA'
+ | 'CDNSKEY'
+ | 'CDS'
+ | 'CERT'
+ | 'CNAME'
+ | 'CSYNC'
+ | 'DHCID'
+ | 'DLV'
+ | 'DNAME'
+ | 'DNSKEY'
+ | 'DOA'
+ | 'DS'
+ | 'EID'
+ | 'EUI48'
+ | 'EUI64'
+ | 'GPOS'
+ | 'GID'
+ | 'HINFO'
+ | 'HIP'
+ | 'HTTPS'
+ | 'IPSECKEY'
+ | 'ISDN'
+ | 'IXFR'
+ | 'KEY'
+ | 'KX'
+ | 'L32'
+ | 'L64'
+ | 'LOC'
+ | 'LP'
+ | 'MAILA'
+ | 'MAILB'
+ | 'MB'
+ | 'MD'
+ | 'MF'
+ | 'MG'
+ | 'MINFO'
+ | 'MR'
+ | 'MX'
+ | 'NAPTR'
+ | 'NB'
+ | 'NBSTAT'
+ | 'NID'
+ | 'NIMLOC'
+ | 'NINFO'
+ | 'NS'
+ | 'NSAP'
+ | 'NSEC'
+ | 'NSEC3'
+ | 'NSEC3PARAM'
+ | 'NULL'
+ | 'NXT'
+ | 'OPENPGPKEY'
+ | 'OPT'
+ | 'PTR'
+ | 'PX'
+ | 'RKEY'
+ | 'RP'
+ | 'RRSIG'
+ | 'RT'
+ | 'SIG'
+ | 'SINK'
+ | 'SMIMEA'
+ | 'SOA'
+ | 'SPF'
+ | 'SRV'
+ | 'SSHFP'
+ | 'SVCB'
+ | 'TA'
+ | 'TALINK'
+ | 'TKEY'
+ | 'TLSA'
+ | 'TSIG'
+ | 'TXT'
+ | 'UINFO'
+ | 'UID'
+ | 'UNSPEC'
+ | 'URI'
+ | 'WKS'
+ | 'X25'
+ | 'ZONEMD'
+ | null
+ >;
+
+ /**
+ * Filters results by DNS response code.
+ */
+ responseCode?: Array<
+ | 'NOERROR'
+ | 'FORMERR'
+ | 'SERVFAIL'
+ | 'NXDOMAIN'
+ | 'NOTIMP'
+ | 'REFUSED'
+ | 'YXDOMAIN'
+ | 'YXRRSET'
+ | 'NXRRSET'
+ | 'NOTAUTH'
+ | 'NOTZONE'
+ | 'BADSIG'
+ | 'BADKEY'
+ | 'BADTIME'
+ | 'BADMODE'
+ | 'BADNAME'
+ | 'BADALG'
+ | 'BADTRUNC'
+ | 'BADCOOKIE'
+ >;
+}
+
+export interface AS112TimeseriesParams {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval?: '15m' | '1h' | '1d' | '1w';
+
+ /**
+ * Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ * excludes results from EU, but includes results from NA.
+ */
+ continent?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ * this week with the previous week. Use this parameter or set specific start and
+ * end dates (`dateStart` and `dateEnd` parameters).
+ */
+ dateRange?: Array;
+
+ /**
+ * Start of the date range.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format in which results will be returned.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Filters results by location. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude locations from results. For example, `-US,PT`
+ * excludes results from the US, but includes results from PT.
+ */
+ location?: Array;
+
+ /**
+ * Array of names used to label the series in the response.
+ */
+ name?: Array;
+
+ /**
+ * Filters results by DNS transport protocol.
+ */
+ protocol?: Array<'UDP' | 'TCP' | 'HTTPS' | 'TLS'>;
+
+ /**
+ * Filters results by DNS query type.
+ */
+ queryType?: Array<
+ | 'A'
+ | 'AAAA'
+ | 'A6'
+ | 'AFSDB'
+ | 'ANY'
+ | 'APL'
+ | 'ATMA'
+ | 'AXFR'
+ | 'CAA'
+ | 'CDNSKEY'
+ | 'CDS'
+ | 'CERT'
+ | 'CNAME'
+ | 'CSYNC'
+ | 'DHCID'
+ | 'DLV'
+ | 'DNAME'
+ | 'DNSKEY'
+ | 'DOA'
+ | 'DS'
+ | 'EID'
+ | 'EUI48'
+ | 'EUI64'
+ | 'GPOS'
+ | 'GID'
+ | 'HINFO'
+ | 'HIP'
+ | 'HTTPS'
+ | 'IPSECKEY'
+ | 'ISDN'
+ | 'IXFR'
+ | 'KEY'
+ | 'KX'
+ | 'L32'
+ | 'L64'
+ | 'LOC'
+ | 'LP'
+ | 'MAILA'
+ | 'MAILB'
+ | 'MB'
+ | 'MD'
+ | 'MF'
+ | 'MG'
+ | 'MINFO'
+ | 'MR'
+ | 'MX'
+ | 'NAPTR'
+ | 'NB'
+ | 'NBSTAT'
+ | 'NID'
+ | 'NIMLOC'
+ | 'NINFO'
+ | 'NS'
+ | 'NSAP'
+ | 'NSEC'
+ | 'NSEC3'
+ | 'NSEC3PARAM'
+ | 'NULL'
+ | 'NXT'
+ | 'OPENPGPKEY'
+ | 'OPT'
+ | 'PTR'
+ | 'PX'
+ | 'RKEY'
+ | 'RP'
+ | 'RRSIG'
+ | 'RT'
+ | 'SIG'
+ | 'SINK'
+ | 'SMIMEA'
+ | 'SOA'
+ | 'SPF'
+ | 'SRV'
+ | 'SSHFP'
+ | 'SVCB'
+ | 'TA'
+ | 'TALINK'
+ | 'TKEY'
+ | 'TLSA'
+ | 'TSIG'
+ | 'TXT'
+ | 'UINFO'
+ | 'UID'
+ | 'UNSPEC'
+ | 'URI'
+ | 'WKS'
+ | 'X25'
+ | 'ZONEMD'
+ | null
+ >;
+
+ /**
+ * Filters results by DNS response code.
+ */
+ responseCode?: Array<
+ | 'NOERROR'
+ | 'FORMERR'
+ | 'SERVFAIL'
+ | 'NXDOMAIN'
+ | 'NOTIMP'
+ | 'REFUSED'
+ | 'YXDOMAIN'
+ | 'YXRRSET'
+ | 'NXRRSET'
+ | 'NOTAUTH'
+ | 'NOTZONE'
+ | 'BADSIG'
+ | 'BADKEY'
+ | 'BADTIME'
+ | 'BADMODE'
+ | 'BADNAME'
+ | 'BADALG'
+ | 'BADTRUNC'
+ | 'BADCOOKIE'
+ >;
+}
+
+export interface AS112TimeseriesGroupsV2Params {
+ /**
+ * Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals).
+ * Refer to
+ * [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/).
+ */
+ aggInterval?: '15m' | '1h' | '1d' | '1w';
+
+ /**
+ * Filters results by continent. Specify a comma-separated list of alpha-2 codes.
+ * Prefix with `-` to exclude continents from results. For example, `-EU,NA`
+ * excludes results from EU, but includes results from NA.
+ */
+ continent?: Array;
+
+ /**
+ * End of the date range (inclusive).
+ */
+ dateEnd?: Array;
+
+ /**
+ * Filters results by date range. For example, use `7d` and `7dcontrol` to compare
+ * this week with the previous week. Use this parameter or set specific start and
+ * end dates (`dateStart` and `dateEnd` parameters).
+ */
+ dateRange?: Array;
+
+ /**
+ * Start of the date range.
+ */
+ dateStart?: Array;
+
+ /**
+ * Format in which results will be returned.
+ */
+ format?: 'JSON' | 'CSV';
+
+ /**
+ * Limits the number of objects per group to the top items within the specified
+ * time range. When item count exceeds the limit, extra items appear grouped under
+ * an "other" category.
+ */
+ limitPerGroup?: number;
+
/**
* Filters results by location. Specify a comma-separated list of alpha-2 codes.
* Prefix with `-` to exclude locations from results. For example, `-US,PT`
@@ -248,12 +880,12 @@ export interface AS112TimeseriesParams {
/**
* Filters results by DNS transport protocol.
*/
- protocol?: 'UDP' | 'TCP' | 'HTTPS' | 'TLS';
+ protocol?: Array<'UDP' | 'TCP' | 'HTTPS' | 'TLS'>;
/**
* Filters results by DNS query type.
*/
- queryType?:
+ queryType?: Array<
| 'A'
| 'AAAA'
| 'A6'
@@ -342,12 +974,13 @@ export interface AS112TimeseriesParams {
| 'WKS'
| 'X25'
| 'ZONEMD'
- | null;
+ | null
+ >;
/**
* Filters results by DNS response code.
*/
- responseCode?:
+ responseCode?: Array<
| 'NOERROR'
| 'FORMERR'
| 'SERVFAIL'
@@ -366,7 +999,8 @@ export interface AS112TimeseriesParams {
| 'BADNAME'
| 'BADALG'
| 'BADTRUNC'
- | 'BADCOOKIE';
+ | 'BADCOOKIE'
+ >;
}
AS112.Summary = Summary;
@@ -375,8 +1009,12 @@ AS112.Top = Top;
export declare namespace AS112 {
export {
+ type AS112SummaryV2Response as AS112SummaryV2Response,
type AS112TimeseriesResponse as AS112TimeseriesResponse,
+ type AS112TimeseriesGroupsV2Response as AS112TimeseriesGroupsV2Response,
+ type AS112SummaryV2Params as AS112SummaryV2Params,
type AS112TimeseriesParams as AS112TimeseriesParams,
+ type AS112TimeseriesGroupsV2Params as AS112TimeseriesGroupsV2Params,
};
export {
diff --git a/src/resources/radar/as112/index.ts b/src/resources/radar/as112/index.ts
index 7b5e4752cb..f3e1911eea 100644
--- a/src/resources/radar/as112/index.ts
+++ b/src/resources/radar/as112/index.ts
@@ -1,6 +1,14 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-export { AS112, type AS112TimeseriesResponse, type AS112TimeseriesParams } from './as112';
+export {
+ AS112,
+ type AS112SummaryV2Response,
+ type AS112TimeseriesResponse,
+ type AS112TimeseriesGroupsV2Response,
+ type AS112SummaryV2Params,
+ type AS112TimeseriesParams,
+ type AS112TimeseriesGroupsV2Params,
+} from './as112';
export {
Summary,
type SummaryDNSSECResponse,
diff --git a/src/resources/radar/as112/summary.ts b/src/resources/radar/as112/summary.ts
index c59fdaeb5a..d839219855 100644
--- a/src/resources/radar/as112/summary.ts
+++ b/src/resources/radar/as112/summary.ts
@@ -9,10 +9,7 @@ export class Summary extends APIResource {
* Retrieves the distribution of DNS queries to AS112 by DNSSEC (DNS Security
* Extensions) support.
*
- * @example
- * ```ts
- * const response = await client.radar.as112.summary.dnssec();
- * ```
+ * @deprecated Use [Radar AS112 Summary By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/as112/methods/summary_v2/) instead.
*/
dnssec(query?: SummaryDNSSECParams, options?: Core.RequestOptions): Core.APIPromise;
dnssec(options?: Core.RequestOptions): Core.APIPromise;
@@ -34,10 +31,7 @@ export class Summary extends APIResource {
* Retrieves the distribution of DNS queries to AS112 by EDNS (Extension Mechanisms
* for DNS) support.
*
- * @example
- * ```ts
- * const response = await client.radar.as112.summary.edns();
- * ```
+ * @deprecated Use [Radar AS112 Summary By Dimension](https://developers.cloudflare.com/api/resources/radar/subresources/as112/methods/summary_v2/) instead.
*/
edns(query?: SummaryEdnsParams, options?: Core.RequestOptions): Core.APIPromise