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/.stats.yml b/.stats.yml
index 5637fc3e0e..3eb9dff55c 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: 1940
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d3b3813ba8fb0b5303cfad8fcbd363941c494711e4cce61069553692b664774f.yml
+openapi_spec_hash: 4f467a53fd61500db4f7561dcfaaa088
+config_hash: 7820d7177150dfa66fc3f3f0c2eb8705
diff --git a/api.md b/api.md
index 7ffb0aa433..0a6bb46dc5 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
@@ -2531,17 +2560,17 @@ Methods:
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
@@ -3919,32 +3948,41 @@ Types:
- Deployment
- Project
- Stage
+- ProjectCreateResponse
+- ProjectListResponse
- ProjectDeleteResponse
+- ProjectEditResponse
+- ProjectGetResponse
- ProjectPurgeBuildCacheResponse
Methods:
-- client.pages.projects.create({ ...params }) -> Project
-- client.pages.projects.list({ ...params }) -> DeploymentsSinglePage
+- client.pages.projects.create({ ...params }) -> ProjectCreateResponse
+- client.pages.projects.list({ ...params }) -> ProjectListResponsesV4PagePaginationArray
- client.pages.projects.delete(projectName, { ...params }) -> ProjectDeleteResponse | null
-- client.pages.projects.edit(projectName, { ...params }) -> Project
-- client.pages.projects.get(projectName, { ...params }) -> Project
+- client.pages.projects.edit(projectName, { ...params }) -> ProjectEditResponse
+- client.pages.projects.get(projectName, { ...params }) -> ProjectGetResponse
- client.pages.projects.purgeBuildCache(projectName, { ...params }) -> ProjectPurgeBuildCacheResponse | null
### Deployments
Types:
+- DeploymentCreateResponse
+- DeploymentListResponse
- DeploymentDeleteResponse
+- DeploymentGetResponse
+- DeploymentRetryResponse
+- DeploymentRollbackResponse
Methods:
-- client.pages.projects.deployments.create(projectName, { ...params }) -> Deployment
-- client.pages.projects.deployments.list(projectName, { ...params }) -> DeploymentsSinglePage
+- client.pages.projects.deployments.create(projectName, { ...params }) -> DeploymentCreateResponse
+- client.pages.projects.deployments.list(projectName, { ...params }) -> DeploymentListResponsesV4PagePaginationArray
- 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
-- client.pages.projects.deployments.rollback(projectName, deploymentId, { ...params }) -> Deployment
+- client.pages.projects.deployments.get(projectName, deploymentId, { ...params }) -> DeploymentGetResponse
+- client.pages.projects.deployments.retry(projectName, deploymentId, { ...params }) -> DeploymentRetryResponse
+- client.pages.projects.deployments.rollback(projectName, deploymentId, { ...params }) -> DeploymentRollbackResponse
#### History
@@ -3970,11 +4008,11 @@ Types:
Methods:
-- client.pages.projects.domains.create(projectName, { ...params }) -> DomainCreateResponse | null
+- client.pages.projects.domains.create(projectName, { ...params }) -> DomainCreateResponse
- client.pages.projects.domains.list(projectName, { ...params }) -> DomainListResponsesSinglePage
- client.pages.projects.domains.delete(projectName, domainName, { ...params }) -> DomainDeleteResponse | null
-- client.pages.projects.domains.edit(projectName, domainName, { ...params }) -> DomainEditResponse | null
-- client.pages.projects.domains.get(projectName, domainName, { ...params }) -> DomainGetResponse | null
+- client.pages.projects.domains.edit(projectName, domainName, { ...params }) -> DomainEditResponse
+- client.pages.projects.domains.get(projectName, domainName, { ...params }) -> DomainGetResponse
# Registrar
@@ -4346,6 +4384,24 @@ Methods:
- client.alerting.policies.delete(policyId, { ...params }) -> PolicyDeleteResponse
- client.alerting.policies.get(policyId, { ...params }) -> Policy
+## Silences
+
+Types:
+
+- SilenceCreateResponse
+- SilenceUpdateResponse
+- SilenceListResponse
+- SilenceDeleteResponse
+- SilenceGetResponse
+
+Methods:
+
+- client.alerting.silences.create([ ...body ]) -> SilenceCreateResponse
+- client.alerting.silences.update([ ...body ]) -> SilenceUpdateResponsesSinglePage
+- client.alerting.silences.list({ ...params }) -> SilenceListResponsesSinglePage
+- client.alerting.silences.delete(silenceId, { ...params }) -> SilenceDeleteResponse
+- client.alerting.silences.get(silenceId, { ...params }) -> SilenceGetResponse
+
# D1
Types:
@@ -4563,6 +4619,75 @@ Methods:
- client.r2.superSlurper.connectivityPrecheck.source({ ...params }) -> ConnectivityPrecheckSourceResponse
- client.r2.superSlurper.connectivityPrecheck.target({ ...params }) -> ConnectivityPrecheckTargetResponse
+# R2DataCatalog
+
+Types:
+
+- R2DataCatalogListResponse
+- R2DataCatalogEnableResponse
+- R2DataCatalogGetResponse
+
+Methods:
+
+- client.r2DataCatalog.list({ ...params }) -> R2DataCatalogListResponse
+- client.r2DataCatalog.disable(bucketName, { ...params }) -> void
+- client.r2DataCatalog.enable(bucketName, { ...params }) -> R2DataCatalogEnableResponse
+- client.r2DataCatalog.get(bucketName, { ...params }) -> R2DataCatalogGetResponse
+
+## MaintenanceConfigs
+
+Types:
+
+- MaintenanceConfigUpdateResponse
+- MaintenanceConfigGetResponse
+
+Methods:
+
+- client.r2DataCatalog.maintenanceConfigs.update(bucketName, { ...params }) -> MaintenanceConfigUpdateResponse
+- client.r2DataCatalog.maintenanceConfigs.get(bucketName, { ...params }) -> MaintenanceConfigGetResponse
+
+## Credentials
+
+Types:
+
+- CredentialCreateResponse
+
+Methods:
+
+- client.r2DataCatalog.credentials.create(bucketName, { ...params }) -> CredentialCreateResponse | null
+
+## Namespaces
+
+Types:
+
+- NamespaceListResponse
+
+Methods:
+
+- client.r2DataCatalog.namespaces.list(bucketName, { ...params }) -> NamespaceListResponse
+
+### Tables
+
+Types:
+
+- TableListResponse
+
+Methods:
+
+- client.r2DataCatalog.namespaces.tables.list(bucketName, namespace, { ...params }) -> TableListResponse
+
+#### MaintenanceConfigs
+
+Types:
+
+- MaintenanceConfigUpdateResponse
+- MaintenanceConfigGetResponse
+
+Methods:
+
+- client.r2DataCatalog.namespaces.tables.maintenanceConfigs.update(bucketName, namespace, tableName, { ...params }) -> MaintenanceConfigUpdateResponse
+- client.r2DataCatalog.namespaces.tables.maintenanceConfigs.get(bucketName, namespace, tableName, { ...params }) -> MaintenanceConfigGetResponse
+
# WorkersForPlatforms
## Dispatch
@@ -5021,6 +5146,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 +5745,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
@@ -5693,25 +5852,30 @@ Types:
- Dataset
- DatasetArray
- DatasetCreation
+- DatasetCreateResponse
+- DatasetUpdateResponse
+- DatasetGetResponse
Methods:
-- client.zeroTrust.dlp.datasets.create({ ...params }) -> DatasetCreation
-- client.zeroTrust.dlp.datasets.update(datasetId, { ...params }) -> Dataset
+- client.zeroTrust.dlp.datasets.create({ ...params }) -> DatasetCreateResponse
+- client.zeroTrust.dlp.datasets.update(datasetId, { ...params }) -> DatasetUpdateResponse
- client.zeroTrust.dlp.datasets.list({ ...params }) -> DatasetsSinglePage
- client.zeroTrust.dlp.datasets.delete(datasetId, { ...params }) -> void
-- client.zeroTrust.dlp.datasets.get(datasetId, { ...params }) -> Dataset
+- client.zeroTrust.dlp.datasets.get(datasetId, { ...params }) -> DatasetGetResponse
#### Upload
Types:
- NewVersion
+- UploadCreateResponse
+- UploadEditResponse
Methods:
-- client.zeroTrust.dlp.datasets.upload.create(datasetId, { ...params }) -> NewVersion
-- client.zeroTrust.dlp.datasets.upload.edit(datasetId, version, dataset, { ...params }) -> Dataset
+- client.zeroTrust.dlp.datasets.upload.create(datasetId, { ...params }) -> UploadCreateResponse
+- client.zeroTrust.dlp.datasets.upload.edit(datasetId, version, dataset, { ...params }) -> UploadEditResponse
#### Versions
@@ -5796,11 +5960,12 @@ Types:
- ContextAwareness
- Profile
- SkipConfiguration
+- ProfileGetResponse
Methods:
- client.zeroTrust.dlp.profiles.list({ ...params }) -> ProfilesSinglePage
-- client.zeroTrust.dlp.profiles.get(profileId, { ...params }) -> Profile
+- client.zeroTrust.dlp.profiles.get(profileId, { ...params }) -> ProfileGetResponse
#### Custom
@@ -5808,28 +5973,32 @@ Types:
- CustomProfile
- Pattern
+- CustomCreateResponse
+- CustomUpdateResponse
- CustomDeleteResponse
+- CustomGetResponse
Methods:
-- client.zeroTrust.dlp.profiles.custom.create({ ...params }) -> Profile
-- client.zeroTrust.dlp.profiles.custom.update(profileId, { ...params }) -> Profile
+- client.zeroTrust.dlp.profiles.custom.create({ ...params }) -> CustomCreateResponse
+- client.zeroTrust.dlp.profiles.custom.update(profileId, { ...params }) -> CustomUpdateResponse
- client.zeroTrust.dlp.profiles.custom.delete(profileId, { ...params }) -> CustomDeleteResponse | null
-- client.zeroTrust.dlp.profiles.custom.get(profileId, { ...params }) -> Profile
+- client.zeroTrust.dlp.profiles.custom.get(profileId, { ...params }) -> CustomGetResponse
#### Predefined
Types:
- PredefinedProfile
+- PredefinedUpdateResponse
- PredefinedDeleteResponse
+- PredefinedGetResponse
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 }) -> PredefinedUpdateResponse
- 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 }) -> PredefinedGetResponse
### Limits
@@ -6061,10 +6230,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 +6254,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 +6438,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 +6618,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 +6656,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 +6886,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 +6969,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 +7020,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 +7095,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 +7147,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 +7257,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 +7341,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 +7471,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 +7871,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 +8130,8 @@ Methods:
- client.snippets.rules.list({ ...params }) -> RuleListResponsesSinglePage
- client.snippets.rules.delete({ ...params }) -> RuleDeleteResponsesSinglePage
+# RealtimeKit
+
# Calls
## SFU
@@ -8305,6 +8586,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
@@ -8497,6 +8798,7 @@ Types:
- DetectionUpdateResponse
- DetectionListResponse
- DetectionDeleteResponse
+- DetectionGetResponse
Methods:
@@ -8504,18 +8806,25 @@ Methods:
- client.leakedCredentialChecks.detections.update(detectionId, { ...params }) -> DetectionUpdateResponse
- client.leakedCredentialChecks.detections.list({ ...params }) -> DetectionListResponsesSinglePage
- client.leakedCredentialChecks.detections.delete(detectionId, { ...params }) -> DetectionDeleteResponse
+- client.leakedCredentialChecks.detections.get(detectionId, { ...params }) -> DetectionGetResponse
# ContentScanning
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 +8854,27 @@ Methods:
Types:
-- AbuseReportCreateResponse
+- AbuseReportCreateResponse
+- AbuseReportListResponse
+- AbuseReportGetResponse
+
+Methods:
+
+- client.abuseReports.create(reportParam, { ...params }) -> AbuseReportCreateResponse
+- client.abuseReports.list({ ...params }) -> AbuseReportListResponsesV4PagePagination
+- client.abuseReports.get(reportParam, { ...params }) -> AbuseReportGetResponse
+
+## Mitigations
+
+Types:
+
+- MitigationListResponse
+- MitigationReviewResponse
Methods:
-- client.abuseReports.create(reportType, { ...params }) -> AbuseReportCreateResponse
+- client.abuseReports.mitigations.list(reportId, { ...params }) -> MitigationListResponsesV4PagePagination
+- client.abuseReports.mitigations.review(reportId, { ...params }) -> MitigationReviewResponsesSinglePage
# AI
@@ -8637,12 +8962,82 @@ Methods:
Types:
+- ToMarkdownSupportedResponse
- ToMarkdownTransformResponse
Methods:
+- client.ai.toMarkdown.supported({ ...params }) -> ToMarkdownSupportedResponsesSinglePage
- client.ai.toMarkdown.transform(file, { ...params }) -> ToMarkdownTransformResponsesSinglePage
+# AISearch
+
+## Instances
+
+Types:
+
+- InstanceCreateResponse
+- InstanceUpdateResponse
+- InstanceListResponse
+- InstanceDeleteResponse
+- InstanceReadResponse
+- InstanceStatsResponse
+
+Methods:
+
+- client.aiSearch.instances.create({ ...params }) -> InstanceCreateResponse
+- client.aiSearch.instances.update(id, { ...params }) -> InstanceUpdateResponse
+- client.aiSearch.instances.list({ ...params }) -> InstanceListResponsesV4PagePaginationArray
+- client.aiSearch.instances.delete(id, { ...params }) -> InstanceDeleteResponse
+- client.aiSearch.instances.read(id, { ...params }) -> InstanceReadResponse
+- client.aiSearch.instances.stats(id, { ...params }) -> InstanceStatsResponse
+
+### Items
+
+Types:
+
+- ItemListResponse
+- ItemGetResponse
+
+Methods:
+
+- client.aiSearch.instances.items.list(id, { ...params }) -> ItemListResponsesV4PagePaginationArray
+- client.aiSearch.instances.items.get(id, itemId, { ...params }) -> ItemGetResponse
+
+### Jobs
+
+Types:
+
+- JobCreateResponse
+- JobListResponse
+- JobGetResponse
+- JobLogsResponse
+
+Methods:
+
+- client.aiSearch.instances.jobs.create(id, { ...params }) -> JobCreateResponse
+- client.aiSearch.instances.jobs.list(id, { ...params }) -> JobListResponsesV4PagePaginationArray
+- client.aiSearch.instances.jobs.get(id, jobId, { ...params }) -> JobGetResponse
+- client.aiSearch.instances.jobs.logs(id, jobId, { ...params }) -> JobLogsResponse
+
+## Tokens
+
+Types:
+
+- TokenCreateResponse
+- TokenUpdateResponse
+- TokenListResponse
+- TokenDeleteResponse
+- TokenReadResponse
+
+Methods:
+
+- client.aiSearch.tokens.create({ ...params }) -> TokenCreateResponse
+- client.aiSearch.tokens.update(id, { ...params }) -> TokenUpdateResponse
+- client.aiSearch.tokens.list({ ...params }) -> TokenListResponsesV4PagePaginationArray
+- client.aiSearch.tokens.delete(id, { ...params }) -> TokenDeleteResponse
+- client.aiSearch.tokens.read(id, { ...params }) -> TokenReadResponse
+
# SecurityCenter
## Insights
@@ -8831,18 +9226,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 +9286,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 +9328,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/scripts/detect-breaking-changes b/scripts/detect-breaking-changes
index 4580a22d2d..7b995bd05c 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
@@ -369,6 +371,7 @@ TEST_PATHS=(
tests/api-resources/alerting/destinations/webhooks.test.ts
tests/api-resources/alerting/history.test.ts
tests/api-resources/alerting/policies.test.ts
+ tests/api-resources/alerting/silences.test.ts
tests/api-resources/d1/d1.test.ts
tests/api-resources/d1/database.test.ts
tests/api-resources/r2/r2.test.ts
@@ -387,6 +390,12 @@ TEST_PATHS=(
tests/api-resources/r2/super-slurper/jobs/jobs.test.ts
tests/api-resources/r2/super-slurper/jobs/logs.test.ts
tests/api-resources/r2/super-slurper/connectivity-precheck.test.ts
+ tests/api-resources/r2-data-catalog/r2-data-catalog.test.ts
+ tests/api-resources/r2-data-catalog/maintenance-configs.test.ts
+ tests/api-resources/r2-data-catalog/credentials.test.ts
+ tests/api-resources/r2-data-catalog/namespaces/namespaces.test.ts
+ tests/api-resources/r2-data-catalog/namespaces/tables/tables.test.ts
+ tests/api-resources/r2-data-catalog/namespaces/tables/maintenance-configs.test.ts
tests/api-resources/workers-for-platforms/workers-for-platforms.test.ts
tests/api-resources/workers-for-platforms/dispatch/dispatch.test.ts
tests/api-resources/workers-for-platforms/dispatch/namespaces/namespaces.test.ts
@@ -430,6 +439,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 +542,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 +623,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 +718,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 +739,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
@@ -731,6 +750,11 @@ TEST_PATHS=(
tests/api-resources/ai/models/models.test.ts
tests/api-resources/ai/models/schema.test.ts
tests/api-resources/ai/to-markdown.test.ts
+ tests/api-resources/aisearch/aisearch.test.ts
+ tests/api-resources/aisearch/instances/instances.test.ts
+ tests/api-resources/aisearch/instances/items.test.ts
+ tests/api-resources/aisearch/instances/jobs.test.ts
+ tests/api-resources/aisearch/tokens.test.ts
tests/api-resources/security-center/security-center.test.ts
tests/api-resources/security-center/insights/insights.test.ts
tests/api-resources/security-center/insights/class.test.ts
@@ -750,11 +774,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/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh
index 37da0aeda5..b228a8dec5 100755
--- a/scripts/utils/upload-artifact.sh
+++ b/scripts/utils/upload-artifact.sh
@@ -12,9 +12,11 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi
-UPLOAD_RESPONSE=$(tar "${BASE_PATH:+-C$BASE_PATH}" -cz "${ARTIFACT_PATH:-dist}" | curl -v -X PUT \
+TARBALL=$(cd dist && npm pack --silent)
+
+UPLOAD_RESPONSE=$(curl -v -X PUT \
-H "Content-Type: application/gzip" \
- --data-binary @- "$SIGNED_URL" 2>&1)
+ --data-binary "@dist/$TARBALL" "$SIGNED_URL" 2>&1)
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
diff --git a/src/index.ts b/src/index.ts
index e95a62b7e6..2a087d65fb 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,15 +34,17 @@ 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';
import { AIGateway } from './resources/ai-gateway/ai-gateway';
import { AI } from './resources/ai/ai';
+import { AISearch } from './resources/aisearch/aisearch';
import { Alerting } from './resources/alerting/alerting';
import { APIGateway } from './resources/api-gateway/api-gateway';
import { Argo } from './resources/argo/argo';
@@ -56,6 +57,7 @@ import { Calls } from './resources/calls/calls';
import { CertificateAuthorities } from './resources/certificate-authorities/certificate-authorities';
import { CloudConnector } from './resources/cloud-connector/cloud-connector';
import { CloudforceOne } from './resources/cloudforce-one/cloudforce-one';
+import { Connectivity } from './resources/connectivity/connectivity';
import { ContentScanning } from './resources/content-scanning/content-scanning';
import { CustomCertificates } from './resources/custom-certificates/custom-certificates';
import { CustomHostnames } from './resources/custom-hostnames/custom-hostnames';
@@ -83,10 +85,13 @@ 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 { R2DataCatalog } from './resources/r2-data-catalog/r2-data-catalog';
import { R2 } from './resources/r2/r2';
import { Radar } from './resources/radar/radar';
import { Registrar } from './resources/registrar/registrar';
@@ -103,6 +108,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 +272,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);
@@ -326,9 +333,11 @@ export class Cloudflare extends Core.APIClient {
alerting: API.Alerting = new API.Alerting(this);
d1: API.D1Resource = new API.D1Resource(this);
r2: API.R2 = new API.R2(this);
+ r2DataCatalog: API.R2DataCatalog = new API.R2DataCatalog(this);
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 +350,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);
@@ -354,12 +364,14 @@ export class Cloudflare extends Core.APIClient {
contentScanning: API.ContentScanning = new API.ContentScanning(this);
abuseReports: API.AbuseReports = new API.AbuseReports(this);
ai: API.AI = new API.AI(this);
+ aiSearch: API.AISearch = new API.AISearch(this);
securityCenter: API.SecurityCenter = new API.SecurityCenter(this);
browserRendering: API.BrowserRendering = new API.BrowserRendering(this);
customPages: API.CustomPages = new API.CustomPages(this);
secretsStore: API.SecretsStore = new API.SecretsStore(this);
pipelines: API.Pipelines = new API.Pipelines(this);
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 +515,7 @@ export class Cloudflare extends Core.APIClient {
}
Cloudflare.Accounts = Accounts;
+Cloudflare.Organizations = Organizations;
Cloudflare.OriginCACertificates = OriginCACertificates;
Cloudflare.IPs = IPs;
Cloudflare.Memberships = Memberships;
@@ -563,9 +576,11 @@ Cloudflare.Stream = Stream;
Cloudflare.Alerting = Alerting;
Cloudflare.D1Resource = D1Resource;
Cloudflare.R2 = R2;
+Cloudflare.R2DataCatalog = R2DataCatalog;
Cloudflare.WorkersForPlatforms = WorkersForPlatforms;
Cloudflare.ZeroTrust = ZeroTrust;
Cloudflare.Turnstile = Turnstile;
+Cloudflare.Connectivity = Connectivity;
Cloudflare.HyperdriveResource = HyperdriveResource;
Cloudflare.RUM = RUM;
Cloudflare.Vectorize = Vectorize;
@@ -578,6 +593,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;
@@ -591,12 +607,14 @@ Cloudflare.LeakedCredentialChecks = LeakedCredentialChecks;
Cloudflare.ContentScanning = ContentScanning;
Cloudflare.AbuseReports = AbuseReports;
Cloudflare.AI = AI;
+Cloudflare.AISearch = AISearch;
Cloudflare.SecurityCenter = SecurityCenter;
Cloudflare.BrowserRendering = BrowserRendering;
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 +654,8 @@ export declare namespace Cloudflare {
export { Accounts as Accounts };
+ export { Organizations as Organizations };
+
export { OriginCACertificates as OriginCACertificates };
export { IPs as IPs };
@@ -756,12 +776,16 @@ export declare namespace Cloudflare {
export { R2 as R2 };
+ export { R2DataCatalog as R2DataCatalog };
+
export { WorkersForPlatforms as WorkersForPlatforms };
export { ZeroTrust as ZeroTrust };
export { Turnstile as Turnstile };
+ export { Connectivity as Connectivity };
+
export { HyperdriveResource as HyperdriveResource };
export { RUM as RUM };
@@ -786,6 +810,8 @@ export declare namespace Cloudflare {
export { Snippets as Snippets };
+ export { RealtimeKit as RealtimeKit };
+
export { Calls as Calls };
export { CloudforceOne as CloudforceOne };
@@ -812,6 +838,8 @@ export declare namespace Cloudflare {
export { AI as AI };
+ export { AISearch as AISearch };
+
export { SecurityCenter as SecurityCenter };
export { BrowserRendering as BrowserRendering };
@@ -824,6 +852,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..74df855364
--- /dev/null
+++ b/src/resources/abuse-reports/abuse-reports.ts
@@ -0,0 +1,1201 @@
+// 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';
+
+ /**
+ * Justification for the report.
+ */
+ justification?: string;
+
+ /**
+ * Original work / Targeted brand in the alleged abuse.
+ */
+ original_work?: string;
+
+ /**
+ * Information about the submitter of the report.
+ */
+ submitter?: Report.Submitter;
+
+ urls?: Array;
+ }
+
+ 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;
+ }
+
+ /**
+ * Information about the submitter of the report.
+ */
+ export interface Submitter {
+ company?: string;
+
+ email?: string;
+
+ name?: string;
+
+ telephone?: string;
+ }
+ }
+}
+
+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';
+
+ /**
+ * Justification for the report.
+ */
+ justification?: string;
+
+ /**
+ * Original work / Targeted brand in the alleged abuse.
+ */
+ original_work?: string;
+
+ /**
+ * Information about the submitter of the report.
+ */
+ submitter?: AbuseReportGetResponse.Submitter;
+
+ urls?: Array;
+}
+
+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;
+ }
+
+ /**
+ * Information about the submitter of the report.
+ */
+ export interface Submitter {
+ company?: string;
+
+ email?: string;
+
+ name?: string;
+
+ telephone?: 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: 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/accounts/logs/audit.ts b/src/resources/accounts/logs/audit.ts
index 63362be091..c951fa3b1a 100644
--- a/src/resources/accounts/logs/audit.ts
+++ b/src/resources/accounts/logs/audit.ts
@@ -252,6 +252,11 @@ export interface AuditListParams extends CursorPaginationAfterParams {
*/
since: string;
+ /**
+ * Query param:
+ */
+ id?: AuditListParams.ID;
+
/**
* Query param:
*/
@@ -371,6 +376,13 @@ export interface AuditListParams extends CursorPaginationAfterParams {
}
export namespace AuditListParams {
+ export interface ID {
+ /**
+ * Filters out audit logs by their IDs.
+ */
+ not?: Array;
+ }
+
export interface AccountName {
/**
* Filters out audit logs by the account name.
@@ -446,7 +458,7 @@ export namespace AuditListParams {
export interface AuditLogID {
/**
- * Filters out audit logs by their IDs.
+ * @deprecated Filters out audit logs by their IDs.
*/
not?: Array;
}
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..a30767d55d 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,17 +317,28 @@ 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.
*/
cidr: string;
+ /**
+ * Body param: Whether Cloudflare is allowed to generate the LOA document on behalf
+ * of the prefix owner.
+ */
+ delegate_loa_creation?: boolean;
+
+ /**
+ * Body param: Description of the prefix.
+ */
+ description?: string;
+
/**
* Body param: Identifier for the uploaded LOA document.
*/
- loa_document_id: string | null;
+ loa_document_id?: string | null;
}
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-gateway/ai-gateway.ts b/src/resources/ai-gateway/ai-gateway.ts
index 0c4c49b406..765ca9490c 100644
--- a/src/resources/ai-gateway/ai-gateway.ts
+++ b/src/resources/ai-gateway/ai-gateway.ts
@@ -248,6 +248,8 @@ export interface AIGatewayCreateResponse {
store_id?: string | null;
stripe?: AIGatewayCreateResponse.Stripe | null;
+
+ zdr?: boolean;
}
export namespace AIGatewayCreateResponse {
@@ -345,6 +347,8 @@ export interface AIGatewayUpdateResponse {
store_id?: string | null;
stripe?: AIGatewayUpdateResponse.Stripe | null;
+
+ zdr?: boolean;
}
export namespace AIGatewayUpdateResponse {
@@ -442,6 +446,8 @@ export interface AIGatewayListResponse {
store_id?: string | null;
stripe?: AIGatewayListResponse.Stripe | null;
+
+ zdr?: boolean;
}
export namespace AIGatewayListResponse {
@@ -539,6 +545,8 @@ export interface AIGatewayDeleteResponse {
store_id?: string | null;
stripe?: AIGatewayDeleteResponse.Stripe | null;
+
+ zdr?: boolean;
}
export namespace AIGatewayDeleteResponse {
@@ -636,6 +644,8 @@ export interface AIGatewayGetResponse {
store_id?: string | null;
stripe?: AIGatewayGetResponse.Stripe | null;
+
+ zdr?: boolean;
}
export namespace AIGatewayGetResponse {
@@ -753,6 +763,11 @@ export interface AIGatewayCreateParams {
* Body param:
*/
logpush_public_key?: string | null;
+
+ /**
+ * Body param:
+ */
+ zdr?: boolean;
}
export interface AIGatewayUpdateParams {
@@ -835,6 +850,11 @@ export interface AIGatewayUpdateParams {
* Body param:
*/
stripe?: AIGatewayUpdateParams.Stripe | null;
+
+ /**
+ * Body param:
+ */
+ zdr?: boolean;
}
export namespace AIGatewayUpdateParams {
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/aisearch.ts b/src/resources/aisearch.ts
new file mode 100644
index 0000000000..97b1aac883
--- /dev/null
+++ b/src/resources/aisearch.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './aisearch/index';
diff --git a/src/resources/aisearch/aisearch.ts b/src/resources/aisearch/aisearch.ts
new file mode 100644
index 0000000000..38fe1486d6
--- /dev/null
+++ b/src/resources/aisearch/aisearch.ts
@@ -0,0 +1,79 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../resource';
+import * as TokensAPI from './tokens';
+import {
+ TokenCreateParams,
+ TokenCreateResponse,
+ TokenDeleteParams,
+ TokenDeleteResponse,
+ TokenListParams,
+ TokenListResponse,
+ TokenListResponsesV4PagePaginationArray,
+ TokenReadParams,
+ TokenReadResponse,
+ TokenUpdateParams,
+ TokenUpdateResponse,
+ Tokens,
+} from './tokens';
+import * as InstancesAPI from './instances/instances';
+import {
+ InstanceCreateParams,
+ InstanceCreateResponse,
+ InstanceDeleteParams,
+ InstanceDeleteResponse,
+ InstanceListParams,
+ InstanceListResponse,
+ InstanceListResponsesV4PagePaginationArray,
+ InstanceReadParams,
+ InstanceReadResponse,
+ InstanceStatsParams,
+ InstanceStatsResponse,
+ InstanceUpdateParams,
+ InstanceUpdateResponse,
+ Instances,
+} from './instances/instances';
+
+export class AISearch extends APIResource {
+ instances: InstancesAPI.Instances = new InstancesAPI.Instances(this._client);
+ tokens: TokensAPI.Tokens = new TokensAPI.Tokens(this._client);
+}
+
+AISearch.Instances = Instances;
+AISearch.InstanceListResponsesV4PagePaginationArray = InstanceListResponsesV4PagePaginationArray;
+AISearch.Tokens = Tokens;
+AISearch.TokenListResponsesV4PagePaginationArray = TokenListResponsesV4PagePaginationArray;
+
+export declare namespace AISearch {
+ export {
+ Instances as Instances,
+ type InstanceCreateResponse as InstanceCreateResponse,
+ type InstanceUpdateResponse as InstanceUpdateResponse,
+ type InstanceListResponse as InstanceListResponse,
+ type InstanceDeleteResponse as InstanceDeleteResponse,
+ type InstanceReadResponse as InstanceReadResponse,
+ type InstanceStatsResponse as InstanceStatsResponse,
+ InstanceListResponsesV4PagePaginationArray as InstanceListResponsesV4PagePaginationArray,
+ type InstanceCreateParams as InstanceCreateParams,
+ type InstanceUpdateParams as InstanceUpdateParams,
+ type InstanceListParams as InstanceListParams,
+ type InstanceDeleteParams as InstanceDeleteParams,
+ type InstanceReadParams as InstanceReadParams,
+ type InstanceStatsParams as InstanceStatsParams,
+ };
+
+ export {
+ Tokens as Tokens,
+ type TokenCreateResponse as TokenCreateResponse,
+ type TokenUpdateResponse as TokenUpdateResponse,
+ type TokenListResponse as TokenListResponse,
+ type TokenDeleteResponse as TokenDeleteResponse,
+ type TokenReadResponse as TokenReadResponse,
+ TokenListResponsesV4PagePaginationArray as TokenListResponsesV4PagePaginationArray,
+ type TokenCreateParams as TokenCreateParams,
+ type TokenUpdateParams as TokenUpdateParams,
+ type TokenListParams as TokenListParams,
+ type TokenDeleteParams as TokenDeleteParams,
+ type TokenReadParams as TokenReadParams,
+ };
+}
diff --git a/src/resources/aisearch/index.ts b/src/resources/aisearch/index.ts
new file mode 100644
index 0000000000..f81ab35006
--- /dev/null
+++ b/src/resources/aisearch/index.ts
@@ -0,0 +1,33 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export { AISearch } from './aisearch';
+export {
+ InstanceListResponsesV4PagePaginationArray,
+ Instances,
+ type InstanceCreateResponse,
+ type InstanceUpdateResponse,
+ type InstanceListResponse,
+ type InstanceDeleteResponse,
+ type InstanceReadResponse,
+ type InstanceStatsResponse,
+ type InstanceCreateParams,
+ type InstanceUpdateParams,
+ type InstanceListParams,
+ type InstanceDeleteParams,
+ type InstanceReadParams,
+ type InstanceStatsParams,
+} from './instances/index';
+export {
+ TokenListResponsesV4PagePaginationArray,
+ Tokens,
+ type TokenCreateResponse,
+ type TokenUpdateResponse,
+ type TokenListResponse,
+ type TokenDeleteResponse,
+ type TokenReadResponse,
+ type TokenCreateParams,
+ type TokenUpdateParams,
+ type TokenListParams,
+ type TokenDeleteParams,
+ type TokenReadParams,
+} from './tokens';
diff --git a/src/resources/aisearch/instances.ts b/src/resources/aisearch/instances.ts
new file mode 100644
index 0000000000..e3873a7498
--- /dev/null
+++ b/src/resources/aisearch/instances.ts
@@ -0,0 +1,3 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export * from './instances/index';
diff --git a/src/resources/aisearch/instances/index.ts b/src/resources/aisearch/instances/index.ts
new file mode 100644
index 0000000000..392d8edc2e
--- /dev/null
+++ b/src/resources/aisearch/instances/index.ts
@@ -0,0 +1,38 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+export {
+ InstanceListResponsesV4PagePaginationArray,
+ Instances,
+ type InstanceCreateResponse,
+ type InstanceUpdateResponse,
+ type InstanceListResponse,
+ type InstanceDeleteResponse,
+ type InstanceReadResponse,
+ type InstanceStatsResponse,
+ type InstanceCreateParams,
+ type InstanceUpdateParams,
+ type InstanceListParams,
+ type InstanceDeleteParams,
+ type InstanceReadParams,
+ type InstanceStatsParams,
+} from './instances';
+export {
+ ItemListResponsesV4PagePaginationArray,
+ Items,
+ type ItemListResponse,
+ type ItemGetResponse,
+ type ItemListParams,
+ type ItemGetParams,
+} from './items';
+export {
+ JobListResponsesV4PagePaginationArray,
+ Jobs,
+ type JobCreateResponse,
+ type JobListResponse,
+ type JobGetResponse,
+ type JobLogsResponse,
+ type JobCreateParams,
+ type JobListParams,
+ type JobGetParams,
+ type JobLogsParams,
+} from './jobs';
diff --git a/src/resources/aisearch/instances/instances.ts b/src/resources/aisearch/instances/instances.ts
new file mode 100644
index 0000000000..a380f4aad5
--- /dev/null
+++ b/src/resources/aisearch/instances/instances.ts
@@ -0,0 +1,1875 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+import { APIResource } from '../../../resource';
+import * as Core from '../../../core';
+import * as ItemsAPI from './items';
+import {
+ ItemGetParams,
+ ItemGetResponse,
+ ItemListParams,
+ ItemListResponse,
+ ItemListResponsesV4PagePaginationArray,
+ Items,
+} from './items';
+import * as JobsAPI from './jobs';
+import {
+ JobCreateParams,
+ JobCreateResponse,
+ JobGetParams,
+ JobGetResponse,
+ JobListParams,
+ JobListResponse,
+ JobListResponsesV4PagePaginationArray,
+ JobLogsParams,
+ JobLogsResponse,
+ Jobs,
+} from './jobs';
+import * as SippyAPI from '../../r2/buckets/sippy';
+import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination';
+
+export class Instances extends APIResource {
+ items: ItemsAPI.Items = new ItemsAPI.Items(this._client);
+ jobs: JobsAPI.Jobs = new JobsAPI.Jobs(this._client);
+
+ /**
+ * Create new instances.
+ *
+ * @example
+ * ```ts
+ * const instance = await client.aiSearch.instances.create({
+ * account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22',
+ * id: 'my-ai-search',
+ * source: 'source',
+ * token_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * type: 'r2',
+ * });
+ * ```
+ */
+ create(
+ params: InstanceCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/ai-search/instances`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: InstanceCreateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Update instances.
+ *
+ * @example
+ * ```ts
+ * const instance = await client.aiSearch.instances.update(
+ * 'my-ai-search',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ update(
+ id: string,
+ params: InstanceUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.put(`/accounts/${account_id}/ai-search/instances/${id}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: InstanceUpdateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List instances.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const instanceListResponse of client.aiSearch.instances.list(
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ params: InstanceListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/ai-search/instances`,
+ InstanceListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Delete instances.
+ *
+ * @example
+ * ```ts
+ * const instance = await client.aiSearch.instances.delete(
+ * 'my-ai-search',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ delete(
+ id: string,
+ params: InstanceDeleteParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.delete(`/accounts/${account_id}/ai-search/instances/${id}`, options) as Core.APIPromise<{
+ result: InstanceDeleteResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Read instances.
+ *
+ * @example
+ * ```ts
+ * const response = await client.aiSearch.instances.read(
+ * 'my-ai-search',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ read(
+ id: string,
+ params: InstanceReadParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(`/accounts/${account_id}/ai-search/instances/${id}`, options) as Core.APIPromise<{
+ result: InstanceReadResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Stats
+ *
+ * @example
+ * ```ts
+ * const response = await client.aiSearch.instances.stats(
+ * 'my-ai-search',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ stats(
+ id: string,
+ params: InstanceStatsParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/ai-search/instances/${id}/stats`,
+ options,
+ ) as Core.APIPromise<{ result: InstanceStatsResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class InstanceListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export interface InstanceCreateResponse {
+ /**
+ * Use your AI Search ID.
+ */
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ created_at: string;
+
+ internal_id: string;
+
+ modified_at: string;
+
+ source: string;
+
+ token_id: string;
+
+ type: 'r2' | 'web-crawler';
+
+ vectorize_name: string;
+
+ ai_gateway_id?: string;
+
+ ai_search_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ cache?: boolean;
+
+ cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
+
+ chunk?: boolean;
+
+ chunk_overlap?: number;
+
+ chunk_size?: number;
+
+ created_by?: string;
+
+ embedding_model?:
+ | '@cf/baai/bge-m3'
+ | '@cf/baai/bge-large-en-v1.5'
+ | '@cf/google/embeddinggemma-300m'
+ | '@cf/qwen/qwen3-embedding-0.6b'
+ | 'google-ai-studio/gemini-embedding-001'
+ | 'openai/text-embedding-3-small'
+ | 'openai/text-embedding-3-large'
+ | '';
+
+ enable?: boolean;
+
+ engine_version?: number;
+
+ last_activity?: string;
+
+ max_num_results?: number;
+
+ metadata?: InstanceCreateResponse.Metadata;
+
+ modified_by?: string;
+
+ paused?: boolean;
+
+ reranking?: boolean;
+
+ reranking_model?: '@cf/baai/bge-reranker-base' | '';
+
+ rewrite_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ rewrite_query?: boolean;
+
+ score_threshold?: number;
+
+ source_params?: InstanceCreateResponse.SourceParams;
+
+ status?: string;
+
+ summarization?: boolean;
+
+ summarization_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ system_prompt_ai_search?: string;
+
+ system_prompt_index_summarization?: string;
+
+ system_prompt_rewrite_query?: string;
+
+ vectorize_active_namespace?: string;
+}
+
+export namespace InstanceCreateResponse {
+ export interface Metadata {
+ created_from_aisearch_wizard?: boolean;
+
+ worker_domain?: string;
+ }
+
+ export interface SourceParams {
+ /**
+ * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ * /private/\*_, _\private\*)
+ */
+ exclude_items?: Array;
+
+ /**
+ * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ * /docs/\*_, _\blog\*.html)
+ */
+ include_items?: Array;
+
+ prefix?: string;
+
+ r2_jurisdiction?: string;
+
+ web_crawler?: SourceParams.WebCrawler;
+ }
+
+ export namespace SourceParams {
+ export interface WebCrawler {
+ parse_options?: WebCrawler.ParseOptions;
+
+ parse_type?: 'sitemap' | 'feed-rss';
+
+ store_options?: WebCrawler.StoreOptions;
+ }
+
+ export namespace WebCrawler {
+ export interface ParseOptions {
+ include_headers?: { [key: string]: string };
+
+ include_images?: boolean;
+
+ use_browser_rendering?: boolean;
+ }
+
+ export interface StoreOptions {
+ storage_id: string;
+
+ r2_jurisdiction?: string;
+
+ storage_type?: SippyAPI.Provider;
+ }
+ }
+ }
+}
+
+export interface InstanceUpdateResponse {
+ /**
+ * Use your AI Search ID.
+ */
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ created_at: string;
+
+ internal_id: string;
+
+ modified_at: string;
+
+ source: string;
+
+ token_id: string;
+
+ type: 'r2' | 'web-crawler';
+
+ vectorize_name: string;
+
+ ai_gateway_id?: string;
+
+ ai_search_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ cache?: boolean;
+
+ cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
+
+ chunk?: boolean;
+
+ chunk_overlap?: number;
+
+ chunk_size?: number;
+
+ created_by?: string;
+
+ embedding_model?:
+ | '@cf/baai/bge-m3'
+ | '@cf/baai/bge-large-en-v1.5'
+ | '@cf/google/embeddinggemma-300m'
+ | '@cf/qwen/qwen3-embedding-0.6b'
+ | 'google-ai-studio/gemini-embedding-001'
+ | 'openai/text-embedding-3-small'
+ | 'openai/text-embedding-3-large'
+ | '';
+
+ enable?: boolean;
+
+ engine_version?: number;
+
+ last_activity?: string;
+
+ max_num_results?: number;
+
+ metadata?: InstanceUpdateResponse.Metadata;
+
+ modified_by?: string;
+
+ paused?: boolean;
+
+ reranking?: boolean;
+
+ reranking_model?: '@cf/baai/bge-reranker-base' | '';
+
+ rewrite_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ rewrite_query?: boolean;
+
+ score_threshold?: number;
+
+ source_params?: InstanceUpdateResponse.SourceParams;
+
+ status?: string;
+
+ summarization?: boolean;
+
+ summarization_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ system_prompt_ai_search?: string;
+
+ system_prompt_index_summarization?: string;
+
+ system_prompt_rewrite_query?: string;
+
+ vectorize_active_namespace?: string;
+}
+
+export namespace InstanceUpdateResponse {
+ export interface Metadata {
+ created_from_aisearch_wizard?: boolean;
+
+ worker_domain?: string;
+ }
+
+ export interface SourceParams {
+ /**
+ * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ * /private/\*_, _\private\*)
+ */
+ exclude_items?: Array;
+
+ /**
+ * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ * /docs/\*_, _\blog\*.html)
+ */
+ include_items?: Array;
+
+ prefix?: string;
+
+ r2_jurisdiction?: string;
+
+ web_crawler?: SourceParams.WebCrawler;
+ }
+
+ export namespace SourceParams {
+ export interface WebCrawler {
+ parse_options?: WebCrawler.ParseOptions;
+
+ parse_type?: 'sitemap' | 'feed-rss';
+
+ store_options?: WebCrawler.StoreOptions;
+ }
+
+ export namespace WebCrawler {
+ export interface ParseOptions {
+ include_headers?: { [key: string]: string };
+
+ include_images?: boolean;
+
+ use_browser_rendering?: boolean;
+ }
+
+ export interface StoreOptions {
+ storage_id: string;
+
+ r2_jurisdiction?: string;
+
+ storage_type?: SippyAPI.Provider;
+ }
+ }
+ }
+}
+
+export interface InstanceListResponse {
+ /**
+ * Use your AI Search ID.
+ */
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ created_at: string;
+
+ internal_id: string;
+
+ modified_at: string;
+
+ source: string;
+
+ token_id: string;
+
+ type: 'r2' | 'web-crawler';
+
+ vectorize_name: string;
+
+ ai_gateway_id?: string;
+
+ ai_search_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ cache?: boolean;
+
+ cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
+
+ chunk?: boolean;
+
+ chunk_overlap?: number;
+
+ chunk_size?: number;
+
+ created_by?: string;
+
+ embedding_model?:
+ | '@cf/baai/bge-m3'
+ | '@cf/baai/bge-large-en-v1.5'
+ | '@cf/google/embeddinggemma-300m'
+ | '@cf/qwen/qwen3-embedding-0.6b'
+ | 'google-ai-studio/gemini-embedding-001'
+ | 'openai/text-embedding-3-small'
+ | 'openai/text-embedding-3-large'
+ | '';
+
+ enable?: boolean;
+
+ engine_version?: number;
+
+ last_activity?: string;
+
+ max_num_results?: number;
+
+ metadata?: InstanceListResponse.Metadata;
+
+ modified_by?: string;
+
+ paused?: boolean;
+
+ reranking?: boolean;
+
+ reranking_model?: '@cf/baai/bge-reranker-base' | '';
+
+ rewrite_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ rewrite_query?: boolean;
+
+ score_threshold?: number;
+
+ source_params?: InstanceListResponse.SourceParams;
+
+ status?: string;
+
+ summarization?: boolean;
+
+ summarization_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ system_prompt_ai_search?: string;
+
+ system_prompt_index_summarization?: string;
+
+ system_prompt_rewrite_query?: string;
+
+ vectorize_active_namespace?: string;
+}
+
+export namespace InstanceListResponse {
+ export interface Metadata {
+ created_from_aisearch_wizard?: boolean;
+
+ worker_domain?: string;
+ }
+
+ export interface SourceParams {
+ /**
+ * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ * /private/\*_, _\private\*)
+ */
+ exclude_items?: Array;
+
+ /**
+ * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ * /docs/\*_, _\blog\*.html)
+ */
+ include_items?: Array;
+
+ prefix?: string;
+
+ r2_jurisdiction?: string;
+
+ web_crawler?: SourceParams.WebCrawler;
+ }
+
+ export namespace SourceParams {
+ export interface WebCrawler {
+ parse_options?: WebCrawler.ParseOptions;
+
+ parse_type?: 'sitemap' | 'feed-rss';
+
+ store_options?: WebCrawler.StoreOptions;
+ }
+
+ export namespace WebCrawler {
+ export interface ParseOptions {
+ include_headers?: { [key: string]: string };
+
+ include_images?: boolean;
+
+ use_browser_rendering?: boolean;
+ }
+
+ export interface StoreOptions {
+ storage_id: string;
+
+ r2_jurisdiction?: string;
+
+ storage_type?: SippyAPI.Provider;
+ }
+ }
+ }
+}
+
+export interface InstanceDeleteResponse {
+ /**
+ * Use your AI Search ID.
+ */
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ created_at: string;
+
+ internal_id: string;
+
+ modified_at: string;
+
+ source: string;
+
+ token_id: string;
+
+ type: 'r2' | 'web-crawler';
+
+ vectorize_name: string;
+
+ ai_gateway_id?: string;
+
+ ai_search_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ cache?: boolean;
+
+ cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
+
+ chunk?: boolean;
+
+ chunk_overlap?: number;
+
+ chunk_size?: number;
+
+ created_by?: string;
+
+ embedding_model?:
+ | '@cf/baai/bge-m3'
+ | '@cf/baai/bge-large-en-v1.5'
+ | '@cf/google/embeddinggemma-300m'
+ | '@cf/qwen/qwen3-embedding-0.6b'
+ | 'google-ai-studio/gemini-embedding-001'
+ | 'openai/text-embedding-3-small'
+ | 'openai/text-embedding-3-large'
+ | '';
+
+ enable?: boolean;
+
+ engine_version?: number;
+
+ last_activity?: string;
+
+ max_num_results?: number;
+
+ metadata?: InstanceDeleteResponse.Metadata;
+
+ modified_by?: string;
+
+ paused?: boolean;
+
+ reranking?: boolean;
+
+ reranking_model?: '@cf/baai/bge-reranker-base' | '';
+
+ rewrite_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ rewrite_query?: boolean;
+
+ score_threshold?: number;
+
+ source_params?: InstanceDeleteResponse.SourceParams;
+
+ status?: string;
+
+ summarization?: boolean;
+
+ summarization_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ system_prompt_ai_search?: string;
+
+ system_prompt_index_summarization?: string;
+
+ system_prompt_rewrite_query?: string;
+
+ vectorize_active_namespace?: string;
+}
+
+export namespace InstanceDeleteResponse {
+ export interface Metadata {
+ created_from_aisearch_wizard?: boolean;
+
+ worker_domain?: string;
+ }
+
+ export interface SourceParams {
+ /**
+ * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ * /private/\*_, _\private\*)
+ */
+ exclude_items?: Array;
+
+ /**
+ * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ * /docs/\*_, _\blog\*.html)
+ */
+ include_items?: Array;
+
+ prefix?: string;
+
+ r2_jurisdiction?: string;
+
+ web_crawler?: SourceParams.WebCrawler;
+ }
+
+ export namespace SourceParams {
+ export interface WebCrawler {
+ parse_options?: WebCrawler.ParseOptions;
+
+ parse_type?: 'sitemap' | 'feed-rss';
+
+ store_options?: WebCrawler.StoreOptions;
+ }
+
+ export namespace WebCrawler {
+ export interface ParseOptions {
+ include_headers?: { [key: string]: string };
+
+ include_images?: boolean;
+
+ use_browser_rendering?: boolean;
+ }
+
+ export interface StoreOptions {
+ storage_id: string;
+
+ r2_jurisdiction?: string;
+
+ storage_type?: SippyAPI.Provider;
+ }
+ }
+ }
+}
+
+export interface InstanceReadResponse {
+ /**
+ * Use your AI Search ID.
+ */
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ created_at: string;
+
+ internal_id: string;
+
+ modified_at: string;
+
+ source: string;
+
+ token_id: string;
+
+ type: 'r2' | 'web-crawler';
+
+ vectorize_name: string;
+
+ ai_gateway_id?: string;
+
+ ai_search_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ cache?: boolean;
+
+ cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
+
+ chunk?: boolean;
+
+ chunk_overlap?: number;
+
+ chunk_size?: number;
+
+ created_by?: string;
+
+ embedding_model?:
+ | '@cf/baai/bge-m3'
+ | '@cf/baai/bge-large-en-v1.5'
+ | '@cf/google/embeddinggemma-300m'
+ | '@cf/qwen/qwen3-embedding-0.6b'
+ | 'google-ai-studio/gemini-embedding-001'
+ | 'openai/text-embedding-3-small'
+ | 'openai/text-embedding-3-large'
+ | '';
+
+ enable?: boolean;
+
+ engine_version?: number;
+
+ last_activity?: string;
+
+ max_num_results?: number;
+
+ metadata?: InstanceReadResponse.Metadata;
+
+ modified_by?: string;
+
+ paused?: boolean;
+
+ reranking?: boolean;
+
+ reranking_model?: '@cf/baai/bge-reranker-base' | '';
+
+ rewrite_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ rewrite_query?: boolean;
+
+ score_threshold?: number;
+
+ source_params?: InstanceReadResponse.SourceParams;
+
+ status?: string;
+
+ summarization?: boolean;
+
+ summarization_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ system_prompt_ai_search?: string;
+
+ system_prompt_index_summarization?: string;
+
+ system_prompt_rewrite_query?: string;
+
+ vectorize_active_namespace?: string;
+}
+
+export namespace InstanceReadResponse {
+ export interface Metadata {
+ created_from_aisearch_wizard?: boolean;
+
+ worker_domain?: string;
+ }
+
+ export interface SourceParams {
+ /**
+ * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ * /private/\*_, _\private\*)
+ */
+ exclude_items?: Array;
+
+ /**
+ * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ * /docs/\*_, _\blog\*.html)
+ */
+ include_items?: Array;
+
+ prefix?: string;
+
+ r2_jurisdiction?: string;
+
+ web_crawler?: SourceParams.WebCrawler;
+ }
+
+ export namespace SourceParams {
+ export interface WebCrawler {
+ parse_options?: WebCrawler.ParseOptions;
+
+ parse_type?: 'sitemap' | 'feed-rss';
+
+ store_options?: WebCrawler.StoreOptions;
+ }
+
+ export namespace WebCrawler {
+ export interface ParseOptions {
+ include_headers?: { [key: string]: string };
+
+ include_images?: boolean;
+
+ use_browser_rendering?: boolean;
+ }
+
+ export interface StoreOptions {
+ storage_id: string;
+
+ r2_jurisdiction?: string;
+
+ storage_type?: SippyAPI.Provider;
+ }
+ }
+ }
+}
+
+export interface InstanceStatsResponse {
+ completed?: number;
+
+ error?: number;
+
+ file_embed_errors?: { [key: string]: unknown };
+
+ index_source_errors?: { [key: string]: unknown };
+
+ last_activity?: string;
+
+ queued?: number;
+
+ running?: number;
+
+ skipped?: number;
+}
+
+export interface InstanceCreateParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+
+ /**
+ * Body param: Use your AI Search ID.
+ */
+ id: string;
+
+ /**
+ * Body param:
+ */
+ source: string;
+
+ /**
+ * Body param:
+ */
+ token_id: string;
+
+ /**
+ * Body param:
+ */
+ type: 'r2' | 'web-crawler';
+
+ /**
+ * Body param:
+ */
+ ai_gateway_id?: string;
+
+ /**
+ * Body param:
+ */
+ ai_search_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ /**
+ * Body param:
+ */
+ chunk?: boolean;
+
+ /**
+ * Body param:
+ */
+ chunk_overlap?: number;
+
+ /**
+ * Body param:
+ */
+ chunk_size?: number;
+
+ /**
+ * Body param:
+ */
+ embedding_model?:
+ | '@cf/baai/bge-m3'
+ | '@cf/baai/bge-large-en-v1.5'
+ | '@cf/google/embeddinggemma-300m'
+ | '@cf/qwen/qwen3-embedding-0.6b'
+ | 'google-ai-studio/gemini-embedding-001'
+ | 'openai/text-embedding-3-small'
+ | 'openai/text-embedding-3-large'
+ | '';
+
+ /**
+ * Body param:
+ */
+ max_num_results?: number;
+
+ /**
+ * Body param:
+ */
+ metadata?: InstanceCreateParams.Metadata;
+
+ /**
+ * Body param:
+ */
+ reranking?: boolean;
+
+ /**
+ * Body param:
+ */
+ reranking_model?: '@cf/baai/bge-reranker-base' | '';
+
+ /**
+ * Body param:
+ */
+ rewrite_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ /**
+ * Body param:
+ */
+ rewrite_query?: boolean;
+
+ /**
+ * Body param:
+ */
+ score_threshold?: number;
+
+ /**
+ * Body param:
+ */
+ source_params?: InstanceCreateParams.SourceParams;
+}
+
+export namespace InstanceCreateParams {
+ export interface Metadata {
+ created_from_aisearch_wizard?: boolean;
+
+ worker_domain?: string;
+ }
+
+ export interface SourceParams {
+ /**
+ * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ * /private/\*_, _\private\*)
+ */
+ exclude_items?: Array;
+
+ /**
+ * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ * /docs/\*_, _\blog\*.html)
+ */
+ include_items?: Array;
+
+ prefix?: string;
+
+ r2_jurisdiction?: string;
+
+ web_crawler?: SourceParams.WebCrawler;
+ }
+
+ export namespace SourceParams {
+ export interface WebCrawler {
+ parse_options?: WebCrawler.ParseOptions;
+
+ parse_type?: 'sitemap' | 'feed-rss';
+
+ store_options?: WebCrawler.StoreOptions;
+ }
+
+ export namespace WebCrawler {
+ export interface ParseOptions {
+ include_headers?: { [key: string]: string };
+
+ include_images?: boolean;
+
+ use_browser_rendering?: boolean;
+ }
+
+ export interface StoreOptions {
+ storage_id: string;
+
+ r2_jurisdiction?: string;
+
+ storage_type?: SippyAPI.ProviderParam;
+ }
+ }
+ }
+}
+
+export interface InstanceUpdateParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ ai_gateway_id?: string;
+
+ /**
+ * Body param:
+ */
+ ai_search_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ /**
+ * Body param:
+ */
+ cache?: boolean;
+
+ /**
+ * Body param:
+ */
+ cache_threshold?: 'super_strict_match' | 'close_enough' | 'flexible_friend' | 'anything_goes';
+
+ /**
+ * Body param:
+ */
+ chunk?: boolean;
+
+ /**
+ * Body param:
+ */
+ chunk_overlap?: number;
+
+ /**
+ * Body param:
+ */
+ chunk_size?: number;
+
+ /**
+ * Body param:
+ */
+ embedding_model?:
+ | '@cf/baai/bge-m3'
+ | '@cf/baai/bge-large-en-v1.5'
+ | '@cf/google/embeddinggemma-300m'
+ | '@cf/qwen/qwen3-embedding-0.6b'
+ | 'google-ai-studio/gemini-embedding-001'
+ | 'openai/text-embedding-3-small'
+ | 'openai/text-embedding-3-large'
+ | '';
+
+ /**
+ * Body param:
+ */
+ max_num_results?: number;
+
+ /**
+ * Body param:
+ */
+ metadata?: InstanceUpdateParams.Metadata;
+
+ /**
+ * Body param:
+ */
+ paused?: boolean;
+
+ /**
+ * Body param:
+ */
+ reranking?: boolean;
+
+ /**
+ * Body param:
+ */
+ reranking_model?: '@cf/baai/bge-reranker-base' | '';
+
+ /**
+ * Body param:
+ */
+ rewrite_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ /**
+ * Body param:
+ */
+ rewrite_query?: boolean;
+
+ /**
+ * Body param:
+ */
+ score_threshold?: number;
+
+ /**
+ * Body param:
+ */
+ source_params?: InstanceUpdateParams.SourceParams;
+
+ /**
+ * Body param:
+ */
+ summarization?: boolean;
+
+ /**
+ * Body param:
+ */
+ summarization_model?:
+ | '@cf/meta/llama-3.3-70b-instruct-fp8-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fast'
+ | '@cf/meta/llama-3.1-8b-instruct-fp8'
+ | '@cf/meta/llama-4-scout-17b-16e-instruct'
+ | '@cf/qwen/qwen3-30b-a3b-fp8'
+ | '@cf/deepseek-ai/deepseek-r1-distill-qwen-32b'
+ | '@cf/moonshotai/kimi-k2-instruct'
+ | 'anthropic/claude-3-7-sonnet'
+ | 'anthropic/claude-sonnet-4'
+ | 'anthropic/claude-opus-4'
+ | 'anthropic/claude-3-5-haiku'
+ | 'cerebras/qwen-3-235b-a22b-instruct'
+ | 'cerebras/qwen-3-235b-a22b-thinking'
+ | 'cerebras/llama-3.3-70b'
+ | 'cerebras/llama-4-maverick-17b-128e-instruct'
+ | 'cerebras/llama-4-scout-17b-16e-instruct'
+ | 'cerebras/gpt-oss-120b'
+ | 'google-ai-studio/gemini-2.5-flash'
+ | 'google-ai-studio/gemini-2.5-pro'
+ | 'grok/grok-4'
+ | 'groq/llama-3.3-70b-versatile'
+ | 'groq/llama-3.1-8b-instant'
+ | 'openai/gpt-5'
+ | 'openai/gpt-5-mini'
+ | 'openai/gpt-5-nano'
+ | '';
+
+ /**
+ * Body param:
+ */
+ system_prompt_ai_search?: string;
+
+ /**
+ * Body param:
+ */
+ system_prompt_index_summarization?: string;
+
+ /**
+ * Body param:
+ */
+ system_prompt_rewrite_query?: string;
+
+ /**
+ * Body param:
+ */
+ token_id?: string;
+}
+
+export namespace InstanceUpdateParams {
+ export interface Metadata {
+ created_from_aisearch_wizard?: boolean;
+
+ worker_domain?: string;
+ }
+
+ export interface SourceParams {
+ /**
+ * List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ * /private/\*_, _\private\*)
+ */
+ exclude_items?: Array;
+
+ /**
+ * List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ * /docs/\*_, _\blog\*.html)
+ */
+ include_items?: Array;
+
+ prefix?: string;
+
+ r2_jurisdiction?: string;
+
+ web_crawler?: SourceParams.WebCrawler;
+ }
+
+ export namespace SourceParams {
+ export interface WebCrawler {
+ parse_options?: WebCrawler.ParseOptions;
+
+ parse_type?: 'sitemap' | 'feed-rss';
+
+ store_options?: WebCrawler.StoreOptions;
+ }
+
+ export namespace WebCrawler {
+ export interface ParseOptions {
+ include_headers?: { [key: string]: string };
+
+ include_images?: boolean;
+
+ use_browser_rendering?: boolean;
+ }
+
+ export interface StoreOptions {
+ storage_id: string;
+
+ r2_jurisdiction?: string;
+
+ storage_type?: SippyAPI.ProviderParam;
+ }
+ }
+ }
+}
+
+export interface InstanceListParams extends V4PagePaginationArrayParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+
+ /**
+ * Query param: Search by id
+ */
+ search?: string;
+}
+
+export interface InstanceDeleteParams {
+ account_id: string;
+}
+
+export interface InstanceReadParams {
+ account_id: string;
+}
+
+export interface InstanceStatsParams {
+ account_id: string;
+}
+
+Instances.InstanceListResponsesV4PagePaginationArray = InstanceListResponsesV4PagePaginationArray;
+Instances.Items = Items;
+Instances.ItemListResponsesV4PagePaginationArray = ItemListResponsesV4PagePaginationArray;
+Instances.Jobs = Jobs;
+Instances.JobListResponsesV4PagePaginationArray = JobListResponsesV4PagePaginationArray;
+
+export declare namespace Instances {
+ export {
+ type InstanceCreateResponse as InstanceCreateResponse,
+ type InstanceUpdateResponse as InstanceUpdateResponse,
+ type InstanceListResponse as InstanceListResponse,
+ type InstanceDeleteResponse as InstanceDeleteResponse,
+ type InstanceReadResponse as InstanceReadResponse,
+ type InstanceStatsResponse as InstanceStatsResponse,
+ InstanceListResponsesV4PagePaginationArray as InstanceListResponsesV4PagePaginationArray,
+ type InstanceCreateParams as InstanceCreateParams,
+ type InstanceUpdateParams as InstanceUpdateParams,
+ type InstanceListParams as InstanceListParams,
+ type InstanceDeleteParams as InstanceDeleteParams,
+ type InstanceReadParams as InstanceReadParams,
+ type InstanceStatsParams as InstanceStatsParams,
+ };
+
+ export {
+ Items as Items,
+ type ItemListResponse as ItemListResponse,
+ type ItemGetResponse as ItemGetResponse,
+ ItemListResponsesV4PagePaginationArray as ItemListResponsesV4PagePaginationArray,
+ type ItemListParams as ItemListParams,
+ type ItemGetParams as ItemGetParams,
+ };
+
+ export {
+ Jobs as Jobs,
+ type JobCreateResponse as JobCreateResponse,
+ type JobListResponse as JobListResponse,
+ type JobGetResponse as JobGetResponse,
+ type JobLogsResponse as JobLogsResponse,
+ JobListResponsesV4PagePaginationArray as JobListResponsesV4PagePaginationArray,
+ type JobCreateParams as JobCreateParams,
+ type JobListParams as JobListParams,
+ type JobGetParams as JobGetParams,
+ type JobLogsParams as JobLogsParams,
+ };
+}
diff --git a/src/resources/aisearch/instances/items.ts b/src/resources/aisearch/instances/items.ts
new file mode 100644
index 0000000000..08a7ae9762
--- /dev/null
+++ b/src/resources/aisearch/instances/items.ts
@@ -0,0 +1,124 @@
+// 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 Items extends APIResource {
+ /**
+ * Items List.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const itemListResponse of client.aiSearch.instances.items.list(
+ * 'my-ai-search',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ id: string,
+ params: ItemListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/ai-search/instances/${id}/items`,
+ ItemListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Get Items.
+ *
+ * @example
+ * ```ts
+ * const item = await client.aiSearch.instances.items.get(
+ * 'my-ai-search',
+ * 'item_id',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ get(
+ id: string,
+ itemId: string,
+ params: ItemGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/ai-search/instances/${id}/items/${itemId}`,
+ options,
+ ) as Core.APIPromise<{ result: ItemGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class ItemListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export interface ItemListResponse {
+ id: string;
+
+ key: string;
+
+ status: 'queued' | 'running' | 'completed' | 'error' | 'skipped';
+
+ error?: string;
+
+ last_seen_at?: string;
+
+ next_action?: string;
+}
+
+export interface ItemGetResponse {
+ id: string;
+
+ key: string;
+
+ status: 'queued' | 'running' | 'completed' | 'error' | 'skipped';
+
+ error?: string;
+
+ last_seen_at?: string;
+
+ next_action?: string;
+}
+
+export interface ItemListParams extends V4PagePaginationArrayParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+
+ /**
+ * Query param:
+ */
+ search?: string;
+
+ /**
+ * Query param:
+ */
+ status?: 'queued' | 'running' | 'completed' | 'error' | 'skipped';
+}
+
+export interface ItemGetParams {
+ account_id: string;
+}
+
+Items.ItemListResponsesV4PagePaginationArray = ItemListResponsesV4PagePaginationArray;
+
+export declare namespace Items {
+ export {
+ type ItemListResponse as ItemListResponse,
+ type ItemGetResponse as ItemGetResponse,
+ ItemListResponsesV4PagePaginationArray as ItemListResponsesV4PagePaginationArray,
+ type ItemListParams as ItemListParams,
+ type ItemGetParams as ItemGetParams,
+ };
+}
diff --git a/src/resources/aisearch/instances/jobs.ts b/src/resources/aisearch/instances/jobs.ts
new file mode 100644
index 0000000000..004f50b98f
--- /dev/null
+++ b/src/resources/aisearch/instances/jobs.ts
@@ -0,0 +1,219 @@
+// 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 Jobs extends APIResource {
+ /**
+ * Create new job
+ *
+ * @example
+ * ```ts
+ * const job = await client.aiSearch.instances.jobs.create(
+ * 'my-ai-search',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ create(
+ id: string,
+ params: JobCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.post(
+ `/accounts/${account_id}/ai-search/instances/${id}/jobs`,
+ options,
+ ) as Core.APIPromise<{ result: JobCreateResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List Jobs
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const jobListResponse of client.aiSearch.instances.jobs.list(
+ * 'my-ai-search',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ id: string,
+ params: JobListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/ai-search/instances/${id}/jobs`,
+ JobListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Get a Job Details
+ *
+ * @example
+ * ```ts
+ * const job = await client.aiSearch.instances.jobs.get(
+ * 'my-ai-search',
+ * 'job_id',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ get(
+ id: string,
+ jobId: string,
+ params: JobGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/ai-search/instances/${id}/jobs/${jobId}`,
+ options,
+ ) as Core.APIPromise<{ result: JobGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List Job Logs
+ *
+ * @example
+ * ```ts
+ * const response = await client.aiSearch.instances.jobs.logs(
+ * 'my-ai-search',
+ * 'job_id',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ logs(
+ id: string,
+ jobId: string,
+ params: JobLogsParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id, ...query } = params;
+ return (
+ this._client.get(`/accounts/${account_id}/ai-search/instances/${id}/jobs/${jobId}/logs`, {
+ query,
+ ...options,
+ }) as Core.APIPromise<{ result: JobLogsResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class JobListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export interface JobCreateResponse {
+ id: string;
+
+ source: 'user' | 'schedule';
+
+ end_reason?: string;
+
+ ended_at?: string;
+
+ last_seen_at?: string;
+
+ started_at?: string;
+}
+
+export interface JobListResponse {
+ id: string;
+
+ source: 'user' | 'schedule';
+
+ end_reason?: string;
+
+ ended_at?: string;
+
+ last_seen_at?: string;
+
+ started_at?: string;
+}
+
+export interface JobGetResponse {
+ id: string;
+
+ source: 'user' | 'schedule';
+
+ end_reason?: string;
+
+ ended_at?: string;
+
+ last_seen_at?: string;
+
+ started_at?: string;
+}
+
+export type JobLogsResponse = Array;
+
+export namespace JobLogsResponse {
+ export interface JobLogsResponseItem {
+ id: number;
+
+ created_at: number;
+
+ message: string;
+
+ message_type: number;
+ }
+}
+
+export interface JobCreateParams {
+ account_id: string;
+}
+
+export interface JobListParams extends V4PagePaginationArrayParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+}
+
+export interface JobGetParams {
+ account_id: string;
+}
+
+export interface JobLogsParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+
+ /**
+ * Query param:
+ */
+ page?: number;
+
+ /**
+ * Query param:
+ */
+ per_page?: number;
+}
+
+Jobs.JobListResponsesV4PagePaginationArray = JobListResponsesV4PagePaginationArray;
+
+export declare namespace Jobs {
+ export {
+ type JobCreateResponse as JobCreateResponse,
+ type JobListResponse as JobListResponse,
+ type JobGetResponse as JobGetResponse,
+ type JobLogsResponse as JobLogsResponse,
+ JobListResponsesV4PagePaginationArray as JobListResponsesV4PagePaginationArray,
+ type JobCreateParams as JobCreateParams,
+ type JobListParams as JobListParams,
+ type JobGetParams as JobGetParams,
+ type JobLogsParams as JobLogsParams,
+ };
+}
diff --git a/src/resources/aisearch/tokens.ts b/src/resources/aisearch/tokens.ts
new file mode 100644
index 0000000000..ba54622174
--- /dev/null
+++ b/src/resources/aisearch/tokens.ts
@@ -0,0 +1,332 @@
+// 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 Tokens extends APIResource {
+ /**
+ * Create new tokens.
+ *
+ * @example
+ * ```ts
+ * const token = await client.aiSearch.tokens.create({
+ * account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22',
+ * cf_api_id: 'cf_api_id',
+ * cf_api_key: 'cf_api_key',
+ * name: 'name',
+ * });
+ * ```
+ */
+ create(params: TokenCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, ...body } = params;
+ return (
+ this._client.post(`/accounts/${account_id}/ai-search/tokens`, { body, ...options }) as Core.APIPromise<{
+ result: TokenCreateResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Delete tokens.
+ *
+ * @example
+ * ```ts
+ * const token = await client.aiSearch.tokens.update(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ update(
+ id: string,
+ params: TokenUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.delete(`/accounts/${account_id}/ai-search/tokens/${id}`, options) as Core.APIPromise<{
+ result: TokenUpdateResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * List tokens.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const tokenListResponse of client.aiSearch.tokens.list(
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ params: TokenListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, ...query } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/ai-search/tokens`,
+ TokenListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
+ }
+
+ /**
+ * Delete tokens.
+ *
+ * @example
+ * ```ts
+ * const token = await client.aiSearch.tokens.delete(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ delete(
+ id: string,
+ params: TokenDeleteParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.delete(`/accounts/${account_id}/ai-search/tokens/${id}`, options) as Core.APIPromise<{
+ result: TokenDeleteResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+
+ /**
+ * Delete tokens.
+ *
+ * @example
+ * ```ts
+ * const response = await client.aiSearch.tokens.read(
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
+ * { account_id: 'c3dc5f0b34a14ff8e1b3ec04895e1b22' },
+ * );
+ * ```
+ */
+ read(
+ id: string,
+ params: TokenReadParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.delete(`/accounts/${account_id}/ai-search/tokens/${id}`, options) as Core.APIPromise<{
+ result: TokenReadResponse;
+ }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class TokenListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
+
+export interface TokenCreateResponse {
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ cf_api_id: string;
+
+ cf_api_key: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ name: string;
+
+ created_by?: string;
+
+ enabled?: boolean;
+
+ legacy?: boolean;
+
+ modified_by?: string;
+
+ synced_at?: string;
+}
+
+export interface TokenUpdateResponse {
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ cf_api_id: string;
+
+ cf_api_key: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ name: string;
+
+ created_by?: string;
+
+ enabled?: boolean;
+
+ legacy?: boolean;
+
+ modified_by?: string;
+
+ synced_at?: string;
+}
+
+export interface TokenListResponse {
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ cf_api_id: string;
+
+ cf_api_key: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ name: string;
+
+ created_by?: string;
+
+ enabled?: boolean;
+
+ legacy?: boolean;
+
+ modified_by?: string;
+
+ synced_at?: string;
+}
+
+export interface TokenDeleteResponse {
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ cf_api_id: string;
+
+ cf_api_key: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ name: string;
+
+ created_by?: string;
+
+ enabled?: boolean;
+
+ legacy?: boolean;
+
+ modified_by?: string;
+
+ synced_at?: string;
+}
+
+export interface TokenReadResponse {
+ id: string;
+
+ account_id: string;
+
+ account_tag: string;
+
+ cf_api_id: string;
+
+ cf_api_key: string;
+
+ created_at: string;
+
+ modified_at: string;
+
+ name: string;
+
+ created_by?: string;
+
+ enabled?: boolean;
+
+ legacy?: boolean;
+
+ modified_by?: string;
+
+ synced_at?: string;
+}
+
+export interface TokenCreateParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ cf_api_id: string;
+
+ /**
+ * Body param:
+ */
+ cf_api_key: string;
+
+ /**
+ * Body param:
+ */
+ name: string;
+
+ /**
+ * Body param:
+ */
+ legacy?: boolean;
+}
+
+export interface TokenUpdateParams {
+ account_id: string;
+}
+
+export interface TokenListParams extends V4PagePaginationArrayParams {
+ /**
+ * Path param:
+ */
+ account_id: string;
+}
+
+export interface TokenDeleteParams {
+ account_id: string;
+}
+
+export interface TokenReadParams {
+ account_id: string;
+}
+
+Tokens.TokenListResponsesV4PagePaginationArray = TokenListResponsesV4PagePaginationArray;
+
+export declare namespace Tokens {
+ export {
+ type TokenCreateResponse as TokenCreateResponse,
+ type TokenUpdateResponse as TokenUpdateResponse,
+ type TokenListResponse as TokenListResponse,
+ type TokenDeleteResponse as TokenDeleteResponse,
+ type TokenReadResponse as TokenReadResponse,
+ TokenListResponsesV4PagePaginationArray as TokenListResponsesV4PagePaginationArray,
+ type TokenCreateParams as TokenCreateParams,
+ type TokenUpdateParams as TokenUpdateParams,
+ type TokenListParams as TokenListParams,
+ type TokenDeleteParams as TokenDeleteParams,
+ type TokenReadParams as TokenReadParams,
+ };
+}
diff --git a/src/resources/alerting/alerting.ts b/src/resources/alerting/alerting.ts
index 6f955cbcb8..e7d373dd1f 100644
--- a/src/resources/alerting/alerting.ts
+++ b/src/resources/alerting/alerting.ts
@@ -21,6 +21,22 @@ import {
PolicyUpdateParams,
PolicyUpdateResponse,
} from './policies';
+import * as SilencesAPI from './silences';
+import {
+ SilenceCreateParams,
+ SilenceCreateResponse,
+ SilenceDeleteParams,
+ SilenceDeleteResponse,
+ SilenceGetParams,
+ SilenceGetResponse,
+ SilenceListParams,
+ SilenceListResponse,
+ SilenceListResponsesSinglePage,
+ SilenceUpdateParams,
+ SilenceUpdateResponse,
+ SilenceUpdateResponsesSinglePage,
+ Silences,
+} from './silences';
import * as DestinationsAPI from './destinations/destinations';
import { Destinations } from './destinations/destinations';
@@ -29,6 +45,7 @@ export class Alerting extends APIResource {
destinations: DestinationsAPI.Destinations = new DestinationsAPI.Destinations(this._client);
history: HistoryAPI.HistoryResource = new HistoryAPI.HistoryResource(this._client);
policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client);
+ silences: SilencesAPI.Silences = new SilencesAPI.Silences(this._client);
}
Alerting.AvailableAlerts = AvailableAlerts;
@@ -37,6 +54,9 @@ Alerting.HistoryResource = HistoryResource;
Alerting.HistoriesV4PagePaginationArray = HistoriesV4PagePaginationArray;
Alerting.Policies = Policies;
Alerting.PoliciesSinglePage = PoliciesSinglePage;
+Alerting.Silences = Silences;
+Alerting.SilenceUpdateResponsesSinglePage = SilenceUpdateResponsesSinglePage;
+Alerting.SilenceListResponsesSinglePage = SilenceListResponsesSinglePage;
export declare namespace Alerting {
export {
@@ -69,4 +89,20 @@ export declare namespace Alerting {
type PolicyDeleteParams as PolicyDeleteParams,
type PolicyGetParams as PolicyGetParams,
};
+
+ export {
+ Silences as Silences,
+ type SilenceCreateResponse as SilenceCreateResponse,
+ type SilenceUpdateResponse as SilenceUpdateResponse,
+ type SilenceListResponse as SilenceListResponse,
+ type SilenceDeleteResponse as SilenceDeleteResponse,
+ type SilenceGetResponse as SilenceGetResponse,
+ SilenceUpdateResponsesSinglePage as SilenceUpdateResponsesSinglePage,
+ SilenceListResponsesSinglePage as SilenceListResponsesSinglePage,
+ type SilenceCreateParams as SilenceCreateParams,
+ type SilenceUpdateParams as SilenceUpdateParams,
+ type SilenceListParams as SilenceListParams,
+ type SilenceDeleteParams as SilenceDeleteParams,
+ type SilenceGetParams as SilenceGetParams,
+ };
}
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/index.ts b/src/resources/alerting/index.ts
index d249a16557..e6a852484e 100644
--- a/src/resources/alerting/index.ts
+++ b/src/resources/alerting/index.ts
@@ -28,3 +28,18 @@ export {
type PolicyDeleteParams,
type PolicyGetParams,
} from './policies';
+export {
+ SilenceUpdateResponsesSinglePage,
+ SilenceListResponsesSinglePage,
+ Silences,
+ type SilenceCreateResponse,
+ type SilenceUpdateResponse,
+ type SilenceListResponse,
+ type SilenceDeleteResponse,
+ type SilenceGetResponse,
+ type SilenceCreateParams,
+ type SilenceUpdateParams,
+ type SilenceListParams,
+ type SilenceDeleteParams,
+ type SilenceGetParams,
+} from './silences';
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/alerting/silences.ts b/src/resources/alerting/silences.ts
new file mode 100644
index 0000000000..eec14eeafd
--- /dev/null
+++ b/src/resources/alerting/silences.ts
@@ -0,0 +1,374 @@
+// 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 Silences extends APIResource {
+ /**
+ * Creates a new silence for an account.
+ *
+ * @example
+ * ```ts
+ * const silence = await client.alerting.silences.create({
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * body: [{}],
+ * });
+ * ```
+ */
+ create(params: SilenceCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ const { account_id, body } = params;
+ return this._client.post(`/accounts/${account_id}/alerting/v3/silences`, { body: body, ...options });
+ }
+
+ /**
+ * Updates existing silences for an account.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const silenceUpdateResponse of client.alerting.silences.update(
+ * {
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * body: [{}],
+ * },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ update(
+ params: SilenceUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id, body } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/alerting/v3/silences`,
+ SilenceUpdateResponsesSinglePage,
+ { body: body, method: 'put', ...options },
+ );
+ }
+
+ /**
+ * Gets a list of silences for an account.
+ *
+ * @example
+ * ```ts
+ * // Automatically fetches more pages as needed.
+ * for await (const silenceListResponse of client.alerting.silences.list(
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
+ * // ...
+ * }
+ * ```
+ */
+ list(
+ params: SilenceListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
+ const { account_id } = params;
+ return this._client.getAPIList(
+ `/accounts/${account_id}/alerting/v3/silences`,
+ SilenceListResponsesSinglePage,
+ options,
+ );
+ }
+
+ /**
+ * Deletes an existing silence for an account.
+ *
+ * @example
+ * ```ts
+ * const silence = await client.alerting.silences.delete(
+ * 'f878e90c23f44126ae3cfc399f646977',
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ delete(
+ silenceId: string,
+ params: SilenceDeleteParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return this._client.delete(`/accounts/${account_id}/alerting/v3/silences/${silenceId}`, options);
+ }
+
+ /**
+ * Gets a specific silence for an account.
+ *
+ * @example
+ * ```ts
+ * const silence = await client.alerting.silences.get(
+ * 'f878e90c23f44126ae3cfc399f646977',
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ get(
+ silenceId: string,
+ params: SilenceGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { account_id } = params;
+ return (
+ this._client.get(
+ `/accounts/${account_id}/alerting/v3/silences/${silenceId}`,
+ options,
+ ) as Core.APIPromise<{ result: SilenceGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
+}
+
+export class SilenceUpdateResponsesSinglePage extends SinglePage {}
+
+export class SilenceListResponsesSinglePage extends SinglePage {}
+
+export interface SilenceCreateResponse {
+ errors: Array;
+
+ messages: Array;
+
+ /**
+ * Whether the API call was successful
+ */
+ success: true;
+}
+
+export namespace SilenceCreateResponse {
+ export interface Error {
+ message: string;
+
+ code?: number;
+ }
+
+ export interface Message {
+ message: string;
+
+ code?: number;
+ }
+}
+
+export interface SilenceUpdateResponse {
+ /**
+ * Silence ID
+ */
+ id?: string;
+
+ /**
+ * When the silence was created.
+ */
+ created_at?: string;
+
+ /**
+ * When the silence ends.
+ */
+ end_time?: string;
+
+ /**
+ * The unique identifier of a notification policy
+ */
+ policy_id?: string;
+
+ /**
+ * When the silence starts.
+ */
+ start_time?: string;
+
+ /**
+ * When the silence was modified.
+ */
+ updated_at?: string;
+}
+
+export interface SilenceListResponse {
+ /**
+ * Silence ID
+ */
+ id?: string;
+
+ /**
+ * When the silence was created.
+ */
+ created_at?: string;
+
+ /**
+ * When the silence ends.
+ */
+ end_time?: string;
+
+ /**
+ * The unique identifier of a notification policy
+ */
+ policy_id?: string;
+
+ /**
+ * When the silence starts.
+ */
+ start_time?: string;
+
+ /**
+ * When the silence was modified.
+ */
+ updated_at?: string;
+}
+
+export interface SilenceDeleteResponse {
+ errors: Array;
+
+ messages: Array;
+
+ /**
+ * Whether the API call was successful
+ */
+ success: true;
+}
+
+export namespace SilenceDeleteResponse {
+ export interface Error {
+ message: string;
+
+ code?: number;
+ }
+
+ export interface Message {
+ message: string;
+
+ code?: number;
+ }
+}
+
+export interface SilenceGetResponse {
+ /**
+ * Silence ID
+ */
+ id?: string;
+
+ /**
+ * When the silence was created.
+ */
+ created_at?: string;
+
+ /**
+ * When the silence ends.
+ */
+ end_time?: string;
+
+ /**
+ * The unique identifier of a notification policy
+ */
+ policy_id?: string;
+
+ /**
+ * When the silence starts.
+ */
+ start_time?: string;
+
+ /**
+ * When the silence was modified.
+ */
+ updated_at?: string;
+}
+
+export interface SilenceCreateParams {
+ /**
+ * Path param: The account id
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ body: Array;
+}
+
+export namespace SilenceCreateParams {
+ export interface Body {
+ /**
+ * When the silence ends.
+ */
+ end_time?: string;
+
+ /**
+ * The unique identifier of a notification policy
+ */
+ policy_id?: string;
+
+ /**
+ * When the silence starts.
+ */
+ start_time?: string;
+ }
+}
+
+export interface SilenceUpdateParams {
+ /**
+ * Path param: The account id
+ */
+ account_id: string;
+
+ /**
+ * Body param:
+ */
+ body: Array;
+}
+
+export namespace SilenceUpdateParams {
+ export interface Body {
+ /**
+ * Silence ID
+ */
+ id?: string;
+
+ /**
+ * When the silence ends.
+ */
+ end_time?: string;
+
+ /**
+ * When the silence starts.
+ */
+ start_time?: string;
+ }
+}
+
+export interface SilenceListParams {
+ /**
+ * The account id
+ */
+ account_id: string;
+}
+
+export interface SilenceDeleteParams {
+ /**
+ * The account id
+ */
+ account_id: string;
+}
+
+export interface SilenceGetParams {
+ /**
+ * The account id
+ */
+ account_id: string;
+}
+
+Silences.SilenceUpdateResponsesSinglePage = SilenceUpdateResponsesSinglePage;
+Silences.SilenceListResponsesSinglePage = SilenceListResponsesSinglePage;
+
+export declare namespace Silences {
+ export {
+ type SilenceCreateResponse as SilenceCreateResponse,
+ type SilenceUpdateResponse as SilenceUpdateResponse,
+ type SilenceListResponse as SilenceListResponse,
+ type SilenceDeleteResponse as SilenceDeleteResponse,
+ type SilenceGetResponse as SilenceGetResponse,
+ SilenceUpdateResponsesSinglePage as SilenceUpdateResponsesSinglePage,
+ SilenceListResponsesSinglePage as SilenceListResponsesSinglePage,
+ type SilenceCreateParams as SilenceCreateParams,
+ type SilenceUpdateParams as SilenceUpdateParams,
+ type SilenceListParams as SilenceListParams,
+ type SilenceDeleteParams as SilenceDeleteParams,
+ type SilenceGetParams as SilenceGetParams,
+ };
+}
diff --git a/src/resources/api-gateway/api-gateway.ts b/src/resources/api-gateway/api-gateway.ts
index 1f9fb727e9..03f4d421e0 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,
@@ -75,14 +74,13 @@ APIGateway.OperationListResponsesV4PagePaginationArray = OperationListResponsesV
APIGateway.OperationBulkCreateResponsesSinglePage = OperationBulkCreateResponsesSinglePage;
APIGateway.Schemas = Schemas;
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,
};
@@ -124,10 +122,10 @@ export declare namespace APIGateway {
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/schema-validation.ts b/src/resources/api-gateway/operations/schema-validation.ts
index 19466e0d9f..f9f298355e 100644
--- a/src/resources/api-gateway/operations/schema-validation.ts
+++ b/src/resources/api-gateway/operations/schema-validation.ts
@@ -3,6 +3,9 @@
import { APIResource } from '../../../resource';
import * as Core from '../../../core';
+/**
+ * @deprecated Please use the [Schema Validation Operations Settings](https://developers.cloudflare.com/api/resources/schema_validation/subresources/settings/subresources/operations/) APIs instead
+ */
export class SchemaValidation extends APIResource {
/**
* Updates operation-level schema validation settings on the zone
diff --git a/src/resources/api-gateway/settings/settings.ts b/src/resources/api-gateway/settings/settings.ts
index 9c7236a309..505baddce3 100644
--- a/src/resources/api-gateway/settings/settings.ts
+++ b/src/resources/api-gateway/settings/settings.ts
@@ -9,6 +9,9 @@ import {
SchemaValidationUpdateParams,
} from './schema-validation';
+/**
+ * @deprecated Please use the [Schema Validation Settings](https://developers.cloudflare.com/api/resources/schema_validation/subresources/settings/) APIs instead
+ */
export class Settings extends APIResource {
schemaValidation: SchemaValidationAPI.SchemaValidation = new SchemaValidationAPI.SchemaValidation(
this._client,
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..e2e0aaf6c2 100644
--- a/src/resources/api-gateway/user-schemas/user-schemas.ts
+++ b/src/resources/api-gateway/user-schemas/user-schemas.ts
@@ -13,6 +13,9 @@ import {
} from './operations';
import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../pagination';
+/**
+ * @deprecated Please use the [Schema Validation](https://developers.cloudflare.com/api/resources/schema_validation/) APIs instead
+ */
export class UserSchemas extends APIResource {
operations: OperationsAPI.Operations = new OperationsAPI.Operations(this._client);
hosts: HostsAPI.Hosts = new HostsAPI.Hosts(this._client);
@@ -22,13 +25,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 +46,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 +78,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 +97,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 +130,7 @@ export namespace Message {
}
}
-export interface PublicSchema {
+export interface OldPublicSchema {
created_at: string;
/**
@@ -153,13 +159,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 +282,7 @@ export interface UserSchemaGetParams {
omit_source?: boolean;
}
-UserSchemas.PublicSchemasV4PagePaginationArray = PublicSchemasV4PagePaginationArray;
+UserSchemas.OldPublicSchemasV4PagePaginationArray = OldPublicSchemasV4PagePaginationArray;
UserSchemas.Operations = Operations;
UserSchemas.OperationListResponsesV4PagePaginationArray = OperationListResponsesV4PagePaginationArray;
UserSchemas.Hosts = Hosts;
@@ -285,10 +291,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..abe2131fae 100644
--- a/src/resources/cloudforce-one/threat-events/threat-events.ts
+++ b/src/resources/cloudforce-one/threat-events/threat-events.ts
@@ -87,7 +87,6 @@ export class ThreatEvents extends APIResource {
* category: 'Domain Resolution',
* date: '2022-04-01T00:00:00Z',
* event: 'An attacker registered the domain domain.com',
- * indicatorType: 'domain',
* raw: { data: { foo: 'bar' } },
* tlp: 'amber',
* });
@@ -165,7 +164,6 @@ export class ThreatEvents extends APIResource {
* date: '2022-04-01T00:00:00Z',
* event:
* 'An attacker registered the domain domain.com',
- * indicatorType: 'domain',
* raw: { data: { foo: 'bar' } },
* tlp: 'amber',
* },
@@ -209,15 +207,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,
@@ -240,6 +233,8 @@ export interface ThreatEventCreateResponse {
event: string;
+ hasChildren: boolean;
+
indicator: string;
indicatorType: string;
@@ -293,6 +288,8 @@ export namespace ThreatEventListResponse {
event: string;
+ hasChildren: boolean;
+
indicator: string;
indicatorType: string;
@@ -338,9 +335,48 @@ export interface ThreatEventDeleteResponse {
}
/**
- * Number of created bulk events
+ * Detailed result of bulk event creation with auto-tag management
*/
-export type ThreatEventBulkCreateResponse = number;
+export interface ThreatEventBulkCreateResponse {
+ /**
+ * Number of events created
+ */
+ createdEventsCount: number;
+
+ /**
+ * Number of indicators created
+ */
+ createdIndicatorsCount: number;
+
+ /**
+ * Number of tags created in SoT
+ */
+ createdTagsCount: number;
+
+ /**
+ * Number of errors encountered
+ */
+ errorCount: number;
+
+ /**
+ * Array of error details
+ */
+ errors?: Array;
+}
+
+export namespace ThreatEventBulkCreateResponse {
+ export interface Error {
+ /**
+ * Error message
+ */
+ error: string;
+
+ /**
+ * Index of the event that caused the error
+ */
+ eventIndex: number;
+ }
+}
export interface ThreatEventEditResponse {
attacker: string;
@@ -353,6 +389,8 @@ export interface ThreatEventEditResponse {
event: string;
+ hasChildren: boolean;
+
indicator: string;
indicatorType: string;
@@ -403,6 +441,8 @@ export interface ThreatEventGetResponse {
event: string;
+ hasChildren: boolean;
+
indicator: string;
indicatorType: string;
@@ -463,11 +503,6 @@ export interface ThreatEventCreateParams {
*/
event: string;
- /**
- * Body param:
- */
- indicatorType: string;
-
/**
* Body param:
*/
@@ -503,6 +538,17 @@ export interface ThreatEventCreateParams {
*/
indicator?: string;
+ /**
+ * Body param: Array of indicators for this event. Supports multiple indicators per
+ * event for complex scenarios.
+ */
+ indicators?: Array;
+
+ /**
+ * Body param:
+ */
+ indicatorType?: string;
+
/**
* Body param:
*/
@@ -532,6 +578,18 @@ export namespace ThreatEventCreateParams {
tlp?: string;
}
+
+ export interface Indicator {
+ /**
+ * The type of indicator (e.g., DOMAIN, IP, JA3, HASH)
+ */
+ indicatorType: string;
+
+ /**
+ * The indicator value (e.g., domain name, IP address, hash)
+ */
+ value: string;
+ }
}
export interface ThreatEventListParams {
@@ -630,8 +688,6 @@ export namespace ThreatEventBulkCreateParams {
event: string;
- indicatorType: string;
-
raw: Data.Raw;
tlp: string;
@@ -646,6 +702,14 @@ export namespace ThreatEventBulkCreateParams {
indicator?: string;
+ /**
+ * Array of indicators for this event. Supports multiple indicators per event for
+ * complex scenarios.
+ */
+ indicators?: Array;
+
+ indicatorType?: string;
+
insight?: string;
tags?: Array;
@@ -663,6 +727,18 @@ export namespace ThreatEventBulkCreateParams {
tlp?: string;
}
+
+ export interface Indicator {
+ /**
+ * The type of indicator (e.g., DOMAIN, IP, JA3, HASH)
+ */
+ indicatorType: string;
+
+ /**
+ * The indicator value (e.g., domain name, IP address, hash)
+ */
+ value: 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..d9c39fe48c 100644
--- a/src/resources/email-security/investigate/investigate.ts
+++ b/src/resources/email-security/investigate/investigate.ts
@@ -135,6 +135,10 @@ export interface InvestigateListResponse {
edf_hash?: string | null;
+ envelope_from?: string | null;
+
+ envelope_to?: Array | null;
+
final_disposition?:
| 'MALICIOUS'
| 'MALICIOUS-BEC'
@@ -158,6 +162,10 @@ export interface InvestigateListResponse {
message_id?: string | null;
+ postfix_id_outbound?: string | null;
+
+ replyto?: string | null;
+
sent_date?: string | null;
subject?: string | null;
@@ -182,7 +190,8 @@ export namespace InvestigateListResponse {
| 'allowed_recipient'
| 'domain_similarity'
| 'domain_recency'
- | 'managed_acceptable_sender';
+ | 'managed_acceptable_sender'
+ | 'outbound_ndr';
blocklisted_message?: boolean;
@@ -195,14 +204,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;
}
@@ -257,6 +290,10 @@ export interface InvestigateGetResponse {
edf_hash?: string | null;
+ envelope_from?: string | null;
+
+ envelope_to?: Array | null;
+
final_disposition?:
| 'MALICIOUS'
| 'MALICIOUS-BEC'
@@ -280,6 +317,10 @@ export interface InvestigateGetResponse {
message_id?: string | null;
+ postfix_id_outbound?: string | null;
+
+ replyto?: string | null;
+
sent_date?: string | null;
subject?: string | null;
@@ -304,7 +345,8 @@ export namespace InvestigateGetResponse {
| 'allowed_recipient'
| 'domain_similarity'
| 'domain_recency'
- | 'managed_acceptable_sender';
+ | 'managed_acceptable_sender'
+ | 'outbound_ndr';
blocklisted_message?: boolean;
@@ -317,14 +359,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 +421,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/email-security/settings/domains.ts b/src/resources/email-security/settings/domains.ts
index 3f39ad82d4..a18128ec9f 100644
--- a/src/resources/email-security/settings/domains.ts
+++ b/src/resources/email-security/settings/domains.ts
@@ -400,6 +400,11 @@ export interface DomainListParams extends V4PagePaginationArrayParams {
*/
domain?: Array;
+ /**
+ * Query param: Filters response to domains with the provided integration ID.
+ */
+ integration_id?: string;
+
/**
* Query param: The field to sort by.
*/
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/permission-groups.ts b/src/resources/iam/permission-groups.ts
index 7408bd79cb..3b50a9029a 100644
--- a/src/resources/iam/permission-groups.ts
+++ b/src/resources/iam/permission-groups.ts
@@ -48,7 +48,12 @@ export class PermissionGroups extends APIResource {
options?: Core.RequestOptions,
): Core.APIPromise {
const { account_id } = params;
- return this._client.get(`/accounts/${account_id}/iam/permission_groups/${permissionGroupId}`, options);
+ return (
+ this._client.get(
+ `/accounts/${account_id}/iam/permission_groups/${permissionGroupId}`,
+ options,
+ ) as Core.APIPromise<{ result: PermissionGroupGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
}
}
diff --git a/src/resources/iam/resource-groups.ts b/src/resources/iam/resource-groups.ts
index 83538b9f5a..f80b49855f 100644
--- a/src/resources/iam/resource-groups.ts
+++ b/src/resources/iam/resource-groups.ts
@@ -30,7 +30,12 @@ export class ResourceGroups extends APIResource {
options?: Core.RequestOptions,
): Core.APIPromise {
const { account_id, ...body } = params;
- return this._client.post(`/accounts/${account_id}/iam/resource_groups`, { body, ...options });
+ return (
+ this._client.post(`/accounts/${account_id}/iam/resource_groups`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ResourceGroupCreateResponse }>
+ )._thenUnwrap((obj) => obj.result);
}
/**
@@ -51,10 +56,12 @@ export class ResourceGroups extends APIResource {
options?: Core.RequestOptions,
): Core.APIPromise {
const { account_id, ...body } = params;
- return this._client.put(`/accounts/${account_id}/iam/resource_groups/${resourceGroupId}`, {
- body,
- ...options,
- });
+ return (
+ this._client.put(`/accounts/${account_id}/iam/resource_groups/${resourceGroupId}`, {
+ body,
+ ...options,
+ }) as Core.APIPromise<{ result: ResourceGroupUpdateResponse }>
+ )._thenUnwrap((obj) => obj.result);
}
/**
@@ -125,7 +132,12 @@ export class ResourceGroups extends APIResource {
options?: Core.RequestOptions,
): Core.APIPromise {
const { account_id } = params;
- return this._client.get(`/accounts/${account_id}/iam/resource_groups/${resourceGroupId}`, options);
+ return (
+ this._client.get(
+ `/accounts/${account_id}/iam/resource_groups/${resourceGroupId}`,
+ options,
+ ) as Core.APIPromise<{ result: ResourceGroupGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
}
}
@@ -136,19 +148,24 @@ export class ResourceGroupListResponsesSinglePage extends SinglePage;
/**
* Attributes associated to the resource group.
*/
- meta?: unknown;
+ meta?: ResourceGroupCreateResponse.Meta;
/**
- * A scope is a combination of scope objects which provides additional context.
+ * Name of the resource group.
*/
- scope?: ResourceGroupCreateResponse.Scope;
+ name?: string;
}
export namespace ResourceGroupCreateResponse {
@@ -163,8 +180,7 @@ export namespace ResourceGroupCreateResponse {
key: string;
/**
- * A list of scope objects for additional context. The number of Scope objects
- * should not be zero.
+ * A list of scope objects for additional context.
*/
objects: Array;
}
@@ -182,6 +198,15 @@ export namespace ResourceGroupCreateResponse {
key: string;
}
}
+
+ /**
+ * Attributes associated to the resource group.
+ */
+ export interface Meta {
+ key?: string;
+
+ value?: string;
+ }
}
/**
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..2d83de14be 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -4,8 +4,9 @@ export * from './shared';
export { ACM } from './acm/acm';
export { AI } from './ai/ai';
export { AIGateway } from './ai-gateway/ai-gateway';
+export { AISearch } from './aisearch/aisearch';
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 +23,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 +59,21 @@ 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 { R2DataCatalog } from './r2-data-catalog/r2-data-catalog';
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 +88,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/leaked-credential-checks/detections.ts b/src/resources/leaked-credential-checks/detections.ts
index ca2e008bd9..5d259c7c3c 100644
--- a/src/resources/leaked-credential-checks/detections.ts
+++ b/src/resources/leaked-credential-checks/detections.ts
@@ -105,6 +105,32 @@ export class Detections extends APIResource {
) as Core.APIPromise<{ result: DetectionDeleteResponse }>
)._thenUnwrap((obj) => obj.result);
}
+
+ /**
+ * Get user-defined detection pattern for Leaked Credential Checks.
+ *
+ * @example
+ * ```ts
+ * const detection =
+ * await client.leakedCredentialChecks.detections.get(
+ * '18a14bafaa8eb1df04ce683ec18c765e',
+ * { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * );
+ * ```
+ */
+ get(
+ detectionId: string,
+ params: DetectionGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
+ const { zone_id } = params;
+ return (
+ this._client.get(
+ `/zones/${zone_id}/leaked-credential-checks/detections/${detectionId}`,
+ options,
+ ) as Core.APIPromise<{ result: DetectionGetResponse }>
+ )._thenUnwrap((obj) => obj.result);
+ }
}
export class DetectionListResponsesSinglePage extends SinglePage {}
@@ -174,6 +200,27 @@ export interface DetectionListResponse {
export type DetectionDeleteResponse = unknown;
+/**
+ * Defines a custom set of username/password expressions to match Leaked Credential
+ * Checks on.
+ */
+export interface DetectionGetResponse {
+ /**
+ * Defines the unique ID for this custom detection.
+ */
+ id?: string;
+
+ /**
+ * Defines ehe ruleset expression to use in matching the password in a request.
+ */
+ password?: string;
+
+ /**
+ * Defines the ruleset expression to use in matching the username in a request.
+ */
+ username?: string;
+}
+
export interface DetectionCreateParams {
/**
* Path param: Defines an identifier.
@@ -226,6 +273,13 @@ export interface DetectionDeleteParams {
zone_id: string;
}
+export interface DetectionGetParams {
+ /**
+ * Defines an identifier.
+ */
+ zone_id: string;
+}
+
Detections.DetectionListResponsesSinglePage = DetectionListResponsesSinglePage;
export declare namespace Detections {
@@ -234,10 +288,12 @@ export declare namespace Detections {
type DetectionUpdateResponse as DetectionUpdateResponse,
type DetectionListResponse as DetectionListResponse,
type DetectionDeleteResponse as DetectionDeleteResponse,
+ type DetectionGetResponse as DetectionGetResponse,
DetectionListResponsesSinglePage as DetectionListResponsesSinglePage,
type DetectionCreateParams as DetectionCreateParams,
type DetectionUpdateParams as DetectionUpdateParams,
type DetectionListParams as DetectionListParams,
type DetectionDeleteParams as DetectionDeleteParams,
+ type DetectionGetParams as DetectionGetParams,
};
}
diff --git a/src/resources/leaked-credential-checks/index.ts b/src/resources/leaked-credential-checks/index.ts
index 1844848bf2..07e645f489 100644
--- a/src/resources/leaked-credential-checks/index.ts
+++ b/src/resources/leaked-credential-checks/index.ts
@@ -7,9 +7,11 @@ export {
type DetectionUpdateResponse,
type DetectionListResponse,
type DetectionDeleteResponse,
+ type DetectionGetResponse,
type DetectionCreateParams,
type DetectionUpdateParams,
type DetectionListParams,
type DetectionDeleteParams,
+ type DetectionGetParams,
} from './detections';
export { LeakedCredentialChecks } from './leaked-credential-checks';
diff --git a/src/resources/leaked-credential-checks/leaked-credential-checks.ts b/src/resources/leaked-credential-checks/leaked-credential-checks.ts
index d8d8de90c1..124e38afea 100644
--- a/src/resources/leaked-credential-checks/leaked-credential-checks.ts
+++ b/src/resources/leaked-credential-checks/leaked-credential-checks.ts
@@ -8,6 +8,8 @@ import {
DetectionCreateResponse,
DetectionDeleteParams,
DetectionDeleteResponse,
+ DetectionGetParams,
+ DetectionGetResponse,
DetectionListParams,
DetectionListResponse,
DetectionListResponsesSinglePage,
@@ -123,10 +125,12 @@ export declare namespace LeakedCredentialChecks {
type DetectionUpdateResponse as DetectionUpdateResponse,
type DetectionListResponse as DetectionListResponse,
type DetectionDeleteResponse as DetectionDeleteResponse,
+ type DetectionGetResponse as DetectionGetResponse,
DetectionListResponsesSinglePage as DetectionListResponsesSinglePage,
type DetectionCreateParams as DetectionCreateParams,
type DetectionUpdateParams as DetectionUpdateParams,
type DetectionListParams as DetectionListParams,
type DetectionDeleteParams as DetectionDeleteParams,
+ type DetectionGetParams as DetectionGetParams,
};
}
diff --git a/src/resources/load-balancers/monitors/monitors.ts b/src/resources/load-balancers/monitors/monitors.ts
index e06f9f7ff9..5d94b47214 100644
--- a/src/resources/load-balancers/monitors/monitors.ts
+++ b/src/resources/load-balancers/monitors/monitors.ts
@@ -240,7 +240,7 @@ export interface Monitor {
* SMTP checks. HTTP and HTTPS checks should only define the port when using a
* non-standard port (HTTP: default 80, HTTPS: default 443).
*/
- port?: number;
+ port?: number | null;
/**
* Assign this monitor to emulate the specified zone while probing. This parameter
@@ -350,7 +350,7 @@ export interface MonitorCreateParams {
* TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port
* when using a non-standard port (HTTP: default 80, HTTPS: default 443).
*/
- port?: number;
+ port?: number | null;
/**
* Body param: Assign this monitor to emulate the specified zone while probing.
@@ -456,7 +456,7 @@ export interface MonitorUpdateParams {
* TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port
* when using a non-standard port (HTTP: default 80, HTTPS: default 443).
*/
- port?: number;
+ port?: number | null;
/**
* Body param: Assign this monitor to emulate the specified zone while probing.
@@ -576,7 +576,7 @@ export interface MonitorEditParams {
* TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port
* when using a non-standard port (HTTP: default 80, HTTPS: default 443).
*/
- port?: number;
+ port?: number | null;
/**
* Body param: Assign this monitor to emulate the specified zone while probing.
diff --git a/src/resources/load-balancers/monitors/previews.ts b/src/resources/load-balancers/monitors/previews.ts
index 677afbce1c..c66f70ec9b 100644
--- a/src/resources/load-balancers/monitors/previews.ts
+++ b/src/resources/load-balancers/monitors/previews.ts
@@ -121,7 +121,7 @@ export interface PreviewCreateParams {
* TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port
* when using a non-standard port (HTTP: default 80, HTTPS: default 443).
*/
- port?: number;
+ port?: number | null;
/**
* Body param: Assign this monitor to emulate the specified zone while probing.
diff --git a/src/resources/load-balancers/pools/health.ts b/src/resources/load-balancers/pools/health.ts
index 83f9743c4e..abce788f74 100644
--- a/src/resources/load-balancers/pools/health.ts
+++ b/src/resources/load-balancers/pools/health.ts
@@ -206,7 +206,7 @@ export interface HealthCreateParams {
* TCP, UDP, and SMTP checks. HTTP and HTTPS checks should only define the port
* when using a non-standard port (HTTP: default 80, HTTPS: default 443).
*/
- port?: number;
+ port?: number | null;
/**
* Body param: Assign this monitor to emulate the specified zone while probing.
diff --git a/src/resources/load-balancers/pools/pools.ts b/src/resources/load-balancers/pools/pools.ts
index e99980c31c..dd9af71c53 100644
--- a/src/resources/load-balancers/pools/pools.ts
+++ b/src/resources/load-balancers/pools/pools.ts
@@ -227,7 +227,7 @@ export interface Pool {
/**
* Configures load shedding policies and percentages for the pool.
*/
- load_shedding?: LoadBalancersAPI.LoadShedding;
+ load_shedding?: LoadBalancersAPI.LoadShedding | null;
/**
* The longitude of the data center containing the origins used in this pool in
@@ -286,7 +286,7 @@ export interface Pool {
* Configures origin steering for the pool. Controls how origins are selected for
* new sessions and traffic without session affinity.
*/
- origin_steering?: LoadBalancersAPI.OriginSteering;
+ origin_steering?: LoadBalancersAPI.OriginSteering | null;
/**
* The list of origins within this pool. Traffic directed at this pool is balanced
@@ -339,7 +339,7 @@ export interface PoolCreateParams {
/**
* Body param: Configures load shedding policies and percentages for the pool.
*/
- load_shedding?: LoadBalancersAPI.LoadSheddingParam;
+ load_shedding?: LoadBalancersAPI.LoadSheddingParam | null;
/**
* Body param: The longitude of the data center containing the origins used in this
@@ -385,7 +385,7 @@ export interface PoolCreateParams {
* Body param: Configures origin steering for the pool. Controls how origins are
* selected for new sessions and traffic without session affinity.
*/
- origin_steering?: LoadBalancersAPI.OriginSteeringParam;
+ origin_steering?: LoadBalancersAPI.OriginSteeringParam | null;
}
export interface PoolUpdateParams {
@@ -434,7 +434,7 @@ export interface PoolUpdateParams {
/**
* Body param: Configures load shedding policies and percentages for the pool.
*/
- load_shedding?: LoadBalancersAPI.LoadSheddingParam;
+ load_shedding?: LoadBalancersAPI.LoadSheddingParam | null;
/**
* Body param: The longitude of the data center containing the origins used in this
@@ -480,7 +480,7 @@ export interface PoolUpdateParams {
* Body param: Configures origin steering for the pool. Controls how origins are
* selected for new sessions and traffic without session affinity.
*/
- origin_steering?: LoadBalancersAPI.OriginSteeringParam;
+ origin_steering?: LoadBalancersAPI.OriginSteeringParam | null;
}
export interface PoolListParams {
@@ -550,7 +550,7 @@ export interface PoolEditParams {
/**
* Body param: Configures load shedding policies and percentages for the pool.
*/
- load_shedding?: LoadBalancersAPI.LoadSheddingParam;
+ load_shedding?: LoadBalancersAPI.LoadSheddingParam | null;
/**
* Body param: The longitude of the data center containing the origins used in this
@@ -602,7 +602,7 @@ export interface PoolEditParams {
* Body param: Configures origin steering for the pool. Controls how origins are
* selected for new sessions and traffic without session affinity.
*/
- origin_steering?: LoadBalancersAPI.OriginSteeringParam;
+ origin_steering?: LoadBalancersAPI.OriginSteeringParam | null;
/**
* Body param: The list of origins within this pool. Traffic directed at this pool
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/magic-transit/ipsec-tunnels.ts b/src/resources/magic-transit/ipsec-tunnels.ts
index 1318526e85..ff23a3a048 100644
--- a/src/resources/magic-transit/ipsec-tunnels.ts
+++ b/src/resources/magic-transit/ipsec-tunnels.ts
@@ -1616,6 +1616,11 @@ export interface IPSECTunnelCreateParams {
*/
bgp?: IPSECTunnelCreateParams.BGP;
+ /**
+ * Body param:
+ */
+ custom_remote_identities?: IPSECTunnelCreateParams.CustomRemoteIdentities;
+
/**
* Body param: The IP address assigned to the customer side of the IPsec tunnel.
* Not required, but must be set for proactive traceroutes to work.
@@ -1694,6 +1699,20 @@ export namespace IPSECTunnelCreateParams {
md5_key?: string;
}
+ export interface CustomRemoteIdentities {
+ /**
+ * A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
+ * generated IKE IDs can still be used even if this custom value is specified.
+ *
+ * Must be of the form `..custom.ipsec.cloudflare.com`.
+ *
+ * This custom ID does not need to be unique. Two IPsec tunnels may have the same
+ * custom fqdn_id. However, if another IPsec tunnel has the same value then the two
+ * tunnels cannot have the same cloudflare_endpoint.
+ */
+ fqdn_id?: string;
+ }
+
export interface HealthCheck {
/**
* The direction of the flow of the healthcheck. Either unidirectional, where the
@@ -1783,6 +1802,11 @@ export interface IPSECTunnelUpdateParams {
*/
bgp?: IPSECTunnelUpdateParams.BGP;
+ /**
+ * Body param:
+ */
+ custom_remote_identities?: IPSECTunnelUpdateParams.CustomRemoteIdentities;
+
/**
* Body param: The IP address assigned to the customer side of the IPsec tunnel.
* Not required, but must be set for proactive traceroutes to work.
@@ -1861,6 +1885,20 @@ export namespace IPSECTunnelUpdateParams {
md5_key?: string;
}
+ export interface CustomRemoteIdentities {
+ /**
+ * A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
+ * generated IKE IDs can still be used even if this custom value is specified.
+ *
+ * Must be of the form `..custom.ipsec.cloudflare.com`.
+ *
+ * This custom ID does not need to be unique. Two IPsec tunnels may have the same
+ * custom fqdn_id. However, if another IPsec tunnel has the same value then the two
+ * tunnels cannot have the same cloudflare_endpoint.
+ */
+ fqdn_id?: string;
+ }
+
export interface HealthCheck {
/**
* The direction of the flow of the healthcheck. Either unidirectional, where the
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/origin-ca-certificates.ts b/src/resources/origin-ca-certificates.ts
index c60e7b1bcb..4699dbb70b 100644
--- a/src/resources/origin-ca-certificates.ts
+++ b/src/resources/origin-ca-certificates.ts
@@ -14,7 +14,11 @@ export class OriginCACertificates extends APIResource {
* @example
* ```ts
* const originCACertificate =
- * await client.originCACertificates.create();
+ * await client.originCACertificates.create({
+ * csr: '-----BEGIN CERTIFICATE REQUEST-----\nMIICxzCCAa8CAQAwSDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDVNhbiBGcmFuY2lz\nY28xCzAJBgNVBAcTAkNBMRQwEgYDVQQDEwtleGFtcGxlLm5ldDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBALxejtu4b+jPdFeFi6OUsye8TYJQBm3WfCvL\nHu5EvijMO/4Z2TImwASbwUF7Ir8OLgH+mGlQZeqyNvGoSOMEaZVXcYfpR1hlVak8\n4GGVr+04IGfOCqaBokaBFIwzclGZbzKmLGwIQioNxGfqFm6RGYGA3be2Je2iseBc\nN8GV1wYmvYE0RR+yWweJCTJ157exyRzu7sVxaEW9F87zBQLyOnwXc64rflXslRqi\ng7F7w5IaQYOl8yvmk/jEPCAha7fkiUfEpj4N12+oPRiMvleJF98chxjD4MH39c5I\nuOslULhrWunfh7GB1jwWNA9y44H0snrf+xvoy2TcHmxvma9Eln8CAwEAAaA6MDgG\nCSqGSIb3DQEJDjErMCkwJwYDVR0RBCAwHoILZXhhbXBsZS5uZXSCD3d3dy5leGFt\ncGxlLm5ldDANBgkqhkiG9w0BAQsFAAOCAQEAcBaX6dOnI8ncARrI9ZSF2AJX+8mx\npTHY2+Y2C0VvrVDGMtbBRH8R9yMbqWtlxeeNGf//LeMkSKSFa4kbpdx226lfui8/\nauRDBTJGx2R1ccUxmLZXx4my0W5iIMxunu+kez+BDlu7bTT2io0uXMRHue4i6quH\nyc5ibxvbJMjR7dqbcanVE10/34oprzXQsJ/VmSuZNXtjbtSKDlmcpw6To/eeAJ+J\nhXykcUihvHyG4A1m2R6qpANBjnA0pHexfwM/SgfzvpbvUg0T1ubmer8BgTwCKIWs\ndcWYTthM51JIqRBfNqy4QcBnX+GY05yltEEswQI55wdiS3CjTTA67sdbcQ==\n-----END CERTIFICATE REQUEST-----',
+ * hostnames: ['example.com', '*.example.com'],
+ * request_type: 'origin-rsa',
+ * });
* ```
*/
create(
@@ -156,19 +160,19 @@ export interface OriginCACertificateCreateParams {
/**
* The Certificate Signing Request (CSR). Must be newline-encoded.
*/
- csr?: string;
+ csr: string;
/**
* Array of hostnames or wildcard names (e.g., \*.example.com) bound to the
* certificate.
*/
- hostnames?: Array;
+ hostnames: Array;
/**
* Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),
* or "keyless-certificate" (for Keyless SSL servers).
*/
- request_type?: Shared.CertificateRequestTypeParam;
+ request_type: Shared.CertificateRequestTypeParam;
/**
* The number of days for which the certificate should be valid.
diff --git a/src/resources/pages/index.ts b/src/resources/pages/index.ts
index 2b2862b5c1..06bf19b09a 100644
--- a/src/resources/pages/index.ts
+++ b/src/resources/pages/index.ts
@@ -1,12 +1,17 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+export { Pages } from './pages';
export {
- DeploymentsSinglePage,
+ ProjectListResponsesV4PagePaginationArray,
Projects,
type Deployment,
type Project,
type Stage,
+ type ProjectCreateResponse,
+ type ProjectListResponse,
type ProjectDeleteResponse,
+ type ProjectEditResponse,
+ type ProjectGetResponse,
type ProjectPurgeBuildCacheResponse,
type ProjectCreateParams,
type ProjectListParams,
@@ -15,4 +20,3 @@ export {
type ProjectGetParams,
type ProjectPurgeBuildCacheParams,
} from './projects/index';
-export { Pages } from './pages';
diff --git a/src/resources/pages/pages.ts b/src/resources/pages/pages.ts
index e92779690f..38d6518310 100644
--- a/src/resources/pages/pages.ts
+++ b/src/resources/pages/pages.ts
@@ -4,14 +4,18 @@ import { APIResource } from '../../resource';
import * as ProjectsAPI from './projects/projects';
import {
Deployment,
- DeploymentsSinglePage,
Project,
ProjectCreateParams,
+ ProjectCreateResponse,
ProjectDeleteParams,
ProjectDeleteResponse,
ProjectEditParams,
+ ProjectEditResponse,
ProjectGetParams,
+ ProjectGetResponse,
ProjectListParams,
+ ProjectListResponse,
+ ProjectListResponsesV4PagePaginationArray,
ProjectPurgeBuildCacheParams,
ProjectPurgeBuildCacheResponse,
Projects,
@@ -23,7 +27,7 @@ export class Pages extends APIResource {
}
Pages.Projects = Projects;
-Pages.DeploymentsSinglePage = DeploymentsSinglePage;
+Pages.ProjectListResponsesV4PagePaginationArray = ProjectListResponsesV4PagePaginationArray;
export declare namespace Pages {
export {
@@ -31,9 +35,13 @@ export declare namespace Pages {
type Deployment as Deployment,
type Project as Project,
type Stage as Stage,
+ type ProjectCreateResponse as ProjectCreateResponse,
+ type ProjectListResponse as ProjectListResponse,
type ProjectDeleteResponse as ProjectDeleteResponse,
+ type ProjectEditResponse as ProjectEditResponse,
+ type ProjectGetResponse as ProjectGetResponse,
type ProjectPurgeBuildCacheResponse as ProjectPurgeBuildCacheResponse,
- DeploymentsSinglePage as DeploymentsSinglePage,
+ ProjectListResponsesV4PagePaginationArray as ProjectListResponsesV4PagePaginationArray,
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..7c78088487 100644
--- a/src/resources/pages/projects/deployments/deployments.ts
+++ b/src/resources/pages/projects/deployments/deployments.ts
@@ -3,9 +3,9 @@
import { APIResource } from '../../../../resource';
import * as Core from '../../../../core';
import * as ProjectsAPI from '../projects';
-import { DeploymentsSinglePage } from '../projects';
import * as HistoryAPI from './history/history';
import { History } from './history/history';
+import { V4PagePaginationArray, type V4PagePaginationArrayParams } from '../../../../pagination';
export class Deployments extends APIResource {
history: HistoryAPI.History = new HistoryAPI.History(this._client);
@@ -27,13 +27,13 @@ export class Deployments extends APIResource {
projectName: string,
params: DeploymentCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(
`/accounts/${account_id}/pages/projects/${projectName}/deployments`,
Core.multipartFormRequestOptions({ body, ...options }),
- ) as Core.APIPromise<{ result: ProjectsAPI.Deployment }>
+ ) as Core.APIPromise<{ result: DeploymentCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -43,7 +43,7 @@ export class Deployments extends APIResource {
* @example
* ```ts
* // Automatically fetches more pages as needed.
- * for await (const deployment of client.pages.projects.deployments.list(
+ * for await (const deploymentListResponse of client.pages.projects.deployments.list(
* 'this-is-my-project-01',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* )) {
@@ -55,11 +55,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,
+ DeploymentListResponsesV4PagePaginationArray,
{ query, ...options },
);
}
@@ -110,13 +110,13 @@ export class Deployments extends APIResource {
deploymentId: string,
params: DeploymentGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id } = params;
return (
this._client.get(
`/accounts/${account_id}/pages/projects/${projectName}/deployments/${deploymentId}`,
options,
- ) as Core.APIPromise<{ result: ProjectsAPI.Deployment }>
+ ) as Core.APIPromise<{ result: DeploymentGetResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -125,14 +125,11 @@ export class Deployments extends APIResource {
*
* @example
* ```ts
- * const deployment =
+ * const response =
* await client.pages.projects.deployments.retry(
* 'this-is-my-project-01',
* '023e105f4ecef8ad9ca31a8372d0c353',
- * {
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * body: {},
- * },
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
@@ -141,13 +138,13 @@ export class Deployments extends APIResource {
deploymentId: string,
params: DeploymentRetryParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id, body } = params;
+ ): Core.APIPromise {
+ const { account_id } = params;
return (
this._client.post(
`/accounts/${account_id}/pages/projects/${projectName}/deployments/${deploymentId}/retry`,
- { body: body, ...options },
- ) as Core.APIPromise<{ result: ProjectsAPI.Deployment }>
+ options,
+ ) as Core.APIPromise<{ result: DeploymentRetryResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -157,14 +154,11 @@ export class Deployments extends APIResource {
*
* @example
* ```ts
- * const deployment =
+ * const response =
* await client.pages.projects.deployments.rollback(
* 'this-is-my-project-01',
* '023e105f4ecef8ad9ca31a8372d0c353',
- * {
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * body: {},
- * },
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
@@ -173,96 +167,1579 @@ export class Deployments extends APIResource {
deploymentId: string,
params: DeploymentRollbackParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id, body } = params;
+ ): Core.APIPromise {
+ const { account_id } = params;
return (
this._client.post(
`/accounts/${account_id}/pages/projects/${projectName}/deployments/${deploymentId}/rollback`,
- { body: body, ...options },
- ) as Core.APIPromise<{ result: ProjectsAPI.Deployment }>
+ options,
+ ) as Core.APIPromise<{ result: DeploymentRollbackResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
-export type DeploymentDeleteResponse = unknown;
+export class DeploymentListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
-export interface DeploymentCreateParams {
+export interface DeploymentCreateResponse {
/**
- * Path param: Identifier
+ * Id of the deployment.
*/
- account_id: string;
+ id: string;
/**
- * 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.
+ * A list of alias URLs pointing to this deployment.
*/
- branch?: string;
-}
+ aliases: Array | null;
-export interface DeploymentListParams {
/**
- * Path param: Identifier
+ * Configs for the project build process.
*/
- account_id: string;
+ build_config: DeploymentCreateResponse.BuildConfig;
/**
- * Query param: What type of deployments to fetch.
+ * When the deployment was created.
*/
- env?: 'production' | 'preview';
-}
+ created_on: string;
-export interface DeploymentDeleteParams {
/**
- * Identifier
+ * Info about what caused the deployment.
*/
- account_id: string;
-}
+ deployment_trigger: DeploymentCreateResponse.DeploymentTrigger;
-export interface DeploymentGetParams {
/**
- * Identifier
+ * Environment variables used for builds and Pages Functions.
*/
- account_id: string;
+ env_vars: {
+ [key: string]:
+ | DeploymentCreateResponse.PagesPlainTextEnvVar
+ | null
+ | DeploymentCreateResponse.PagesSecretTextEnvVar
+ | null;
+ } | null;
+
+ /**
+ * Type of deploy.
+ */
+ environment: 'preview' | 'production';
+
+ /**
+ * If the deployment has been skipped.
+ */
+ is_skipped: boolean;
+
+ /**
+ * The status of the deployment.
+ */
+ latest_stage: ProjectsAPI.Stage;
+
+ /**
+ * When the deployment was last modified.
+ */
+ modified_on: string;
+
+ /**
+ * Id of the project.
+ */
+ project_id: string;
+
+ /**
+ * Name of the project.
+ */
+ project_name: string;
+
+ /**
+ * Short Id (8 character) of the deployment.
+ */
+ short_id: string;
+
+ /**
+ * Configs for the project source control.
+ */
+ source: DeploymentCreateResponse.Source;
+
+ /**
+ * List of past stages.
+ */
+ stages: Array;
+
+ /**
+ * The live URL to view this deployment.
+ */
+ url: string;
+
+ /**
+ * Whether the deployment uses functions.
+ */
+ uses_functions?: boolean | null;
}
-export interface DeploymentRetryParams {
+export namespace DeploymentCreateResponse {
/**
- * Path param: Identifier
+ * Configs for the project build process.
*/
- account_id: string;
+ export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
+
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
+
+ /**
+ * Enable build caching for the project.
+ */
+ build_caching?: boolean | null;
+
+ /**
+ * Command used to build project.
+ */
+ build_command?: string | null;
+
+ /**
+ * Assets output directory of the build.
+ */
+ destination_dir?: string | null;
+
+ /**
+ * Directory to run the command.
+ */
+ root_dir?: string | null;
+ }
+
+ /**
+ * Info about what caused the deployment.
+ */
+ export interface DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ metadata: DeploymentTrigger.Metadata;
+
+ /**
+ * What caused the deployment.
+ */
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
+ }
+
+ export namespace DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ export interface Metadata {
+ /**
+ * Where the trigger happened.
+ */
+ branch: string;
+
+ /**
+ * Whether the deployment trigger commit was dirty.
+ */
+ commit_dirty: boolean;
+
+ /**
+ * Hash of the deployment trigger commit.
+ */
+ commit_hash: string;
+
+ /**
+ * Message of the deployment trigger commit.
+ */
+ commit_message: string;
+ }
+ }
+
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
/**
- * Body param:
+ * An encrypted environment variable.
*/
- body: unknown;
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
+
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
+ deployments_enabled?: boolean;
+
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: 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;
+
+ /**
+ * 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';
+
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
+ production_deployments_enabled?: boolean;
+
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
+ }
+ }
}
-export interface DeploymentRollbackParams {
+export interface DeploymentListResponse {
/**
- * Path param: Identifier
+ * Id of the deployment.
*/
- account_id: string;
+ id: string;
+
+ /**
+ * A list of alias URLs pointing to this deployment.
+ */
+ aliases: Array | null;
+
+ /**
+ * Configs for the project build process.
+ */
+ build_config: DeploymentListResponse.BuildConfig;
+
+ /**
+ * When the deployment was created.
+ */
+ created_on: string;
+
+ /**
+ * Info about what caused the deployment.
+ */
+ deployment_trigger: DeploymentListResponse.DeploymentTrigger;
+
+ /**
+ * Environment variables used for builds and Pages Functions.
+ */
+ env_vars: {
+ [key: string]:
+ | DeploymentListResponse.PagesPlainTextEnvVar
+ | null
+ | DeploymentListResponse.PagesSecretTextEnvVar
+ | null;
+ } | null;
+
+ /**
+ * Type of deploy.
+ */
+ environment: 'preview' | 'production';
+
+ /**
+ * If the deployment has been skipped.
+ */
+ is_skipped: boolean;
+
+ /**
+ * The status of the deployment.
+ */
+ latest_stage: ProjectsAPI.Stage;
+
+ /**
+ * When the deployment was last modified.
+ */
+ modified_on: string;
+
+ /**
+ * Id of the project.
+ */
+ project_id: string;
+
+ /**
+ * Name of the project.
+ */
+ project_name: string;
+
+ /**
+ * Short Id (8 character) of the deployment.
+ */
+ short_id: string;
+
+ /**
+ * Configs for the project source control.
+ */
+ source: DeploymentListResponse.Source;
+
+ /**
+ * List of past stages.
+ */
+ stages: Array;
+
+ /**
+ * The live URL to view this deployment.
+ */
+ url: string;
/**
- * Body param:
+ * Whether the deployment uses functions.
*/
- body: unknown;
+ uses_functions?: boolean | null;
}
-Deployments.History = History;
+export namespace DeploymentListResponse {
+ /**
+ * Configs for the project build process.
+ */
+ export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
-export declare namespace Deployments {
- export {
- type DeploymentDeleteResponse as DeploymentDeleteResponse,
- type DeploymentCreateParams as DeploymentCreateParams,
- type DeploymentListParams as DeploymentListParams,
- type DeploymentDeleteParams as DeploymentDeleteParams,
- type DeploymentGetParams as DeploymentGetParams,
- type DeploymentRetryParams as DeploymentRetryParams,
- type DeploymentRollbackParams as DeploymentRollbackParams,
- };
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
- export { History as History };
+ /**
+ * Enable build caching for the project.
+ */
+ build_caching?: boolean | null;
+
+ /**
+ * Command used to build project.
+ */
+ build_command?: string | null;
+
+ /**
+ * Assets output directory of the build.
+ */
+ destination_dir?: string | null;
+
+ /**
+ * Directory to run the command.
+ */
+ root_dir?: string | null;
+ }
+
+ /**
+ * Info about what caused the deployment.
+ */
+ export interface DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ metadata: DeploymentTrigger.Metadata;
+
+ /**
+ * What caused the deployment.
+ */
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
+ }
+
+ export namespace DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ export interface Metadata {
+ /**
+ * Where the trigger happened.
+ */
+ branch: string;
+
+ /**
+ * Whether the deployment trigger commit was dirty.
+ */
+ commit_dirty: boolean;
+
+ /**
+ * Hash of the deployment trigger commit.
+ */
+ commit_hash: string;
+
+ /**
+ * Message of the deployment trigger commit.
+ */
+ commit_message: string;
+ }
+ }
+
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
+
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
+
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
+ deployments_enabled?: boolean;
+
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: 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;
+
+ /**
+ * 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';
+
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
+ production_deployments_enabled?: boolean;
+
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
+ }
+ }
}
-export { DeploymentsSinglePage };
+export type DeploymentDeleteResponse = unknown;
+
+export interface DeploymentGetResponse {
+ /**
+ * Id of the deployment.
+ */
+ id: string;
+
+ /**
+ * A list of alias URLs pointing to this deployment.
+ */
+ aliases: Array | null;
+
+ /**
+ * Configs for the project build process.
+ */
+ build_config: DeploymentGetResponse.BuildConfig;
+
+ /**
+ * When the deployment was created.
+ */
+ created_on: string;
+
+ /**
+ * Info about what caused the deployment.
+ */
+ deployment_trigger: DeploymentGetResponse.DeploymentTrigger;
+
+ /**
+ * Environment variables used for builds and Pages Functions.
+ */
+ env_vars: {
+ [key: string]:
+ | DeploymentGetResponse.PagesPlainTextEnvVar
+ | null
+ | DeploymentGetResponse.PagesSecretTextEnvVar
+ | null;
+ } | null;
+
+ /**
+ * Type of deploy.
+ */
+ environment: 'preview' | 'production';
+
+ /**
+ * If the deployment has been skipped.
+ */
+ is_skipped: boolean;
+
+ /**
+ * The status of the deployment.
+ */
+ latest_stage: ProjectsAPI.Stage;
+
+ /**
+ * When the deployment was last modified.
+ */
+ modified_on: string;
+
+ /**
+ * Id of the project.
+ */
+ project_id: string;
+
+ /**
+ * Name of the project.
+ */
+ project_name: string;
+
+ /**
+ * Short Id (8 character) of the deployment.
+ */
+ short_id: string;
+
+ /**
+ * Configs for the project source control.
+ */
+ source: DeploymentGetResponse.Source;
+
+ /**
+ * List of past stages.
+ */
+ stages: Array;
+
+ /**
+ * The live URL to view this deployment.
+ */
+ url: string;
+
+ /**
+ * Whether the deployment uses functions.
+ */
+ uses_functions?: boolean | null;
+}
+
+export namespace DeploymentGetResponse {
+ /**
+ * Configs for the project build process.
+ */
+ export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
+
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
+
+ /**
+ * Enable build caching for the project.
+ */
+ build_caching?: boolean | null;
+
+ /**
+ * Command used to build project.
+ */
+ build_command?: string | null;
+
+ /**
+ * Assets output directory of the build.
+ */
+ destination_dir?: string | null;
+
+ /**
+ * Directory to run the command.
+ */
+ root_dir?: string | null;
+ }
+
+ /**
+ * Info about what caused the deployment.
+ */
+ export interface DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ metadata: DeploymentTrigger.Metadata;
+
+ /**
+ * What caused the deployment.
+ */
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
+ }
+
+ export namespace DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ export interface Metadata {
+ /**
+ * Where the trigger happened.
+ */
+ branch: string;
+
+ /**
+ * Whether the deployment trigger commit was dirty.
+ */
+ commit_dirty: boolean;
+
+ /**
+ * Hash of the deployment trigger commit.
+ */
+ commit_hash: string;
+
+ /**
+ * Message of the deployment trigger commit.
+ */
+ commit_message: string;
+ }
+ }
+
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
+
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
+
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
+ deployments_enabled?: boolean;
+
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: 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;
+
+ /**
+ * 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';
+
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
+ production_deployments_enabled?: boolean;
+
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
+ }
+ }
+}
+
+export interface DeploymentRetryResponse {
+ /**
+ * Id of the deployment.
+ */
+ id: string;
+
+ /**
+ * A list of alias URLs pointing to this deployment.
+ */
+ aliases: Array | null;
+
+ /**
+ * Configs for the project build process.
+ */
+ build_config: DeploymentRetryResponse.BuildConfig;
+
+ /**
+ * When the deployment was created.
+ */
+ created_on: string;
+
+ /**
+ * Info about what caused the deployment.
+ */
+ deployment_trigger: DeploymentRetryResponse.DeploymentTrigger;
+
+ /**
+ * Environment variables used for builds and Pages Functions.
+ */
+ env_vars: {
+ [key: string]:
+ | DeploymentRetryResponse.PagesPlainTextEnvVar
+ | null
+ | DeploymentRetryResponse.PagesSecretTextEnvVar
+ | null;
+ } | null;
+
+ /**
+ * Type of deploy.
+ */
+ environment: 'preview' | 'production';
+
+ /**
+ * If the deployment has been skipped.
+ */
+ is_skipped: boolean;
+
+ /**
+ * The status of the deployment.
+ */
+ latest_stage: ProjectsAPI.Stage;
+
+ /**
+ * When the deployment was last modified.
+ */
+ modified_on: string;
+
+ /**
+ * Id of the project.
+ */
+ project_id: string;
+
+ /**
+ * Name of the project.
+ */
+ project_name: string;
+
+ /**
+ * Short Id (8 character) of the deployment.
+ */
+ short_id: string;
+
+ /**
+ * Configs for the project source control.
+ */
+ source: DeploymentRetryResponse.Source;
+
+ /**
+ * List of past stages.
+ */
+ stages: Array;
+
+ /**
+ * The live URL to view this deployment.
+ */
+ url: string;
+
+ /**
+ * Whether the deployment uses functions.
+ */
+ uses_functions?: boolean | null;
+}
+
+export namespace DeploymentRetryResponse {
+ /**
+ * Configs for the project build process.
+ */
+ export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
+
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
+
+ /**
+ * Enable build caching for the project.
+ */
+ build_caching?: boolean | null;
+
+ /**
+ * Command used to build project.
+ */
+ build_command?: string | null;
+
+ /**
+ * Assets output directory of the build.
+ */
+ destination_dir?: string | null;
+
+ /**
+ * Directory to run the command.
+ */
+ root_dir?: string | null;
+ }
+
+ /**
+ * Info about what caused the deployment.
+ */
+ export interface DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ metadata: DeploymentTrigger.Metadata;
+
+ /**
+ * What caused the deployment.
+ */
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
+ }
+
+ export namespace DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ export interface Metadata {
+ /**
+ * Where the trigger happened.
+ */
+ branch: string;
+
+ /**
+ * Whether the deployment trigger commit was dirty.
+ */
+ commit_dirty: boolean;
+
+ /**
+ * Hash of the deployment trigger commit.
+ */
+ commit_hash: string;
+
+ /**
+ * Message of the deployment trigger commit.
+ */
+ commit_message: string;
+ }
+ }
+
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
+
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
+
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
+ deployments_enabled?: boolean;
+
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: 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;
+
+ /**
+ * 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';
+
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
+ production_deployments_enabled?: boolean;
+
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
+ }
+ }
+}
+
+export interface DeploymentRollbackResponse {
+ /**
+ * Id of the deployment.
+ */
+ id: string;
+
+ /**
+ * A list of alias URLs pointing to this deployment.
+ */
+ aliases: Array | null;
+
+ /**
+ * Configs for the project build process.
+ */
+ build_config: DeploymentRollbackResponse.BuildConfig;
+
+ /**
+ * When the deployment was created.
+ */
+ created_on: string;
+
+ /**
+ * Info about what caused the deployment.
+ */
+ deployment_trigger: DeploymentRollbackResponse.DeploymentTrigger;
+
+ /**
+ * Environment variables used for builds and Pages Functions.
+ */
+ env_vars: {
+ [key: string]:
+ | DeploymentRollbackResponse.PagesPlainTextEnvVar
+ | null
+ | DeploymentRollbackResponse.PagesSecretTextEnvVar
+ | null;
+ } | null;
+
+ /**
+ * Type of deploy.
+ */
+ environment: 'preview' | 'production';
+
+ /**
+ * If the deployment has been skipped.
+ */
+ is_skipped: boolean;
+
+ /**
+ * The status of the deployment.
+ */
+ latest_stage: ProjectsAPI.Stage;
+
+ /**
+ * When the deployment was last modified.
+ */
+ modified_on: string;
+
+ /**
+ * Id of the project.
+ */
+ project_id: string;
+
+ /**
+ * Name of the project.
+ */
+ project_name: string;
+
+ /**
+ * Short Id (8 character) of the deployment.
+ */
+ short_id: string;
+
+ /**
+ * Configs for the project source control.
+ */
+ source: DeploymentRollbackResponse.Source;
+
+ /**
+ * List of past stages.
+ */
+ stages: Array;
+
+ /**
+ * The live URL to view this deployment.
+ */
+ url: string;
+
+ /**
+ * Whether the deployment uses functions.
+ */
+ uses_functions?: boolean | null;
+}
+
+export namespace DeploymentRollbackResponse {
+ /**
+ * Configs for the project build process.
+ */
+ export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
+
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
+
+ /**
+ * Enable build caching for the project.
+ */
+ build_caching?: boolean | null;
+
+ /**
+ * Command used to build project.
+ */
+ build_command?: string | null;
+
+ /**
+ * Assets output directory of the build.
+ */
+ destination_dir?: string | null;
+
+ /**
+ * Directory to run the command.
+ */
+ root_dir?: string | null;
+ }
+
+ /**
+ * Info about what caused the deployment.
+ */
+ export interface DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ metadata: DeploymentTrigger.Metadata;
+
+ /**
+ * What caused the deployment.
+ */
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
+ }
+
+ export namespace DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ export interface Metadata {
+ /**
+ * Where the trigger happened.
+ */
+ branch: string;
+
+ /**
+ * Whether the deployment trigger commit was dirty.
+ */
+ commit_dirty: boolean;
+
+ /**
+ * Hash of the deployment trigger commit.
+ */
+ commit_hash: string;
+
+ /**
+ * Message of the deployment trigger commit.
+ */
+ commit_message: string;
+ }
+ }
+
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
+
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
+
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
+ deployments_enabled?: boolean;
+
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: 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;
+
+ /**
+ * 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';
+
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
+ production_deployments_enabled?: boolean;
+
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
+ }
+ }
+}
+
+export interface DeploymentCreateParams {
+ /**
+ * Path param: Identifier.
+ */
+ 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 extends V4PagePaginationArrayParams {
+ /**
+ * Path param: Identifier.
+ */
+ account_id: string;
+
+ /**
+ * Query param: What type of deployments to fetch.
+ */
+ env?: 'production' | 'preview';
+}
+
+export interface DeploymentDeleteParams {
+ /**
+ * Identifier.
+ */
+ account_id: string;
+}
+
+export interface DeploymentGetParams {
+ /**
+ * Identifier.
+ */
+ account_id: string;
+}
+
+export interface DeploymentRetryParams {
+ /**
+ * Identifier.
+ */
+ account_id: string;
+}
+
+export interface DeploymentRollbackParams {
+ /**
+ * Identifier.
+ */
+ account_id: string;
+}
+
+Deployments.DeploymentListResponsesV4PagePaginationArray = DeploymentListResponsesV4PagePaginationArray;
+Deployments.History = History;
+
+export declare namespace Deployments {
+ export {
+ type DeploymentCreateResponse as DeploymentCreateResponse,
+ type DeploymentListResponse as DeploymentListResponse,
+ type DeploymentDeleteResponse as DeploymentDeleteResponse,
+ type DeploymentGetResponse as DeploymentGetResponse,
+ type DeploymentRetryResponse as DeploymentRetryResponse,
+ type DeploymentRollbackResponse as DeploymentRollbackResponse,
+ DeploymentListResponsesV4PagePaginationArray as DeploymentListResponsesV4PagePaginationArray,
+ type DeploymentCreateParams as DeploymentCreateParams,
+ type DeploymentListParams as DeploymentListParams,
+ type DeploymentDeleteParams as DeploymentDeleteParams,
+ type DeploymentGetParams as DeploymentGetParams,
+ type DeploymentRetryParams as DeploymentRetryParams,
+ type DeploymentRollbackParams as DeploymentRollbackParams,
+ };
+
+ export { History as History };
+}
diff --git a/src/resources/pages/projects/deployments/history/logs.ts b/src/resources/pages/projects/deployments/history/logs.ts
index 94ad44f1cd..e92f6d0aa4 100644
--- a/src/resources/pages/projects/deployments/history/logs.ts
+++ b/src/resources/pages/projects/deployments/history/logs.ts
@@ -34,24 +34,24 @@ export class Logs extends APIResource {
}
export interface LogGetResponse {
- data?: Array;
+ data: Array;
- includes_container_logs?: boolean;
+ includes_container_logs: boolean;
- total?: number;
+ total: number;
}
export namespace LogGetResponse {
export interface Data {
- line?: string;
+ line: string;
- ts?: string;
+ ts: string;
}
}
export interface LogGetParams {
/**
- * Identifier
+ * Identifier.
*/
account_id: string;
}
diff --git a/src/resources/pages/projects/deployments/index.ts b/src/resources/pages/projects/deployments/index.ts
index e111d2b387..2fae9d13f8 100644
--- a/src/resources/pages/projects/deployments/index.ts
+++ b/src/resources/pages/projects/deployments/index.ts
@@ -1,8 +1,14 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export {
+ DeploymentListResponsesV4PagePaginationArray,
Deployments,
+ type DeploymentCreateResponse,
+ type DeploymentListResponse,
type DeploymentDeleteResponse,
+ type DeploymentGetResponse,
+ type DeploymentRetryResponse,
+ type DeploymentRollbackResponse,
type DeploymentCreateParams,
type DeploymentListParams,
type DeploymentDeleteParams,
diff --git a/src/resources/pages/projects/domains.ts b/src/resources/pages/projects/domains.ts
index 1b5182a756..0276ffecd1 100644
--- a/src/resources/pages/projects/domains.ts
+++ b/src/resources/pages/projects/domains.ts
@@ -12,7 +12,10 @@ export class Domains extends APIResource {
* ```ts
* const domain = await client.pages.projects.domains.create(
* 'this-is-my-project-01',
- * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * {
+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * name: 'this-is-my-domain-01.com',
+ * },
* );
* ```
*/
@@ -20,13 +23,13 @@ export class Domains extends APIResource {
projectName: string,
params: DomainCreateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/pages/projects/${projectName}/domains`, {
body,
...options,
- }) as Core.APIPromise<{ result: DomainCreateResponse | null }>
+ }) as Core.APIPromise<{ result: DomainCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -92,10 +95,7 @@ export class Domains extends APIResource {
* const response = await client.pages.projects.domains.edit(
* 'this-is-my-project-01',
* 'this-is-my-domain-01.com',
- * {
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * body: {},
- * },
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
@@ -104,13 +104,13 @@ export class Domains extends APIResource {
domainName: string,
params: DomainEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
- const { account_id, body } = params;
+ ): Core.APIPromise {
+ const { account_id } = params;
return (
- this._client.patch(`/accounts/${account_id}/pages/projects/${projectName}/domains/${domainName}`, {
- body: body,
- ...options,
- }) as Core.APIPromise<{ result: DomainEditResponse | null }>
+ this._client.patch(
+ `/accounts/${account_id}/pages/projects/${projectName}/domains/${domainName}`,
+ options,
+ ) as Core.APIPromise<{ result: DomainEditResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -131,13 +131,13 @@ export class Domains extends APIResource {
domainName: string,
params: DomainGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id } = params;
return (
this._client.get(
`/accounts/${account_id}/pages/projects/${projectName}/domains/${domainName}`,
options,
- ) as Core.APIPromise<{ result: DomainGetResponse | null }>
+ ) as Core.APIPromise<{ result: DomainGetResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
@@ -145,32 +145,35 @@ export class Domains extends APIResource {
export class DomainListResponsesSinglePage extends SinglePage {}
export interface DomainCreateResponse {
- id?: string;
+ id: string;
- certificate_authority?: 'google' | 'lets_encrypt';
+ certificate_authority: 'google' | 'lets_encrypt';
- created_on?: string;
+ created_on: string;
- domain_id?: string;
+ domain_id: string;
- name?: string;
+ /**
+ * The domain name.
+ */
+ name: string;
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- validation_data?: DomainCreateResponse.ValidationData;
+ validation_data: DomainCreateResponse.ValidationData;
- verification_data?: DomainCreateResponse.VerificationData;
+ verification_data: DomainCreateResponse.VerificationData;
- zone_tag?: string;
+ zone_tag: string;
}
export namespace DomainCreateResponse {
export interface ValidationData {
- error_message?: string;
+ method: 'http' | 'txt';
- method?: 'http' | 'txt';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
+ error_message?: string;
txt_name?: string;
@@ -178,39 +181,42 @@ export namespace DomainCreateResponse {
}
export interface VerificationData {
- error_message?: string;
+ status: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- status?: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ error_message?: string;
}
}
export interface DomainListResponse {
- id?: string;
+ id: string;
- certificate_authority?: 'google' | 'lets_encrypt';
+ certificate_authority: 'google' | 'lets_encrypt';
- created_on?: string;
+ created_on: string;
- domain_id?: string;
+ domain_id: string;
- name?: string;
+ /**
+ * The domain name.
+ */
+ name: string;
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- validation_data?: DomainListResponse.ValidationData;
+ validation_data: DomainListResponse.ValidationData;
- verification_data?: DomainListResponse.VerificationData;
+ verification_data: DomainListResponse.VerificationData;
- zone_tag?: string;
+ zone_tag: string;
}
export namespace DomainListResponse {
export interface ValidationData {
- error_message?: string;
+ method: 'http' | 'txt';
- method?: 'http' | 'txt';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
+ error_message?: string;
txt_name?: string;
@@ -218,41 +224,44 @@ export namespace DomainListResponse {
}
export interface VerificationData {
- error_message?: string;
+ status: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- status?: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ error_message?: string;
}
}
export type DomainDeleteResponse = unknown;
export interface DomainEditResponse {
- id?: string;
+ id: string;
- certificate_authority?: 'google' | 'lets_encrypt';
+ certificate_authority: 'google' | 'lets_encrypt';
- created_on?: string;
+ created_on: string;
- domain_id?: string;
+ domain_id: string;
- name?: string;
+ /**
+ * The domain name.
+ */
+ name: string;
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- validation_data?: DomainEditResponse.ValidationData;
+ validation_data: DomainEditResponse.ValidationData;
- verification_data?: DomainEditResponse.VerificationData;
+ verification_data: DomainEditResponse.VerificationData;
- zone_tag?: string;
+ zone_tag: string;
}
export namespace DomainEditResponse {
export interface ValidationData {
- error_message?: string;
+ method: 'http' | 'txt';
- method?: 'http' | 'txt';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
+ error_message?: string;
txt_name?: string;
@@ -260,39 +269,42 @@ export namespace DomainEditResponse {
}
export interface VerificationData {
- error_message?: string;
+ status: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- status?: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ error_message?: string;
}
}
export interface DomainGetResponse {
- id?: string;
+ id: string;
- certificate_authority?: 'google' | 'lets_encrypt';
+ certificate_authority: 'google' | 'lets_encrypt';
- created_on?: string;
+ created_on: string;
- domain_id?: string;
+ domain_id: string;
- name?: string;
+ /**
+ * The domain name.
+ */
+ name: string;
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- validation_data?: DomainGetResponse.ValidationData;
+ validation_data: DomainGetResponse.ValidationData;
- verification_data?: DomainGetResponse.VerificationData;
+ verification_data: DomainGetResponse.VerificationData;
- zone_tag?: string;
+ zone_tag: string;
}
export namespace DomainGetResponse {
export interface ValidationData {
- error_message?: string;
+ method: 'http' | 'txt';
- method?: 'http' | 'txt';
+ status: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
- status?: 'initializing' | 'pending' | 'active' | 'deactivated' | 'error';
+ error_message?: string;
txt_name?: string;
@@ -300,53 +312,48 @@ export namespace DomainGetResponse {
}
export interface VerificationData {
- error_message?: string;
+ status: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
- status?: 'pending' | 'active' | 'deactivated' | 'blocked' | 'error';
+ error_message?: string;
}
}
export interface DomainCreateParams {
/**
- * Path param: Identifier
+ * Path param: Identifier.
*/
account_id: string;
/**
- * Body param:
+ * Body param: The domain name.
*/
- name?: string;
+ name: string;
}
export interface DomainListParams {
/**
- * Identifier
+ * Identifier.
*/
account_id: string;
}
export interface DomainDeleteParams {
/**
- * Identifier
+ * Identifier.
*/
account_id: string;
}
export interface DomainEditParams {
/**
- * Path param: Identifier
+ * Identifier.
*/
account_id: string;
-
- /**
- * Body param:
- */
- body: unknown;
}
export interface DomainGetParams {
/**
- * Identifier
+ * Identifier.
*/
account_id: string;
}
diff --git a/src/resources/pages/projects/index.ts b/src/resources/pages/projects/index.ts
index a40f121ec5..919774d1db 100644
--- a/src/resources/pages/projects/index.ts
+++ b/src/resources/pages/projects/index.ts
@@ -1,8 +1,14 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export {
+ DeploymentListResponsesV4PagePaginationArray,
Deployments,
+ type DeploymentCreateResponse,
+ type DeploymentListResponse,
type DeploymentDeleteResponse,
+ type DeploymentGetResponse,
+ type DeploymentRetryResponse,
+ type DeploymentRollbackResponse,
type DeploymentCreateParams,
type DeploymentListParams,
type DeploymentDeleteParams,
@@ -10,21 +16,6 @@ export {
type DeploymentRetryParams,
type DeploymentRollbackParams,
} from './deployments/index';
-export {
- DeploymentsSinglePage,
- Projects,
- type Deployment,
- type Project,
- type Stage,
- type ProjectDeleteResponse,
- type ProjectPurgeBuildCacheResponse,
- type ProjectCreateParams,
- type ProjectListParams,
- type ProjectDeleteParams,
- type ProjectEditParams,
- type ProjectGetParams,
- type ProjectPurgeBuildCacheParams,
-} from './projects';
export {
DomainListResponsesSinglePage,
Domains,
@@ -39,3 +30,22 @@ export {
type DomainEditParams,
type DomainGetParams,
} from './domains';
+export {
+ ProjectListResponsesV4PagePaginationArray,
+ Projects,
+ type Deployment,
+ type Project,
+ type Stage,
+ type ProjectCreateResponse,
+ type ProjectListResponse,
+ type ProjectDeleteResponse,
+ type ProjectEditResponse,
+ type ProjectGetResponse,
+ type ProjectPurgeBuildCacheResponse,
+ type ProjectCreateParams,
+ type ProjectListParams,
+ type ProjectDeleteParams,
+ type ProjectEditParams,
+ type ProjectGetParams,
+ type ProjectPurgeBuildCacheParams,
+} from './projects';
diff --git a/src/resources/pages/projects/projects.ts b/src/resources/pages/projects/projects.ts
index 01225591dc..de1f7454c2 100644
--- a/src/resources/pages/projects/projects.ts
+++ b/src/resources/pages/projects/projects.ts
@@ -2,6 +2,7 @@
import { APIResource } from '../../../resource';
import * as Core from '../../../core';
+import * as ProjectsAPI from './projects';
import * as DomainsAPI from './domains';
import {
DomainCreateParams,
@@ -20,15 +21,21 @@ import {
import * as DeploymentsAPI from './deployments/deployments';
import {
DeploymentCreateParams,
+ DeploymentCreateResponse,
DeploymentDeleteParams,
DeploymentDeleteResponse,
DeploymentGetParams,
+ DeploymentGetResponse,
DeploymentListParams,
+ DeploymentListResponse,
+ DeploymentListResponsesV4PagePaginationArray,
DeploymentRetryParams,
+ DeploymentRetryResponse,
DeploymentRollbackParams,
+ DeploymentRollbackResponse,
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,14 +48,16 @@ export class Projects extends APIResource {
* ```ts
* const project = await client.pages.projects.create({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
+ * name: 'my-pages-app',
+ * production_branch: 'main',
* });
* ```
*/
- create(params: ProjectCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ create(params: ProjectCreateParams, options?: Core.RequestOptions): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/pages/projects`, { body, ...options }) as Core.APIPromise<{
- result: Project;
+ result: ProjectCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -59,9 +68,9 @@ export class Projects extends APIResource {
* @example
* ```ts
* // Automatically fetches more pages as needed.
- * for await (const deployment of client.pages.projects.list({
- * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
- * })) {
+ * for await (const projectListResponse of client.pages.projects.list(
+ * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
+ * )) {
* // ...
* }
* ```
@@ -69,9 +78,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`,
+ ProjectListResponsesV4PagePaginationArray,
+ { query, ...options },
+ );
}
/**
@@ -105,7 +118,7 @@ export class Projects extends APIResource {
*
* @example
* ```ts
- * const project = await client.pages.projects.edit(
+ * const response = await client.pages.projects.edit(
* 'this-is-my-project-01',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
@@ -115,13 +128,13 @@ export class Projects extends APIResource {
projectName: string,
params: ProjectEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.patch(`/accounts/${account_id}/pages/projects/${projectName}`, {
body,
...options,
- }) as Core.APIPromise<{ result: Project }>
+ }) as Core.APIPromise<{ result: ProjectEditResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -140,11 +153,11 @@ export class Projects extends APIResource {
projectName: string,
params: ProjectGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id } = params;
return (
this._client.get(`/accounts/${account_id}/pages/projects/${projectName}`, options) as Core.APIPromise<{
- result: Project;
+ result: ProjectGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -176,87 +189,95 @@ export class Projects extends APIResource {
}
}
-export class DeploymentsSinglePage extends SinglePage {}
+export class ProjectListResponsesV4PagePaginationArray extends V4PagePaginationArray {}
export interface Deployment {
/**
* Id of the deployment.
*/
- id?: string;
+ id: string;
/**
* A list of alias URLs pointing to this deployment.
*/
- aliases?: Array | null;
+ aliases: Array | null;
/**
* Configs for the project build process.
*/
- build_config?: Deployment.BuildConfig;
+ build_config: Deployment.BuildConfig;
/**
* When the deployment was created.
*/
- created_on?: string;
+ created_on: string;
/**
* Info about what caused the deployment.
*/
- deployment_trigger?: Deployment.DeploymentTrigger;
+ deployment_trigger: Deployment.DeploymentTrigger;
/**
* Environment variables used for builds and Pages Functions.
*/
- env_vars?: {
+ env_vars: {
[key: string]: Deployment.PagesPlainTextEnvVar | null | Deployment.PagesSecretTextEnvVar | null;
- };
+ } | null;
/**
* Type of deploy.
*/
- environment?: 'preview' | 'production';
+ environment: 'preview' | 'production';
/**
* If the deployment has been skipped.
*/
- is_skipped?: boolean;
+ is_skipped: boolean;
/**
* The status of the deployment.
*/
- latest_stage?: Stage;
+ latest_stage: Stage;
/**
* When the deployment was last modified.
*/
- modified_on?: string;
+ modified_on: string;
/**
* Id of the project.
*/
- project_id?: string;
+ project_id: string;
/**
* Name of the project.
*/
- project_name?: string;
+ project_name: string;
/**
* Short Id (8 character) of the deployment.
*/
- short_id?: string;
+ short_id: string;
- source?: Deployment.Source;
+ /**
+ * Configs for the project source control.
+ */
+ source: Deployment.Source;
/**
* List of past stages.
*/
- stages?: Array;
+ stages: Array;
/**
* The live URL to view this deployment.
*/
- url?: string;
+ url: string;
+
+ /**
+ * Whether the deployment uses functions.
+ */
+ uses_functions?: boolean | null;
}
export namespace Deployment {
@@ -264,6 +285,16 @@ export namespace Deployment {
* Configs for the project build process.
*/
export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
+
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
+
/**
* Enable build caching for the project.
*/
@@ -275,7 +306,7 @@ export namespace Deployment {
build_command?: string | null;
/**
- * Output directory of the build.
+ * Assets output directory of the build.
*/
destination_dir?: string | null;
@@ -283,16 +314,6 @@ export namespace Deployment {
* Directory to run the command.
*/
root_dir?: string | null;
-
- /**
- * The classifying tag for analytics.
- */
- web_analytics_tag?: string | null;
-
- /**
- * The auth token for analytics.
- */
- web_analytics_token?: string | null;
}
/**
@@ -302,12 +323,12 @@ export namespace Deployment {
/**
* Additional info about the trigger.
*/
- metadata?: DeploymentTrigger.Metadata;
+ metadata: DeploymentTrigger.Metadata;
/**
* What caused the deployment.
*/
- type?: 'push' | 'ad_hoc';
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
}
export namespace DeploymentTrigger {
@@ -318,17 +339,22 @@ export namespace Deployment {
/**
* Where the trigger happened.
*/
- branch?: string;
+ branch: string;
+
+ /**
+ * Whether the deployment trigger commit was dirty.
+ */
+ commit_dirty: boolean;
/**
* Hash of the deployment trigger commit.
*/
- commit_hash?: string;
+ commit_hash: string;
/**
* Message of the deployment trigger commit.
*/
- commit_message?: string;
+ commit_message: string;
}
}
@@ -356,85 +382,169 @@ export namespace Deployment {
value: string;
}
+ /**
+ * Configs for the project source control.
+ */
export interface Source {
- config?: Source.Config;
+ config: Source.Config;
- type?: string;
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
}
export namespace Source {
export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
deployments_enabled?: boolean;
- owner?: string;
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: 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;
- 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';
- production_branch?: string;
-
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
production_deployments_enabled?: boolean;
- repo_name?: string;
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
}
}
}
export interface Project {
/**
- * Id of the project.
+ * ID of the project.
*/
- id?: string;
+ id: string;
/**
- * Configs for the project build process.
+ * Most recent production deployment of the project.
*/
- build_config?: Project.BuildConfig;
+ canonical_deployment: Project.CanonicalDeployment | null;
/**
- * Most recent deployment to the repo.
+ * When the project was created.
*/
- canonical_deployment?: Deployment | null;
+ created_on: string;
/**
- * When the project was created.
+ * Configs for deployments in a project.
*/
- created_on?: string;
+ deployment_configs: Project.DeploymentConfigs;
/**
- * Configs for deployments in a project.
+ * Framework the project is using.
*/
- deployment_configs?: Project.DeploymentConfigs;
+ framework: string;
/**
- * A list of associated custom domains for the project.
+ * Version of the framework the project is using.
*/
- domains?: Array;
+ framework_version: string;
/**
- * Most recent deployment to the repo.
+ * Most recent deployment of the project.
*/
- latest_deployment?: Deployment | null;
+ latest_deployment: Project.LatestDeployment | null;
/**
* Name of the project.
*/
- name?: string;
+ name: string;
+
+ /**
+ * Name of the preview script.
+ */
+ preview_script_name: string;
/**
* Production branch of the project. Used to identify production deployments.
*/
- production_branch?: string;
+ production_branch: string;
+
+ /**
+ * Name of the production script.
+ */
+ production_script_name: string;
+
+ /**
+ * Whether the project uses functions.
+ */
+ uses_functions: boolean | null;
+
+ /**
+ * Configs for the project build process.
+ */
+ build_config?: Project.BuildConfig;
+ /**
+ * A list of associated custom domains for the project.
+ */
+ domains?: Array;
+
+ /**
+ * Configs for the project source control.
+ */
source?: Project.Source;
/**
@@ -445,390 +555,455 @@ export interface Project {
export namespace Project {
/**
- * Configs for the project build process.
+ * Most recent production deployment of the project.
*/
- export interface BuildConfig {
+ export interface CanonicalDeployment {
/**
- * Enable build caching for the project.
+ * Id of the deployment.
*/
- build_caching?: boolean | null;
+ id: string;
/**
- * Command used to build project.
+ * A list of alias URLs pointing to this deployment.
*/
- build_command?: string | null;
+ aliases: Array | null;
/**
- * Output directory of the build.
+ * Configs for the project build process.
*/
- destination_dir?: string | null;
+ build_config: CanonicalDeployment.BuildConfig;
/**
- * Directory to run the command.
+ * When the deployment was created.
*/
- root_dir?: string | null;
+ created_on: string;
/**
- * The classifying tag for analytics.
+ * Info about what caused the deployment.
*/
- web_analytics_tag?: string | null;
+ deployment_trigger: CanonicalDeployment.DeploymentTrigger;
/**
- * The auth token for analytics.
+ * Environment variables used for builds and Pages Functions.
*/
- web_analytics_token?: string | null;
- }
+ env_vars: {
+ [key: string]:
+ | CanonicalDeployment.PagesPlainTextEnvVar
+ | null
+ | CanonicalDeployment.PagesSecretTextEnvVar
+ | null;
+ } | null;
- /**
- * Configs for deployments in a project.
- */
- export interface DeploymentConfigs {
/**
- * Configs for preview deploys.
+ * Type of deploy.
*/
- preview?: DeploymentConfigs.Preview;
+ environment: 'preview' | 'production';
/**
- * Configs for production deploys.
+ * If the deployment has been skipped.
*/
- production?: DeploymentConfigs.Production;
- }
+ is_skipped: boolean;
- export namespace DeploymentConfigs {
/**
- * Configs for preview deploys.
+ * The status of the deployment.
*/
- export interface Preview {
- /**
- * Constellation bindings used for Pages Functions.
- */
- ai_bindings?: { [key: string]: Preview.AIBindings | null } | null;
+ latest_stage: ProjectsAPI.Stage;
- /**
- * Analytics Engine bindings used for Pages Functions.
- */
- analytics_engine_datasets?: { [key: string]: Preview.AnalyticsEngineDatasets | null } | null;
+ /**
+ * When the deployment was last modified.
+ */
+ modified_on: string;
- /**
- * Browser bindings used for Pages Functions.
- */
- browsers?: { [key: string]: Preview.Browsers | null } | null;
+ /**
+ * Id of the project.
+ */
+ project_id: string;
- /**
- * Compatibility date used for Pages Functions.
- */
- compatibility_date?: string;
+ /**
+ * Name of the project.
+ */
+ project_name: string;
- /**
- * Compatibility flags used for Pages Functions.
- */
- compatibility_flags?: Array;
+ /**
+ * Short Id (8 character) of the deployment.
+ */
+ short_id: string;
- /**
- * D1 databases used for Pages Functions.
- */
- d1_databases?: { [key: string]: Preview.D1Databases | null } | null;
+ /**
+ * Configs for the project source control.
+ */
+ source: CanonicalDeployment.Source;
- /**
- * Durable Object namespaces used for Pages Functions.
- */
- durable_object_namespaces?: { [key: string]: Preview.DurableObjectNamespaces | null } | null;
+ /**
+ * List of past stages.
+ */
+ stages: Array;
- /**
- * Environment variables used for builds and Pages Functions.
- */
- env_vars?: {
- [key: string]: Preview.PagesPlainTextEnvVar | null | Preview.PagesSecretTextEnvVar | null;
- };
+ /**
+ * The live URL to view this deployment.
+ */
+ url: string;
- /**
- * Hyperdrive bindings used for Pages Functions.
- */
- hyperdrive_bindings?: { [key: string]: Preview.HyperdriveBindings | null } | null;
+ /**
+ * Whether the deployment uses functions.
+ */
+ uses_functions?: boolean | null;
+ }
+ export namespace CanonicalDeployment {
+ /**
+ * Configs for the project build process.
+ */
+ export interface BuildConfig {
/**
- * KV namespaces used for Pages Functions.
+ * The classifying tag for analytics.
*/
- kv_namespaces?: { [key: string]: Preview.KVNamespaces | null } | null;
+ web_analytics_tag: string | null;
/**
- * mTLS bindings used for Pages Functions.
+ * The auth token for analytics.
*/
- mtls_certificates?: { [key: string]: Preview.MTLSCertificates | null } | null;
+ web_analytics_token: string | null;
/**
- * Placement setting used for Pages Functions.
+ * Enable build caching for the project.
*/
- placement?: Preview.Placement | null;
+ build_caching?: boolean | null;
/**
- * Queue Producer bindings used for Pages Functions.
+ * Command used to build project.
*/
- queue_producers?: { [key: string]: Preview.QueueProducers | null } | null;
+ build_command?: string | null;
/**
- * R2 buckets used for Pages Functions.
+ * Assets output directory of the build.
*/
- r2_buckets?: { [key: string]: Preview.R2Buckets | null } | null;
+ destination_dir?: string | null;
/**
- * Services used for Pages Functions.
+ * Directory to run the command.
*/
- services?: { [key: string]: Preview.Services | null } | null;
+ root_dir?: string | null;
+ }
+ /**
+ * Info about what caused the deployment.
+ */
+ export interface DeploymentTrigger {
/**
- * Vectorize bindings used for Pages Functions.
+ * Additional info about the trigger.
*/
- vectorize_bindings?: { [key: string]: Preview.VectorizeBindings | null } | null;
- }
+ metadata: DeploymentTrigger.Metadata;
- export namespace Preview {
/**
- * AI binding.
+ * What caused the deployment.
*/
- export interface AIBindings {
- project_id?: string;
- }
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
+ }
+ export namespace DeploymentTrigger {
/**
- * Analytics Engine binding.
+ * Additional info about the trigger.
*/
- export interface AnalyticsEngineDatasets {
+ export interface Metadata {
/**
- * Name of the dataset.
+ * Where the trigger happened.
*/
- dataset?: string;
- }
-
- /**
- * Browser binding.
- */
- export interface Browsers {}
+ branch: string;
- /**
- * D1 binding.
- */
- export interface D1Databases {
/**
- * UUID of the D1 database.
+ * Whether the deployment trigger commit was dirty.
*/
- id?: string;
- }
+ commit_dirty: boolean;
- /**
- * Durable Object binding.
- */
- export interface DurableObjectNamespaces {
/**
- * ID of the Durable Object namespace.
+ * Hash of the deployment trigger commit.
*/
- namespace_id?: string;
- }
-
- /**
- * A plaintext environment variable.
- */
- export interface PagesPlainTextEnvVar {
- type: 'plain_text';
+ commit_hash: string;
/**
- * Environment variable value.
+ * Message of the deployment trigger commit.
*/
- value: string;
+ commit_message: string;
}
+ }
+
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
/**
- * An encrypted environment variable.
+ * Environment variable value.
*/
- export interface PagesSecretTextEnvVar {
- type: 'secret_text';
+ value: string;
+ }
- /**
- * Secret value.
- */
- value: string;
- }
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
/**
- * Hyperdrive binding.
+ * Secret value.
*/
- export interface HyperdriveBindings {
- id?: string;
- }
+ value: string;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
/**
- * KV namespace binding.
+ * The source control management provider.
*/
- export interface KVNamespaces {
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
/**
- * ID of the KV namespace.
+ * The owner of the repository.
*/
- namespace_id?: string;
- }
+ owner: string;
- /**
- * mTLS binding.
- */
- export interface MTLSCertificates {
- certificate_id?: string;
- }
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
- /**
- * Placement setting used for Pages Functions.
- */
- export interface Placement {
/**
- * Placement mode.
+ * The production branch of the repository.
*/
- mode?: string;
- }
+ production_branch: string;
- /**
- * Queue Producer binding.
- */
- export interface QueueProducers {
/**
- * Name of the Queue.
+ * The name of the repository.
*/
- name?: string;
- }
+ repo_name: string;
- /**
- * R2 binding.
- */
- export interface R2Buckets {
/**
- * Jurisdiction of the R2 bucket.
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
*/
- jurisdiction?: string | null;
+ deployments_enabled?: boolean;
/**
- * Name of the R2 bucket.
+ * The owner ID of the repository.
*/
- name?: string;
- }
+ owner_id?: string;
- /**
- * Service binding.
- */
- export interface Services {
/**
- * The entrypoint to bind to.
+ * A list of paths that should be excluded from triggering a preview deployment.
+ * Wildcard syntax (`*`) is supported.
*/
- entrypoint?: string | null;
+ path_excludes?: Array;
/**
- * The Service environment.
+ * A list of paths that should be watched to trigger a preview deployment. Wildcard
+ * syntax (`*`) is supported.
*/
- environment?: string;
+ path_includes?: Array;
/**
- * The Service name.
+ * 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`.
*/
- service?: string;
- }
+ preview_branch_excludes?: Array;
- /**
- * Vectorize binding.
- */
- export interface VectorizeBindings {
- index_name?: string;
+ /**
+ * 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';
+
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
+ production_deployments_enabled?: boolean;
+
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
}
}
+ }
+
+ /**
+ * Configs for deployments in a project.
+ */
+ export interface DeploymentConfigs {
+ /**
+ * Configs for preview deploys.
+ */
+ preview: DeploymentConfigs.Preview;
/**
* Configs for production deploys.
*/
- export interface Production {
- /**
- * Constellation bindings used for Pages Functions.
- */
- ai_bindings?: { [key: string]: Production.AIBindings | null } | null;
+ production: DeploymentConfigs.Production;
+ }
+ export namespace DeploymentConfigs {
+ /**
+ * Configs for preview deploys.
+ */
+ export interface Preview {
/**
- * Analytics Engine bindings used for Pages Functions.
+ * Whether to always use the latest compatibility date for Pages Functions.
*/
- analytics_engine_datasets?: { [key: string]: Production.AnalyticsEngineDatasets | null } | null;
+ always_use_latest_compatibility_date: boolean;
/**
- * Browser bindings used for Pages Functions.
+ * The major version of the build image to use for Pages Functions.
*/
- browsers?: { [key: string]: Production.Browsers | null } | null;
+ build_image_major_version: number;
/**
* Compatibility date used for Pages Functions.
*/
- compatibility_date?: string;
+ compatibility_date: string;
/**
* Compatibility flags used for Pages Functions.
*/
- compatibility_flags?: Array;
+ compatibility_flags: Array;
/**
- * D1 databases used for Pages Functions.
+ * Environment variables used for builds and Pages Functions.
*/
- d1_databases?: { [key: string]: Production.D1Databases | null } | null;
+ env_vars: {
+ [key: string]: Preview.PagesPlainTextEnvVar | null | Preview.PagesSecretTextEnvVar | null;
+ } | null;
/**
- * Durable Object namespaces used for Pages Functions.
+ * Whether to fail open when the deployment config cannot be applied.
*/
- durable_object_namespaces?: { [key: string]: Production.DurableObjectNamespaces | null } | null;
+ fail_open: boolean;
/**
- * Environment variables used for builds and Pages Functions.
+ * @deprecated All new projects now use the Standard usage model.
*/
- env_vars?: {
- [key: string]: Production.PagesPlainTextEnvVar | null | Production.PagesSecretTextEnvVar | null;
- };
+ usage_model: 'standard' | 'bundled' | 'unbound';
+
+ /**
+ * Constellation bindings used for Pages Functions.
+ */
+ ai_bindings?: { [key: string]: Preview.AIBindings };
+
+ /**
+ * Analytics Engine bindings used for Pages Functions.
+ */
+ analytics_engine_datasets?: { [key: string]: Preview.AnalyticsEngineDatasets };
+
+ /**
+ * Browser bindings used for Pages Functions.
+ */
+ browsers?: { [key: string]: Preview.Browsers | null };
+
+ /**
+ * D1 databases used for Pages Functions.
+ */
+ d1_databases?: { [key: string]: Preview.D1Databases };
+
+ /**
+ * Durable Object namespaces used for Pages Functions.
+ */
+ durable_object_namespaces?: { [key: string]: Preview.DurableObjectNamespaces };
/**
* Hyperdrive bindings used for Pages Functions.
*/
- hyperdrive_bindings?: { [key: string]: Production.HyperdriveBindings | null } | null;
+ hyperdrive_bindings?: { [key: string]: Preview.HyperdriveBindings };
/**
* KV namespaces used for Pages Functions.
*/
- kv_namespaces?: { [key: string]: Production.KVNamespaces | null } | null;
+ kv_namespaces?: { [key: string]: Preview.KVNamespaces };
+
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Preview.Limits;
/**
* mTLS bindings used for Pages Functions.
*/
- mtls_certificates?: { [key: string]: Production.MTLSCertificates | null } | null;
+ mtls_certificates?: { [key: string]: Preview.MTLSCertificates };
/**
* Placement setting used for Pages Functions.
*/
- placement?: Production.Placement | null;
+ placement?: Preview.Placement;
/**
* Queue Producer bindings used for Pages Functions.
*/
- queue_producers?: { [key: string]: Production.QueueProducers | null } | null;
+ queue_producers?: { [key: string]: Preview.QueueProducers };
/**
* R2 buckets used for Pages Functions.
*/
- r2_buckets?: { [key: string]: Production.R2Buckets | null } | null;
+ r2_buckets?: { [key: string]: Preview.R2Buckets };
/**
* Services used for Pages Functions.
*/
- services?: { [key: string]: Production.Services | null } | null;
+ services?: { [key: string]: Preview.Services };
/**
* Vectorize bindings used for Pages Functions.
*/
- vectorize_bindings?: { [key: string]: Production.VectorizeBindings | null } | null;
+ vectorize_bindings?: { [key: string]: Preview.VectorizeBindings };
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
}
- export namespace Production {
+ export namespace Preview {
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
+
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
/**
* AI binding.
*/
export interface AIBindings {
- project_id?: string;
+ project_id: string;
}
/**
@@ -838,7 +1013,7 @@ export namespace Project {
/**
* Name of the dataset.
*/
- dataset?: string;
+ dataset: string;
}
/**
@@ -853,7 +1028,7 @@ export namespace Project {
/**
* UUID of the D1 database.
*/
- id?: string;
+ id: string;
}
/**
@@ -863,55 +1038,41 @@ export namespace Project {
/**
* ID of the Durable Object namespace.
*/
- namespace_id?: string;
+ namespace_id: string;
}
/**
- * A plaintext environment variable.
+ * Hyperdrive binding.
*/
- export interface PagesPlainTextEnvVar {
- type: 'plain_text';
-
- /**
- * Environment variable value.
- */
- value: string;
+ export interface HyperdriveBindings {
+ id: string;
}
/**
- * An encrypted environment variable.
+ * KV namespace binding.
*/
- export interface PagesSecretTextEnvVar {
- type: 'secret_text';
-
+ export interface KVNamespaces {
/**
- * Secret value.
+ * ID of the KV namespace.
*/
- value: string;
+ namespace_id: string;
}
/**
- * Hyperdrive binding.
- */
- export interface HyperdriveBindings {
- id?: string;
- }
-
- /**
- * KV namespace binding.
+ * Limits for Pages Functions.
*/
- export interface KVNamespaces {
+ export interface Limits {
/**
- * ID of the KV namespace.
+ * CPU time limit in milliseconds.
*/
- namespace_id?: string;
+ cpu_ms: number;
}
/**
* mTLS binding.
*/
export interface MTLSCertificates {
- certificate_id?: string;
+ certificate_id: string;
}
/**
@@ -921,7 +1082,7 @@ export namespace Project {
/**
* Placement mode.
*/
- mode?: string;
+ mode: string;
}
/**
@@ -931,7 +1092,7 @@ export namespace Project {
/**
* Name of the Queue.
*/
- name?: string;
+ name: string;
}
/**
@@ -939,14 +1100,14 @@ export namespace Project {
*/
export interface R2Buckets {
/**
- * Jurisdiction of the R2 bucket.
+ * Name of the R2 bucket.
*/
- jurisdiction?: string | null;
+ name: string;
/**
- * Name of the R2 bucket.
+ * Jurisdiction of the R2 bucket.
*/
- name?: string;
+ jurisdiction?: string | null;
}
/**
@@ -954,121 +1115,6220 @@ export namespace Project {
*/
export interface Services {
/**
- * The entrypoint to bind to.
+ * The Service environment.
*/
- entrypoint?: string | null;
+ environment: string;
/**
- * The Service environment.
+ * The Service name.
*/
- environment?: string;
+ service: string;
/**
- * The Service name.
+ * The entrypoint to bind to.
*/
- service?: string;
+ entrypoint?: string | null;
}
/**
* Vectorize binding.
*/
export interface VectorizeBindings {
- index_name?: string;
+ index_name: string;
}
}
- }
- export interface Source {
- config?: Source.Config;
+ /**
+ * Configs for production deploys.
+ */
+ export interface Production {
+ /**
+ * Whether to always use the latest compatibility date for Pages Functions.
+ */
+ always_use_latest_compatibility_date: boolean;
- type?: string;
- }
+ /**
+ * The major version of the build image to use for Pages Functions.
+ */
+ build_image_major_version: number;
- export namespace Source {
- export interface Config {
- deployments_enabled?: boolean;
+ /**
+ * Compatibility date used for Pages Functions.
+ */
+ compatibility_date: string;
- owner?: string;
+ /**
+ * Compatibility flags used for Pages Functions.
+ */
+ compatibility_flags: Array;
- path_excludes?: Array;
+ /**
+ * Environment variables used for builds and Pages Functions.
+ */
+ env_vars: {
+ [key: string]: Production.PagesPlainTextEnvVar | null | Production.PagesSecretTextEnvVar | null;
+ } | null;
- path_includes?: Array;
+ /**
+ * Whether to fail open when the deployment config cannot be applied.
+ */
+ fail_open: boolean;
- pr_comments_enabled?: boolean;
+ /**
+ * @deprecated All new projects now use the Standard usage model.
+ */
+ usage_model: 'standard' | 'bundled' | 'unbound';
- preview_branch_excludes?: Array;
+ /**
+ * Constellation bindings used for Pages Functions.
+ */
+ ai_bindings?: { [key: string]: Production.AIBindings };
- preview_branch_includes?: Array;
+ /**
+ * Analytics Engine bindings used for Pages Functions.
+ */
+ analytics_engine_datasets?: { [key: string]: Production.AnalyticsEngineDatasets };
- preview_deployment_setting?: 'all' | 'none' | 'custom';
+ /**
+ * Browser bindings used for Pages Functions.
+ */
+ browsers?: { [key: string]: Production.Browsers | null };
- production_branch?: string;
+ /**
+ * D1 databases used for Pages Functions.
+ */
+ d1_databases?: { [key: string]: Production.D1Databases };
- production_deployments_enabled?: boolean;
+ /**
+ * Durable Object namespaces used for Pages Functions.
+ */
+ durable_object_namespaces?: { [key: string]: Production.DurableObjectNamespaces };
- repo_name?: string;
- }
- }
-}
+ /**
+ * Hyperdrive bindings used for Pages Functions.
+ */
+ hyperdrive_bindings?: { [key: string]: Production.HyperdriveBindings };
-/**
- * The status of the deployment.
- */
-export interface Stage {
- /**
- * When the stage ended.
- */
- ended_on?: string | null;
+ /**
+ * KV namespaces used for Pages Functions.
+ */
+ kv_namespaces?: { [key: string]: Production.KVNamespaces };
- /**
- * The current build stage.
- */
- name?: 'queued' | 'initialize' | 'clone_repo' | 'build' | 'deploy';
+ /**
+ * Limits for Pages Functions.
+ */
+ limits?: Production.Limits;
+
+ /**
+ * mTLS bindings used for Pages Functions.
+ */
+ mtls_certificates?: { [key: string]: Production.MTLSCertificates };
+
+ /**
+ * Placement setting used for Pages Functions.
+ */
+ placement?: Production.Placement;
+
+ /**
+ * Queue Producer bindings used for Pages Functions.
+ */
+ queue_producers?: { [key: string]: Production.QueueProducers };
+
+ /**
+ * R2 buckets used for Pages Functions.
+ */
+ r2_buckets?: { [key: string]: Production.R2Buckets };
+
+ /**
+ * Services used for Pages Functions.
+ */
+ services?: { [key: string]: Production.Services };
+
+ /**
+ * Vectorize bindings used for Pages Functions.
+ */
+ vectorize_bindings?: { [key: string]: Production.VectorizeBindings };
+
+ /**
+ * Hash of the Wrangler configuration used for the deployment.
+ */
+ wrangler_config_hash?: string;
+ }
+
+ export namespace Production {
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
+
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
+ /**
+ * AI binding.
+ */
+ export interface AIBindings {
+ project_id: string;
+ }
+
+ /**
+ * Analytics Engine binding.
+ */
+ export interface AnalyticsEngineDatasets {
+ /**
+ * Name of the dataset.
+ */
+ dataset: string;
+ }
+
+ /**
+ * Browser binding.
+ */
+ export interface Browsers {}
+
+ /**
+ * D1 binding.
+ */
+ export interface D1Databases {
+ /**
+ * UUID of the D1 database.
+ */
+ id: string;
+ }
+
+ /**
+ * Durable Object binding.
+ */
+ export interface DurableObjectNamespaces {
+ /**
+ * ID of the Durable Object namespace.
+ */
+ namespace_id: string;
+ }
+
+ /**
+ * Hyperdrive binding.
+ */
+ export interface HyperdriveBindings {
+ id: string;
+ }
+
+ /**
+ * KV namespace binding.
+ */
+ export interface KVNamespaces {
+ /**
+ * ID of the KV namespace.
+ */
+ namespace_id: string;
+ }
+
+ /**
+ * Limits for Pages Functions.
+ */
+ export interface Limits {
+ /**
+ * CPU time limit in milliseconds.
+ */
+ cpu_ms: number;
+ }
+
+ /**
+ * mTLS binding.
+ */
+ export interface MTLSCertificates {
+ certificate_id: string;
+ }
+
+ /**
+ * Placement setting used for Pages Functions.
+ */
+ export interface Placement {
+ /**
+ * Placement mode.
+ */
+ mode: string;
+ }
+
+ /**
+ * Queue Producer binding.
+ */
+ export interface QueueProducers {
+ /**
+ * Name of the Queue.
+ */
+ name: string;
+ }
+
+ /**
+ * R2 binding.
+ */
+ export interface R2Buckets {
+ /**
+ * Name of the R2 bucket.
+ */
+ name: string;
+
+ /**
+ * Jurisdiction of the R2 bucket.
+ */
+ jurisdiction?: string | null;
+ }
+
+ /**
+ * Service binding.
+ */
+ export interface Services {
+ /**
+ * The Service environment.
+ */
+ environment: string;
+
+ /**
+ * The Service name.
+ */
+ service: string;
+
+ /**
+ * The entrypoint to bind to.
+ */
+ entrypoint?: string | null;
+ }
+
+ /**
+ * Vectorize binding.
+ */
+ export interface VectorizeBindings {
+ index_name: string;
+ }
+ }
+ }
+
+ /**
+ * Most recent deployment of the project.
+ */
+ export interface LatestDeployment {
+ /**
+ * Id of the deployment.
+ */
+ id: string;
+
+ /**
+ * A list of alias URLs pointing to this deployment.
+ */
+ aliases: Array | null;
+
+ /**
+ * Configs for the project build process.
+ */
+ build_config: LatestDeployment.BuildConfig;
+
+ /**
+ * When the deployment was created.
+ */
+ created_on: string;
+
+ /**
+ * Info about what caused the deployment.
+ */
+ deployment_trigger: LatestDeployment.DeploymentTrigger;
+
+ /**
+ * Environment variables used for builds and Pages Functions.
+ */
+ env_vars: {
+ [key: string]:
+ | LatestDeployment.PagesPlainTextEnvVar
+ | null
+ | LatestDeployment.PagesSecretTextEnvVar
+ | null;
+ } | null;
+
+ /**
+ * Type of deploy.
+ */
+ environment: 'preview' | 'production';
+
+ /**
+ * If the deployment has been skipped.
+ */
+ is_skipped: boolean;
+
+ /**
+ * The status of the deployment.
+ */
+ latest_stage: ProjectsAPI.Stage;
+
+ /**
+ * When the deployment was last modified.
+ */
+ modified_on: string;
+
+ /**
+ * Id of the project.
+ */
+ project_id: string;
+
+ /**
+ * Name of the project.
+ */
+ project_name: string;
+
+ /**
+ * Short Id (8 character) of the deployment.
+ */
+ short_id: string;
+
+ /**
+ * Configs for the project source control.
+ */
+ source: LatestDeployment.Source;
+
+ /**
+ * List of past stages.
+ */
+ stages: Array;
+
+ /**
+ * The live URL to view this deployment.
+ */
+ url: string;
+
+ /**
+ * Whether the deployment uses functions.
+ */
+ uses_functions?: boolean | null;
+ }
+
+ export namespace LatestDeployment {
+ /**
+ * Configs for the project build process.
+ */
+ export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
+
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
+
+ /**
+ * Enable build caching for the project.
+ */
+ build_caching?: boolean | null;
+
+ /**
+ * Command used to build project.
+ */
+ build_command?: string | null;
+
+ /**
+ * Assets output directory of the build.
+ */
+ destination_dir?: string | null;
+
+ /**
+ * Directory to run the command.
+ */
+ root_dir?: string | null;
+ }
+
+ /**
+ * Info about what caused the deployment.
+ */
+ export interface DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ metadata: DeploymentTrigger.Metadata;
+
+ /**
+ * What caused the deployment.
+ */
+ type: 'github:push' | 'ad_hoc' | 'deploy_hook';
+ }
+
+ export namespace DeploymentTrigger {
+ /**
+ * Additional info about the trigger.
+ */
+ export interface Metadata {
+ /**
+ * Where the trigger happened.
+ */
+ branch: string;
+
+ /**
+ * Whether the deployment trigger commit was dirty.
+ */
+ commit_dirty: boolean;
+
+ /**
+ * Hash of the deployment trigger commit.
+ */
+ commit_hash: string;
+
+ /**
+ * Message of the deployment trigger commit.
+ */
+ commit_message: string;
+ }
+ }
+
+ /**
+ * A plaintext environment variable.
+ */
+ export interface PagesPlainTextEnvVar {
+ type: 'plain_text';
+
+ /**
+ * Environment variable value.
+ */
+ value: string;
+ }
+
+ /**
+ * An encrypted environment variable.
+ */
+ export interface PagesSecretTextEnvVar {
+ type: 'secret_text';
+
+ /**
+ * Secret value.
+ */
+ value: string;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
+
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
+ deployments_enabled?: boolean;
+
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: 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;
+
+ /**
+ * 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';
+
+ /**
+ * Whether to trigger a production deployment on commits to the production branch.
+ */
+ production_deployments_enabled?: boolean;
+
+ /**
+ * The ID of the repository.
+ */
+ repo_id?: string;
+ }
+ }
+ }
+
+ /**
+ * Configs for the project build process.
+ */
+ export interface BuildConfig {
+ /**
+ * The classifying tag for analytics.
+ */
+ web_analytics_tag: string | null;
+
+ /**
+ * The auth token for analytics.
+ */
+ web_analytics_token: string | null;
+
+ /**
+ * Enable build caching for the project.
+ */
+ build_caching?: boolean | null;
+
+ /**
+ * Command used to build project.
+ */
+ build_command?: string | null;
+
+ /**
+ * Assets output directory of the build.
+ */
+ destination_dir?: string | null;
+
+ /**
+ * Directory to run the command.
+ */
+ root_dir?: string | null;
+ }
+
+ /**
+ * Configs for the project source control.
+ */
+ export interface Source {
+ config: Source.Config;
+
+ /**
+ * The source control management provider.
+ */
+ type: 'github' | 'gitlab';
+ }
+
+ export namespace Source {
+ export interface Config {
+ /**
+ * The owner of the repository.
+ */
+ owner: string;
+
+ /**
+ * Whether to enable PR comments.
+ */
+ pr_comments_enabled: boolean;
+
+ /**
+ * The production branch of the repository.
+ */
+ production_branch: string;
+
+ /**
+ * The name of the repository.
+ */
+ repo_name: string;
+
+ /**
+ * @deprecated Use `production_deployments_enabled` and
+ * `preview_deployment_setting` for more granular control.
+ */
+ deployments_enabled?: boolean;
+
+ /**
+ * The owner ID of the repository.
+ */
+ owner_id?: string;
+
+ /**
+ * A list of paths that should be excluded from triggering a preview deployment.
+ * Wildcard syntax (`*`) is supported.
+ */
+ path_excludes?: Array