Skip to content

Commit a3a1e0e

Browse files
release: 4.4.0 (#4158)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 1219741 commit a3a1e0e

File tree

227 files changed

+15387
-7542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+15387
-7542
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.3.0"
2+
".": "4.4.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1713
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-40991506ce58ce957e8a66e67a3ea0ce30eb6a573c30addc2a60a80ea6b378b8.yml
3-
openapi_spec_hash: 49aee83e2c8c51d02a2bf4c62d70b3c0
4-
config_hash: f3d6fe4927a7690f10f9599be1feaede
1+
configured_endpoints: 1739
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-845f804141f01edfcce598436ef1e94b17a4281624186c9728108732936bcb5a.yml
3+
openapi_spec_hash: 71b329a117f0bfc0378e1ce68fab7874
4+
config_hash: 3d9fadb4356418193954f0f70e6f47f9

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog
22

3+
## 4.4.0 (2025-05-16)
4+
5+
Full Changelog: [v4.3.0...v4.4.0](https://github.com/cloudflare/cloudflare-go/compare/v4.3.0...v4.4.0)
6+
7+
### Features
8+
9+
* **api:** api update ([aae9064](https://github.com/cloudflare/cloudflare-go/commit/aae90647b3d9509a6725a8d482ea3a6554e20034))
10+
* **api:** api update ([ac52226](https://github.com/cloudflare/cloudflare-go/commit/ac52226636bc69a42c4aa690a9daa7f34ac1ca47))
11+
* **api:** api update ([4fee36a](https://github.com/cloudflare/cloudflare-go/commit/4fee36a42d9d2ef04fa4b74fee187e5f13d66756))
12+
* **api:** api update ([91dd616](https://github.com/cloudflare/cloudflare-go/commit/91dd616d0ab27b7885a502a3a3918e7c3b635e60))
13+
* **api:** api update ([dcb22b4](https://github.com/cloudflare/cloudflare-go/commit/dcb22b44ced1f0669cc92bb8cf50063e4d6bf869))
14+
* **api:** api update ([c855087](https://github.com/cloudflare/cloudflare-go/commit/c855087ab3f224b54a30e1e120a7135a6e974226))
15+
* **api:** api update ([506f9d7](https://github.com/cloudflare/cloudflare-go/commit/506f9d7526a243eed8b7c3c84f336e40616c4879))
16+
* **api:** api update ([afdc867](https://github.com/cloudflare/cloudflare-go/commit/afdc867fd894a5c3a37c1a132ac2f61be4ce4089))
17+
* **api:** api update ([90a4553](https://github.com/cloudflare/cloudflare-go/commit/90a4553d8eb20f99457ddf0771455fa4fbfc3efa))
18+
* **api:** api update ([ddd85b6](https://github.com/cloudflare/cloudflare-go/commit/ddd85b646be6ae4320f2cca99b1bb919319f9c1b))
19+
* **api:** api update ([44e5806](https://github.com/cloudflare/cloudflare-go/commit/44e5806b24d47f0466bd99221394d97ce8e3832a))
20+
* **api:** manual updates ([90ff208](https://github.com/cloudflare/cloudflare-go/commit/90ff2085403626841617348463bd7181ccbaa0dc))
21+
* **api:** manual updates ([5c00227](https://github.com/cloudflare/cloudflare-go/commit/5c00227fc28d67e34d7b1036f45a58bb3553ac49))
22+
* **client:** add support for endpoint-specific base URLs in python ([f59c493](https://github.com/cloudflare/cloudflare-go/commit/f59c49347d6618b71d7a327b8ae5e111e47c53d3))
23+
* **device_settings:** swap list to get endpoint ([60da729](https://github.com/cloudflare/cloudflare-go/commit/60da7299c51d2adb348b56d920e0871257b5ba99))
24+
* **schema_validation:** add mapped endpoints ([f069836](https://github.com/cloudflare/cloudflare-go/commit/f0698366b4777148de63821a4566b7bbc0575e20))
25+
26+
27+
### Bug Fixes
28+
29+
* **api:** fix path placeholders ([b915548](https://github.com/cloudflare/cloudflare-go/commit/b91554891e38b4fa490e3a0a2d2bcb1ead3cf325))
30+
* **client:** clean up reader resources ([cf6bee7](https://github.com/cloudflare/cloudflare-go/commit/cf6bee715a5d53aac97bc7b410d275179ae69901))
31+
* **client:** correctly update body in WithJSONSet ([f464861](https://github.com/cloudflare/cloudflare-go/commit/f464861c2663b588f8611311e4c8ba9470c85420))
32+
* **client:** remove shared import ([a684ed7](https://github.com/cloudflare/cloudflare-go/commit/a684ed735ba24c78fea1d83fa656ea1e7feffed5))
33+
* **urlscanner:** don't unwwrap scan response ([0b12408](https://github.com/cloudflare/cloudflare-go/commit/0b12408c0d0605d3b55b86f528290aa27061f73c))
34+
335
## 4.3.0 (2025-05-05)
436

537
Full Changelog: [v4.2.0...v4.3.0](https://github.com/cloudflare/cloudflare-go/compare/v4.2.0...v4.3.0)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Or to pin the version:
2222
<!-- x-release-please-start-version -->
2323

2424
```sh
25-
go get -u 'github.com/cloudflare/cloudflare-go/v4@v4.3.0'
25+
go get -u 'github.com/cloudflare/cloudflare-go/v4@v4.4.0'
2626
```
2727

2828
<!-- x-release-please-end -->

accounts/account.go

Lines changed: 6 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -170,44 +170,18 @@ func (r accountJSON) RawJSON() string {
170170
type AccountSettings struct {
171171
// Sets an abuse contact email to notify for abuse reports.
172172
AbuseContactEmail string `json:"abuse_contact_email"`
173-
// Specifies the default nameservers to be used for new zones added to this
174-
// account.
175-
//
176-
// - `cloudflare.standard` for Cloudflare-branded nameservers
177-
// - `custom.account` for account custom nameservers
178-
// - `custom.tenant` for tenant custom nameservers
179-
//
180-
// See
181-
// [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)
182-
// for more information.
183-
//
184-
// Deprecated in favor of
185-
// [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
186-
//
187-
// Deprecated: deprecated
188-
DefaultNameservers AccountSettingsDefaultNameservers `json:"default_nameservers"`
189173
// Indicates whether membership in this account requires that Two-Factor
190174
// Authentication is enabled
191-
EnforceTwofactor bool `json:"enforce_twofactor"`
192-
// Indicates whether new zones should use the account-level custom nameservers by
193-
// default.
194-
//
195-
// Deprecated in favor of
196-
// [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
197-
//
198-
// Deprecated: deprecated
199-
UseAccountCustomNSByDefault bool `json:"use_account_custom_ns_by_default"`
200-
JSON accountSettingsJSON `json:"-"`
175+
EnforceTwofactor bool `json:"enforce_twofactor"`
176+
JSON accountSettingsJSON `json:"-"`
201177
}
202178

203179
// accountSettingsJSON contains the JSON metadata for the struct [AccountSettings]
204180
type accountSettingsJSON struct {
205-
AbuseContactEmail apijson.Field
206-
DefaultNameservers apijson.Field
207-
EnforceTwofactor apijson.Field
208-
UseAccountCustomNSByDefault apijson.Field
209-
raw string
210-
ExtraFields map[string]apijson.Field
181+
AbuseContactEmail apijson.Field
182+
EnforceTwofactor apijson.Field
183+
raw string
184+
ExtraFields map[string]apijson.Field
211185
}
212186

213187
func (r *AccountSettings) UnmarshalJSON(data []byte) (err error) {
@@ -218,35 +192,6 @@ func (r accountSettingsJSON) RawJSON() string {
218192
return r.raw
219193
}
220194

221-
// Specifies the default nameservers to be used for new zones added to this
222-
// account.
223-
//
224-
// - `cloudflare.standard` for Cloudflare-branded nameservers
225-
// - `custom.account` for account custom nameservers
226-
// - `custom.tenant` for tenant custom nameservers
227-
//
228-
// See
229-
// [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)
230-
// for more information.
231-
//
232-
// Deprecated in favor of
233-
// [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
234-
type AccountSettingsDefaultNameservers string
235-
236-
const (
237-
AccountSettingsDefaultNameserversCloudflareStandard AccountSettingsDefaultNameservers = "cloudflare.standard"
238-
AccountSettingsDefaultNameserversCustomAccount AccountSettingsDefaultNameservers = "custom.account"
239-
AccountSettingsDefaultNameserversCustomTenant AccountSettingsDefaultNameservers = "custom.tenant"
240-
)
241-
242-
func (r AccountSettingsDefaultNameservers) IsKnown() bool {
243-
switch r {
244-
case AccountSettingsDefaultNameserversCloudflareStandard, AccountSettingsDefaultNameserversCustomAccount, AccountSettingsDefaultNameserversCustomTenant:
245-
return true
246-
}
247-
return false
248-
}
249-
250195
type AccountParam struct {
251196
// Account name
252197
Name param.Field[string] `json:"name,required"`
@@ -262,33 +207,9 @@ func (r AccountParam) MarshalJSON() (data []byte, err error) {
262207
type AccountSettingsParam struct {
263208
// Sets an abuse contact email to notify for abuse reports.
264209
AbuseContactEmail param.Field[string] `json:"abuse_contact_email"`
265-
// Specifies the default nameservers to be used for new zones added to this
266-
// account.
267-
//
268-
// - `cloudflare.standard` for Cloudflare-branded nameservers
269-
// - `custom.account` for account custom nameservers
270-
// - `custom.tenant` for tenant custom nameservers
271-
//
272-
// See
273-
// [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)
274-
// for more information.
275-
//
276-
// Deprecated in favor of
277-
// [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
278-
//
279-
// Deprecated: deprecated
280-
DefaultNameservers param.Field[AccountSettingsDefaultNameservers] `json:"default_nameservers"`
281210
// Indicates whether membership in this account requires that Two-Factor
282211
// Authentication is enabled
283212
EnforceTwofactor param.Field[bool] `json:"enforce_twofactor"`
284-
// Indicates whether new zones should use the account-level custom nameservers by
285-
// default.
286-
//
287-
// Deprecated in favor of
288-
// [DNS Settings](https://developers.cloudflare.com/api/operations/dns-settings-for-an-account-update-dns-settings).
289-
//
290-
// Deprecated: deprecated
291-
UseAccountCustomNSByDefault param.Field[bool] `json:"use_account_custom_ns_by_default"`
292213
}
293214

294215
func (r AccountSettingsParam) MarshalJSON() (data []byte, err error) {

accounts/account_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ func TestAccountUpdateWithOptionalParams(t *testing.T) {
6161
Account: accounts.AccountParam{
6262
Name: cloudflare.F("Demo Account"),
6363
Settings: cloudflare.F(accounts.AccountSettingsParam{
64-
AbuseContactEmail: cloudflare.F("abuse_contact_email"),
65-
DefaultNameservers: cloudflare.F(accounts.AccountSettingsDefaultNameserversCloudflareStandard),
66-
EnforceTwofactor: cloudflare.F(true),
67-
UseAccountCustomNSByDefault: cloudflare.F(true),
64+
AbuseContactEmail: cloudflare.F("abuse_contact_email"),
65+
EnforceTwofactor: cloudflare.F(true),
6866
}),
6967
},
7068
})

ai/ai.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,12 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam
7575

7676
// An array of classification results for the input text
7777
//
78-
// Union satisfied by [ai.AIRunResponseTextClassification], [shared.UnionString],
79-
// [ai.AIRunResponseAudio], [ai.AIRunResponseTextEmbeddings],
80-
// [ai.AIRunResponseAutomaticSpeechRecognition],
81-
// [ai.AIRunResponseImageClassification], [ai.AIRunResponseObjectDetection],
82-
// [ai.AIRunResponseObject], [ai.AIRunResponseTranslation],
83-
// [ai.AIRunResponseSummarization], [ai.AIRunResponseImageToText] or
84-
// [ai.AIRunResponseImageTextToText].
78+
// Union satisfied by [AIRunResponseTextClassification], [shared.UnionString],
79+
// [AIRunResponseAudio], [AIRunResponseTextEmbeddings],
80+
// [AIRunResponseAutomaticSpeechRecognition], [AIRunResponseImageClassification],
81+
// [AIRunResponseObjectDetection], [AIRunResponseObject],
82+
// [AIRunResponseTranslation], [AIRunResponseSummarization],
83+
// [AIRunResponseImageToText] or [AIRunResponseImageTextToText].
8584
type AIRunResponseUnion interface {
8685
ImplementsAIRunResponseUnion()
8786
}

0 commit comments

Comments
 (0)