Skip to content

Commit 13b389b

Browse files
stainless-app[bot]stainless-bot
authored andcommittedNov 11, 2024·
feat(api): api update (#3589)
1 parent c345b54 commit 13b389b

37 files changed

+1390
-1339
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1397
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f5305b253841aee001bed9bf486562184b70df73d31313774fd5b00bc2e7f8e1.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1f3a5920b5590a1e7f4df129cc299fe3d4aaa7bf4ef6915b015dd898b1a1813c.yml

‎accounts/member.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1375,8 +1375,8 @@ func (r MemberNewParams) MarshalJSON() (data []byte, err error) {
13751375
type MemberNewParamsBody struct {
13761376
// The contact email address of the user.
13771377
Email param.Field[string] `json:"email,required"`
1378-
Policies param.Field[interface{}] `json:"policies,required"`
1379-
Roles param.Field[interface{}] `json:"roles,required"`
1378+
Policies param.Field[interface{}] `json:"policies"`
1379+
Roles param.Field[interface{}] `json:"roles"`
13801380
Status param.Field[MemberNewParamsBodyStatus] `json:"status"`
13811381
}
13821382

@@ -1570,9 +1570,9 @@ func (r MemberUpdateParams) MarshalJSON() (data []byte, err error) {
15701570
}
15711571

15721572
type MemberUpdateParamsBody struct {
1573-
Policies param.Field[interface{}] `json:"policies,required"`
1574-
Roles param.Field[interface{}] `json:"roles,required"`
1575-
User param.Field[interface{}] `json:"user,required"`
1573+
Policies param.Field[interface{}] `json:"policies"`
1574+
Roles param.Field[interface{}] `json:"roles"`
1575+
User param.Field[interface{}] `json:"user"`
15761576
}
15771577

15781578
func (r MemberUpdateParamsBody) MarshalJSON() (data []byte, err error) {

‎api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4876,7 +4876,7 @@ Methods:
48764876

48774877
- <code title="post /{account_or_zone}/{account_or_zone_id}/access/service_tokens">client.ZeroTrust.Access.ServiceTokens.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenNewParams">AccessServiceTokenNewParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenNewResponse">AccessServiceTokenNewResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
48784878
- <code title="put /{account_or_zone}/{account_or_zone_id}/access/service_tokens/{service_token_id}">client.ZeroTrust.Access.ServiceTokens.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, serviceTokenID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenUpdateParams">AccessServiceTokenUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#ServiceToken">ServiceToken</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
4879-
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/service_tokens">client.ZeroTrust.Access.ServiceTokens.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenListParams">AccessServiceTokenListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#ServiceToken">ServiceToken</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
4879+
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/service_tokens">client.ZeroTrust.Access.ServiceTokens.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenListParams">AccessServiceTokenListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#ServiceToken">ServiceToken</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
48804880
- <code title="delete /{account_or_zone}/{account_or_zone_id}/access/service_tokens/{service_token_id}">client.ZeroTrust.Access.ServiceTokens.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, serviceTokenID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenDeleteParams">AccessServiceTokenDeleteParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#ServiceToken">ServiceToken</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
48814881
- <code title="get /{account_or_zone}/{account_or_zone_id}/access/service_tokens/{service_token_id}">client.ZeroTrust.Access.ServiceTokens.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, serviceTokenID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenGetParams">AccessServiceTokenGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#ServiceToken">ServiceToken</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
48824882
- <code title="post /accounts/{account_id}/access/service_tokens/{service_token_id}/refresh">client.ZeroTrust.Access.ServiceTokens.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenService.Refresh">Refresh</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, serviceTokenID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#AccessServiceTokenRefreshParams">AccessServiceTokenRefreshParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust">zero_trust</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v3/zero_trust#ServiceToken">ServiceToken</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

‎api_gateway/operation.go

+15-15
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,19 @@ func (r APIShieldMethod) IsKnown() bool {
191191
type APIShieldFeatures struct {
192192
// This field can have the runtime type of
193193
// [APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
194-
APIRouting interface{} `json:"api_routing,required"`
194+
APIRouting interface{} `json:"api_routing"`
195195
// This field can have the runtime type of
196196
// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
197-
ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
197+
ConfidenceIntervals interface{} `json:"confidence_intervals"`
198198
// This field can have the runtime type of
199199
// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
200-
ParameterSchemas interface{} `json:"parameter_schemas,required"`
200+
ParameterSchemas interface{} `json:"parameter_schemas"`
201201
// This field can have the runtime type of
202202
// [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
203-
SchemaInfo interface{} `json:"schema_info,required"`
203+
SchemaInfo interface{} `json:"schema_info"`
204204
// This field can have the runtime type of
205205
// [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds].
206-
Thresholds interface{} `json:"thresholds,required"`
206+
Thresholds interface{} `json:"thresholds"`
207207
JSON apiShieldFeaturesJSON `json:"-"`
208208
union APIShieldFeaturesUnion
209209
}
@@ -832,19 +832,19 @@ func (r OperationListResponseMethod) IsKnown() bool {
832832
type OperationListResponseFeatures struct {
833833
// This field can have the runtime type of
834834
// [OperationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
835-
APIRouting interface{} `json:"api_routing,required"`
835+
APIRouting interface{} `json:"api_routing"`
836836
// This field can have the runtime type of
837837
// [OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
838-
ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
838+
ConfidenceIntervals interface{} `json:"confidence_intervals"`
839839
// This field can have the runtime type of
840840
// [OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
841-
ParameterSchemas interface{} `json:"parameter_schemas,required"`
841+
ParameterSchemas interface{} `json:"parameter_schemas"`
842842
// This field can have the runtime type of
843843
// [OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
844-
SchemaInfo interface{} `json:"schema_info,required"`
844+
SchemaInfo interface{} `json:"schema_info"`
845845
// This field can have the runtime type of
846846
// [OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
847-
Thresholds interface{} `json:"thresholds,required"`
847+
Thresholds interface{} `json:"thresholds"`
848848
JSON operationListResponseFeaturesJSON `json:"-"`
849849
union OperationListResponseFeaturesUnion
850850
}
@@ -1518,19 +1518,19 @@ func (r OperationGetResponseMethod) IsKnown() bool {
15181518
type OperationGetResponseFeatures struct {
15191519
// This field can have the runtime type of
15201520
// [OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
1521-
APIRouting interface{} `json:"api_routing,required"`
1521+
APIRouting interface{} `json:"api_routing"`
15221522
// This field can have the runtime type of
15231523
// [OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
1524-
ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
1524+
ConfidenceIntervals interface{} `json:"confidence_intervals"`
15251525
// This field can have the runtime type of
15261526
// [OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
1527-
ParameterSchemas interface{} `json:"parameter_schemas,required"`
1527+
ParameterSchemas interface{} `json:"parameter_schemas"`
15281528
// This field can have the runtime type of
15291529
// [OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
1530-
SchemaInfo interface{} `json:"schema_info,required"`
1530+
SchemaInfo interface{} `json:"schema_info"`
15311531
// This field can have the runtime type of
15321532
// [OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
1533-
Thresholds interface{} `json:"thresholds,required"`
1533+
Thresholds interface{} `json:"thresholds"`
15341534
JSON operationGetResponseFeaturesJSON `json:"-"`
15351535
union OperationGetResponseFeaturesUnion
15361536
}

‎api_gateway/userschemaoperation.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ type UserSchemaOperationListResponse struct {
7878
// insertion. This will further be Cloudflare-normalized upon insertion. See:
7979
// https://developers.cloudflare.com/rules/normalization/how-it-works/.
8080
Endpoint string `json:"endpoint,required" format:"uri-template"`
81-
// This field can have the runtime type of [APIShieldFeatures].
82-
Features interface{} `json:"features,required"`
8381
// RFC3986-compliant host.
8482
Host string `json:"host,required" format:"hostname"`
8583
// The HTTP method used to access the endpoint.
86-
Method UserSchemaOperationListResponseMethod `json:"method,required"`
87-
LastUpdated time.Time `json:"last_updated" format:"date-time"`
84+
Method UserSchemaOperationListResponseMethod `json:"method,required"`
85+
// This field can have the runtime type of [APIShieldFeatures].
86+
Features interface{} `json:"features"`
87+
LastUpdated time.Time `json:"last_updated" format:"date-time"`
8888
// UUID
8989
OperationID string `json:"operation_id"`
9090
JSON userSchemaOperationListResponseJSON `json:"-"`
@@ -95,9 +95,9 @@ type UserSchemaOperationListResponse struct {
9595
// [UserSchemaOperationListResponse]
9696
type userSchemaOperationListResponseJSON struct {
9797
Endpoint apijson.Field
98-
Features apijson.Field
9998
Host apijson.Field
10099
Method apijson.Field
100+
Features apijson.Field
101101
LastUpdated apijson.Field
102102
OperationID apijson.Field
103103
raw string

‎cache/cache.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ func (r CachePurgeParams) MarshalJSON() (data []byte, err error) {
156156
}
157157

158158
type CachePurgeParamsBody struct {
159-
Files param.Field[interface{}] `json:"files,required"`
160-
Hosts param.Field[interface{}] `json:"hosts,required"`
161-
Prefixes param.Field[interface{}] `json:"prefixes,required"`
162-
Tags param.Field[interface{}] `json:"tags,required"`
159+
Files param.Field[interface{}] `json:"files"`
160+
Hosts param.Field[interface{}] `json:"hosts"`
161+
Prefixes param.Field[interface{}] `json:"prefixes"`
163162
// For more information, please refer to
164163
// [purge everything documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything/).
165-
PurgeEverything param.Field[bool] `json:"purge_everything"`
164+
PurgeEverything param.Field[bool] `json:"purge_everything"`
165+
Tags param.Field[interface{}] `json:"tags"`
166166
}
167167

168168
func (r CachePurgeParamsBody) MarshalJSON() (data []byte, err error) {

0 commit comments

Comments
 (0)
Please sign in to comment.