Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "6.4.0"
".": "6.5.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 1932
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6183ef87f1b8eea6ad4bae542bfde2ec23a5526ae2b7bacdf6c6a4c48d990995.yml
openapi_spec_hash: 9c8ac3d56571ebf1e170d993b71ccb4d
config_hash: aaacea52b646facd5527d7b1e928123d
configured_endpoints: 1948
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d3b3813ba8fb0b5303cfad8fcbd363941c494711e4cce61069553692b664774f.yml
openapi_spec_hash: 4f467a53fd61500db4f7561dcfaaa088
config_hash: e46aac70a20120e31732b1248c24ef48
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 6.5.0 (2025-12-17)

Full Changelog: [v6.4.0...v6.5.0](https://github.com/cloudflare/cloudflare-go/compare/v6.4.0...v6.5.0)

### Features

* **ai_gateway:** add `zdr` field ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
* **ai_search**: add AI Search endpoints ([9d95c4b](https://github.com/cloudflare/cloudflare-go/commit/9d95c4baab206211083fbf85ab04ff3fa9205fc8))
* **leaked_credentials_check**: Add GET endpoint for leaked_credentials_check/detections ([2c4f6f5](https://github.com/cloudflare/cloudflare-go/commit/2c4f6f5f09e5aba4afe79b4df782032b242bf2af))
* **magic_transit:** support custom remote identities ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
* **r2:** add `keys` to super slurper response types ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
* **radar:** support filtering results by agent type ([2020995](https://github.com/cloudflare/cloudflare-go/commit/2020995fcd4a89b52f8b1bf2f78303a90fa4e66a))
* **workers:** add startup_time_ms to version types ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
* **zero_trust:** support new gateway list types ([2020995](https://github.com/cloudflare/cloudflare-go/commit/2020995fcd4a89b52f8b1bf2f78303a90fa4e66a))

### Chores

* **accounts:** docs, tests updates ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
* **api_gateway** Deprecate API Shield Schema Validation resources ([ae8644c](https://github.com/cloudflare/cloudflare-go/commit/ae8644cb41a29e0a1496b79cbe797365be1cb253))
* **internal:** codegen related update ([d2d0a29](https://github.com/cloudflare/cloudflare-go/commit/d2d0a295b5658e40177ec6af88b7d6a5d4bbc8bb))
* **load_balancers:** update pool, monitor nullability ([2020995](https://github.com/cloudflare/cloudflare-go/commit/2020995fcd4a89b52f8b1bf2f78303a90fa4e66a))
* **zero_trus:** refactor DLP entry types ([23fdbc6](https://github.com/cloudflare/cloudflare-go/commit/23fdbc69d399ef783bf4ad85df3ae07cf8ffb794))

## 6.4.0 (2025-12-04)

Full Changelog: [v6.3.0...v6.4.0](https://github.com/cloudflare/cloudflare-go/compare/v6.3.0...v6.4.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/cloudflare/cloudflare-go/v4@v6.4.0'
go get -u 'github.com/cloudflare/cloudflare-go/v4@v6.5.0'
```

<!-- x-release-please-end -->
Expand Down
2 changes: 2 additions & 0 deletions accounts/logaudit.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,8 @@ func (r LogAuditListParamsActorTypeNot) IsKnown() bool {
// Deprecated: deprecated in favor of ID. Use ID to query by the audit log ID.
type LogAuditListParamsAuditLogID struct {
// Filters out audit logs by their IDs.
//
// Deprecated: deprecated
Not param.Field[[]string] `query:"not"`
}

Expand Down
3 changes: 3 additions & 0 deletions accounts/logaudit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func TestLogAuditListWithOptionalParams(t *testing.T) {
ActorType: cloudflare.F(accounts.LogAuditListParamsActorType{
Not: cloudflare.F([]accounts.LogAuditListParamsActorTypeNot{accounts.LogAuditListParamsActorTypeNotAccount}),
}),
AuditLogID: cloudflare.F(accounts.LogAuditListParamsAuditLogID{
Not: cloudflare.F([]string{"f174be97-19b1-40d6-954d-70cd5fbd52db"}),
}),
Cursor: cloudflare.F("Q1buH-__DQqqig7SVYXT-SsMOTGY2Z3Y80W-fGgva7yaDdmPKveucH5ddOcHsJRhNb-xUK8agZQqkJSMAENGO8NU6g=="),
Direction: cloudflare.F(accounts.LogAuditListParamsDirectionDesc),
Limit: cloudflare.F(25.000000),
Expand Down
10 changes: 5 additions & 5 deletions ai/tomarkdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ func (r *ToMarkdownService) SupportedAutoPaging(ctx context.Context, query ToMar
}

// Convert Files into Markdown
func (r *ToMarkdownService) Transform(ctx context.Context, file io.Reader, body ToMarkdownTransformParams, opts ...option.RequestOption) (res *pagination.SinglePage[ToMarkdownTransformResponse], err error) {
func (r *ToMarkdownService) Transform(ctx context.Context, file io.Reader, params ToMarkdownTransformParams, opts ...option.RequestOption) (res *pagination.SinglePage[ToMarkdownTransformResponse], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
opts = append([]option.RequestOption{option.WithRequestBody("application/octet-stream", file), option.WithResponseInto(&raw)}, opts...)
if body.AccountID.Value == "" {
if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
return
}
path := fmt.Sprintf("accounts/%s/ai/tomarkdown", body.AccountID)
path := fmt.Sprintf("accounts/%s/ai/tomarkdown", params.AccountID)
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, nil, &res, opts...)
if err != nil {
return nil, err
Expand All @@ -89,8 +89,8 @@ func (r *ToMarkdownService) Transform(ctx context.Context, file io.Reader, body
}

// Convert Files into Markdown
func (r *ToMarkdownService) TransformAutoPaging(ctx context.Context, file io.Reader, body ToMarkdownTransformParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ToMarkdownTransformResponse] {
return pagination.NewSinglePageAutoPager(r.Transform(ctx, file, body, opts...))
func (r *ToMarkdownService) TransformAutoPaging(ctx context.Context, file io.Reader, params ToMarkdownTransformParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ToMarkdownTransformResponse] {
return pagination.NewSinglePageAutoPager(r.Transform(ctx, file, params, opts...))
}

type ToMarkdownSupportedResponse struct {
Expand Down
12 changes: 12 additions & 0 deletions ai_gateway/aigateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ type AIGatewayNewResponse struct {
Otel []AIGatewayNewResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayNewResponseStripe `json:"stripe,nullable"`
Zdr bool `json:"zdr"`
JSON aiGatewayNewResponseJSON `json:"-"`
}

Expand Down Expand Up @@ -207,6 +208,7 @@ type aiGatewayNewResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -463,6 +465,7 @@ type AIGatewayUpdateResponse struct {
Otel []AIGatewayUpdateResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayUpdateResponseStripe `json:"stripe,nullable"`
Zdr bool `json:"zdr"`
JSON aiGatewayUpdateResponseJSON `json:"-"`
}

Expand Down Expand Up @@ -490,6 +493,7 @@ type aiGatewayUpdateResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -747,6 +751,7 @@ type AIGatewayListResponse struct {
Otel []AIGatewayListResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayListResponseStripe `json:"stripe,nullable"`
Zdr bool `json:"zdr"`
JSON aiGatewayListResponseJSON `json:"-"`
}

Expand Down Expand Up @@ -774,6 +779,7 @@ type aiGatewayListResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -1031,6 +1037,7 @@ type AIGatewayDeleteResponse struct {
Otel []AIGatewayDeleteResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayDeleteResponseStripe `json:"stripe,nullable"`
Zdr bool `json:"zdr"`
JSON aiGatewayDeleteResponseJSON `json:"-"`
}

Expand Down Expand Up @@ -1058,6 +1065,7 @@ type aiGatewayDeleteResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -1315,6 +1323,7 @@ type AIGatewayGetResponse struct {
Otel []AIGatewayGetResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayGetResponseStripe `json:"stripe,nullable"`
Zdr bool `json:"zdr"`
JSON aiGatewayGetResponseJSON `json:"-"`
}

Expand Down Expand Up @@ -1342,6 +1351,7 @@ type aiGatewayGetResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -1590,6 +1600,7 @@ type AIGatewayNewParams struct {
LogManagementStrategy param.Field[AIGatewayNewParamsLogManagementStrategy] `json:"log_management_strategy"`
Logpush param.Field[bool] `json:"logpush"`
LogpushPublicKey param.Field[string] `json:"logpush_public_key"`
Zdr param.Field[bool] `json:"zdr"`
}

func (r AIGatewayNewParams) MarshalJSON() (data []byte, err error) {
Expand Down Expand Up @@ -1666,6 +1677,7 @@ type AIGatewayUpdateParams struct {
Otel param.Field[[]AIGatewayUpdateParamsOtel] `json:"otel"`
StoreID param.Field[string] `json:"store_id"`
Stripe param.Field[AIGatewayUpdateParamsStripe] `json:"stripe"`
Zdr param.Field[bool] `json:"zdr"`
}

func (r AIGatewayUpdateParams) MarshalJSON() (data []byte, err error) {
Expand Down
2 changes: 2 additions & 0 deletions ai_gateway/aigateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func TestAIGatewayNewWithOptionalParams(t *testing.T) {
LogManagementStrategy: cloudflare.F(ai_gateway.AIGatewayNewParamsLogManagementStrategyStopInserting),
Logpush: cloudflare.F(true),
LogpushPublicKey: cloudflare.F("xxxxxxxxxxxxxxxx"),
Zdr: cloudflare.F(true),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down Expand Up @@ -99,6 +100,7 @@ func TestAIGatewayUpdateWithOptionalParams(t *testing.T) {
Payload: cloudflare.F("payload"),
}}),
}),
Zdr: cloudflare.F(true),
},
)
if err != nil {
Expand Down
30 changes: 30 additions & 0 deletions ai_search/aisearch.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

package ai_search

import (
"github.com/cloudflare/cloudflare-go/v6/option"
)

// AISearchService contains methods and other services that help with interacting
// with the cloudflare API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewAISearchService] method instead.
type AISearchService struct {
Options []option.RequestOption
Instances *InstanceService
Tokens *TokenService
}

// NewAISearchService generates a new service that applies the given options to
// each request. These options are applied after the parent client's options (if
// there is one), and before any request-specific options.
func NewAISearchService(opts ...option.RequestOption) (r *AISearchService) {
r = &AISearchService{}
r.Options = opts
r.Instances = NewInstanceService(opts...)
r.Tokens = NewTokenService(opts...)
return
}
Loading
Loading