Skip to content

Commit

Permalink
feat(api): api update (#3570)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stainless Bot committed Nov 6, 2024
1 parent f9830f4 commit 007b781
Show file tree
Hide file tree
Showing 39 changed files with 2,676 additions and 2,541 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1361
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-bc0b27a6ed686a5f7ea5742498072a682dae635643c49cea95a3e5292868faa3.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f42cd2aad7c5dc546130b78d1b183a339ff0c666d7b0e98159bdfbf09eecd80d.yml
4 changes: 2 additions & 2 deletions accounts/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -1375,9 +1375,9 @@ func (r MemberNewParams) MarshalJSON() (data []byte, err error) {
type MemberNewParamsBody struct {
// The contact email address of the user.
Email param.Field[string] `json:"email,required"`
Policies param.Field[interface{}] `json:"policies,required"`
Roles param.Field[interface{}] `json:"roles,required"`
Status param.Field[MemberNewParamsBodyStatus] `json:"status"`
Policies param.Field[interface{}] `json:"policies,required"`
}

func (r MemberNewParamsBody) MarshalJSON() (data []byte, err error) {
Expand Down Expand Up @@ -1570,9 +1570,9 @@ func (r MemberUpdateParams) MarshalJSON() (data []byte, err error) {
}

type MemberUpdateParamsBody struct {
Policies param.Field[interface{}] `json:"policies,required"`
Roles param.Field[interface{}] `json:"roles,required"`
User param.Field[interface{}] `json:"user,required"`
Policies param.Field[interface{}] `json:"policies,required"`
}

func (r MemberUpdateParamsBody) MarshalJSON() (data []byte, err error) {
Expand Down
54 changes: 27 additions & 27 deletions api_gateway/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,33 +189,33 @@ func (r APIShieldMethod) IsKnown() bool {
}

type APIShieldFeatures struct {
// This field can have the runtime type of
// [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds].
Thresholds interface{} `json:"thresholds,required"`
// This field can have the runtime type of
// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
ParameterSchemas interface{} `json:"parameter_schemas,required"`
// This field can have the runtime type of
// [APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
APIRouting interface{} `json:"api_routing,required"`
// This field can have the runtime type of
// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
// This field can have the runtime type of
// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
ParameterSchemas interface{} `json:"parameter_schemas,required"`
// This field can have the runtime type of
// [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
SchemaInfo interface{} `json:"schema_info,required"`
SchemaInfo interface{} `json:"schema_info,required"`
// This field can have the runtime type of
// [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds].
Thresholds interface{} `json:"thresholds,required"`
JSON apiShieldFeaturesJSON `json:"-"`
union APIShieldFeaturesUnion
}

// apiShieldFeaturesJSON contains the JSON metadata for the struct
// [APIShieldFeatures]
type apiShieldFeaturesJSON struct {
Thresholds apijson.Field
ParameterSchemas apijson.Field
APIRouting apijson.Field
ConfidenceIntervals apijson.Field
ParameterSchemas apijson.Field
SchemaInfo apijson.Field
Thresholds apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -830,33 +830,33 @@ func (r OperationListResponseMethod) IsKnown() bool {
}

type OperationListResponseFeatures struct {
// This field can have the runtime type of
// [OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
Thresholds interface{} `json:"thresholds,required"`
// This field can have the runtime type of
// [OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
ParameterSchemas interface{} `json:"parameter_schemas,required"`
// This field can have the runtime type of
// [OperationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
APIRouting interface{} `json:"api_routing,required"`
// This field can have the runtime type of
// [OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
// This field can have the runtime type of
// [OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
ParameterSchemas interface{} `json:"parameter_schemas,required"`
// This field can have the runtime type of
// [OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
SchemaInfo interface{} `json:"schema_info,required"`
SchemaInfo interface{} `json:"schema_info,required"`
// This field can have the runtime type of
// [OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
Thresholds interface{} `json:"thresholds,required"`
JSON operationListResponseFeaturesJSON `json:"-"`
union OperationListResponseFeaturesUnion
}

// operationListResponseFeaturesJSON contains the JSON metadata for the struct
// [OperationListResponseFeatures]
type operationListResponseFeaturesJSON struct {
Thresholds apijson.Field
ParameterSchemas apijson.Field
APIRouting apijson.Field
ConfidenceIntervals apijson.Field
ParameterSchemas apijson.Field
SchemaInfo apijson.Field
Thresholds apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -1516,33 +1516,33 @@ func (r OperationGetResponseMethod) IsKnown() bool {
}

type OperationGetResponseFeatures struct {
// This field can have the runtime type of
// [OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
Thresholds interface{} `json:"thresholds,required"`
// This field can have the runtime type of
// [OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
ParameterSchemas interface{} `json:"parameter_schemas,required"`
// This field can have the runtime type of
// [OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
APIRouting interface{} `json:"api_routing,required"`
// This field can have the runtime type of
// [OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
// This field can have the runtime type of
// [OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
ParameterSchemas interface{} `json:"parameter_schemas,required"`
// This field can have the runtime type of
// [OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
SchemaInfo interface{} `json:"schema_info,required"`
SchemaInfo interface{} `json:"schema_info,required"`
// This field can have the runtime type of
// [OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
Thresholds interface{} `json:"thresholds,required"`
JSON operationGetResponseFeaturesJSON `json:"-"`
union OperationGetResponseFeaturesUnion
}

// operationGetResponseFeaturesJSON contains the JSON metadata for the struct
// [OperationGetResponseFeatures]
type operationGetResponseFeaturesJSON struct {
Thresholds apijson.Field
ParameterSchemas apijson.Field
APIRouting apijson.Field
ConfidenceIntervals apijson.Field
ParameterSchemas apijson.Field
SchemaInfo apijson.Field
Thresholds apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down
12 changes: 6 additions & 6 deletions api_gateway/userschemaoperation.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,28 @@ type UserSchemaOperationListResponse struct {
// insertion. This will further be Cloudflare-normalized upon insertion. See:
// https://developers.cloudflare.com/rules/normalization/how-it-works/.
Endpoint string `json:"endpoint,required" format:"uri-template"`
// This field can have the runtime type of [APIShieldFeatures].
Features interface{} `json:"features,required"`
// RFC3986-compliant host.
Host string `json:"host,required" format:"hostname"`
// The HTTP method used to access the endpoint.
Method UserSchemaOperationListResponseMethod `json:"method,required"`
LastUpdated time.Time `json:"last_updated" format:"date-time"`
// UUID
OperationID string `json:"operation_id"`
// This field can have the runtime type of [APIShieldFeatures].
Features interface{} `json:"features,required"`
JSON userSchemaOperationListResponseJSON `json:"-"`
union UserSchemaOperationListResponseUnion
OperationID string `json:"operation_id"`
JSON userSchemaOperationListResponseJSON `json:"-"`
union UserSchemaOperationListResponseUnion
}

// userSchemaOperationListResponseJSON contains the JSON metadata for the struct
// [UserSchemaOperationListResponse]
type userSchemaOperationListResponseJSON struct {
Endpoint apijson.Field
Features apijson.Field
Host apijson.Field
Method apijson.Field
LastUpdated apijson.Field
OperationID apijson.Field
Features apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down
Loading

0 comments on commit 007b781

Please sign in to comment.