Skip to content

Commit 3a0bb65

Browse files
release: 2.0.0-beta.15 (#1614)
* feat(api): update via SDK Studio (#1613) * release: 2.0.0-beta.15 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent f29893e commit 3a0bb65

File tree

125 files changed

+671
-678
lines changed

Some content is hidden

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

125 files changed

+671
-678
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-
".": "2.0.0-beta.14"
2+
".": "2.0.0-beta.15"
33
}

CHANGELOG.md

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

3+
## 2.0.0-beta.15 (2024-03-26)
4+
5+
Full Changelog: [v2.0.0-beta.14...v2.0.0-beta.15](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.14...v2.0.0-beta.15)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([#1613](https://github.com/cloudflare/cloudflare-go/issues/1613)) ([e4a1ad5](https://github.com/cloudflare/cloudflare-go/commit/e4a1ad5bb5039657b02cd97f6e00a7e2cc887b09))
10+
311
## 2.0.0-beta.14 (2024-03-25)
412

513
Full Changelog: [v2.0.0-beta.13...v2.0.0-beta.14](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.13...v2.0.0-beta.14)

README.md

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

2626
```sh
27-
go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.14'
27+
go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.15'
2828
```
2929

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

api.md

Lines changed: 51 additions & 55 deletions
Large diffs are not rendered by default.

d1/database.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (r *DatabaseService) Query(ctx context.Context, accountIdentifier string, d
112112

113113
type D1CreateDatabase struct {
114114
// Specifies the timestamp the resource was created as an ISO8601 string.
115-
CreatedAt interface{} `json:"created_at"`
115+
CreatedAt string `json:"created_at"`
116116
Name string `json:"name"`
117117
UUID string `json:"uuid"`
118118
Version string `json:"version"`
@@ -140,7 +140,7 @@ func (r d1CreateDatabaseJSON) RawJSON() string {
140140

141141
type D1DatabaseDetails struct {
142142
// Specifies the timestamp the resource was created as an ISO8601 string.
143-
CreatedAt interface{} `json:"created_at"`
143+
CreatedAt string `json:"created_at"`
144144
// The D1 database's size, in bytes.
145145
FileSize float64 `json:"file_size"`
146146
Name string `json:"name"`

dns/record.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ func (r DNSRecordNAPTRTTLNumber) IsKnown() bool {
22292229

22302230
type DNSRecordNS struct {
22312231
// A valid name server host name.
2232-
Content interface{} `json:"content,required"`
2232+
Content string `json:"content,required"`
22332233
// DNS record name (or @ for the zone apex) in Punycode.
22342234
Name string `json:"name,required"`
22352235
// Record type.
@@ -4807,7 +4807,7 @@ type RecordNewParamsDNSRecordsNSRecord struct {
48074807
// Identifier
48084808
ZoneID param.Field[string] `path:"zone_id,required"`
48094809
// A valid name server host name.
4810-
Content param.Field[interface{}] `json:"content,required"`
4810+
Content param.Field[string] `json:"content,required"`
48114811
// DNS record name (or @ for the zone apex) in Punycode.
48124812
Name param.Field[string] `json:"name,required"`
48134813
// Record type.
@@ -6618,7 +6618,7 @@ type RecordUpdateParamsDNSRecordsNSRecord struct {
66186618
// Identifier
66196619
ZoneID param.Field[string] `path:"zone_id,required"`
66206620
// A valid name server host name.
6621-
Content param.Field[interface{}] `json:"content,required"`
6621+
Content param.Field[string] `json:"content,required"`
66226622
// DNS record name (or @ for the zone apex) in Punycode.
66236623
Name param.Field[string] `json:"name,required"`
66246624
// Record type.
@@ -8661,7 +8661,7 @@ type RecordEditParamsDNSRecordsNSRecord struct {
86618661
// Identifier
86628662
ZoneID param.Field[string] `path:"zone_id,required"`
86638663
// A valid name server host name.
8664-
Content param.Field[interface{}] `json:"content,required"`
8664+
Content param.Field[string] `json:"content,required"`
86658665
// DNS record name (or @ for the zone apex) in Punycode.
86668666
Name param.Field[string] `json:"name,required"`
86678667
// Record type.

firewall/wafoverride.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ func (r legacyJhsOverrideJSON) RawJSON() string {
188188
type LegacyJhsOverrideRewriteAction struct {
189189
// The WAF rule action to apply.
190190
Block LegacyJhsOverrideRewriteActionBlock `json:"block"`
191-
Challenge interface{} `json:"challenge"`
192-
Default interface{} `json:"default"`
191+
Challenge string `json:"challenge"`
192+
Default string `json:"default"`
193193
// The WAF rule action to apply.
194194
Disable LegacyJhsOverrideRewriteActionDisable `json:"disable"`
195-
Simulate interface{} `json:"simulate"`
195+
Simulate string `json:"simulate"`
196196
JSON legacyJhsOverrideRewriteActionJSON `json:"-"`
197197
}
198198

hostnames/settingtls.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ type TLSCertificatesAndHostnamesSettingObjectDelete struct {
143143
// This is the time the tls setting was originally created for this hostname.
144144
CreatedAt time.Time `json:"created_at" format:"date-time"`
145145
// The hostname for which the tls settings are set.
146-
Hostname string `json:"hostname"`
147-
Status interface{} `json:"status"`
146+
Hostname string `json:"hostname"`
147+
Status string `json:"status"`
148148
// This is the time the tls setting was updated.
149149
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
150-
Value interface{} `json:"value"`
150+
Value string `json:"value"`
151151
JSON tlsCertificatesAndHostnamesSettingObjectDeleteJSON `json:"-"`
152152
}
153153

images/v1key.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ func NewV1KeyService(opts ...option.RequestOption) (r *V1KeyService) {
3131
}
3232

3333
// Create a new signing key with specified name. Returns all keys available.
34-
func (r *V1KeyService) Update(ctx context.Context, signingKeyName interface{}, body V1KeyUpdateParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) {
34+
func (r *V1KeyService) Update(ctx context.Context, signingKeyName string, body V1KeyUpdateParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) {
3535
opts = append(r.Options[:], opts...)
3636
var env V1KeyUpdateResponseEnvelope
37-
path := fmt.Sprintf("accounts/%s/images/v1/keys/%v", body.AccountID, signingKeyName)
37+
path := fmt.Sprintf("accounts/%s/images/v1/keys/%s", body.AccountID, signingKeyName)
3838
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...)
3939
if err != nil {
4040
return
@@ -58,10 +58,10 @@ func (r *V1KeyService) List(ctx context.Context, query V1KeyListParams, opts ...
5858

5959
// Delete signing key with specified name. Returns all keys available. When last
6060
// key is removed, a new default signing key will be generated.
61-
func (r *V1KeyService) Delete(ctx context.Context, signingKeyName interface{}, body V1KeyDeleteParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) {
61+
func (r *V1KeyService) Delete(ctx context.Context, signingKeyName string, body V1KeyDeleteParams, opts ...option.RequestOption) (res *ImagesImageKeys, err error) {
6262
opts = append(r.Options[:], opts...)
6363
var env V1KeyDeleteResponseEnvelope
64-
path := fmt.Sprintf("accounts/%s/images/v1/keys/%v", body.AccountID, signingKeyName)
64+
path := fmt.Sprintf("accounts/%s/images/v1/keys/%s", body.AccountID, signingKeyName)
6565
err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
6666
if err != nil {
6767
return

images/v1key_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestV1KeyUpdate(t *testing.T) {
3030
)
3131
_, err := client.Images.V1.Keys.Update(
3232
context.TODO(),
33-
"someKey",
33+
"string",
3434
images.V1KeyUpdateParams{
3535
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
3636
},
@@ -86,7 +86,7 @@ func TestV1KeyDelete(t *testing.T) {
8686
)
8787
_, err := client.Images.V1.Keys.Delete(
8888
context.TODO(),
89-
"someKey",
89+
"string",
9090
images.V1KeyDeleteParams{
9191
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
9292
},

images/v1variant.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ func (r *V1VariantService) List(ctx context.Context, query V1VariantListParams,
6060
}
6161

6262
// Deleting a variant purges the cache for all images associated with the variant.
63-
func (r *V1VariantService) Delete(ctx context.Context, variantID interface{}, body V1VariantDeleteParams, opts ...option.RequestOption) (res *V1VariantDeleteResponse, err error) {
63+
func (r *V1VariantService) Delete(ctx context.Context, variantID string, body V1VariantDeleteParams, opts ...option.RequestOption) (res *V1VariantDeleteResponse, err error) {
6464
opts = append(r.Options[:], opts...)
6565
var env V1VariantDeleteResponseEnvelope
66-
path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", body.AccountID, variantID)
66+
path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", body.AccountID, variantID)
6767
err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
6868
if err != nil {
6969
return
@@ -73,10 +73,10 @@ func (r *V1VariantService) Delete(ctx context.Context, variantID interface{}, bo
7373
}
7474

7575
// Updating a variant purges the cache for all images associated with the variant.
76-
func (r *V1VariantService) Edit(ctx context.Context, variantID interface{}, params V1VariantEditParams, opts ...option.RequestOption) (res *ImageVariant, err error) {
76+
func (r *V1VariantService) Edit(ctx context.Context, variantID string, params V1VariantEditParams, opts ...option.RequestOption) (res *ImageVariant, err error) {
7777
opts = append(r.Options[:], opts...)
7878
var env V1VariantEditResponseEnvelope
79-
path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", params.AccountID, variantID)
79+
path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", params.AccountID, variantID)
8080
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...)
8181
if err != nil {
8282
return
@@ -86,10 +86,10 @@ func (r *V1VariantService) Edit(ctx context.Context, variantID interface{}, para
8686
}
8787

8888
// Fetch details for a single variant.
89-
func (r *V1VariantService) Get(ctx context.Context, variantID interface{}, query V1VariantGetParams, opts ...option.RequestOption) (res *ImageVariant, err error) {
89+
func (r *V1VariantService) Get(ctx context.Context, variantID string, query V1VariantGetParams, opts ...option.RequestOption) (res *ImageVariant, err error) {
9090
opts = append(r.Options[:], opts...)
9191
var env V1VariantGetResponseEnvelope
92-
path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", query.AccountID, variantID)
92+
path := fmt.Sprintf("accounts/%s/images/v1/variants/%s", query.AccountID, variantID)
9393
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
9494
if err != nil {
9595
return
@@ -119,7 +119,7 @@ func (r imageVariantJSON) RawJSON() string {
119119
}
120120

121121
type ImageVariantVariant struct {
122-
ID interface{} `json:"id,required"`
122+
ID string `json:"id,required"`
123123
// Allows you to define image resizing sizes for different use cases.
124124
Options ImageVariantVariantOptions `json:"options,required"`
125125
// Indicates whether the variant can access an image without a signature,
@@ -258,7 +258,7 @@ func (r imageVariantsVariantsJSON) RawJSON() string {
258258
}
259259

260260
type ImageVariantsVariantsHero struct {
261-
ID interface{} `json:"id,required"`
261+
ID string `json:"id,required"`
262262
// Allows you to define image resizing sizes for different use cases.
263263
Options ImageVariantsVariantsHeroOptions `json:"options,required"`
264264
// Indicates whether the variant can access an image without a signature,
@@ -374,8 +374,8 @@ func init() {
374374

375375
type V1VariantNewParams struct {
376376
// Account identifier tag.
377-
AccountID param.Field[string] `path:"account_id,required"`
378-
ID param.Field[interface{}] `json:"id,required"`
377+
AccountID param.Field[string] `path:"account_id,required"`
378+
ID param.Field[string] `json:"id,required"`
379379
// Allows you to define image resizing sizes for different use cases.
380380
Options param.Field[V1VariantNewParamsOptions] `json:"options,required"`
381381
// Indicates whether the variant can access an image without a signature,

images/v1variant_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestV1VariantNewWithOptionalParams(t *testing.T) {
3030
)
3131
_, err := client.Images.V1.Variants.New(context.TODO(), images.V1VariantNewParams{
3232
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
33-
ID: cloudflare.F[any]("hero"),
33+
ID: cloudflare.F("string"),
3434
Options: cloudflare.F(images.V1VariantNewParamsOptions{
3535
Fit: cloudflare.F(images.V1VariantNewParamsOptionsFitScaleDown),
3636
Height: cloudflare.F(768.000000),
@@ -90,7 +90,7 @@ func TestV1VariantDelete(t *testing.T) {
9090
)
9191
_, err := client.Images.V1.Variants.Delete(
9292
context.TODO(),
93-
"hero",
93+
"string",
9494
images.V1VariantDeleteParams{
9595
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
9696
},
@@ -120,7 +120,7 @@ func TestV1VariantEditWithOptionalParams(t *testing.T) {
120120
)
121121
_, err := client.Images.V1.Variants.Edit(
122122
context.TODO(),
123-
"hero",
123+
"string",
124124
images.V1VariantEditParams{
125125
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
126126
Options: cloudflare.F(images.V1VariantEditParamsOptions{
@@ -157,7 +157,7 @@ func TestV1VariantGet(t *testing.T) {
157157
)
158158
_, err := client.Images.V1.Variants.Get(
159159
context.TODO(),
160-
"hero",
160+
"string",
161161
images.V1VariantGetParams{
162162
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
163163
},

intel/domain.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type IntelDomain struct {
5353
// Application that the hostname belongs to.
5454
Application IntelDomainApplication `json:"application"`
5555
// Current content categories.
56-
ContentCategories interface{} `json:"content_categories"`
56+
ContentCategories []interface{} `json:"content_categories"`
5757
Domain string `json:"domain"`
5858
InheritedContentCategories []IntelDomainInheritedContentCategory `json:"inherited_content_categories"`
5959
// Domain from which `inherited_content_categories` and `inherited_risk_types` are
@@ -69,7 +69,7 @@ type IntelDomain struct {
6969
// Hostname risk score, which is a value between 0 (lowest risk) to 1 (highest
7070
// risk).
7171
RiskScore float64 `json:"risk_score"`
72-
RiskTypes interface{} `json:"risk_types"`
72+
RiskTypes []interface{} `json:"risk_types"`
7373
JSON intelDomainJSON `json:"-"`
7474
}
7575

intel/domainbulk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type DomainBulkGetResponse struct {
5151
// Application that the hostname belongs to.
5252
Application DomainBulkGetResponseApplication `json:"application"`
5353
// Current content categories.
54-
ContentCategories interface{} `json:"content_categories"`
54+
ContentCategories []interface{} `json:"content_categories"`
5555
Domain string `json:"domain"`
5656
InheritedContentCategories []DomainBulkGetResponseInheritedContentCategory `json:"inherited_content_categories"`
5757
// Domain from which `inherited_content_categories` and `inherited_risk_types` are
@@ -64,7 +64,7 @@ type DomainBulkGetResponse struct {
6464
// Hostname risk score, which is a value between 0 (lowest risk) to 1 (highest
6565
// risk).
6666
RiskScore float64 `json:"risk_score"`
67-
RiskTypes interface{} `json:"risk_types"`
67+
RiskTypes []interface{} `json:"risk_types"`
6868
JSON domainBulkGetResponseJSON `json:"-"`
6969
}
7070

intel/domainhistory.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (r intelDomainHistoryJSON) RawJSON() string {
7171
}
7272

7373
type IntelDomainHistoryCategorization struct {
74-
Categories interface{} `json:"categories"`
74+
Categories []interface{} `json:"categories"`
7575
End time.Time `json:"end" format:"date"`
7676
Start time.Time `json:"start" format:"date"`
7777
JSON intelDomainHistoryCategorizationJSON `json:"-"`
@@ -97,8 +97,8 @@ func (r intelDomainHistoryCategorizationJSON) RawJSON() string {
9797

9898
type DomainHistoryGetParams struct {
9999
// Identifier
100-
AccountID param.Field[string] `path:"account_id,required"`
101-
Domain param.Field[interface{}] `query:"domain"`
100+
AccountID param.Field[string] `path:"account_id,required"`
101+
Domain param.Field[string] `query:"domain"`
102102
}
103103

104104
// URLQuery serializes [DomainHistoryGetParams]'s query parameters as `url.Values`.

intel/domainhistory_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestDomainHistoryGetWithOptionalParams(t *testing.T) {
3030
)
3131
_, err := client.Intel.DomainHistory.Get(context.TODO(), intel.DomainHistoryGetParams{
3232
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
33-
Domain: cloudflare.F[any]("example.com"),
33+
Domain: cloudflare.F("example.com"),
3434
})
3535
if err != nil {
3636
var apierr *cloudflare.Error

intel/ip.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type IntelSchemasIP struct {
5353
// to.
5454
BelongsToRef IntelSchemasIPBelongsToRef `json:"belongs_to_ref"`
5555
IP IntelSchemasIPIP `json:"ip" format:"ipv4"`
56-
RiskTypes interface{} `json:"risk_types"`
56+
RiskTypes []interface{} `json:"risk_types"`
5757
JSON intelSchemasIPJSON `json:"-"`
5858
}
5959

@@ -77,9 +77,9 @@ func (r intelSchemasIPJSON) RawJSON() string {
7777
// Specifies a reference to the autonomous systems (AS) that the IP address belongs
7878
// to.
7979
type IntelSchemasIPBelongsToRef struct {
80-
ID interface{} `json:"id"`
81-
Country string `json:"country"`
82-
Description string `json:"description"`
80+
ID string `json:"id"`
81+
Country string `json:"country"`
82+
Description string `json:"description"`
8383
// Infrastructure type of this ASN.
8484
Type IntelSchemasIPBelongsToRefType `json:"type"`
8585
Value string `json:"value"`

intel/miscategorization.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ type MiscategorizationNewParams struct {
6868
// Identifier
6969
AccountID param.Field[string] `path:"account_id,required"`
7070
// Content category IDs to add.
71-
ContentAdds param.Field[interface{}] `json:"content_adds"`
71+
ContentAdds param.Field[[]float64] `json:"content_adds"`
7272
// Content category IDs to remove.
73-
ContentRemoves param.Field[interface{}] `json:"content_removes"`
73+
ContentRemoves param.Field[[]float64] `json:"content_removes"`
7474
IndicatorType param.Field[MiscategorizationNewParamsIndicatorType] `json:"indicator_type"`
7575
// Provide only if indicator_type is `ipv4` or `ipv6`.
7676
IP param.Field[interface{}] `json:"ip"`
7777
// Security category IDs to add.
78-
SecurityAdds param.Field[interface{}] `json:"security_adds"`
78+
SecurityAdds param.Field[[]float64] `json:"security_adds"`
7979
// Security category IDs to remove.
80-
SecurityRemoves param.Field[interface{}] `json:"security_removes"`
80+
SecurityRemoves param.Field[[]float64] `json:"security_removes"`
8181
// Provide only if indicator_type is `domain` or `url`. Example if indicator_type
8282
// is `domain`: `example.com`. Example if indicator_type is `url`:
8383
// `https://example.com/news/`.

0 commit comments

Comments
 (0)