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..66fa9c69fc 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: 1907
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc732ca8d1d7f1c11a1ee579060ddfd8f953a3ad94fd5053056b53370129d040.yml
+openapi_spec_hash: a3e1e833dfe13845abd1e2227993a979
+config_hash: 6b8d4cb6cfb2bdcc28988fb6e9769676
diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa438cce21..01d37cfba4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,88 @@
# Changelog
+## 5.3.0 (2025-11-14)
+
+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: DLP-3878 Switch DLP Predefined Profile endpoints ([90367e6](https://github.com/cloudflare/cloudflare-typescript/commit/90367e600fd5636b8896a7bed16bb0d1ab4b38da))
+* feat: SDKs for Organizations and OrganizationsProfile ([f7c1373](https://github.com/cloudflare/cloudflare-typescript/commit/f7c13739fbbba7b9d9ff9c259b37bea92ac6688a))
+* feat(abuse_reports): add abuse mitigations in Client API ([6fb7708](https://github.com/cloudflare/cloudflare-typescript/commit/6fb77085e1f2d1581fae2b6ad476cbd9c8f1080e))
+* 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(pipelines): Configure SDKs/Terraform to use the new Pipelines, Streams, Sinks routes ([7208b56](https://github.com/cloudflare/cloudflare-typescript/commit/7208b567afb920fe8a3661a470d559f3c26f5380))
+* feat(radar): add new group by dimension endpoints; deprecate to_markdown endpoint ([59c3fa8](https://github.com/cloudflare/cloudflare-typescript/commit/59c3fa82a30a74e24e0c95515fca67ba06d5cd14))
+* feat(tomarkdown): add new markdown supported endpoint ([0d90679](https://github.com/cloudflare/cloudflare-typescript/commit/0d90679f3a1f6e24dda31818e37b2e67703d4b1e))
+* 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 ([5e23502](https://github.com/cloudflare/cloudflare-typescript/commit/5e235020c1d9e9ea4607f88166b8148fb374de1c))
+* **api:** update composite API spec ([80f0294](https://github.com/cloudflare/cloudflare-typescript/commit/80f02949b4657dd074e1ccaed50b29455e09a042))
+* **api:** update composite API spec ([2776982](https://github.com/cloudflare/cloudflare-typescript/commit/277698218598d291668dcb56738133b124f4ddac))
+* **api:** update composite API spec ([5702cce](https://github.com/cloudflare/cloudflare-typescript/commit/5702cce21cfd27f9063c065ce89f4dec1d8de1f4))
+* **api:** update composite API spec ([7db53fa](https://github.com/cloudflare/cloudflare-typescript/commit/7db53fa76f348c72564727dd4d7bb1c7f65595d4))
+* **api:** update composite API spec ([529549a](https://github.com/cloudflare/cloudflare-typescript/commit/529549af7ecbbbadcedeb2578cca113178e73f4d))
+* **api:** update composite API spec ([fbb4acf](https://github.com/cloudflare/cloudflare-typescript/commit/fbb4acfbe3d4b2265c6f396efae013f58a5e8966))
+* **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))
+
## 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..53f1883f3f 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
@@ -5826,10 +5886,9 @@ Types:
Methods:
-- client.zeroTrust.dlp.profiles.predefined.create({ ...params }) -> Profile
-- client.zeroTrust.dlp.profiles.predefined.update(profileId, { ...params }) -> Profile
+- client.zeroTrust.dlp.profiles.predefined.update(profileId, { ...params }) -> PredefinedProfile
- client.zeroTrust.dlp.profiles.predefined.delete(profileId, { ...params }) -> PredefinedDeleteResponse | null
-- client.zeroTrust.dlp.profiles.predefined.get(profileId, { ...params }) -> Profile
+- client.zeroTrust.dlp.profiles.predefined.get(profileId, { ...params }) -> PredefinedProfile
### Limits
@@ -6061,10 +6120,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 +6144,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 +6328,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 +6508,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 +6546,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 +6776,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 +6859,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 +6910,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 +6985,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 +7037,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 +7147,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 +7231,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 +7361,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 +7761,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 +8020,8 @@ Methods:
- client.snippets.rules.list({ ...params }) -> RuleListResponsesSinglePage
- client.snippets.rules.delete({ ...params }) -> RuleDeleteResponsesSinglePage
+# RealtimeKit
+
# Calls
## SFU
@@ -8305,6 +8476,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 +8700,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
@@ -8545,11 +8742,27 @@ Methods:
Types:
-- AbuseReportCreateResponse
+- 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
+
+## Mitigations
+
+Types:
+
+- MitigationListResponse
+- MitigationReviewResponse
+
+Methods:
+
+- client.abuseReports.mitigations.list(reportId, { ...params }) -> MitigationListResponsesV4PagePagination
+- client.abuseReports.mitigations.review(reportId, { ...params }) -> MitigationReviewResponsesSinglePage
# AI
@@ -8637,10 +8850,12 @@ Methods:
Types:
+- ToMarkdownSupportedResponse
- ToMarkdownTransformResponse
Methods:
+- client.ai.toMarkdown.supported({ ...params }) -> ToMarkdownSupportedResponsesSinglePage
- client.ai.toMarkdown.transform(file, { ...params }) -> ToMarkdownTransformResponsesSinglePage
# SecurityCenter
@@ -8831,18 +9046,59 @@ Methods:
Types:
-- PipelineCreateResponse
-- PipelineUpdateResponse
-- PipelineListResponse
-- PipelineGetResponse
+- PipelineCreateResponse
+- PipelineUpdateResponse
+- PipelineListResponse
+- PipelineCreateV1Response
+- PipelineGetResponse
+- PipelineGetV1Response
+- PipelineListV1Response
+- PipelineValidateSqlResponse
Methods:
-- client.pipelines.create({ ...params }) -> PipelineCreateResponse
-- client.pipelines.update(pipelineName, { ...params }) -> PipelineUpdateResponse
-- client.pipelines.list({ ...params }) -> PipelineListResponse
-- client.pipelines.delete(pipelineName, { ...params }) -> void
-- client.pipelines.get(pipelineName, { ...params }) -> PipelineGetResponse
+- client.pipelines.create({ ...params }) -> PipelineCreateResponse
+- client.pipelines.update(pipelineName, { ...params }) -> PipelineUpdateResponse
+- client.pipelines.list({ ...params }) -> PipelineListResponse
+- client.pipelines.delete(pipelineName, { ...params }) -> void
+- client.pipelines.createV1({ ...params }) -> PipelineCreateV1Response
+- client.pipelines.deleteV1(pipelineId, { ...params }) -> void
+- client.pipelines.get(pipelineName, { ...params }) -> PipelineGetResponse
+- client.pipelines.getV1(pipelineId, { ...params }) -> PipelineGetV1Response
+- client.pipelines.listV1({ ...params }) -> PipelineListV1ResponsesV4PagePaginationArray
+- client.pipelines.validateSql({ ...params }) -> PipelineValidateSqlResponse
+
+## Sinks
+
+Types:
+
+- SinkCreateResponse
+- SinkListResponse
+- SinkGetResponse
+
+Methods:
+
+- client.pipelines.sinks.create({ ...params }) -> SinkCreateResponse
+- client.pipelines.sinks.list({ ...params }) -> SinkListResponsesV4PagePaginationArray
+- client.pipelines.sinks.delete(sinkId, { ...params }) -> void
+- client.pipelines.sinks.get(sinkId, { ...params }) -> SinkGetResponse
+
+## Streams
+
+Types:
+
+- StreamCreateResponse
+- StreamUpdateResponse
+- StreamListResponse
+- StreamGetResponse
+
+Methods:
+
+- client.pipelines.streams.create({ ...params }) -> StreamCreateResponse
+- client.pipelines.streams.update(streamId, { ...params }) -> StreamUpdateResponse
+- client.pipelines.streams.list({ ...params }) -> StreamListResponsesV4PagePaginationArray
+- client.pipelines.streams.delete(streamId, { ...params }) -> void
+- client.pipelines.streams.get(streamId, { ...params }) -> StreamGetResponse
# SchemaValidation
@@ -8850,19 +9106,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 +9148,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..99f4dd2c10 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
@@ -721,7 +732,8 @@ TEST_PATHS=(
tests/api-resources/content-scanning/content-scanning.test.ts
tests/api-resources/content-scanning/payloads.test.ts
tests/api-resources/content-scanning/settings.test.ts
- tests/api-resources/abuse-reports.test.ts
+ tests/api-resources/abuse-reports/abuse-reports.test.ts
+ tests/api-resources/abuse-reports/mitigations.test.ts
tests/api-resources/ai/ai.test.ts
tests/api-resources/ai/finetunes/finetunes.test.ts
tests/api-resources/ai/finetunes/assets.test.ts
@@ -750,11 +762,17 @@ TEST_PATHS=(
tests/api-resources/secrets-store/stores/stores.test.ts
tests/api-resources/secrets-store/stores/secrets.test.ts
tests/api-resources/secrets-store/quota.test.ts
- tests/api-resources/pipelines.test.ts
+ tests/api-resources/pipelines/pipelines.test.ts
+ tests/api-resources/pipelines/sinks.test.ts
+ tests/api-resources/pipelines/streams.test.ts
tests/api-resources/schema-validation/schema-validation.test.ts
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..4b5be7346f 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -20,7 +20,6 @@ import {
} from './pagination';
import * as Uploads from './uploads';
import * as API from './resources/index';
-import { AbuseReports } from './resources/abuse-reports';
import { AuditLogs } from './resources/audit-logs';
import { BotManagement } from './resources/bot-management';
import { ClientCertificates } from './resources/client-certificates';
@@ -35,10 +34,11 @@ import { Memberships } from './resources/memberships';
import { OriginCACertificates } from './resources/origin-ca-certificates';
import { OriginPostQuantumEncryption } from './resources/origin-post-quantum-encryption';
import { PageRules } from './resources/page-rules';
-import { Pipelines } from './resources/pipelines';
import { RateLimits } from './resources/rate-limits';
+import { RealtimeKit } from './resources/realtime-kit';
import { SecurityTXT } from './resources/security-txt';
import { URLNormalization } from './resources/url-normalization';
+import { AbuseReports } from './resources/abuse-reports/abuse-reports';
import { Accounts } from './resources/accounts/accounts';
import { ACM } from './resources/acm/acm';
import { Addressing } from './resources/addressing/addressing';
@@ -56,6 +56,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,9 +84,11 @@ 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';
+import { Pipelines } from './resources/pipelines/pipelines';
import { Queues } from './resources/queues/queues';
import { R2 } from './resources/r2/r2';
import { Radar } from './resources/radar/radar';
@@ -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..d99f32381a 100644
--- a/src/resources/abuse-reports.ts
+++ b/src/resources/abuse-reports.ts
@@ -1,889 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-import { APIResource } from '../resource';
-import * as Core from '../core';
-
-export class AbuseReports extends APIResource {
- /**
- * Submit the Abuse Report of a particular type
- */
- create(
- reportType: string,
- params: AbuseReportCreateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id, ...body } = params;
- return (
- this._client.post(`/accounts/${account_id}/abuse-reports/${reportType}`, {
- body,
- ...options,
- }) as Core.APIPromise<{ result: AbuseReportCreateResponse }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-/**
- * The result should be 'success' for successful response
- */
-export type AbuseReportCreateResponse = string;
-
-export type AbuseReportCreateParams =
- | AbuseReportCreateParams.AbuseReportsDmcaReport
- | AbuseReportCreateParams.AbuseReportsTrademarkReport
- | AbuseReportCreateParams.AbuseReportsGeneralReport
- | AbuseReportCreateParams.AbuseReportsPhishingReport
- | AbuseReportCreateParams.AbuseReportsCsamReport
- | AbuseReportCreateParams.AbuseReportsThreatReport
- | AbuseReportCreateParams.AbuseReportsRegistrarWhoisReport
- | AbuseReportCreateParams.AbuseReportsNcseiReport;
-
-export declare namespace AbuseReportCreateParams {
- export interface AbuseReportsDmcaReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_dmca';
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- address1: string;
-
- /**
- * Body param: The name of the copyright holder. Text not exceeding 60 characters.
- * This field may be released by Cloudflare to third parties such as the Lumen
- * Database (https://lumendatabase.org/).
- */
- agent_name: string;
-
- /**
- * Body param: Can be `0` for false or `1` for true. Must be value: 1 for DMCA
- * reports
- */
- agree: 1;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- city: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- country: string;
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- host_notification: 'send';
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- original_work: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send';
-
- /**
- * Body param: Required for DMCA reports, should be same as Name. An affirmation
- * that all information in the report is true and accurate while agreeing to the
- * policies of Cloudflare's abuse reports
- */
- signature: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- state: string;
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-
- export interface AbuseReportsTrademarkReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_trademark';
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- host_notification: 'send';
-
- /**
- * Body param: A detailed description of the infringement, including any necessary
- * access details and the exact steps needed to view the content, not exceeding
- * 5000 characters.
- */
- justification: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send';
-
- /**
- * Body param: Text not exceeding 1000 characters
- */
- trademark_number: string;
-
- /**
- * Body param: Text not exceeding 1000 characters
- */
- trademark_office: string;
-
- /**
- * Body param: Text not exceeding 1000 characters
- */
- trademark_symbol: string;
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-
- export interface AbuseReportsGeneralReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_general';
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- host_notification: 'send' | 'send-anon';
-
- /**
- * Body param: A detailed description of the infringement, including any necessary
- * access details and the exact steps needed to view the content, not exceeding
- * 5000 characters.
- */
- justification: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send' | 'send-anon' | 'none';
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: A list of IP addresses separated by ‘\n’ (new line character). The
- * list of destination IPs should not exceed 30 IP addresses. Each one of the IP
- * addresses ought to be unique.
- */
- destination_ips?: string;
-
- /**
- * Body param: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP.
- * The total size of the field should not exceed 2000 characters. Each individual
- * port/protocol should not exceed 100 characters. The list should not have more
- * than 30 unique ports and protocols.
- */
- ports_protocols?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: A list of IP addresses separated by ‘\n’ (new line character). The
- * list of source IPs should not exceed 30 IP addresses. Each one of the IP
- * addresses ought to be unique.
- */
- source_ips?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-
- export interface AbuseReportsPhishingReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_phishing';
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- host_notification: 'send' | 'send-anon';
-
- /**
- * Body param: A detailed description of the infringement, including any necessary
- * access details and the exact steps needed to view the content, not exceeding
- * 5000 characters.
- */
- justification: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send' | 'send-anon';
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- original_work?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-
- export interface AbuseReportsCsamReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_children';
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- host_notification: 'send' | 'send-anon';
-
- /**
- * Body param: A detailed description of the infringement, including any necessary
- * access details and the exact steps needed to view the content, not exceeding
- * 5000 characters.
- */
- justification: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- ncmec_notification: 'send' | 'send-anon';
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send' | 'send-anon' | 'none';
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- country?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-
- export interface AbuseReportsThreatReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_threat';
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- host_notification: 'send' | 'send-anon';
-
- /**
- * Body param: A detailed description of the infringement, including any necessary
- * access details and the exact steps needed to view the content, not exceeding
- * 5000 characters.
- */
- justification: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send' | 'send-anon';
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-
- export interface AbuseReportsRegistrarWhoisReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_registrar_whois';
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send' | 'send-anon' | 'none';
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-
- export interface AbuseReportsNcseiReport {
- /**
- * Path param: The account ID of the submitter.
- */
- account_id: string;
-
- /**
- * Body param: The abuse report type.
- */
- act: 'abuse_ncsei';
-
- /**
- * Body param: A valid email of the abuse reporter. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- email: string;
-
- /**
- * Body param: Should match the value provided in `email`
- */
- email2: string;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- host_notification: 'send' | 'send-anon';
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- name: string;
-
- /**
- * Body param: If the submitter is the target of NCSEI in the URLs of the abuse
- * report.
- */
- ncsei_subject_representation: boolean;
-
- /**
- * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
- * and Trademark reports cannot be anonymous.
- */
- owner_notification: 'send' | 'send-anon' | 'none';
-
- /**
- * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
- * list of the URLs should not exceed 250 URLs. All URLs should have the same
- * hostname. Each URL should be unique. This field may be released by Cloudflare to
- * third parties such as the Lumen Database (https://lumendatabase.org/).
- */
- urls: string;
-
- /**
- * Body param: Any additional comments about the infringement not exceeding 2000
- * characters
- */
- comments?: string;
-
- /**
- * Body param: Text not exceeding 100 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- company?: string;
-
- /**
- * Body param: Text not exceeding 255 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- country?: string;
-
- /**
- * Body param: Text containing 2 characters
- */
- reported_country?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- reported_user_agent?: string;
-
- /**
- * Body param: Text not exceeding 20 characters. This field may be released by
- * Cloudflare to third parties such as the Lumen Database
- * (https://lumendatabase.org/).
- */
- tele?: string;
-
- /**
- * Body param: Text not exceeding 255 characters
- */
- title?: string;
- }
-}
-
-export declare namespace AbuseReports {
- export {
- type AbuseReportCreateResponse as AbuseReportCreateResponse,
- type AbuseReportCreateParams as AbuseReportCreateParams,
- };
-}
+export * from './abuse-reports/index';
diff --git a/src/resources/abuse-reports/abuse-reports.ts b/src/resources/abuse-reports/abuse-reports.ts
new file mode 100644
index 0000000000..1906ee3245
--- /dev/null
+++ b/src/resources/abuse-reports/abuse-reports.ts
@@ -0,0 +1,1141 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+import * as MitigationsAPI from './mitigations';
+import {
+ MitigationListParams,
+ MitigationListResponse,
+ MitigationListResponsesV4PagePagination,
+ MitigationReviewParams,
+ MitigationReviewResponse,
+ MitigationReviewResponsesSinglePage,
+ Mitigations,
+} from './mitigations';
+import { V4PagePagination, type V4PagePaginationParams } from '../../pagination';
+
+export class AbuseReports extends APIResource {
+ mitigations: MitigationsAPI.Mitigations = new MitigationsAPI.Mitigations(this._client);
+
+ /**
+ * Submit the Abuse Report of a particular type
+ */
+ create(
+ reportParam: string,
+ params: AbuseReportCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ 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
+ | AbuseReportCreateParams.AbuseReportsGeneralReport
+ | AbuseReportCreateParams.AbuseReportsPhishingReport
+ | AbuseReportCreateParams.AbuseReportsCsamReport
+ | AbuseReportCreateParams.AbuseReportsThreatReport
+ | AbuseReportCreateParams.AbuseReportsRegistrarWhoisReport
+ | AbuseReportCreateParams.AbuseReportsNcseiReport;
+
+export declare namespace AbuseReportCreateParams {
+ export interface AbuseReportsDmcaReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_dmca';
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ address1: string;
+
+ /**
+ * Body param: The name of the copyright holder. Text not exceeding 60 characters.
+ * This field may be released by Cloudflare to third parties such as the Lumen
+ * Database (https://lumendatabase.org/).
+ */
+ agent_name: string;
+
+ /**
+ * Body param: Can be `0` for false or `1` for true. Must be value: 1 for DMCA
+ * reports
+ */
+ agree: 1;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ city: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ country: string;
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ host_notification: 'send';
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ original_work: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send';
+
+ /**
+ * Body param: Required for DMCA reports, should be same as Name. An affirmation
+ * that all information in the report is true and accurate while agreeing to the
+ * policies of Cloudflare's abuse reports
+ */
+ signature: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ state: string;
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+
+ export interface AbuseReportsTrademarkReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_trademark';
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ host_notification: 'send';
+
+ /**
+ * Body param: A detailed description of the infringement, including any necessary
+ * access details and the exact steps needed to view the content, not exceeding
+ * 5000 characters.
+ */
+ justification: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send';
+
+ /**
+ * Body param: Text not exceeding 1000 characters
+ */
+ trademark_number: string;
+
+ /**
+ * Body param: Text not exceeding 1000 characters
+ */
+ trademark_office: string;
+
+ /**
+ * Body param: Text not exceeding 1000 characters
+ */
+ trademark_symbol: string;
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+
+ export interface AbuseReportsGeneralReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_general';
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ host_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: A detailed description of the infringement, including any necessary
+ * access details and the exact steps needed to view the content, not exceeding
+ * 5000 characters.
+ */
+ justification: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send' | 'send-anon' | 'none';
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: A list of IP addresses separated by ‘\n’ (new line character). The
+ * list of destination IPs should not exceed 30 IP addresses. Each one of the IP
+ * addresses ought to be unique.
+ */
+ destination_ips?: string;
+
+ /**
+ * Body param: A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP.
+ * The total size of the field should not exceed 2000 characters. Each individual
+ * port/protocol should not exceed 100 characters. The list should not have more
+ * than 30 unique ports and protocols.
+ */
+ ports_protocols?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: A list of IP addresses separated by ‘\n’ (new line character). The
+ * list of source IPs should not exceed 30 IP addresses. Each one of the IP
+ * addresses ought to be unique.
+ */
+ source_ips?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+
+ export interface AbuseReportsPhishingReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_phishing';
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ host_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: A detailed description of the infringement, including any necessary
+ * access details and the exact steps needed to view the content, not exceeding
+ * 5000 characters.
+ */
+ justification: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ original_work?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+
+ export interface AbuseReportsCsamReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_children';
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ host_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: A detailed description of the infringement, including any necessary
+ * access details and the exact steps needed to view the content, not exceeding
+ * 5000 characters.
+ */
+ justification: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ ncmec_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send' | 'send-anon' | 'none';
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ country?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+
+ export interface AbuseReportsThreatReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_threat';
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ host_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: A detailed description of the infringement, including any necessary
+ * access details and the exact steps needed to view the content, not exceeding
+ * 5000 characters.
+ */
+ justification: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+
+ export interface AbuseReportsRegistrarWhoisReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_registrar_whois';
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send' | 'send-anon' | 'none';
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+
+ export interface AbuseReportsNcseiReport {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: The report type for submitted reports.
+ */
+ act: 'abuse_ncsei';
+
+ /**
+ * Body param: A valid email of the abuse reporter. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ email: string;
+
+ /**
+ * Body param: Should match the value provided in `email`
+ */
+ email2: string;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ host_notification: 'send' | 'send-anon';
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ name: string;
+
+ /**
+ * Body param: If the submitter is the target of NCSEI in the URLs of the abuse
+ * report.
+ */
+ ncsei_subject_representation: boolean;
+
+ /**
+ * Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA)
+ * and Trademark reports cannot be anonymous.
+ */
+ owner_notification: 'send' | 'send-anon' | 'none';
+
+ /**
+ * Body param: A list of valid URLs separated by ‘\n’ (new line character). The
+ * list of the URLs should not exceed 250 URLs. All URLs should have the same
+ * hostname. Each URL should be unique. This field may be released by Cloudflare to
+ * third parties such as the Lumen Database (https://lumendatabase.org/).
+ */
+ urls: string;
+
+ /**
+ * Body param: Any additional comments about the infringement not exceeding 2000
+ * characters
+ */
+ comments?: string;
+
+ /**
+ * Body param: Text not exceeding 100 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ company?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ country?: string;
+
+ /**
+ * Body param: Text containing 2 characters
+ */
+ reported_country?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ reported_user_agent?: string;
+
+ /**
+ * Body param: Text not exceeding 20 characters. This field may be released by
+ * Cloudflare to third parties such as the Lumen Database
+ * (https://lumendatabase.org/).
+ */
+ tele?: string;
+
+ /**
+ * Body param: Text not exceeding 255 characters
+ */
+ title?: string;
+ }
+}
+
+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;
+AbuseReports.Mitigations = Mitigations;
+AbuseReports.MitigationListResponsesV4PagePagination = MitigationListResponsesV4PagePagination;
+AbuseReports.MitigationReviewResponsesSinglePage = MitigationReviewResponsesSinglePage;
+
+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,
+ };
+
+ export {
+ Mitigations as Mitigations,
+ type MitigationListResponse as MitigationListResponse,
+ type MitigationReviewResponse as MitigationReviewResponse,
+ MitigationListResponsesV4PagePagination as MitigationListResponsesV4PagePagination,
+ MitigationReviewResponsesSinglePage as MitigationReviewResponsesSinglePage,
+ type MitigationListParams as MitigationListParams,
+ type MitigationReviewParams as MitigationReviewParams,
+ };
+}
diff --git a/src/resources/abuse-reports/index.ts b/src/resources/abuse-reports/index.ts
new file mode 100644
index 0000000000..ea6893efe5
--- /dev/null
+++ b/src/resources/abuse-reports/index.ts
@@ -0,0 +1,12 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export { AbuseReports } from './abuse-reports';
+export {
+ MitigationListResponsesV4PagePagination,
+ MitigationReviewResponsesSinglePage,
+ Mitigations,
+ type MitigationListResponse,
+ type MitigationReviewResponse,
+ type MitigationListParams,
+ type MitigationReviewParams,
+} from './mitigations';
diff --git a/src/resources/abuse-reports/mitigations.ts b/src/resources/abuse-reports/mitigations.ts
new file mode 100644
index 0000000000..eae497cc57
--- /dev/null
+++ b/src/resources/abuse-reports/mitigations.ts
@@ -0,0 +1,208 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+import { SinglePage, V4PagePagination, type V4PagePaginationParams } from '../../pagination';
+
+export class Mitigations extends APIResource {
+ /**
+ * List mitigations done to remediate the abuse report.
+ */
+ list(
+ reportId: string,
+ params: MitigationListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/abuse-reports/${reportId}/mitigations`,
+ MitigationListResponsesV4PagePagination,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Request a review for mitigations on an account.
+ */
+ review(
+ reportId: string,
+ params: MitigationReviewParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...body } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/abuse-reports/${reportId}/mitigations/appeal`,
+ MitigationReviewResponsesSinglePage,
+ { body, method: 'post', ...options },
+ );
+ }
+}
+
+export class MitigationListResponsesV4PagePagination extends V4PagePagination {}
+
+export class MitigationReviewResponsesSinglePage extends SinglePage {}
+
+export interface MitigationListResponse {
+ mitigations: Array;
+}
+
+export namespace MitigationListResponse {
+ export interface Mitigation {
+ /**
+ * ID of remediation.
+ */
+ id: string;
+
+ /**
+ * Date when the mitigation will become active. Time in RFC 3339 format
+ * (https://www.rfc-editor.org/rfc/rfc3339.html)
+ */
+ effective_date: string;
+
+ entity_id: string;
+
+ entity_type: 'url_pattern' | 'account' | 'zone';
+
+ /**
+ * The status of a mitigation
+ */
+ status: 'pending' | 'active' | 'in_review' | 'cancelled' | 'removed';
+
+ /**
+ * The type of mitigation
+ */
+ type:
+ | 'legal_block'
+ | 'phishing_interstitial'
+ | 'network_block'
+ | 'rate_limit_cache'
+ | 'account_suspend'
+ | 'redirect_video_stream';
+ }
+}
+
+export interface MitigationReviewResponse {
+ /**
+ * ID of remediation.
+ */
+ id: string;
+
+ /**
+ * Date when the mitigation will become active. Time in RFC 3339 format
+ * (https://www.rfc-editor.org/rfc/rfc3339.html)
+ */
+ effective_date: string;
+
+ entity_id: string;
+
+ entity_type: 'url_pattern' | 'account' | 'zone';
+
+ /**
+ * The status of a mitigation
+ */
+ status: 'pending' | 'active' | 'in_review' | 'cancelled' | 'removed';
+
+ /**
+ * The type of mitigation
+ */
+ type:
+ | 'legal_block'
+ | 'phishing_interstitial'
+ | 'network_block'
+ | 'rate_limit_cache'
+ | 'account_suspend'
+ | 'redirect_video_stream';
+}
+
+export interface MitigationListParams extends V4PagePaginationParams {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Query param: Returns mitigation that were dispatched after the given date
+ */
+ effective_after?: string;
+
+ /**
+ * Query param: Returns mitigations that were dispatched before the given date
+ */
+ effective_before?: string;
+
+ /**
+ * Query param: Filter by the type of entity the mitigation impacts.
+ */
+ entity_type?: 'url_pattern' | 'account' | 'zone';
+
+ /**
+ * Query param: A property to sort by, followed by the order
+ */
+ sort?:
+ | 'type,asc'
+ | 'type,desc'
+ | 'effective_date,asc'
+ | 'effective_date,desc'
+ | 'status,asc'
+ | 'status,desc'
+ | 'entity_type,asc'
+ | 'entity_type,desc';
+
+ /**
+ * Query param: Filter by the status of the mitigation.
+ */
+ status?: 'pending' | 'active' | 'in_review' | 'cancelled' | 'removed';
+
+ /**
+ * Query param: Filter by the type of mitigation. This filter parameter can be
+ * specified multiple times to include multiple types of mitigations in the result
+ * set, e.g. ?type=rate_limit_cache&type=legal_block.
+ */
+ type?:
+ | 'legal_block'
+ | 'phishing_interstitial'
+ | 'network_block'
+ | 'rate_limit_cache'
+ | 'account_suspend'
+ | 'redirect_video_stream';
+}
+
+export interface MitigationReviewParams {
+ /**
+ * Path param: Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * Body param: List of mitigations to appeal.
+ */
+ appeals: Array;
+}
+
+export namespace MitigationReviewParams {
+ export interface Appeal {
+ /**
+ * ID of the mitigation to appeal.
+ */
+ id: string;
+
+ /**
+ * Reason why the customer is appealing.
+ */
+ reason: 'removed' | 'misclassified';
+ }
+}
+
+Mitigations.MitigationListResponsesV4PagePagination = MitigationListResponsesV4PagePagination;
+Mitigations.MitigationReviewResponsesSinglePage = MitigationReviewResponsesSinglePage;
+
+export declare namespace Mitigations {
+ export {
+ type MitigationListResponse as MitigationListResponse,
+ type MitigationReviewResponse as MitigationReviewResponse,
+ MitigationListResponsesV4PagePagination as MitigationListResponsesV4PagePagination,
+ MitigationReviewResponsesSinglePage as MitigationReviewResponsesSinglePage,
+ type MitigationListParams as MitigationListParams,
+ type MitigationReviewParams as MitigationReviewParams,
+ };
+}
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/ai/ai.ts b/src/resources/ai/ai.ts
index a6774c28a0..3d1778abe1 100644
--- a/src/resources/ai/ai.ts
+++ b/src/resources/ai/ai.ts
@@ -9,6 +9,9 @@ import { TaskListParams, TaskListResponse, TaskListResponsesSinglePage, Tasks }
import * as ToMarkdownAPI from './to-markdown';
import {
ToMarkdown,
+ ToMarkdownSupportedParams,
+ ToMarkdownSupportedResponse,
+ ToMarkdownSupportedResponsesSinglePage,
ToMarkdownTransformParams,
ToMarkdownTransformResponse,
ToMarkdownTransformResponsesSinglePage,
@@ -1063,6 +1066,7 @@ AI.TaskListResponsesSinglePage = TaskListResponsesSinglePage;
AI.Models = Models;
AI.ModelListResponsesV4PagePaginationArray = ModelListResponsesV4PagePaginationArray;
AI.ToMarkdown = ToMarkdown;
+AI.ToMarkdownSupportedResponsesSinglePage = ToMarkdownSupportedResponsesSinglePage;
AI.ToMarkdownTransformResponsesSinglePage = ToMarkdownTransformResponsesSinglePage;
export declare namespace AI {
@@ -1099,8 +1103,11 @@ export declare namespace AI {
export {
ToMarkdown as ToMarkdown,
+ type ToMarkdownSupportedResponse as ToMarkdownSupportedResponse,
type ToMarkdownTransformResponse as ToMarkdownTransformResponse,
+ ToMarkdownSupportedResponsesSinglePage as ToMarkdownSupportedResponsesSinglePage,
ToMarkdownTransformResponsesSinglePage as ToMarkdownTransformResponsesSinglePage,
+ type ToMarkdownSupportedParams as ToMarkdownSupportedParams,
type ToMarkdownTransformParams as ToMarkdownTransformParams,
};
}
diff --git a/src/resources/ai/index.ts b/src/resources/ai/index.ts
index 213e475dd2..60f0842740 100644
--- a/src/resources/ai/index.ts
+++ b/src/resources/ai/index.ts
@@ -22,8 +22,11 @@ export {
} from './models/index';
export { TaskListResponsesSinglePage, Tasks, type TaskListResponse, type TaskListParams } from './tasks';
export {
+ ToMarkdownSupportedResponsesSinglePage,
ToMarkdownTransformResponsesSinglePage,
ToMarkdown,
+ type ToMarkdownSupportedResponse,
type ToMarkdownTransformResponse,
+ type ToMarkdownSupportedParams,
type ToMarkdownTransformParams,
} from './to-markdown';
diff --git a/src/resources/ai/to-markdown.ts b/src/resources/ai/to-markdown.ts
index 8c075a3a75..319d2ea8c1 100644
--- a/src/resources/ai/to-markdown.ts
+++ b/src/resources/ai/to-markdown.ts
@@ -6,6 +6,21 @@ import { SinglePage } from '../../pagination';
import { type BlobLike } from '../../uploads';
export class ToMarkdown extends APIResource {
+ /**
+ * Get all converted formats supported
+ */
+ supported(
+ params: ToMarkdownSupportedParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/ai/tomarkdown/supported`,
+ ToMarkdownSupportedResponsesSinglePage,
+ options,
+ );
+ }
+
/**
* Convert Files into Markdown
*/
@@ -29,8 +44,16 @@ export class ToMarkdown extends APIResource {
}
}
+export class ToMarkdownSupportedResponsesSinglePage extends SinglePage {}
+
export class ToMarkdownTransformResponsesSinglePage extends SinglePage {}
+export interface ToMarkdownSupportedResponse {
+ extension: string;
+
+ mimeType: string;
+}
+
export interface ToMarkdownTransformResponse {
data: string;
@@ -43,6 +66,10 @@ export interface ToMarkdownTransformResponse {
tokens: string;
}
+export interface ToMarkdownSupportedParams {
+ account_id: string;
+}
+
export interface ToMarkdownTransformParams {
/**
* Path param:
@@ -50,12 +77,16 @@ export interface ToMarkdownTransformParams {
account_id: string;
}
+ToMarkdown.ToMarkdownSupportedResponsesSinglePage = ToMarkdownSupportedResponsesSinglePage;
ToMarkdown.ToMarkdownTransformResponsesSinglePage = ToMarkdownTransformResponsesSinglePage;
export declare namespace ToMarkdown {
export {
+ type ToMarkdownSupportedResponse as ToMarkdownSupportedResponse,
type ToMarkdownTransformResponse as ToMarkdownTransformResponse,
+ ToMarkdownSupportedResponsesSinglePage as ToMarkdownSupportedResponsesSinglePage,
ToMarkdownTransformResponsesSinglePage as ToMarkdownTransformResponsesSinglePage,
+ type ToMarkdownSupportedParams as ToMarkdownSupportedParams,
type ToMarkdownTransformParams as ToMarkdownTransformParams,
};
}
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..8d390ae8aa 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,15 @@ export class Configurations extends APIResource {
* });
* ```
*/
- 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 });
+ update(params: ConfigurationUpdateParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { zone_id, normalize, ...body } = params;
+ return (
+ this._client.put(`/zones/${zone_id}/api_gateway/configuration`, {
+ query: { normalize },
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: Configuration }>
+ )._thenUnwrap((obj) => obj.result);
}
/**
@@ -93,17 +95,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.
@@ -117,6 +108,12 @@ export interface ConfigurationUpdateParams {
| ConfigurationUpdateParams.APIShieldAuthIDCharacteristic
| ConfigurationUpdateParams.APIShieldAuthIDCharacteristicJWTClaim
>;
+
+ /**
+ * Query param: Ensures that the configuration is written or retrieved in
+ * normalized fashion
+ */
+ normalize?: boolean;
}
export namespace ConfigurationUpdateParams {
@@ -164,15 +161,15 @@ export interface ConfigurationGetParams {
zone_id: string;
/**
- * Query param: Requests information about certain properties.
+ * Query param: Ensures that the configuration is written or retrieved in
+ * normalized fashion
*/
- properties?: Array<'auth_id_characteristics'>;
+ normalize?: boolean;
}
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..db6807ef5a 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, uses
+ * the default dataset.
+ */
+ 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..cd9e316204 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,
+ * uses the default dataset.
+ */
+ 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..e1adaf13f9 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, uses the default dataset.
+ */
+ 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..1235187ac8 100644
--- a/src/resources/email-security/investigate/investigate.ts
+++ b/src/resources/email-security/investigate/investigate.ts
@@ -182,7 +182,8 @@ export namespace InvestigateListResponse {
| 'allowed_recipient'
| 'domain_similarity'
| 'domain_recency'
- | 'managed_acceptable_sender';
+ | 'managed_acceptable_sender'
+ | 'outbound_ndr';
blocklisted_message?: boolean;
@@ -195,14 +196,38 @@ export namespace InvestigateListResponse {
| 'allowed_recipient'
| 'domain_similarity'
| 'domain_recency'
- | 'managed_acceptable_sender';
+ | 'managed_acceptable_sender'
+ | 'outbound_ndr';
}
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;
}
@@ -304,7 +329,8 @@ export namespace InvestigateGetResponse {
| 'allowed_recipient'
| 'domain_similarity'
| 'domain_recency'
- | 'managed_acceptable_sender';
+ | 'managed_acceptable_sender'
+ | 'outbound_ndr';
blocklisted_message?: boolean;
@@ -317,14 +343,38 @@ export namespace InvestigateGetResponse {
| 'allowed_recipient'
| 'domain_similarity'
| 'domain_recency'
- | 'managed_acceptable_sender';
+ | 'managed_acceptable_sender'
+ | 'outbound_ndr';
}
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 +405,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..aa69e93aa4 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -5,7 +5,7 @@ export { ACM } from './acm/acm';
export { AI } from './ai/ai';
export { AIGateway } from './ai-gateway/ai-gateway';
export { APIGateway } from './api-gateway/api-gateway';
-export { AbuseReports } from './abuse-reports';
+export { AbuseReports } from './abuse-reports/abuse-reports';
export { Accounts } from './accounts/accounts';
export { Addressing } from './addressing/addressing';
export { Alerting } from './alerting/alerting';
@@ -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,18 +58,20 @@ 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';
export { PageRules } from './page-rules';
export { PageShield } from './page-shield/page-shield';
export { Pages } from './pages/pages';
-export { Pipelines } from './pipelines';
+export { Pipelines } from './pipelines/pipelines';
export { Queues } from './queues/queues';
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..7c0dd168ab 100644
--- a/src/resources/pipelines.ts
+++ b/src/resources/pipelines.ts
@@ -1,1053 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-import { APIResource } from '../resource';
-import * as Core from '../core';
-
-export class Pipelines extends APIResource {
- /**
- * Create a new pipeline.
- *
- * @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' }],
- * });
- * ```
- */
- create(
- params: PipelineCreateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id, ...body } = params;
- return (
- this._client.post(`/accounts/${account_id}/pipelines`, { body, ...options }) as Core.APIPromise<{
- result: PipelineCreateResponse;
- }>
- )._thenUnwrap((obj) => obj.result);
- }
-
- /**
- * Update an existing pipeline.
- *
- * @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' }],
- * },
- * );
- * ```
- */
- update(
- pipelineName: string,
- params: PipelineUpdateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id, ...body } = params;
- return (
- this._client.put(`/accounts/${account_id}/pipelines/${pipelineName}`, {
- body,
- ...options,
- }) as Core.APIPromise<{ result: PipelineUpdateResponse }>
- )._thenUnwrap((obj) => obj.result);
- }
-
- /**
- * List, filter, and paginate pipelines in an account.
- *
- * @example
- * ```ts
- * const pipelines = await client.pipelines.list({
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * });
- * ```
- */
- list(params: PipelineListParams, options?: Core.RequestOptions): Core.APIPromise {
- const { account_id, ...query } = params;
- return this._client.get(`/accounts/${account_id}/pipelines`, { query, ...options });
- }
-
- /**
- * Delete a pipeline.
- *
- * @example
- * ```ts
- * await client.pipelines.delete('sample_pipeline', {
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * });
- * ```
- */
- delete(
- pipelineName: string,
- params: PipelineDeleteParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id } = params;
- return this._client.delete(`/accounts/${account_id}/pipelines/${pipelineName}`, {
- ...options,
- headers: { Accept: '*/*', ...options?.headers },
- });
- }
-
- /**
- * Get configuration of a pipeline.
- *
- * @example
- * ```ts
- * const pipeline = await client.pipelines.get(
- * 'sample_pipeline',
- * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
- * );
- * ```
- */
- get(
- pipelineName: string,
- params: PipelineGetParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id } = params;
- return (
- this._client.get(`/accounts/${account_id}/pipelines/${pipelineName}`, options) as Core.APIPromise<{
- result: PipelineGetResponse;
- }>
- )._thenUnwrap((obj) => obj.result);
- }
-}
-
-/**
- * Describes the configuration of a pipeline.
- */
-export interface PipelineCreateResponse {
- /**
- * Specifies the pipeline identifier.
- */
- id: string;
-
- destination: PipelineCreateResponse.Destination;
-
- /**
- * Indicates the endpoint URL to send traffic.
- */
- endpoint: string;
-
- /**
- * Defines the name of the pipeline.
- */
- name: string;
-
- source: Array<
- | PipelineCreateResponse.CloudflarePipelinesWorkersPipelinesHTTPSource
- | PipelineCreateResponse.CloudflarePipelinesWorkersPipelinesBindingSource
- >;
-
- /**
- * Indicates the version number of last saved configuration.
- */
- version: number;
-}
-
-export namespace PipelineCreateResponse {
- export interface Destination {
- batch: Destination.Batch;
-
- compression: Destination.Compression;
-
- /**
- * Specifies the format of data to deliver.
- */
- format: 'json';
-
- path: Destination.Path;
-
- /**
- * Specifies the type of destination.
- */
- type: 'r2';
- }
-
- export namespace Destination {
- export interface Batch {
- /**
- * Specifies rough maximum size of files.
- */
- max_bytes: number;
-
- /**
- * Specifies duration to wait to aggregate batches files.
- */
- max_duration_s: number;
-
- /**
- * Specifies rough maximum number of rows per file.
- */
- max_rows: number;
- }
-
- export interface Compression {
- /**
- * Specifies the desired compression algorithm and format.
- */
- type: 'none' | 'gzip' | 'deflate';
- }
-
- export interface Path {
- /**
- * Specifies the R2 Bucket to store files.
- */
- bucket: string;
-
- /**
- * Specifies the name pattern to for individual data files.
- */
- filename?: string;
-
- /**
- * Specifies the name pattern for directory.
- */
- filepath?: string;
-
- /**
- * Specifies the base directory within the bucket.
- */
- prefix?: string;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
-
- /**
- * Specifies whether authentication is required to send to this pipeline via HTTP.
- */
- authentication?: boolean;
-
- cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
- }
-
- export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
- export interface CORS {
- /**
- * Specifies allowed origins to allow Cross Origin HTTP Requests.
- */
- origins?: Array;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesBindingSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
- }
-}
-
-/**
- * Describes the configuration of a pipeline.
- */
-export interface PipelineUpdateResponse {
- /**
- * Specifies the pipeline identifier.
- */
- id: string;
-
- destination: PipelineUpdateResponse.Destination;
-
- /**
- * Indicates the endpoint URL to send traffic.
- */
- endpoint: string;
-
- /**
- * Defines the name of the pipeline.
- */
- name: string;
-
- source: Array<
- | PipelineUpdateResponse.CloudflarePipelinesWorkersPipelinesHTTPSource
- | PipelineUpdateResponse.CloudflarePipelinesWorkersPipelinesBindingSource
- >;
-
- /**
- * Indicates the version number of last saved configuration.
- */
- version: number;
-}
-
-export namespace PipelineUpdateResponse {
- export interface Destination {
- batch: Destination.Batch;
-
- compression: Destination.Compression;
-
- /**
- * Specifies the format of data to deliver.
- */
- format: 'json';
-
- path: Destination.Path;
-
- /**
- * Specifies the type of destination.
- */
- type: 'r2';
- }
-
- export namespace Destination {
- export interface Batch {
- /**
- * Specifies rough maximum size of files.
- */
- max_bytes: number;
-
- /**
- * Specifies duration to wait to aggregate batches files.
- */
- max_duration_s: number;
-
- /**
- * Specifies rough maximum number of rows per file.
- */
- max_rows: number;
- }
-
- export interface Compression {
- /**
- * Specifies the desired compression algorithm and format.
- */
- type: 'none' | 'gzip' | 'deflate';
- }
-
- export interface Path {
- /**
- * Specifies the R2 Bucket to store files.
- */
- bucket: string;
-
- /**
- * Specifies the name pattern to for individual data files.
- */
- filename?: string;
-
- /**
- * Specifies the name pattern for directory.
- */
- filepath?: string;
-
- /**
- * Specifies the base directory within the bucket.
- */
- prefix?: string;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
-
- /**
- * Specifies whether authentication is required to send to this pipeline via HTTP.
- */
- authentication?: boolean;
-
- cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
- }
-
- export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
- export interface CORS {
- /**
- * Specifies allowed origins to allow Cross Origin HTTP Requests.
- */
- origins?: Array;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesBindingSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
- }
-}
-
-export interface PipelineListResponse {
- result_info: PipelineListResponse.ResultInfo;
-
- results: Array;
-
- /**
- * Indicates whether the API call was successful.
- */
- success: boolean;
-}
-
-export namespace PipelineListResponse {
- export interface ResultInfo {
- /**
- * Indicates the number of items on current page.
- */
- count: number;
-
- /**
- * Indicates the current page number.
- */
- page: number;
-
- /**
- * Indicates the number of items per page.
- */
- per_page: number;
-
- /**
- * Indicates the total number of items.
- */
- total_count: number;
- }
-
- /**
- * Describes the configuration of a pipeline.
- */
- export interface Result {
- /**
- * Specifies the pipeline identifier.
- */
- id: string;
-
- destination: Result.Destination;
-
- /**
- * Indicates the endpoint URL to send traffic.
- */
- endpoint: string;
-
- /**
- * Defines the name of the pipeline.
- */
- name: string;
-
- source: Array<
- | Result.CloudflarePipelinesWorkersPipelinesHTTPSource
- | Result.CloudflarePipelinesWorkersPipelinesBindingSource
- >;
-
- /**
- * Indicates the version number of last saved configuration.
- */
- version: number;
- }
-
- export namespace Result {
- export interface Destination {
- batch: Destination.Batch;
-
- compression: Destination.Compression;
-
- /**
- * Specifies the format of data to deliver.
- */
- format: 'json';
-
- path: Destination.Path;
-
- /**
- * Specifies the type of destination.
- */
- type: 'r2';
- }
-
- export namespace Destination {
- export interface Batch {
- /**
- * Specifies rough maximum size of files.
- */
- max_bytes: number;
-
- /**
- * Specifies duration to wait to aggregate batches files.
- */
- max_duration_s: number;
-
- /**
- * Specifies rough maximum number of rows per file.
- */
- max_rows: number;
- }
-
- export interface Compression {
- /**
- * Specifies the desired compression algorithm and format.
- */
- type: 'none' | 'gzip' | 'deflate';
- }
-
- export interface Path {
- /**
- * Specifies the R2 Bucket to store files.
- */
- bucket: string;
-
- /**
- * Specifies the name pattern to for individual data files.
- */
- filename?: string;
-
- /**
- * Specifies the name pattern for directory.
- */
- filepath?: string;
-
- /**
- * Specifies the base directory within the bucket.
- */
- prefix?: string;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
-
- /**
- * Specifies whether authentication is required to send to this pipeline via HTTP.
- */
- authentication?: boolean;
-
- cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
- }
-
- export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
- export interface CORS {
- /**
- * Specifies allowed origins to allow Cross Origin HTTP Requests.
- */
- origins?: Array;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesBindingSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
- }
- }
-}
-
-/**
- * Describes the configuration of a pipeline.
- */
-export interface PipelineGetResponse {
- /**
- * Specifies the pipeline identifier.
- */
- id: string;
-
- destination: PipelineGetResponse.Destination;
-
- /**
- * Indicates the endpoint URL to send traffic.
- */
- endpoint: string;
-
- /**
- * Defines the name of the pipeline.
- */
- name: string;
-
- source: Array<
- | PipelineGetResponse.CloudflarePipelinesWorkersPipelinesHTTPSource
- | PipelineGetResponse.CloudflarePipelinesWorkersPipelinesBindingSource
- >;
-
- /**
- * Indicates the version number of last saved configuration.
- */
- version: number;
-}
-
-export namespace PipelineGetResponse {
- export interface Destination {
- batch: Destination.Batch;
-
- compression: Destination.Compression;
-
- /**
- * Specifies the format of data to deliver.
- */
- format: 'json';
-
- path: Destination.Path;
-
- /**
- * Specifies the type of destination.
- */
- type: 'r2';
- }
-
- export namespace Destination {
- export interface Batch {
- /**
- * Specifies rough maximum size of files.
- */
- max_bytes: number;
-
- /**
- * Specifies duration to wait to aggregate batches files.
- */
- max_duration_s: number;
-
- /**
- * Specifies rough maximum number of rows per file.
- */
- max_rows: number;
- }
-
- export interface Compression {
- /**
- * Specifies the desired compression algorithm and format.
- */
- type: 'none' | 'gzip' | 'deflate';
- }
-
- export interface Path {
- /**
- * Specifies the R2 Bucket to store files.
- */
- bucket: string;
-
- /**
- * Specifies the name pattern to for individual data files.
- */
- filename?: string;
-
- /**
- * Specifies the name pattern for directory.
- */
- filepath?: string;
-
- /**
- * Specifies the base directory within the bucket.
- */
- prefix?: string;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
-
- /**
- * Specifies whether authentication is required to send to this pipeline via HTTP.
- */
- authentication?: boolean;
-
- cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
- }
-
- export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
- export interface CORS {
- /**
- * Specifies allowed origins to allow Cross Origin HTTP Requests.
- */
- origins?: Array;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesBindingSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
- }
-}
-
-export interface PipelineCreateParams {
- /**
- * Path param: Specifies the public ID of the account.
- */
- account_id: string;
-
- /**
- * Body param:
- */
- destination: PipelineCreateParams.Destination;
-
- /**
- * Body param: Defines the name of the pipeline.
- */
- name: string;
-
- /**
- * Body param:
- */
- source: Array<
- | PipelineCreateParams.CloudflarePipelinesWorkersPipelinesHTTPSource
- | PipelineCreateParams.CloudflarePipelinesWorkersPipelinesBindingSource
- >;
-}
-
-export namespace PipelineCreateParams {
- export interface Destination {
- batch: Destination.Batch;
-
- compression: Destination.Compression;
-
- credentials: Destination.Credentials;
-
- /**
- * Specifies the format of data to deliver.
- */
- format: 'json';
-
- path: Destination.Path;
-
- /**
- * Specifies the type of destination.
- */
- type: 'r2';
- }
-
- export namespace Destination {
- export interface Batch {
- /**
- * Specifies rough maximum size of files.
- */
- max_bytes?: number;
-
- /**
- * Specifies duration to wait to aggregate batches files.
- */
- max_duration_s?: number;
-
- /**
- * Specifies rough maximum number of rows per file.
- */
- max_rows?: number;
- }
-
- export interface Compression {
- /**
- * Specifies the desired compression algorithm and format.
- */
- type?: 'none' | 'gzip' | 'deflate';
- }
-
- export interface Credentials {
- /**
- * Specifies the R2 Bucket Access Key Id.
- */
- access_key_id: string;
-
- /**
- * Specifies the R2 Endpoint.
- */
- endpoint: string;
-
- /**
- * Specifies the R2 Bucket Secret Access Key.
- */
- secret_access_key: string;
- }
-
- export interface Path {
- /**
- * Specifies the R2 Bucket to store files.
- */
- bucket: string;
-
- /**
- * Specifies the name pattern to for individual data files.
- */
- filename?: string;
-
- /**
- * Specifies the name pattern for directory.
- */
- filepath?: string;
-
- /**
- * Specifies the base directory within the bucket.
- */
- prefix?: string;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
-
- /**
- * Specifies whether authentication is required to send to this pipeline via HTTP.
- */
- authentication?: boolean;
-
- cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
- }
-
- export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
- export interface CORS {
- /**
- * Specifies allowed origins to allow Cross Origin HTTP Requests.
- */
- origins?: Array;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesBindingSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
- }
-}
-
-export interface PipelineUpdateParams {
- /**
- * Path param: Specifies the public ID of the account.
- */
- account_id: string;
-
- /**
- * Body param:
- */
- destination: PipelineUpdateParams.Destination;
-
- /**
- * Body param: Defines the name of the pipeline.
- */
- name: string;
-
- /**
- * Body param:
- */
- source: Array<
- | PipelineUpdateParams.CloudflarePipelinesWorkersPipelinesHTTPSource
- | PipelineUpdateParams.CloudflarePipelinesWorkersPipelinesBindingSource
- >;
-}
-
-export namespace PipelineUpdateParams {
- export interface Destination {
- batch: Destination.Batch;
-
- compression: Destination.Compression;
-
- /**
- * Specifies the format of data to deliver.
- */
- format: 'json';
-
- path: Destination.Path;
-
- /**
- * Specifies the type of destination.
- */
- type: 'r2';
-
- credentials?: Destination.Credentials;
- }
-
- export namespace Destination {
- export interface Batch {
- /**
- * Specifies rough maximum size of files.
- */
- max_bytes?: number;
-
- /**
- * Specifies duration to wait to aggregate batches files.
- */
- max_duration_s?: number;
-
- /**
- * Specifies rough maximum number of rows per file.
- */
- max_rows?: number;
- }
-
- export interface Compression {
- /**
- * Specifies the desired compression algorithm and format.
- */
- type?: 'none' | 'gzip' | 'deflate';
- }
-
- export interface Path {
- /**
- * Specifies the R2 Bucket to store files.
- */
- bucket: string;
-
- /**
- * Specifies the name pattern to for individual data files.
- */
- filename?: string;
-
- /**
- * Specifies the name pattern for directory.
- */
- filepath?: string;
-
- /**
- * Specifies the base directory within the bucket.
- */
- prefix?: string;
- }
-
- export interface Credentials {
- /**
- * Specifies the R2 Bucket Access Key Id.
- */
- access_key_id: string;
-
- /**
- * Specifies the R2 Endpoint.
- */
- endpoint: string;
-
- /**
- * Specifies the R2 Bucket Secret Access Key.
- */
- secret_access_key: string;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
-
- /**
- * Specifies whether authentication is required to send to this pipeline via HTTP.
- */
- authentication?: boolean;
-
- cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
- }
-
- export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
- export interface CORS {
- /**
- * Specifies allowed origins to allow Cross Origin HTTP Requests.
- */
- origins?: Array;
- }
- }
-
- export interface CloudflarePipelinesWorkersPipelinesBindingSource {
- /**
- * Specifies the format of source data.
- */
- format: 'json';
-
- type: string;
- }
-}
-
-export interface PipelineListParams {
- /**
- * Path param: Specifies the public ID of the account.
- */
- account_id: string;
-
- /**
- * Query param: Specifies which page to retrieve.
- */
- page?: string;
-
- /**
- * Query param: Specifies the number of pipelines per page.
- */
- per_page?: string;
-
- /**
- * Query param: Specifies the prefix of pipeline name to search.
- */
- search?: string;
-}
-
-export interface PipelineDeleteParams {
- /**
- * Specifies the public ID of the account.
- */
- account_id: string;
-}
-
-export interface PipelineGetParams {
- /**
- * Specifies the public ID of the account.
- */
- account_id: string;
-}
-
-export declare namespace Pipelines {
- export {
- type PipelineCreateResponse as PipelineCreateResponse,
- type PipelineUpdateResponse as PipelineUpdateResponse,
- type PipelineListResponse as PipelineListResponse,
- type PipelineGetResponse as PipelineGetResponse,
- type PipelineCreateParams as PipelineCreateParams,
- type PipelineUpdateParams as PipelineUpdateParams,
- type PipelineListParams as PipelineListParams,
- type PipelineDeleteParams as PipelineDeleteParams,
- type PipelineGetParams as PipelineGetParams,
- };
-}
+export * from './pipelines/index';
diff --git a/src/resources/pipelines/index.ts b/src/resources/pipelines/index.ts
new file mode 100644
index 0000000000..5a27aae1c7
--- /dev/null
+++ b/src/resources/pipelines/index.ts
@@ -0,0 +1,27 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export { Pipelines } from './pipelines';
+export {
+ SinkListResponsesV4PagePaginationArray,
+ Sinks,
+ type SinkCreateResponse,
+ type SinkListResponse,
+ type SinkGetResponse,
+ type SinkCreateParams,
+ type SinkListParams,
+ type SinkDeleteParams,
+ type SinkGetParams,
+} from './sinks';
+export {
+ StreamListResponsesV4PagePaginationArray,
+ Streams,
+ type StreamCreateResponse,
+ type StreamUpdateResponse,
+ type StreamListResponse,
+ type StreamGetResponse,
+ type StreamCreateParams,
+ type StreamUpdateParams,
+ type StreamListParams,
+ type StreamDeleteParams,
+ type StreamGetParams,
+} from './streams';
diff --git a/src/resources/pipelines/pipelines.ts b/src/resources/pipelines/pipelines.ts
new file mode 100644
index 0000000000..ebe126d177
--- /dev/null
+++ b/src/resources/pipelines/pipelines.ts
@@ -0,0 +1,1466 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as Core from '../../core';
+import * as SinksAPI from './sinks';
+import {
+ SinkCreateParams,
+ SinkCreateResponse,
+ SinkDeleteParams,
+ SinkGetParams,
+ SinkGetResponse,
+ SinkListParams,
+ SinkListResponse,
+ SinkListResponsesV4PagePaginationArray,
+ Sinks,
+} from './sinks';
+import * as StreamsAPI from './streams';
+import {
+ StreamCreateParams,
+ StreamCreateResponse,
+ StreamDeleteParams,
+ StreamGetParams,
+ StreamGetResponse,
+ StreamListParams,
+ StreamListResponse,
+ StreamListResponsesV4PagePaginationArray,
+ StreamUpdateParams,
+ StreamUpdateResponse,
+ Streams,
+} from './streams';
+import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../pagination';
+
+export class Pipelines extends APIResource {
+ sinks: SinksAPI.Sinks = new SinksAPI.Sinks(this._client);
+ streams: StreamsAPI.Streams = new StreamsAPI.Streams(this._client);
+
+ /**
+ * [DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint
+ * instead.
+ *
+ * @deprecated Use create_v1 instead. This endpoint will be removed in the future.
+ */
+ create(
+ params: PipelineCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/pipelines`, { body, ...options }) as Core.APIPromise<{
+ result: PipelineCreateResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * [DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines
+ * endpoint instead.
+ *
+ * @deprecated The v1 API does not support updates. This endpoint will be removed in the future.
+ */
+ update(
+ pipelineName: string,
+ params: PipelineUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.put(`/accounts/${account_id}/pipelines/${pipelineName}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: PipelineUpdateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * [DEPRECATED] List, filter, and paginate pipelines in an account. Use the new
+ * /pipelines/v1/pipelines endpoint instead.
+ *
+ * @deprecated Use list_v1 instead. This endpoint will be removed in the future.
+ */
+ list(params: PipelineListParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, ...query } = params;
+ return this._client.get(`/accounts/${account_id}/pipelines`, { query, ...options });
+ }
+
+ /**
+ * [DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint
+ * instead.
+ *
+ * @deprecated Use delete_v1 instead. This endpoint will be removed in the future.
+ */
+ delete(
+ pipelineName: string,
+ params: PipelineDeleteParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return this._client.delete(`/accounts/${account_id}/pipelines/${pipelineName}`, {
+ ...options,
+ headers: { Accept: '*/*', ...options?.headers },
+ });
+ }
+
+ /**
+ * Create a new Pipeline.
+ *
+ * @example
+ * ```ts
+ * const response = await client.pipelines.createV1({
+ * account_id: '0123105f4ecef8ad9ca31a8372d0c353',
+ * name: 'my_pipeline',
+ * sql: 'insert into sink select * from source;',
+ * });
+ * ```
+ */
+ createV1(
+ params: PipelineCreateV1Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/pipelines/v1/pipelines`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: PipelineCreateV1Response }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Delete Pipeline in Account.
+ *
+ * @example
+ * ```ts
+ * await client.pipelines.deleteV1(
+ * '043e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ deleteV1(
+ pipelineId: string,
+ params: PipelineDeleteV1Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return this._client.delete(`/accounts/${account_id}/pipelines/v1/pipelines/${pipelineId}`, {
+ ...options,
+ headers: { Accept: '*/*', ...options?.headers },
+ });
+ }
+
+ /**
+ * [DEPRECATED] Get configuration of a pipeline. Use the new
+ * /pipelines/v1/pipelines endpoint instead.
+ *
+ * @deprecated Use get_v1 instead. This endpoint will be removed in the future.
+ */
+ get(
+ pipelineName: string,
+ params: PipelineGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(`/accounts/${account_id}/pipelines/${pipelineName}`, options) as Core.APIPromise<{
+ result: PipelineGetResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Get Pipelines Details.
+ *
+ * @example
+ * ```ts
+ * const response = await client.pipelines.getV1(
+ * '043e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ getV1(
+ pipelineId: string,
+ params: PipelineGetV1Params,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/pipelines/v1/pipelines/${pipelineId}`,
+ options,
+ ) as Core.APIPromise<{ result: PipelineGetV1Response }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List/Filter Pipelines in Account.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const pipelineListV1Response of client.pipelines.listV1(
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ listV1(
+ params: PipelineListV1Params,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/pipelines/v1/pipelines`,
+ PipelineListV1ResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Validate Arroyo SQL.
+ *
+ * @example
+ * ```ts
+ * const response = await client.pipelines.validateSql({
+ * account_id: '0123105f4ecef8ad9ca31a8372d0c353',
+ * sql: 'insert into sink select * from source;',
+ * });
+ * ```
+ */
+ validateSql(
+ params: PipelineValidateSqlParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/pipelines/v1/validate_sql`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: PipelineValidateSqlResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class PipelineListV1ResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+/**
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
+ */
+export interface PipelineCreateResponse {
+ /**
+ * Specifies the pipeline identifier.
+ */
+ id: string;
+
+ destination: PipelineCreateResponse.Destination;
+
+ /**
+ * Indicates the endpoint URL to send traffic.
+ */
+ endpoint: string;
+
+ /**
+ * Defines the name of the pipeline.
+ */
+ name: string;
+
+ source: Array<
+ | PipelineCreateResponse.CloudflarePipelinesWorkersPipelinesHTTPSource
+ | PipelineCreateResponse.CloudflarePipelinesWorkersPipelinesBindingSource
+ >;
+
+ /**
+ * Indicates the version number of last saved configuration.
+ */
+ version: number;
+}
+
+export namespace PipelineCreateResponse {
+ export interface Destination {
+ batch: Destination.Batch;
+
+ compression: Destination.Compression;
+
+ /**
+ * Specifies the format of data to deliver.
+ */
+ format: 'json';
+
+ path: Destination.Path;
+
+ /**
+ * Specifies the type of destination.
+ */
+ type: 'r2';
+ }
+
+ export namespace Destination {
+ export interface Batch {
+ /**
+ * Specifies rough maximum size of files.
+ */
+ max_bytes: number;
+
+ /**
+ * Specifies duration to wait to aggregate batches files.
+ */
+ max_duration_s: number;
+
+ /**
+ * Specifies rough maximum number of rows per file.
+ */
+ max_rows: number;
+ }
+
+ export interface Compression {
+ /**
+ * Specifies the desired compression algorithm and format.
+ */
+ type: 'none' | 'gzip' | 'deflate';
+ }
+
+ export interface Path {
+ /**
+ * Specifies the R2 Bucket to store files.
+ */
+ bucket: string;
+
+ /**
+ * Specifies the name pattern to for individual data files.
+ */
+ filename?: string;
+
+ /**
+ * Specifies the name pattern for directory.
+ */
+ filepath?: string;
+
+ /**
+ * Specifies the base directory within the bucket.
+ */
+ prefix?: string;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+
+ /**
+ * Specifies whether authentication is required to send to this pipeline via HTTP.
+ */
+ authentication?: boolean;
+
+ cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
+ }
+
+ export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
+ export interface CORS {
+ /**
+ * Specifies allowed origins to allow Cross Origin HTTP Requests.
+ */
+ origins?: Array;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesBindingSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+ }
+}
+
+/**
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
+ */
+export interface PipelineUpdateResponse {
+ /**
+ * Specifies the pipeline identifier.
+ */
+ id: string;
+
+ destination: PipelineUpdateResponse.Destination;
+
+ /**
+ * Indicates the endpoint URL to send traffic.
+ */
+ endpoint: string;
+
+ /**
+ * Defines the name of the pipeline.
+ */
+ name: string;
+
+ source: Array<
+ | PipelineUpdateResponse.CloudflarePipelinesWorkersPipelinesHTTPSource
+ | PipelineUpdateResponse.CloudflarePipelinesWorkersPipelinesBindingSource
+ >;
+
+ /**
+ * Indicates the version number of last saved configuration.
+ */
+ version: number;
+}
+
+export namespace PipelineUpdateResponse {
+ export interface Destination {
+ batch: Destination.Batch;
+
+ compression: Destination.Compression;
+
+ /**
+ * Specifies the format of data to deliver.
+ */
+ format: 'json';
+
+ path: Destination.Path;
+
+ /**
+ * Specifies the type of destination.
+ */
+ type: 'r2';
+ }
+
+ export namespace Destination {
+ export interface Batch {
+ /**
+ * Specifies rough maximum size of files.
+ */
+ max_bytes: number;
+
+ /**
+ * Specifies duration to wait to aggregate batches files.
+ */
+ max_duration_s: number;
+
+ /**
+ * Specifies rough maximum number of rows per file.
+ */
+ max_rows: number;
+ }
+
+ export interface Compression {
+ /**
+ * Specifies the desired compression algorithm and format.
+ */
+ type: 'none' | 'gzip' | 'deflate';
+ }
+
+ export interface Path {
+ /**
+ * Specifies the R2 Bucket to store files.
+ */
+ bucket: string;
+
+ /**
+ * Specifies the name pattern to for individual data files.
+ */
+ filename?: string;
+
+ /**
+ * Specifies the name pattern for directory.
+ */
+ filepath?: string;
+
+ /**
+ * Specifies the base directory within the bucket.
+ */
+ prefix?: string;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+
+ /**
+ * Specifies whether authentication is required to send to this pipeline via HTTP.
+ */
+ authentication?: boolean;
+
+ cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
+ }
+
+ export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
+ export interface CORS {
+ /**
+ * Specifies allowed origins to allow Cross Origin HTTP Requests.
+ */
+ origins?: Array;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesBindingSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+ }
+}
+
+export interface PipelineListResponse {
+ result_info: PipelineListResponse.ResultInfo;
+
+ results: Array;
+
+ /**
+ * Indicates whether the API call was successful.
+ */
+ success: boolean;
+}
+
+export namespace PipelineListResponse {
+ export interface ResultInfo {
+ /**
+ * Indicates the number of items on current page.
+ */
+ count: number;
+
+ /**
+ * Indicates the current page number.
+ */
+ page: number;
+
+ /**
+ * Indicates the number of items per page.
+ */
+ per_page: number;
+
+ /**
+ * Indicates the total number of items.
+ */
+ total_count: number;
+ }
+
+ /**
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
+ */
+ export interface Result {
+ /**
+ * Specifies the pipeline identifier.
+ */
+ id: string;
+
+ destination: Result.Destination;
+
+ /**
+ * Indicates the endpoint URL to send traffic.
+ */
+ endpoint: string;
+
+ /**
+ * Defines the name of the pipeline.
+ */
+ name: string;
+
+ source: Array<
+ | Result.CloudflarePipelinesWorkersPipelinesHTTPSource
+ | Result.CloudflarePipelinesWorkersPipelinesBindingSource
+ >;
+
+ /**
+ * Indicates the version number of last saved configuration.
+ */
+ version: number;
+ }
+
+ export namespace Result {
+ export interface Destination {
+ batch: Destination.Batch;
+
+ compression: Destination.Compression;
+
+ /**
+ * Specifies the format of data to deliver.
+ */
+ format: 'json';
+
+ path: Destination.Path;
+
+ /**
+ * Specifies the type of destination.
+ */
+ type: 'r2';
+ }
+
+ export namespace Destination {
+ export interface Batch {
+ /**
+ * Specifies rough maximum size of files.
+ */
+ max_bytes: number;
+
+ /**
+ * Specifies duration to wait to aggregate batches files.
+ */
+ max_duration_s: number;
+
+ /**
+ * Specifies rough maximum number of rows per file.
+ */
+ max_rows: number;
+ }
+
+ export interface Compression {
+ /**
+ * Specifies the desired compression algorithm and format.
+ */
+ type: 'none' | 'gzip' | 'deflate';
+ }
+
+ export interface Path {
+ /**
+ * Specifies the R2 Bucket to store files.
+ */
+ bucket: string;
+
+ /**
+ * Specifies the name pattern to for individual data files.
+ */
+ filename?: string;
+
+ /**
+ * Specifies the name pattern for directory.
+ */
+ filepath?: string;
+
+ /**
+ * Specifies the base directory within the bucket.
+ */
+ prefix?: string;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+
+ /**
+ * Specifies whether authentication is required to send to this pipeline via HTTP.
+ */
+ authentication?: boolean;
+
+ cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
+ }
+
+ export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
+ export interface CORS {
+ /**
+ * Specifies allowed origins to allow Cross Origin HTTP Requests.
+ */
+ origins?: Array;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesBindingSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+ }
+ }
+}
+
+export interface PipelineCreateV1Response {
+ /**
+ * Indicates a unique identifier for this pipeline.
+ */
+ id: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ /**
+ * Indicates the name of the Pipeline.
+ */
+ name: string;
+
+ /**
+ * Specifies SQL for the Pipeline processing flow.
+ */
+ sql: string;
+
+ /**
+ * Indicates the current status of the Pipeline.
+ */
+ status: string;
+}
+
+/**
+ * @deprecated [DEPRECATED] Describes the configuration of a pipeline. Use the new
+ * streams/sinks/pipelines API instead.
+ */
+export interface PipelineGetResponse {
+ /**
+ * Specifies the pipeline identifier.
+ */
+ id: string;
+
+ destination: PipelineGetResponse.Destination;
+
+ /**
+ * Indicates the endpoint URL to send traffic.
+ */
+ endpoint: string;
+
+ /**
+ * Defines the name of the pipeline.
+ */
+ name: string;
+
+ source: Array<
+ | PipelineGetResponse.CloudflarePipelinesWorkersPipelinesHTTPSource
+ | PipelineGetResponse.CloudflarePipelinesWorkersPipelinesBindingSource
+ >;
+
+ /**
+ * Indicates the version number of last saved configuration.
+ */
+ version: number;
+}
+
+export namespace PipelineGetResponse {
+ export interface Destination {
+ batch: Destination.Batch;
+
+ compression: Destination.Compression;
+
+ /**
+ * Specifies the format of data to deliver.
+ */
+ format: 'json';
+
+ path: Destination.Path;
+
+ /**
+ * Specifies the type of destination.
+ */
+ type: 'r2';
+ }
+
+ export namespace Destination {
+ export interface Batch {
+ /**
+ * Specifies rough maximum size of files.
+ */
+ max_bytes: number;
+
+ /**
+ * Specifies duration to wait to aggregate batches files.
+ */
+ max_duration_s: number;
+
+ /**
+ * Specifies rough maximum number of rows per file.
+ */
+ max_rows: number;
+ }
+
+ export interface Compression {
+ /**
+ * Specifies the desired compression algorithm and format.
+ */
+ type: 'none' | 'gzip' | 'deflate';
+ }
+
+ export interface Path {
+ /**
+ * Specifies the R2 Bucket to store files.
+ */
+ bucket: string;
+
+ /**
+ * Specifies the name pattern to for individual data files.
+ */
+ filename?: string;
+
+ /**
+ * Specifies the name pattern for directory.
+ */
+ filepath?: string;
+
+ /**
+ * Specifies the base directory within the bucket.
+ */
+ prefix?: string;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+
+ /**
+ * Specifies whether authentication is required to send to this pipeline via HTTP.
+ */
+ authentication?: boolean;
+
+ cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
+ }
+
+ export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
+ export interface CORS {
+ /**
+ * Specifies allowed origins to allow Cross Origin HTTP Requests.
+ */
+ origins?: Array;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesBindingSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+ }
+}
+
+export interface PipelineGetV1Response {
+ /**
+ * Indicates a unique identifier for this pipeline.
+ */
+ id: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ /**
+ * Indicates the name of the Pipeline.
+ */
+ name: string;
+
+ /**
+ * Specifies SQL for the Pipeline processing flow.
+ */
+ sql: string;
+
+ /**
+ * Indicates the current status of the Pipeline.
+ */
+ status: string;
+
+ /**
+ * List of streams and sinks used by this pipeline.
+ */
+ tables: Array;
+}
+
+export namespace PipelineGetV1Response {
+ export interface Table {
+ /**
+ * Unique identifier for the connection (stream or sink).
+ */
+ id: string;
+
+ /**
+ * Latest available version of the connection.
+ */
+ latest: number;
+
+ /**
+ * Name of the connection.
+ */
+ name: string;
+
+ /**
+ * Type of the connection.
+ */
+ type: 'stream' | 'sink';
+
+ /**
+ * Current version of the connection used by this pipeline.
+ */
+ version: number;
+ }
+}
+
+export interface PipelineListV1Response {
+ /**
+ * Indicates a unique identifier for this pipeline.
+ */
+ id: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ /**
+ * Indicates the name of the Pipeline.
+ */
+ name: string;
+
+ /**
+ * Specifies SQL for the Pipeline processing flow.
+ */
+ sql: string;
+
+ /**
+ * Indicates the current status of the Pipeline.
+ */
+ status: string;
+}
+
+export interface PipelineValidateSqlResponse {
+ /**
+ * Indicates tables involved in the processing.
+ */
+ tables: { [key: string]: PipelineValidateSqlResponse.Tables };
+
+ graph?: PipelineValidateSqlResponse.Graph;
+}
+
+export namespace PipelineValidateSqlResponse {
+ export interface Tables {
+ id: string;
+
+ name: string;
+
+ type: string;
+
+ version: number;
+ }
+
+ export interface Graph {
+ edges: Array;
+
+ nodes: Array;
+ }
+
+ export namespace Graph {
+ export interface Edge {
+ dest_id: number;
+
+ edge_type: string;
+
+ key_type: string;
+
+ src_id: number;
+
+ value_type: string;
+ }
+
+ export interface Node {
+ description: string;
+
+ node_id: number;
+
+ operator: string;
+
+ parallelism: number;
+ }
+ }
+}
+
+export interface PipelineCreateParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ destination: PipelineCreateParams.Destination;
+
+ /**
+ * Body param: Defines the name of the pipeline.
+ */
+ name: string;
+
+ /**
+ * Body param:
+ */
+ source: Array<
+ | PipelineCreateParams.CloudflarePipelinesWorkersPipelinesHTTPSource
+ | PipelineCreateParams.CloudflarePipelinesWorkersPipelinesBindingSource
+ >;
+}
+
+export namespace PipelineCreateParams {
+ export interface Destination {
+ batch: Destination.Batch;
+
+ compression: Destination.Compression;
+
+ credentials: Destination.Credentials;
+
+ /**
+ * Specifies the format of data to deliver.
+ */
+ format: 'json';
+
+ path: Destination.Path;
+
+ /**
+ * Specifies the type of destination.
+ */
+ type: 'r2';
+ }
+
+ export namespace Destination {
+ export interface Batch {
+ /**
+ * Specifies rough maximum size of files.
+ */
+ max_bytes?: number;
+
+ /**
+ * Specifies duration to wait to aggregate batches files.
+ */
+ max_duration_s?: number;
+
+ /**
+ * Specifies rough maximum number of rows per file.
+ */
+ max_rows?: number;
+ }
+
+ export interface Compression {
+ /**
+ * Specifies the desired compression algorithm and format.
+ */
+ type?: 'none' | 'gzip' | 'deflate';
+ }
+
+ export interface Credentials {
+ /**
+ * Specifies the R2 Bucket Access Key Id.
+ */
+ access_key_id: string;
+
+ /**
+ * Specifies the R2 Endpoint.
+ */
+ endpoint: string;
+
+ /**
+ * Specifies the R2 Bucket Secret Access Key.
+ */
+ secret_access_key: string;
+ }
+
+ export interface Path {
+ /**
+ * Specifies the R2 Bucket to store files.
+ */
+ bucket: string;
+
+ /**
+ * Specifies the name pattern to for individual data files.
+ */
+ filename?: string;
+
+ /**
+ * Specifies the name pattern for directory.
+ */
+ filepath?: string;
+
+ /**
+ * Specifies the base directory within the bucket.
+ */
+ prefix?: string;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+
+ /**
+ * Specifies whether authentication is required to send to this pipeline via HTTP.
+ */
+ authentication?: boolean;
+
+ cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
+ }
+
+ export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
+ export interface CORS {
+ /**
+ * Specifies allowed origins to allow Cross Origin HTTP Requests.
+ */
+ origins?: Array;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesBindingSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+ }
+}
+
+export interface PipelineUpdateParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ destination: PipelineUpdateParams.Destination;
+
+ /**
+ * Body param: Defines the name of the pipeline.
+ */
+ name: string;
+
+ /**
+ * Body param:
+ */
+ source: Array<
+ | PipelineUpdateParams.CloudflarePipelinesWorkersPipelinesHTTPSource
+ | PipelineUpdateParams.CloudflarePipelinesWorkersPipelinesBindingSource
+ >;
+}
+
+export namespace PipelineUpdateParams {
+ export interface Destination {
+ batch: Destination.Batch;
+
+ compression: Destination.Compression;
+
+ /**
+ * Specifies the format of data to deliver.
+ */
+ format: 'json';
+
+ path: Destination.Path;
+
+ /**
+ * Specifies the type of destination.
+ */
+ type: 'r2';
+
+ credentials?: Destination.Credentials;
+ }
+
+ export namespace Destination {
+ export interface Batch {
+ /**
+ * Specifies rough maximum size of files.
+ */
+ max_bytes?: number;
+
+ /**
+ * Specifies duration to wait to aggregate batches files.
+ */
+ max_duration_s?: number;
+
+ /**
+ * Specifies rough maximum number of rows per file.
+ */
+ max_rows?: number;
+ }
+
+ export interface Compression {
+ /**
+ * Specifies the desired compression algorithm and format.
+ */
+ type?: 'none' | 'gzip' | 'deflate';
+ }
+
+ export interface Path {
+ /**
+ * Specifies the R2 Bucket to store files.
+ */
+ bucket: string;
+
+ /**
+ * Specifies the name pattern to for individual data files.
+ */
+ filename?: string;
+
+ /**
+ * Specifies the name pattern for directory.
+ */
+ filepath?: string;
+
+ /**
+ * Specifies the base directory within the bucket.
+ */
+ prefix?: string;
+ }
+
+ export interface Credentials {
+ /**
+ * Specifies the R2 Bucket Access Key Id.
+ */
+ access_key_id: string;
+
+ /**
+ * Specifies the R2 Endpoint.
+ */
+ endpoint: string;
+
+ /**
+ * Specifies the R2 Bucket Secret Access Key.
+ */
+ secret_access_key: string;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] HTTP source configuration. Use the new streams API
+ * instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesHTTPSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+
+ /**
+ * Specifies whether authentication is required to send to this pipeline via HTTP.
+ */
+ authentication?: boolean;
+
+ cors?: CloudflarePipelinesWorkersPipelinesHTTPSource.CORS;
+ }
+
+ export namespace CloudflarePipelinesWorkersPipelinesHTTPSource {
+ export interface CORS {
+ /**
+ * Specifies allowed origins to allow Cross Origin HTTP Requests.
+ */
+ origins?: Array;
+ }
+ }
+
+ /**
+ * @deprecated [DEPRECATED] Worker binding source configuration. Use the new
+ * streams API instead.
+ */
+ export interface CloudflarePipelinesWorkersPipelinesBindingSource {
+ /**
+ * Specifies the format of source data.
+ */
+ format: 'json';
+
+ type: string;
+ }
+}
+
+export interface PipelineListParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Query param: Specifies which page to retrieve.
+ */
+ page?: string;
+
+ /**
+ * Query param: Specifies the number of pipelines per page.
+ */
+ per_page?: string;
+
+ /**
+ * Query param: Specifies the prefix of pipeline name to search.
+ */
+ search?: string;
+}
+
+export interface PipelineDeleteParams {
+ /**
+ * Specifies the public ID of the account.
+ */
+ account_id: string;
+}
+
+export interface PipelineCreateV1Params {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Body param: Specifies the name of the Pipeline.
+ */
+ name: string;
+
+ /**
+ * Body param: Specifies SQL for the Pipeline processing flow.
+ */
+ sql: string;
+}
+
+export interface PipelineDeleteV1Params {
+ /**
+ * Specifies the public ID of the account.
+ */
+ account_id: string;
+}
+
+export interface PipelineGetParams {
+ /**
+ * Specifies the public ID of the account.
+ */
+ account_id: string;
+}
+
+export interface PipelineGetV1Params {
+ /**
+ * Specifies the public ID of the account.
+ */
+ account_id: string;
+}
+
+export interface PipelineListV1Params extends V4PagePaginationArrayParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+}
+
+export interface PipelineValidateSqlParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Body param: Specifies SQL to validate.
+ */
+ sql: string;
+}
+
+Pipelines.PipelineListV1ResponsesV4PagePaginationArray = PipelineListV1ResponsesV4PagePaginationArray;
+Pipelines.Sinks = Sinks;
+Pipelines.SinkListResponsesV4PagePaginationArray = SinkListResponsesV4PagePaginationArray;
+Pipelines.Streams = Streams;
+Pipelines.StreamListResponsesV4PagePaginationArray = StreamListResponsesV4PagePaginationArray;
+
+export declare namespace Pipelines {
+ export {
+ type PipelineCreateResponse as PipelineCreateResponse,
+ type PipelineUpdateResponse as PipelineUpdateResponse,
+ type PipelineListResponse as PipelineListResponse,
+ type PipelineCreateV1Response as PipelineCreateV1Response,
+ type PipelineGetResponse as PipelineGetResponse,
+ type PipelineGetV1Response as PipelineGetV1Response,
+ type PipelineListV1Response as PipelineListV1Response,
+ type PipelineValidateSqlResponse as PipelineValidateSqlResponse,
+ PipelineListV1ResponsesV4PagePaginationArray as PipelineListV1ResponsesV4PagePaginationArray,
+ type PipelineCreateParams as PipelineCreateParams,
+ type PipelineUpdateParams as PipelineUpdateParams,
+ type PipelineListParams as PipelineListParams,
+ type PipelineDeleteParams as PipelineDeleteParams,
+ type PipelineCreateV1Params as PipelineCreateV1Params,
+ type PipelineDeleteV1Params as PipelineDeleteV1Params,
+ type PipelineGetParams as PipelineGetParams,
+ type PipelineGetV1Params as PipelineGetV1Params,
+ type PipelineListV1Params as PipelineListV1Params,
+ type PipelineValidateSqlParams as PipelineValidateSqlParams,
+ };
+
+ export {
+ Sinks as Sinks,
+ type SinkCreateResponse as SinkCreateResponse,
+ type SinkListResponse as SinkListResponse,
+ type SinkGetResponse as SinkGetResponse,
+ SinkListResponsesV4PagePaginationArray as SinkListResponsesV4PagePaginationArray,
+ type SinkCreateParams as SinkCreateParams,
+ type SinkListParams as SinkListParams,
+ type SinkDeleteParams as SinkDeleteParams,
+ type SinkGetParams as SinkGetParams,
+ };
+
+ export {
+ Streams as Streams,
+ type StreamCreateResponse as StreamCreateResponse,
+ type StreamUpdateResponse as StreamUpdateResponse,
+ type StreamListResponse as StreamListResponse,
+ type StreamGetResponse as StreamGetResponse,
+ StreamListResponsesV4PagePaginationArray as StreamListResponsesV4PagePaginationArray,
+ type StreamCreateParams as StreamCreateParams,
+ type StreamUpdateParams as StreamUpdateParams,
+ type StreamListParams as StreamListParams,
+ type StreamDeleteParams as StreamDeleteParams,
+ type StreamGetParams as StreamGetParams,
+ };
+}
diff --git a/src/resources/pipelines/sinks.ts b/src/resources/pipelines/sinks.ts
new file mode 100644
index 0000000000..bc79abd008
--- /dev/null
+++ b/src/resources/pipelines/sinks.ts
@@ -0,0 +1,1610 @@
+// 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 Sinks extends APIResource {
+ /**
+ * Create a new Sink.
+ *
+ * @example
+ * ```ts
+ * const sink = await client.pipelines.sinks.create({
+ * account_id: '0123105f4ecef8ad9ca31a8372d0c353',
+ * name: 'my_sink',
+ * type: 'r2',
+ * });
+ * ```
+ */
+ create(params: SinkCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/pipelines/v1/sinks`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: SinkCreateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List/Filter Sinks in Account.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const sinkListResponse of client.pipelines.sinks.list(
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ params: SinkListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/pipelines/v1/sinks`,
+ SinkListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Delete Pipeline in Account.
+ *
+ * @example
+ * ```ts
+ * await client.pipelines.sinks.delete(
+ * '0223105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ delete(sinkId: string, params: SinkDeleteParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, force } = params;
+ return this._client.delete(`/accounts/${account_id}/pipelines/v1/sinks/${sinkId}`, {
+ query: { force },
+ ...options,
+ headers: { Accept: '*/*', ...options?.headers },
+ });
+ }
+
+ /**
+ * Get Sink Details.
+ *
+ * @example
+ * ```ts
+ * const sink = await client.pipelines.sinks.get(
+ * '0223105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ get(
+ sinkId: string,
+ params: SinkGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(`/accounts/${account_id}/pipelines/v1/sinks/${sinkId}`, options) as Core.APIPromise<{
+ result: SinkGetResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class SinkListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export interface SinkCreateResponse {
+ /**
+ * Indicates a unique identifier for this sink.
+ */
+ id: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ /**
+ * Defines the name of the Sink.
+ */
+ name: string;
+
+ /**
+ * Specifies the type of sink.
+ */
+ type: 'r2' | 'r2_data_catalog';
+
+ /**
+ * R2 Data Catalog Sink
+ */
+ config?:
+ | SinkCreateResponse.CloudflarePipelinesR2Table
+ | SinkCreateResponse.CloudflarePipelinesR2DataCatalogTable;
+
+ format?: SinkCreateResponse.Json | SinkCreateResponse.Parquet;
+
+ schema?: SinkCreateResponse.Schema;
+}
+
+export namespace SinkCreateResponse {
+ export interface CloudflarePipelinesR2Table {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ account_id: string;
+
+ /**
+ * R2 Bucket to write to
+ */
+ bucket: string;
+
+ credentials: CloudflarePipelinesR2Table.Credentials;
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ file_naming?: CloudflarePipelinesR2Table.FileNaming;
+
+ /**
+ * Jurisdiction this bucket is hosted in
+ */
+ jurisdiction?: string;
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ partitioning?: CloudflarePipelinesR2Table.Partitioning;
+
+ /**
+ * Subpath within the bucket to write to
+ */
+ path?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2Table.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2Table {
+ export interface Credentials {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ access_key_id: string;
+
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ secret_access_key: string;
+ }
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ export interface FileNaming {
+ /**
+ * The prefix to use in file name. i.e prefix-.parquet
+ */
+ prefix?: string;
+
+ /**
+ * Filename generation strategy.
+ */
+ strategy?: 'serial' | 'uuid' | 'uuid_v7' | 'ulid';
+
+ /**
+ * This will overwrite the default file suffix. i.e .parquet, use with caution
+ */
+ suffix?: string;
+ }
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ export interface Partitioning {
+ /**
+ * The pattern of the date string
+ */
+ time_pattern?: string;
+ }
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ /**
+ * R2 Data Catalog Sink
+ */
+ export interface CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Authentication token
+ */
+ token: string;
+
+ /**
+ * Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * The R2 Bucket that hosts this catalog
+ */
+ bucket: string;
+
+ /**
+ * Table name
+ */
+ table_name: string;
+
+ /**
+ * Table namespace
+ */
+ namespace?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2DataCatalogTable.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+}
+
+export interface SinkListResponse {
+ /**
+ * Indicates a unique identifier for this sink.
+ */
+ id: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ /**
+ * Defines the name of the Sink.
+ */
+ name: string;
+
+ /**
+ * Specifies the type of sink.
+ */
+ type: 'r2' | 'r2_data_catalog';
+
+ /**
+ * Defines the configuration of the R2 Sink.
+ */
+ config?:
+ | SinkListResponse.CloudflarePipelinesR2Table
+ | SinkListResponse.CloudflarePipelinesR2DataCatalogTable;
+
+ format?: SinkListResponse.Json | SinkListResponse.Parquet;
+
+ schema?: SinkListResponse.Schema;
+}
+
+export namespace SinkListResponse {
+ export interface CloudflarePipelinesR2Table {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ account_id: string;
+
+ /**
+ * R2 Bucket to write to
+ */
+ bucket: string;
+
+ credentials: CloudflarePipelinesR2Table.Credentials;
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ file_naming?: CloudflarePipelinesR2Table.FileNaming;
+
+ /**
+ * Jurisdiction this bucket is hosted in
+ */
+ jurisdiction?: string;
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ partitioning?: CloudflarePipelinesR2Table.Partitioning;
+
+ /**
+ * Subpath within the bucket to write to
+ */
+ path?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2Table.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2Table {
+ export interface Credentials {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ access_key_id: string;
+
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ secret_access_key: string;
+ }
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ export interface FileNaming {
+ /**
+ * The prefix to use in file name. i.e prefix-.parquet
+ */
+ prefix?: string;
+
+ /**
+ * Filename generation strategy.
+ */
+ strategy?: 'serial' | 'uuid' | 'uuid_v7' | 'ulid';
+
+ /**
+ * This will overwrite the default file suffix. i.e .parquet, use with caution
+ */
+ suffix?: string;
+ }
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ export interface Partitioning {
+ /**
+ * The pattern of the date string
+ */
+ time_pattern?: string;
+ }
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ /**
+ * R2 Data Catalog Sink
+ */
+ export interface CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Authentication token
+ */
+ token: string;
+
+ /**
+ * Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * The R2 Bucket that hosts this catalog
+ */
+ bucket: string;
+
+ /**
+ * Table name
+ */
+ table_name: string;
+
+ /**
+ * Table namespace
+ */
+ namespace?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2DataCatalogTable.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+}
+
+export interface SinkGetResponse {
+ /**
+ * Indicates a unique identifier for this sink.
+ */
+ id: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ /**
+ * Defines the name of the Sink.
+ */
+ name: string;
+
+ /**
+ * Specifies the type of sink.
+ */
+ type: 'r2' | 'r2_data_catalog';
+
+ /**
+ * Defines the configuration of the R2 Sink.
+ */
+ config?: SinkGetResponse.CloudflarePipelinesR2Table | SinkGetResponse.CloudflarePipelinesR2DataCatalogTable;
+
+ format?: SinkGetResponse.Json | SinkGetResponse.Parquet;
+
+ schema?: SinkGetResponse.Schema;
+}
+
+export namespace SinkGetResponse {
+ export interface CloudflarePipelinesR2Table {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ account_id: string;
+
+ /**
+ * R2 Bucket to write to
+ */
+ bucket: string;
+
+ credentials: CloudflarePipelinesR2Table.Credentials;
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ file_naming?: CloudflarePipelinesR2Table.FileNaming;
+
+ /**
+ * Jurisdiction this bucket is hosted in
+ */
+ jurisdiction?: string;
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ partitioning?: CloudflarePipelinesR2Table.Partitioning;
+
+ /**
+ * Subpath within the bucket to write to
+ */
+ path?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2Table.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2Table {
+ export interface Credentials {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ access_key_id: string;
+
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ secret_access_key: string;
+ }
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ export interface FileNaming {
+ /**
+ * The prefix to use in file name. i.e prefix-.parquet
+ */
+ prefix?: string;
+
+ /**
+ * Filename generation strategy.
+ */
+ strategy?: 'serial' | 'uuid' | 'uuid_v7' | 'ulid';
+
+ /**
+ * This will overwrite the default file suffix. i.e .parquet, use with caution
+ */
+ suffix?: string;
+ }
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ export interface Partitioning {
+ /**
+ * The pattern of the date string
+ */
+ time_pattern?: string;
+ }
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ /**
+ * R2 Data Catalog Sink
+ */
+ export interface CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Authentication token
+ */
+ token: string;
+
+ /**
+ * Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * The R2 Bucket that hosts this catalog
+ */
+ bucket: string;
+
+ /**
+ * Table name
+ */
+ table_name: string;
+
+ /**
+ * Table namespace
+ */
+ namespace?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2DataCatalogTable.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+}
+
+export interface SinkCreateParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Body param: Defines the name of the Sink.
+ */
+ name: string;
+
+ /**
+ * Body param: Specifies the type of sink.
+ */
+ type: 'r2' | 'r2_data_catalog';
+
+ /**
+ * Body param: Defines the configuration of the R2 Sink.
+ */
+ config?:
+ | SinkCreateParams.CloudflarePipelinesR2Table
+ | SinkCreateParams.CloudflarePipelinesR2DataCatalogTable;
+
+ /**
+ * Body param:
+ */
+ format?: SinkCreateParams.Json | SinkCreateParams.Parquet;
+
+ /**
+ * Body param:
+ */
+ schema?: SinkCreateParams.Schema;
+}
+
+export namespace SinkCreateParams {
+ export interface CloudflarePipelinesR2Table {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ account_id: string;
+
+ /**
+ * R2 Bucket to write to
+ */
+ bucket: string;
+
+ credentials: CloudflarePipelinesR2Table.Credentials;
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ file_naming?: CloudflarePipelinesR2Table.FileNaming;
+
+ /**
+ * Jurisdiction this bucket is hosted in
+ */
+ jurisdiction?: string;
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ partitioning?: CloudflarePipelinesR2Table.Partitioning;
+
+ /**
+ * Subpath within the bucket to write to
+ */
+ path?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2Table.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2Table {
+ export interface Credentials {
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ access_key_id: string;
+
+ /**
+ * Cloudflare Account ID for the bucket
+ */
+ secret_access_key: string;
+ }
+
+ /**
+ * Controls filename prefix/suffix and strategy.
+ */
+ export interface FileNaming {
+ /**
+ * The prefix to use in file name. i.e prefix-.parquet
+ */
+ prefix?: string;
+
+ /**
+ * Filename generation strategy.
+ */
+ strategy?: 'serial' | 'uuid' | 'uuid_v7' | 'ulid';
+
+ /**
+ * This will overwrite the default file suffix. i.e .parquet, use with caution
+ */
+ suffix?: string;
+ }
+
+ /**
+ * Data-layout partitioning for sinks.
+ */
+ export interface Partitioning {
+ /**
+ * The pattern of the date string
+ */
+ time_pattern?: string;
+ }
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ /**
+ * R2 Data Catalog Sink
+ */
+ export interface CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Authentication token
+ */
+ token: string;
+
+ /**
+ * Cloudflare Account ID
+ */
+ account_id: string;
+
+ /**
+ * The R2 Bucket that hosts this catalog
+ */
+ bucket: string;
+
+ /**
+ * Table name
+ */
+ table_name: string;
+
+ /**
+ * Table namespace
+ */
+ namespace?: string;
+
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ rolling_policy?: CloudflarePipelinesR2DataCatalogTable.RollingPolicy;
+ }
+
+ export namespace CloudflarePipelinesR2DataCatalogTable {
+ /**
+ * Rolling policy for file sinks (when & why to close a file and open a new one).
+ */
+ export interface RollingPolicy {
+ /**
+ * Files will be rolled after reaching this number of bytes
+ */
+ file_size_bytes?: number;
+
+ /**
+ * Number of seconds of inactivity to wait before rolling over to a new file
+ */
+ inactivity_seconds?: number;
+
+ /**
+ * Number of seconds to wait before rolling over to a new file
+ */
+ interval_seconds?: number;
+ }
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+}
+
+export interface SinkListParams extends V4PagePaginationArrayParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Query param:
+ */
+ pipeline_id?: string;
+}
+
+export interface SinkDeleteParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Query param: Delete sink forcefully, including deleting any dependent pipelines.
+ */
+ force?: string;
+}
+
+export interface SinkGetParams {
+ /**
+ * Specifies the public ID of the account.
+ */
+ account_id: string;
+}
+
+Sinks.SinkListResponsesV4PagePaginationArray = SinkListResponsesV4PagePaginationArray;
+
+export declare namespace Sinks {
+ export {
+ type SinkCreateResponse as SinkCreateResponse,
+ type SinkListResponse as SinkListResponse,
+ type SinkGetResponse as SinkGetResponse,
+ SinkListResponsesV4PagePaginationArray as SinkListResponsesV4PagePaginationArray,
+ type SinkCreateParams as SinkCreateParams,
+ type SinkListParams as SinkListParams,
+ type SinkDeleteParams as SinkDeleteParams,
+ type SinkGetParams as SinkGetParams,
+ };
+}
diff --git a/src/resources/pipelines/streams.ts b/src/resources/pipelines/streams.ts
new file mode 100644
index 0000000000..8c0537e878
--- /dev/null
+++ b/src/resources/pipelines/streams.ts
@@ -0,0 +1,1273 @@
+// 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 Streams extends APIResource {
+ /**
+ * Create a new Stream.
+ *
+ * @example
+ * ```ts
+ * const stream = await client.pipelines.streams.create({
+ * account_id: '0123105f4ecef8ad9ca31a8372d0c353',
+ * name: 'my_stream',
+ * });
+ * ```
+ */
+ create(params: StreamCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/pipelines/v1/streams`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: StreamCreateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Update a Stream.
+ *
+ * @example
+ * ```ts
+ * const stream = await client.pipelines.streams.update(
+ * '033e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ update(
+ streamId: string,
+ params: StreamUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.patch(`/accounts/${account_id}/pipelines/v1/streams/${streamId}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: StreamUpdateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List/Filter Streams in Account.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const streamListResponse of client.pipelines.streams.list(
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ params: StreamListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/pipelines/v1/streams`,
+ StreamListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Delete Stream in Account.
+ *
+ * @example
+ * ```ts
+ * await client.pipelines.streams.delete(
+ * '033e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ delete(streamId: string, params: StreamDeleteParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, force } = params;
+ return this._client.delete(`/accounts/${account_id}/pipelines/v1/streams/${streamId}`, {
+ query: { force },
+ ...options,
+ headers: { Accept: '*/*', ...options?.headers },
+ });
+ }
+
+ /**
+ * Get Stream Details.
+ *
+ * @example
+ * ```ts
+ * const stream = await client.pipelines.streams.get(
+ * '033e105f4ecef8ad9ca31a8372d0c353',
+ * { account_id: '0123105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ get(
+ streamId: string,
+ params: StreamGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/pipelines/v1/streams/${streamId}`,
+ options,
+ ) as Core.APIPromise<{ result: StreamGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class StreamListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export interface StreamCreateResponse {
+ /**
+ * Indicates a unique identifier for this stream.
+ */
+ id: string;
+
+ created_at: string;
+
+ http: StreamCreateResponse.HTTP;
+
+ modified_at: string;
+
+ /**
+ * Indicates the name of the Stream.
+ */
+ name: string;
+
+ /**
+ * Indicates the current version of this stream.
+ */
+ version: number;
+
+ worker_binding: StreamCreateResponse.WorkerBinding;
+
+ /**
+ * Indicates the endpoint URL of this stream.
+ */
+ endpoint?: string;
+
+ format?: StreamCreateResponse.Json | StreamCreateResponse.Parquet;
+
+ schema?: StreamCreateResponse.Schema;
+}
+
+export namespace StreamCreateResponse {
+ export interface HTTP {
+ /**
+ * Indicates that authentication is required for the HTTP endpoint.
+ */
+ authentication: boolean;
+
+ /**
+ * Indicates that the HTTP endpoint is enabled.
+ */
+ enabled: boolean;
+
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ cors?: HTTP.CORS;
+ }
+
+ export namespace HTTP {
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ export interface CORS {
+ origins?: Array;
+ }
+ }
+
+ export interface WorkerBinding {
+ /**
+ * Indicates that the worker binding is enabled.
+ */
+ enabled: boolean;
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+}
+
+export interface StreamUpdateResponse {
+ /**
+ * Indicates a unique identifier for this stream.
+ */
+ id: string;
+
+ created_at: string;
+
+ http: StreamUpdateResponse.HTTP;
+
+ modified_at: string;
+
+ /**
+ * Indicates the name of the Stream.
+ */
+ name: string;
+
+ /**
+ * Indicates the current version of this stream.
+ */
+ version: number;
+
+ worker_binding: StreamUpdateResponse.WorkerBinding;
+
+ /**
+ * Indicates the endpoint URL of this stream.
+ */
+ endpoint?: string;
+
+ format?: StreamUpdateResponse.Json | StreamUpdateResponse.Parquet;
+}
+
+export namespace StreamUpdateResponse {
+ export interface HTTP {
+ /**
+ * Indicates that authentication is required for the HTTP endpoint.
+ */
+ authentication: boolean;
+
+ /**
+ * Indicates that the HTTP endpoint is enabled.
+ */
+ enabled: boolean;
+
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ cors?: HTTP.CORS;
+ }
+
+ export namespace HTTP {
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ export interface CORS {
+ origins?: Array;
+ }
+ }
+
+ export interface WorkerBinding {
+ /**
+ * Indicates that the worker binding is enabled.
+ */
+ enabled: boolean;
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+}
+
+export interface StreamListResponse {
+ /**
+ * Indicates a unique identifier for this stream.
+ */
+ id: string;
+
+ created_at: string;
+
+ http: StreamListResponse.HTTP;
+
+ modified_at: string;
+
+ /**
+ * Indicates the name of the Stream.
+ */
+ name: string;
+
+ /**
+ * Indicates the current version of this stream.
+ */
+ version: number;
+
+ worker_binding: StreamListResponse.WorkerBinding;
+
+ /**
+ * Indicates the endpoint URL of this stream.
+ */
+ endpoint?: string;
+
+ format?: StreamListResponse.Json | StreamListResponse.Parquet;
+
+ schema?: StreamListResponse.Schema;
+}
+
+export namespace StreamListResponse {
+ export interface HTTP {
+ /**
+ * Indicates that authentication is required for the HTTP endpoint.
+ */
+ authentication: boolean;
+
+ /**
+ * Indicates that the HTTP endpoint is enabled.
+ */
+ enabled: boolean;
+
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ cors?: HTTP.CORS;
+ }
+
+ export namespace HTTP {
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ export interface CORS {
+ origins?: Array;
+ }
+ }
+
+ export interface WorkerBinding {
+ /**
+ * Indicates that the worker binding is enabled.
+ */
+ enabled: boolean;
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+}
+
+export interface StreamGetResponse {
+ /**
+ * Indicates a unique identifier for this stream.
+ */
+ id: string;
+
+ created_at: string;
+
+ http: StreamGetResponse.HTTP;
+
+ modified_at: string;
+
+ /**
+ * Indicates the name of the Stream.
+ */
+ name: string;
+
+ /**
+ * Indicates the current version of this stream.
+ */
+ version: number;
+
+ worker_binding: StreamGetResponse.WorkerBinding;
+
+ /**
+ * Indicates the endpoint URL of this stream.
+ */
+ endpoint?: string;
+
+ format?: StreamGetResponse.Json | StreamGetResponse.Parquet;
+
+ schema?: StreamGetResponse.Schema;
+}
+
+export namespace StreamGetResponse {
+ export interface HTTP {
+ /**
+ * Indicates that authentication is required for the HTTP endpoint.
+ */
+ authentication: boolean;
+
+ /**
+ * Indicates that the HTTP endpoint is enabled.
+ */
+ enabled: boolean;
+
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ cors?: HTTP.CORS;
+ }
+
+ export namespace HTTP {
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ export interface CORS {
+ origins?: Array;
+ }
+ }
+
+ export interface WorkerBinding {
+ /**
+ * Indicates that the worker binding is enabled.
+ */
+ enabled: boolean;
+ }
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+}
+
+export interface StreamCreateParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Body param: Specifies the name of the Stream.
+ */
+ name: string;
+
+ /**
+ * Body param:
+ */
+ format?: StreamCreateParams.Json | StreamCreateParams.Parquet;
+
+ /**
+ * Body param:
+ */
+ http?: StreamCreateParams.HTTP;
+
+ /**
+ * Body param:
+ */
+ schema?: StreamCreateParams.Schema;
+
+ /**
+ * Body param:
+ */
+ worker_binding?: StreamCreateParams.WorkerBinding;
+}
+
+export namespace StreamCreateParams {
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+
+ export interface HTTP {
+ /**
+ * Indicates that authentication is required for the HTTP endpoint.
+ */
+ authentication: boolean;
+
+ /**
+ * Indicates that the HTTP endpoint is enabled.
+ */
+ enabled: boolean;
+
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ cors?: HTTP.CORS;
+ }
+
+ export namespace HTTP {
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ export interface CORS {
+ origins?: Array;
+ }
+ }
+
+ export interface Schema {
+ fields?: Array<
+ | Schema.Int32
+ | Schema.Int64
+ | Schema.Float32
+ | Schema.Float64
+ | Schema.Bool
+ | Schema.String
+ | Schema.Binary
+ | Schema.Timestamp
+ | Schema.Json
+ | Schema.Struct
+ | Schema.List
+ >;
+
+ format?: Schema.Json | Schema.Parquet;
+
+ inferred?: boolean | null;
+ }
+
+ export namespace Schema {
+ export interface Int32 {
+ type: 'int32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Int64 {
+ type: 'int64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float32 {
+ type: 'float32';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Float64 {
+ type: 'float64';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Bool {
+ type: 'bool';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface String {
+ type: 'string';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Binary {
+ type: 'binary';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Timestamp {
+ type: 'timestamp';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+
+ unit?: 'second' | 'millisecond' | 'microsecond' | 'nanosecond';
+ }
+
+ export interface Json {
+ type: 'json';
+
+ metadata_key?: string | null;
+
+ name?: string;
+
+ required?: boolean;
+
+ sql_name?: string;
+ }
+
+ export interface Struct {}
+
+ export interface List {}
+
+ export interface Json {
+ type: 'json';
+
+ decimal_encoding?: 'number' | 'string' | 'bytes';
+
+ timestamp_format?: 'rfc3339' | 'unix_millis';
+
+ unstructured?: boolean;
+ }
+
+ export interface Parquet {
+ type: 'parquet';
+
+ compression?: 'uncompressed' | 'snappy' | 'gzip' | 'zstd' | 'lz4';
+
+ row_group_bytes?: number | null;
+ }
+ }
+
+ export interface WorkerBinding {
+ /**
+ * Indicates that the worker binding is enabled.
+ */
+ enabled: boolean;
+ }
+}
+
+export interface StreamUpdateParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ http?: StreamUpdateParams.HTTP;
+
+ /**
+ * Body param:
+ */
+ worker_binding?: StreamUpdateParams.WorkerBinding;
+}
+
+export namespace StreamUpdateParams {
+ export interface HTTP {
+ /**
+ * Indicates that authentication is required for the HTTP endpoint.
+ */
+ authentication: boolean;
+
+ /**
+ * Indicates that the HTTP endpoint is enabled.
+ */
+ enabled: boolean;
+
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ cors?: HTTP.CORS;
+ }
+
+ export namespace HTTP {
+ /**
+ * Specifies the CORS options for the HTTP endpoint.
+ */
+ export interface CORS {
+ origins?: Array;
+ }
+ }
+
+ export interface WorkerBinding {
+ /**
+ * Indicates that the worker binding is enabled.
+ */
+ enabled: boolean;
+ }
+}
+
+export interface StreamListParams extends V4PagePaginationArrayParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Query param: Specifies the public ID of the pipeline.
+ */
+ pipeline_id?: string;
+}
+
+export interface StreamDeleteParams {
+ /**
+ * Path param: Specifies the public ID of the account.
+ */
+ account_id: string;
+
+ /**
+ * Query param: Delete stream forcefully, including deleting any dependent
+ * pipelines.
+ */
+ force?: string;
+}
+
+export interface StreamGetParams {
+ /**
+ * Specifies the public ID of the account.
+ */
+ account_id: string;
+}
+
+Streams.StreamListResponsesV4PagePaginationArray = StreamListResponsesV4PagePaginationArray;
+
+export declare namespace Streams {
+ export {
+ type StreamCreateResponse as StreamCreateResponse,
+ type StreamUpdateResponse as StreamUpdateResponse,
+ type StreamListResponse as StreamListResponse,
+ type StreamGetResponse as StreamGetResponse,
+ StreamListResponsesV4PagePaginationArray as StreamListResponsesV4PagePaginationArray,
+ type StreamCreateParams as StreamCreateParams,
+ type StreamUpdateParams as StreamUpdateParams,
+ type StreamListParams as StreamListParams,
+ type StreamDeleteParams as StreamDeleteParams,
+ type StreamGetParams as StreamGetParams,
+ };
+}
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