From 91904d3952069c937192f061402aeee59e870830 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 09:35:13 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#3020) --- .stats.yml | 2 +- event_notifications/r2configuration.go | 6 ++--- event_notifications/r2configurationqueue.go | 12 +++++----- queues/consumer.go | 24 +++++++++---------- queues/message.go | 12 +++++----- queues/queue.go | 26 ++++++++++----------- rulesets/ruleset.go | 3 ++- 7 files changed, 43 insertions(+), 42 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8abe575d317..a4c4d5edff8 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1332 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3c8580867e73b591b7c3c788d9f633c68a3cc3a7bc8db6f70bfdfedb06efd713.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2a9ffabff35ce46c90b6af81dd4ecb70c4c8611183fc5179eb9011bec6e114b1.yml diff --git a/event_notifications/r2configuration.go b/event_notifications/r2configuration.go index ec8f85bae15..1ac2be3be97 100755 --- a/event_notifications/r2configuration.go +++ b/event_notifications/r2configuration.go @@ -132,7 +132,7 @@ func (r R2ConfigurationGetResponseItemRulesAction) IsKnown() bool { } type R2ConfigurationGetParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` } @@ -140,7 +140,7 @@ type R2ConfigurationGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result R2ConfigurationGetResponse `json:"result,required"` - // Whether the API call was successful. + // Whether the API call was successful Success R2ConfigurationGetResponseEnvelopeSuccess `json:"success,required"` JSON r2ConfigurationGetResponseEnvelopeJSON `json:"-"` } @@ -164,7 +164,7 @@ func (r r2ConfigurationGetResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type R2ConfigurationGetResponseEnvelopeSuccess bool const ( diff --git a/event_notifications/r2configurationqueue.go b/event_notifications/r2configurationqueue.go index 11229b18771..33db8e2d739 100755 --- a/event_notifications/r2configurationqueue.go +++ b/event_notifications/r2configurationqueue.go @@ -138,7 +138,7 @@ func (r R2ConfigurationQueueDeleteResponseArray) ImplementsEventNotificationsR2C } type R2ConfigurationQueueUpdateParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` // Array of rules to drive notifications Rules param.Field[[]R2ConfigurationQueueUpdateParamsRule] `json:"rules"` @@ -183,7 +183,7 @@ type R2ConfigurationQueueUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result R2ConfigurationQueueUpdateResponse `json:"result,required"` - // Whether the API call was successful. + // Whether the API call was successful Success R2ConfigurationQueueUpdateResponseEnvelopeSuccess `json:"success,required"` JSON r2ConfigurationQueueUpdateResponseEnvelopeJSON `json:"-"` } @@ -207,7 +207,7 @@ func (r r2ConfigurationQueueUpdateResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type R2ConfigurationQueueUpdateResponseEnvelopeSuccess bool const ( @@ -223,7 +223,7 @@ func (r R2ConfigurationQueueUpdateResponseEnvelopeSuccess) IsKnown() bool { } type R2ConfigurationQueueDeleteParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` } @@ -231,7 +231,7 @@ type R2ConfigurationQueueDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result R2ConfigurationQueueDeleteResponseUnion `json:"result,required"` - // Whether the API call was successful. + // Whether the API call was successful Success R2ConfigurationQueueDeleteResponseEnvelopeSuccess `json:"success,required"` JSON r2ConfigurationQueueDeleteResponseEnvelopeJSON `json:"-"` } @@ -255,7 +255,7 @@ func (r r2ConfigurationQueueDeleteResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type R2ConfigurationQueueDeleteResponseEnvelopeSuccess bool const ( diff --git a/queues/consumer.go b/queues/consumer.go index b24c42e2092..0e646938c9f 100755 --- a/queues/consumer.go +++ b/queues/consumer.go @@ -325,7 +325,7 @@ type ConsumerDeleteResponseArray []interface{} func (r ConsumerDeleteResponseArray) ImplementsQueuesConsumerDeleteResponseUnion() {} type ConsumerNewParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` } @@ -338,7 +338,7 @@ type ConsumerNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ConsumerNewResponse `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success ConsumerNewResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerNewResponseEnvelopeResultInfo `json:"result_info"` JSON consumerNewResponseEnvelopeJSON `json:"-"` @@ -364,7 +364,7 @@ func (r consumerNewResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type ConsumerNewResponseEnvelopeSuccess bool const ( @@ -411,7 +411,7 @@ func (r consumerNewResponseEnvelopeResultInfoJSON) RawJSON() string { } type ConsumerUpdateParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` } @@ -424,7 +424,7 @@ type ConsumerUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ConsumerUpdateResponse `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success ConsumerUpdateResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerUpdateResponseEnvelopeResultInfo `json:"result_info"` JSON consumerUpdateResponseEnvelopeJSON `json:"-"` @@ -450,7 +450,7 @@ func (r consumerUpdateResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type ConsumerUpdateResponseEnvelopeSuccess bool const ( @@ -497,7 +497,7 @@ func (r consumerUpdateResponseEnvelopeResultInfoJSON) RawJSON() string { } type ConsumerDeleteParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` } @@ -505,7 +505,7 @@ type ConsumerDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ConsumerDeleteResponseUnion `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success ConsumerDeleteResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerDeleteResponseEnvelopeResultInfo `json:"result_info"` JSON consumerDeleteResponseEnvelopeJSON `json:"-"` @@ -531,7 +531,7 @@ func (r consumerDeleteResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type ConsumerDeleteResponseEnvelopeSuccess bool const ( @@ -578,7 +578,7 @@ func (r consumerDeleteResponseEnvelopeResultInfoJSON) RawJSON() string { } type ConsumerGetParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` } @@ -586,7 +586,7 @@ type ConsumerGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result []Consumer `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success ConsumerGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo ConsumerGetResponseEnvelopeResultInfo `json:"result_info"` JSON consumerGetResponseEnvelopeJSON `json:"-"` @@ -612,7 +612,7 @@ func (r consumerGetResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type ConsumerGetResponseEnvelopeSuccess bool const ( diff --git a/queues/message.go b/queues/message.go index 60384219c07..0aa17e97400 100755 --- a/queues/message.go +++ b/queues/message.go @@ -135,7 +135,7 @@ func (r messagePullResponseJSON) RawJSON() string { } type MessageAckParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` Acks param.Field[[]MessageAckParamsAck] `json:"acks"` Retries param.Field[[]MessageAckParamsRetry] `json:"retries"` @@ -170,7 +170,7 @@ type MessageAckResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result MessageAckResponse `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success MessageAckResponseEnvelopeSuccess `json:"success,required"` ResultInfo MessageAckResponseEnvelopeResultInfo `json:"result_info"` JSON messageAckResponseEnvelopeJSON `json:"-"` @@ -196,7 +196,7 @@ func (r messageAckResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type MessageAckResponseEnvelopeSuccess bool const ( @@ -243,7 +243,7 @@ func (r messageAckResponseEnvelopeResultInfoJSON) RawJSON() string { } type MessagePullParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` // The maximum number of messages to include in a batch. BatchSize param.Field[float64] `json:"batch_size"` @@ -260,7 +260,7 @@ type MessagePullResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result []MessagePullResponse `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success MessagePullResponseEnvelopeSuccess `json:"success,required"` ResultInfo MessagePullResponseEnvelopeResultInfo `json:"result_info"` JSON messagePullResponseEnvelopeJSON `json:"-"` @@ -286,7 +286,7 @@ func (r messagePullResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type MessagePullResponseEnvelopeSuccess bool const ( diff --git a/queues/queue.go b/queues/queue.go index cdba740c668..8d526c75916 100755 --- a/queues/queue.go +++ b/queues/queue.go @@ -282,7 +282,7 @@ type QueueDeleteResponseArray []interface{} func (r QueueDeleteResponseArray) ImplementsQueuesQueueDeleteResponseUnion() {} type QueueNewParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` QueueName param.Field[string] `json:"queue_name,required"` } @@ -295,7 +295,7 @@ type QueueNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result QueueCreated `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success QueueNewResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueNewResponseEnvelopeResultInfo `json:"result_info"` JSON queueNewResponseEnvelopeJSON `json:"-"` @@ -321,7 +321,7 @@ func (r queueNewResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type QueueNewResponseEnvelopeSuccess bool const ( @@ -368,7 +368,7 @@ func (r queueNewResponseEnvelopeResultInfoJSON) RawJSON() string { } type QueueUpdateParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` } @@ -381,7 +381,7 @@ type QueueUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result QueueUpdated `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success QueueUpdateResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueUpdateResponseEnvelopeResultInfo `json:"result_info"` JSON queueUpdateResponseEnvelopeJSON `json:"-"` @@ -407,7 +407,7 @@ func (r queueUpdateResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type QueueUpdateResponseEnvelopeSuccess bool const ( @@ -454,12 +454,12 @@ func (r queueUpdateResponseEnvelopeResultInfoJSON) RawJSON() string { } type QueueListParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` } type QueueDeleteParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` } @@ -467,7 +467,7 @@ type QueueDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result QueueDeleteResponseUnion `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success QueueDeleteResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueDeleteResponseEnvelopeResultInfo `json:"result_info"` JSON queueDeleteResponseEnvelopeJSON `json:"-"` @@ -493,7 +493,7 @@ func (r queueDeleteResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type QueueDeleteResponseEnvelopeSuccess bool const ( @@ -540,7 +540,7 @@ func (r queueDeleteResponseEnvelopeResultInfoJSON) RawJSON() string { } type QueueGetParams struct { - // Identifier. + // Identifier AccountID param.Field[string] `path:"account_id,required"` } @@ -548,7 +548,7 @@ type QueueGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Queue `json:"result,required,nullable"` - // Whether the API call was successful. + // Whether the API call was successful Success QueueGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo QueueGetResponseEnvelopeResultInfo `json:"result_info"` JSON queueGetResponseEnvelopeJSON `json:"-"` @@ -574,7 +574,7 @@ func (r queueGetResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful. +// Whether the API call was successful type QueueGetResponseEnvelopeSuccess bool const ( diff --git a/rulesets/ruleset.go b/rulesets/ruleset.go index 921c2c8ac08..a16c14a5f15 100755 --- a/rulesets/ruleset.go +++ b/rulesets/ruleset.go @@ -261,11 +261,12 @@ const ( PhaseMagicTransit Phase = "magic_transit" PhaseMagicTransitIDsManaged Phase = "magic_transit_ids_managed" PhaseMagicTransitManaged Phase = "magic_transit_managed" + PhaseMagicTransitRatelimit Phase = "magic_transit_ratelimit" ) func (r Phase) IsKnown() bool { switch r { - case PhaseDDoSL4, PhaseDDoSL7, PhaseHTTPConfigSettings, PhaseHTTPCustomErrors, PhaseHTTPLogCustomFields, PhaseHTTPRatelimit, PhaseHTTPRequestCacheSettings, PhaseHTTPRequestDynamicRedirect, PhaseHTTPRequestFirewallCustom, PhaseHTTPRequestFirewallManaged, PhaseHTTPRequestLateTransform, PhaseHTTPRequestOrigin, PhaseHTTPRequestRedirect, PhaseHTTPRequestSanitize, PhaseHTTPRequestSBFM, PhaseHTTPRequestSelectConfiguration, PhaseHTTPRequestTransform, PhaseHTTPResponseCompression, PhaseHTTPResponseFirewallManaged, PhaseHTTPResponseHeadersTransform, PhaseMagicTransit, PhaseMagicTransitIDsManaged, PhaseMagicTransitManaged: + case PhaseDDoSL4, PhaseDDoSL7, PhaseHTTPConfigSettings, PhaseHTTPCustomErrors, PhaseHTTPLogCustomFields, PhaseHTTPRatelimit, PhaseHTTPRequestCacheSettings, PhaseHTTPRequestDynamicRedirect, PhaseHTTPRequestFirewallCustom, PhaseHTTPRequestFirewallManaged, PhaseHTTPRequestLateTransform, PhaseHTTPRequestOrigin, PhaseHTTPRequestRedirect, PhaseHTTPRequestSanitize, PhaseHTTPRequestSBFM, PhaseHTTPRequestSelectConfiguration, PhaseHTTPRequestTransform, PhaseHTTPResponseCompression, PhaseHTTPResponseFirewallManaged, PhaseHTTPResponseHeadersTransform, PhaseMagicTransit, PhaseMagicTransitIDsManaged, PhaseMagicTransitManaged, PhaseMagicTransitRatelimit: return true } return false