Skip to content
Open
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.3.0"
".": "6.4.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: 1915
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc732ca8d1d7f1c11a1ee579060ddfd8f953a3ad94fd5053056b53370129d040.yml
openapi_spec_hash: a3e1e833dfe13845abd1e2227993a979
config_hash: 6b8d4cb6cfb2bdcc28988fb6e9769676
configured_endpoints: 1931
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d01829c5ff74f82c372d7c132f3c9adcef9a7ac392e1dc7ff431f3397c94b6fb.yml
openapi_spec_hash: 36f226c48f0fda588903ef75a766ccb1
config_hash: bfa05f973c1b1797df33a05f942d5fac
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 6.4.0 (2025-12-02)

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

### Features

* feat(r2_data_catalog): Configure SDKs/Terraform to use R2 Data Catalog routes ([d1b1eab](https://github.com/cloudflare/cloudflare-go/commit/d1b1eab741593d97221a099b07e120cc205999dc))
* feat(silences): add a new alert silencing api ([fbe4969](https://github.com/cloudflare/cloudflare-go/commit/fbe4969d2d8b61c2e8c635543297a04e14435391))


### Chores

* **api:** update composite API spec ([86f0a73](https://github.com/cloudflare/cloudflare-go/commit/86f0a73093fe70cec9766b585281f396ec500c76))

## 6.3.0 (2025-11-19)

Full Changelog: [v6.2.0...v6.3.0](https://github.com/cloudflare/cloudflare-go/compare/v6.2.0...v6.3.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.3.0'
go get -u 'github.com/cloudflare/cloudflare-go/v4@v6.4.0'
```

<!-- x-release-please-end -->
Expand Down
82 changes: 80 additions & 2 deletions abuse_reports/abusereport.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ type AbuseReportListResponseReport struct {
Status AbuseReportListResponseReportsStatus `json:"status,required"`
// The abuse report type
Type AbuseReportListResponseReportsType `json:"type,required"`
JSON abuseReportListResponseReportJSON `json:"-"`
// Justification for the report.
Justification string `json:"justification"`
// Original work / Targeted brand in the alleged abuse.
OriginalWork string `json:"original_work"`
// Information about the submitter of the report.
Submitter AbuseReportListResponseReportsSubmitter `json:"submitter"`
URLs []string `json:"urls"`
JSON abuseReportListResponseReportJSON `json:"-"`
}

// abuseReportListResponseReportJSON contains the JSON metadata for the struct
Expand All @@ -158,6 +165,10 @@ type abuseReportListResponseReportJSON struct {
MitigationSummary apijson.Field
Status apijson.Field
Type apijson.Field
Justification apijson.Field
OriginalWork apijson.Field
Submitter apijson.Field
URLs apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -244,6 +255,34 @@ func (r AbuseReportListResponseReportsType) IsKnown() bool {
return false
}

// Information about the submitter of the report.
type AbuseReportListResponseReportsSubmitter struct {
Company string `json:"company"`
Email string `json:"email"`
Name string `json:"name"`
Telephone string `json:"telephone"`
JSON abuseReportListResponseReportsSubmitterJSON `json:"-"`
}

// abuseReportListResponseReportsSubmitterJSON contains the JSON metadata for the
// struct [AbuseReportListResponseReportsSubmitter]
type abuseReportListResponseReportsSubmitterJSON struct {
Company apijson.Field
Email apijson.Field
Name apijson.Field
Telephone apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AbuseReportListResponseReportsSubmitter) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r abuseReportListResponseReportsSubmitterJSON) RawJSON() string {
return r.raw
}

type AbuseReportGetResponse struct {
// Public facing ID of abuse report, aka abuse_rand.
ID string `json:"id,required"`
Expand All @@ -258,7 +297,14 @@ type AbuseReportGetResponse struct {
Status AbuseReportGetResponseStatus `json:"status,required"`
// The abuse report type
Type AbuseReportGetResponseType `json:"type,required"`
JSON abuseReportGetResponseJSON `json:"-"`
// Justification for the report.
Justification string `json:"justification"`
// Original work / Targeted brand in the alleged abuse.
OriginalWork string `json:"original_work"`
// Information about the submitter of the report.
Submitter AbuseReportGetResponseSubmitter `json:"submitter"`
URLs []string `json:"urls"`
JSON abuseReportGetResponseJSON `json:"-"`
}

// abuseReportGetResponseJSON contains the JSON metadata for the struct
Expand All @@ -270,6 +316,10 @@ type abuseReportGetResponseJSON struct {
MitigationSummary apijson.Field
Status apijson.Field
Type apijson.Field
Justification apijson.Field
OriginalWork apijson.Field
Submitter apijson.Field
URLs apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -356,6 +406,34 @@ func (r AbuseReportGetResponseType) IsKnown() bool {
return false
}

// Information about the submitter of the report.
type AbuseReportGetResponseSubmitter struct {
Company string `json:"company"`
Email string `json:"email"`
Name string `json:"name"`
Telephone string `json:"telephone"`
JSON abuseReportGetResponseSubmitterJSON `json:"-"`
}

// abuseReportGetResponseSubmitterJSON contains the JSON metadata for the struct
// [AbuseReportGetResponseSubmitter]
type abuseReportGetResponseSubmitterJSON struct {
Company apijson.Field
Email apijson.Field
Name apijson.Field
Telephone apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AbuseReportGetResponseSubmitter) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r abuseReportGetResponseSubmitterJSON) RawJSON() string {
return r.raw
}

type AbuseReportNewParams struct {
AccountID param.Field[string] `path:"account_id,required"`
Body AbuseReportNewParamsBodyUnion `json:"body,required"`
Expand Down
29 changes: 14 additions & 15 deletions accounts/logaudit.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ type LogAuditListParams struct {
// date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
// conforms to RFC3339.
Since param.Field[time.Time] `query:"since,required" format:"date"`
ID param.Field[LogAuditListParamsID] `query:"id"`
AccountName param.Field[LogAuditListParamsAccountName] `query:"account_name"`
ActionResult param.Field[LogAuditListParamsActionResult] `query:"action_result"`
ActionType param.Field[LogAuditListParamsActionType] `query:"action_type"`
Expand All @@ -366,7 +367,6 @@ type LogAuditListParams struct {
ActorTokenID param.Field[LogAuditListParamsActorTokenID] `query:"actor_token_id"`
ActorTokenName param.Field[LogAuditListParamsActorTokenName] `query:"actor_token_name"`
ActorType param.Field[LogAuditListParamsActorType] `query:"actor_type"`
AuditLogID param.Field[LogAuditListParamsAuditLogID] `query:"audit_log_id"`
// The cursor is an opaque token used to paginate through large sets of records. It
// indicates the position from which to continue when requesting the next set of
// records. A valid cursor value can be obtained from the cursor object in the
Expand Down Expand Up @@ -397,6 +397,19 @@ func (r LogAuditListParams) URLQuery() (v url.Values) {
})
}

type LogAuditListParamsID struct {
// Filters out audit logs by their IDs.
Not param.Field[[]string] `query:"not"`
}

// URLQuery serializes [LogAuditListParamsID]'s query parameters as `url.Values`.
func (r LogAuditListParamsID) URLQuery() (v url.Values) {
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
ArrayFormat: apiquery.ArrayQueryFormatRepeat,
NestedFormat: apiquery.NestedQueryFormatDots,
})
}

type LogAuditListParamsAccountName struct {
// Filters out audit logs by the account name.
Not param.Field[[]string] `query:"not"`
Expand Down Expand Up @@ -607,20 +620,6 @@ func (r LogAuditListParamsActorTypeNot) IsKnown() bool {
return false
}

type LogAuditListParamsAuditLogID struct {
// Filters out audit logs by their IDs.
Not param.Field[[]string] `query:"not"`
}

// URLQuery serializes [LogAuditListParamsAuditLogID]'s query parameters as
// `url.Values`.
func (r LogAuditListParamsAuditLogID) URLQuery() (v url.Values) {
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
ArrayFormat: apiquery.ArrayQueryFormatRepeat,
NestedFormat: apiquery.NestedQueryFormatDots,
})
}

// Sets sorting order.
type LogAuditListParamsDirection string

Expand Down
6 changes: 3 additions & 3 deletions accounts/logaudit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
AccountID: cloudflare.F("a67e14daa5f8dceeb91fe5449ba496ef"),
Before: cloudflare.F(time.Now()),
Since: cloudflare.F(time.Now()),
ID: cloudflare.F(accounts.LogAuditListParamsID{
Not: cloudflare.F([]string{"f174be97-19b1-40d6-954d-70cd5fbd52db"}),
}),
AccountName: cloudflare.F(accounts.LogAuditListParamsAccountName{
Not: cloudflare.F([]string{"string"}),
}),
Expand Down Expand Up @@ -60,12 +63,9 @@
ActorTokenName: cloudflare.F(accounts.LogAuditListParamsActorTokenName{
Not: cloudflare.F([]string{"Test Token"}),
}),
ActorType: cloudflare.F(accounts.LogAuditListParamsActorType{

Check failure on line 66 in accounts/logaudit_test.go

View workflow job for this annotation

GitHub Actions / detect-breaking-changes

undefined: accounts.LogAuditListParamsAuditLogID

Check failure on line 66 in accounts/logaudit_test.go

View workflow job for this annotation

GitHub Actions / detect-breaking-changes

unknown field AuditLogID in struct literal of type accounts.LogAuditListParams
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
2 changes: 2 additions & 0 deletions alerting/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type AlertingService struct {
Destinations *DestinationService
History *HistoryService
Policies *PolicyService
Silences *SilenceService
}

// NewAlertingService generates a new service that applies the given options to
Expand All @@ -30,5 +31,6 @@ func NewAlertingService(opts ...option.RequestOption) (r *AlertingService) {
r.Destinations = NewDestinationService(opts...)
r.History = NewHistoryService(opts...)
r.Policies = NewPolicyService(opts...)
r.Silences = NewSilenceService(opts...)
return
}
Loading
Loading