Skip to content

Commit f7cc141

Browse files
feat(api): api update
1 parent bee2925 commit f7cc141

File tree

9 files changed

+797
-35
lines changed

9 files changed

+797
-35
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1752
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f801f95f633b797f0b67cbf842b5bf4ccc62c59d990ef48cafa5a4598bf3bbe4.yml
3-
openapi_spec_hash: 7eaafea439b3d08227ce856926020268
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3ec6a50514bd47671aa3d5f9999af51a1dd5eedf5cf179e004f280e9e817f0ec.yml
3+
openapi_spec_hash: f6c29452ed5232054bfb2689ad4b88be
44
config_hash: 8f5aab183b4a8e0f4a9ec9c0293b54f1

zaraz/config.go

Lines changed: 198 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,7 @@ func (r configurationConsentPurposesWithTranslationJSON) RawJSON() string {
22382238
}
22392239

22402240
type ConfigUpdateParams struct {
2241-
// Identifier
2241+
// Identifier.
22422242
ZoneID param.Field[string] `path:"zone_id,required"`
22432243
// Data layer compatibility mode enabled.
22442244
DataLayer param.Field[bool] `json:"dataLayer,required"`
@@ -3393,8 +3393,8 @@ func (r ConfigUpdateParamsConsentPurposesWithTranslations) MarshalJSON() (data [
33933393
}
33943394

33953395
type ConfigUpdateResponseEnvelope struct {
3396-
Errors []shared.ResponseInfo `json:"errors,required"`
3397-
Messages []shared.ResponseInfo `json:"messages,required"`
3396+
Errors []ConfigUpdateResponseEnvelopeErrors `json:"errors,required"`
3397+
Messages []ConfigUpdateResponseEnvelopeMessages `json:"messages,required"`
33983398
// Zaraz configuration
33993399
Result Configuration `json:"result,required"`
34003400
// Whether the API call was successful
@@ -3421,14 +3421,110 @@ func (r configUpdateResponseEnvelopeJSON) RawJSON() string {
34213421
return r.raw
34223422
}
34233423

3424+
type ConfigUpdateResponseEnvelopeErrors struct {
3425+
Code int64 `json:"code,required"`
3426+
Message string `json:"message,required"`
3427+
DocumentationURL string `json:"documentation_url"`
3428+
Source ConfigUpdateResponseEnvelopeErrorsSource `json:"source"`
3429+
JSON configUpdateResponseEnvelopeErrorsJSON `json:"-"`
3430+
}
3431+
3432+
// configUpdateResponseEnvelopeErrorsJSON contains the JSON metadata for the struct
3433+
// [ConfigUpdateResponseEnvelopeErrors]
3434+
type configUpdateResponseEnvelopeErrorsJSON struct {
3435+
Code apijson.Field
3436+
Message apijson.Field
3437+
DocumentationURL apijson.Field
3438+
Source apijson.Field
3439+
raw string
3440+
ExtraFields map[string]apijson.Field
3441+
}
3442+
3443+
func (r *ConfigUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
3444+
return apijson.UnmarshalRoot(data, r)
3445+
}
3446+
3447+
func (r configUpdateResponseEnvelopeErrorsJSON) RawJSON() string {
3448+
return r.raw
3449+
}
3450+
3451+
type ConfigUpdateResponseEnvelopeErrorsSource struct {
3452+
Pointer string `json:"pointer"`
3453+
JSON configUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
3454+
}
3455+
3456+
// configUpdateResponseEnvelopeErrorsSourceJSON contains the JSON metadata for the
3457+
// struct [ConfigUpdateResponseEnvelopeErrorsSource]
3458+
type configUpdateResponseEnvelopeErrorsSourceJSON struct {
3459+
Pointer apijson.Field
3460+
raw string
3461+
ExtraFields map[string]apijson.Field
3462+
}
3463+
3464+
func (r *ConfigUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) {
3465+
return apijson.UnmarshalRoot(data, r)
3466+
}
3467+
3468+
func (r configUpdateResponseEnvelopeErrorsSourceJSON) RawJSON() string {
3469+
return r.raw
3470+
}
3471+
3472+
type ConfigUpdateResponseEnvelopeMessages struct {
3473+
Code int64 `json:"code,required"`
3474+
Message string `json:"message,required"`
3475+
DocumentationURL string `json:"documentation_url"`
3476+
Source ConfigUpdateResponseEnvelopeMessagesSource `json:"source"`
3477+
JSON configUpdateResponseEnvelopeMessagesJSON `json:"-"`
3478+
}
3479+
3480+
// configUpdateResponseEnvelopeMessagesJSON contains the JSON metadata for the
3481+
// struct [ConfigUpdateResponseEnvelopeMessages]
3482+
type configUpdateResponseEnvelopeMessagesJSON struct {
3483+
Code apijson.Field
3484+
Message apijson.Field
3485+
DocumentationURL apijson.Field
3486+
Source apijson.Field
3487+
raw string
3488+
ExtraFields map[string]apijson.Field
3489+
}
3490+
3491+
func (r *ConfigUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
3492+
return apijson.UnmarshalRoot(data, r)
3493+
}
3494+
3495+
func (r configUpdateResponseEnvelopeMessagesJSON) RawJSON() string {
3496+
return r.raw
3497+
}
3498+
3499+
type ConfigUpdateResponseEnvelopeMessagesSource struct {
3500+
Pointer string `json:"pointer"`
3501+
JSON configUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
3502+
}
3503+
3504+
// configUpdateResponseEnvelopeMessagesSourceJSON contains the JSON metadata for
3505+
// the struct [ConfigUpdateResponseEnvelopeMessagesSource]
3506+
type configUpdateResponseEnvelopeMessagesSourceJSON struct {
3507+
Pointer apijson.Field
3508+
raw string
3509+
ExtraFields map[string]apijson.Field
3510+
}
3511+
3512+
func (r *ConfigUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) {
3513+
return apijson.UnmarshalRoot(data, r)
3514+
}
3515+
3516+
func (r configUpdateResponseEnvelopeMessagesSourceJSON) RawJSON() string {
3517+
return r.raw
3518+
}
3519+
34243520
type ConfigGetParams struct {
3425-
// Identifier
3521+
// Identifier.
34263522
ZoneID param.Field[string] `path:"zone_id,required"`
34273523
}
34283524

34293525
type ConfigGetResponseEnvelope struct {
3430-
Errors []shared.ResponseInfo `json:"errors,required"`
3431-
Messages []shared.ResponseInfo `json:"messages,required"`
3526+
Errors []ConfigGetResponseEnvelopeErrors `json:"errors,required"`
3527+
Messages []ConfigGetResponseEnvelopeMessages `json:"messages,required"`
34323528
// Zaraz configuration
34333529
Result Configuration `json:"result,required"`
34343530
// Whether the API call was successful
@@ -3454,3 +3550,99 @@ func (r *ConfigGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
34543550
func (r configGetResponseEnvelopeJSON) RawJSON() string {
34553551
return r.raw
34563552
}
3553+
3554+
type ConfigGetResponseEnvelopeErrors struct {
3555+
Code int64 `json:"code,required"`
3556+
Message string `json:"message,required"`
3557+
DocumentationURL string `json:"documentation_url"`
3558+
Source ConfigGetResponseEnvelopeErrorsSource `json:"source"`
3559+
JSON configGetResponseEnvelopeErrorsJSON `json:"-"`
3560+
}
3561+
3562+
// configGetResponseEnvelopeErrorsJSON contains the JSON metadata for the struct
3563+
// [ConfigGetResponseEnvelopeErrors]
3564+
type configGetResponseEnvelopeErrorsJSON struct {
3565+
Code apijson.Field
3566+
Message apijson.Field
3567+
DocumentationURL apijson.Field
3568+
Source apijson.Field
3569+
raw string
3570+
ExtraFields map[string]apijson.Field
3571+
}
3572+
3573+
func (r *ConfigGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
3574+
return apijson.UnmarshalRoot(data, r)
3575+
}
3576+
3577+
func (r configGetResponseEnvelopeErrorsJSON) RawJSON() string {
3578+
return r.raw
3579+
}
3580+
3581+
type ConfigGetResponseEnvelopeErrorsSource struct {
3582+
Pointer string `json:"pointer"`
3583+
JSON configGetResponseEnvelopeErrorsSourceJSON `json:"-"`
3584+
}
3585+
3586+
// configGetResponseEnvelopeErrorsSourceJSON contains the JSON metadata for the
3587+
// struct [ConfigGetResponseEnvelopeErrorsSource]
3588+
type configGetResponseEnvelopeErrorsSourceJSON struct {
3589+
Pointer apijson.Field
3590+
raw string
3591+
ExtraFields map[string]apijson.Field
3592+
}
3593+
3594+
func (r *ConfigGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) {
3595+
return apijson.UnmarshalRoot(data, r)
3596+
}
3597+
3598+
func (r configGetResponseEnvelopeErrorsSourceJSON) RawJSON() string {
3599+
return r.raw
3600+
}
3601+
3602+
type ConfigGetResponseEnvelopeMessages struct {
3603+
Code int64 `json:"code,required"`
3604+
Message string `json:"message,required"`
3605+
DocumentationURL string `json:"documentation_url"`
3606+
Source ConfigGetResponseEnvelopeMessagesSource `json:"source"`
3607+
JSON configGetResponseEnvelopeMessagesJSON `json:"-"`
3608+
}
3609+
3610+
// configGetResponseEnvelopeMessagesJSON contains the JSON metadata for the struct
3611+
// [ConfigGetResponseEnvelopeMessages]
3612+
type configGetResponseEnvelopeMessagesJSON struct {
3613+
Code apijson.Field
3614+
Message apijson.Field
3615+
DocumentationURL apijson.Field
3616+
Source apijson.Field
3617+
raw string
3618+
ExtraFields map[string]apijson.Field
3619+
}
3620+
3621+
func (r *ConfigGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
3622+
return apijson.UnmarshalRoot(data, r)
3623+
}
3624+
3625+
func (r configGetResponseEnvelopeMessagesJSON) RawJSON() string {
3626+
return r.raw
3627+
}
3628+
3629+
type ConfigGetResponseEnvelopeMessagesSource struct {
3630+
Pointer string `json:"pointer"`
3631+
JSON configGetResponseEnvelopeMessagesSourceJSON `json:"-"`
3632+
}
3633+
3634+
// configGetResponseEnvelopeMessagesSourceJSON contains the JSON metadata for the
3635+
// struct [ConfigGetResponseEnvelopeMessagesSource]
3636+
type configGetResponseEnvelopeMessagesSourceJSON struct {
3637+
Pointer apijson.Field
3638+
raw string
3639+
ExtraFields map[string]apijson.Field
3640+
}
3641+
3642+
func (r *ConfigGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) {
3643+
return apijson.UnmarshalRoot(data, r)
3644+
}
3645+
3646+
func (r configGetResponseEnvelopeMessagesSourceJSON) RawJSON() string {
3647+
return r.raw
3648+
}

zaraz/default.go

Lines changed: 99 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"github.com/cloudflare/cloudflare-go/v4/internal/param"
1313
"github.com/cloudflare/cloudflare-go/v4/internal/requestconfig"
1414
"github.com/cloudflare/cloudflare-go/v4/option"
15-
"github.com/cloudflare/cloudflare-go/v4/shared"
1615
)
1716

1817
// DefaultService contains methods and other services that help with interacting
@@ -52,13 +51,13 @@ func (r *DefaultService) Get(ctx context.Context, query DefaultGetParams, opts .
5251
}
5352

5453
type DefaultGetParams struct {
55-
// Identifier
54+
// Identifier.
5655
ZoneID param.Field[string] `path:"zone_id,required"`
5756
}
5857

5958
type DefaultGetResponseEnvelope struct {
60-
Errors []shared.ResponseInfo `json:"errors,required"`
61-
Messages []shared.ResponseInfo `json:"messages,required"`
59+
Errors []DefaultGetResponseEnvelopeErrors `json:"errors,required"`
60+
Messages []DefaultGetResponseEnvelopeMessages `json:"messages,required"`
6261
// Zaraz configuration
6362
Result Configuration `json:"result,required"`
6463
// Whether the API call was successful
@@ -84,3 +83,99 @@ func (r *DefaultGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
8483
func (r defaultGetResponseEnvelopeJSON) RawJSON() string {
8584
return r.raw
8685
}
86+
87+
type DefaultGetResponseEnvelopeErrors struct {
88+
Code int64 `json:"code,required"`
89+
Message string `json:"message,required"`
90+
DocumentationURL string `json:"documentation_url"`
91+
Source DefaultGetResponseEnvelopeErrorsSource `json:"source"`
92+
JSON defaultGetResponseEnvelopeErrorsJSON `json:"-"`
93+
}
94+
95+
// defaultGetResponseEnvelopeErrorsJSON contains the JSON metadata for the struct
96+
// [DefaultGetResponseEnvelopeErrors]
97+
type defaultGetResponseEnvelopeErrorsJSON struct {
98+
Code apijson.Field
99+
Message apijson.Field
100+
DocumentationURL apijson.Field
101+
Source apijson.Field
102+
raw string
103+
ExtraFields map[string]apijson.Field
104+
}
105+
106+
func (r *DefaultGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
107+
return apijson.UnmarshalRoot(data, r)
108+
}
109+
110+
func (r defaultGetResponseEnvelopeErrorsJSON) RawJSON() string {
111+
return r.raw
112+
}
113+
114+
type DefaultGetResponseEnvelopeErrorsSource struct {
115+
Pointer string `json:"pointer"`
116+
JSON defaultGetResponseEnvelopeErrorsSourceJSON `json:"-"`
117+
}
118+
119+
// defaultGetResponseEnvelopeErrorsSourceJSON contains the JSON metadata for the
120+
// struct [DefaultGetResponseEnvelopeErrorsSource]
121+
type defaultGetResponseEnvelopeErrorsSourceJSON struct {
122+
Pointer apijson.Field
123+
raw string
124+
ExtraFields map[string]apijson.Field
125+
}
126+
127+
func (r *DefaultGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) {
128+
return apijson.UnmarshalRoot(data, r)
129+
}
130+
131+
func (r defaultGetResponseEnvelopeErrorsSourceJSON) RawJSON() string {
132+
return r.raw
133+
}
134+
135+
type DefaultGetResponseEnvelopeMessages struct {
136+
Code int64 `json:"code,required"`
137+
Message string `json:"message,required"`
138+
DocumentationURL string `json:"documentation_url"`
139+
Source DefaultGetResponseEnvelopeMessagesSource `json:"source"`
140+
JSON defaultGetResponseEnvelopeMessagesJSON `json:"-"`
141+
}
142+
143+
// defaultGetResponseEnvelopeMessagesJSON contains the JSON metadata for the struct
144+
// [DefaultGetResponseEnvelopeMessages]
145+
type defaultGetResponseEnvelopeMessagesJSON struct {
146+
Code apijson.Field
147+
Message apijson.Field
148+
DocumentationURL apijson.Field
149+
Source apijson.Field
150+
raw string
151+
ExtraFields map[string]apijson.Field
152+
}
153+
154+
func (r *DefaultGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
155+
return apijson.UnmarshalRoot(data, r)
156+
}
157+
158+
func (r defaultGetResponseEnvelopeMessagesJSON) RawJSON() string {
159+
return r.raw
160+
}
161+
162+
type DefaultGetResponseEnvelopeMessagesSource struct {
163+
Pointer string `json:"pointer"`
164+
JSON defaultGetResponseEnvelopeMessagesSourceJSON `json:"-"`
165+
}
166+
167+
// defaultGetResponseEnvelopeMessagesSourceJSON contains the JSON metadata for the
168+
// struct [DefaultGetResponseEnvelopeMessagesSource]
169+
type defaultGetResponseEnvelopeMessagesSourceJSON struct {
170+
Pointer apijson.Field
171+
raw string
172+
ExtraFields map[string]apijson.Field
173+
}
174+
175+
func (r *DefaultGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) {
176+
return apijson.UnmarshalRoot(data, r)
177+
}
178+
179+
func (r defaultGetResponseEnvelopeMessagesSourceJSON) RawJSON() string {
180+
return r.raw
181+
}

zaraz/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ func (r *ExportService) Get(ctx context.Context, query ExportGetParams, opts ...
4646
}
4747

4848
type ExportGetParams struct {
49-
// Identifier
49+
// Identifier.
5050
ZoneID param.Field[string] `path:"zone_id,required"`
5151
}

0 commit comments

Comments
 (0)