Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #1762

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2797,7 +2797,7 @@ Params Types:

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets">rulesets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets#ResponeRule">ResponeRule</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets">rulesets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets#ResponseRule">ResponseRule</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets">rulesets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets#Ruleset">Ruleset</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets">rulesets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets#RulesetNewResponse">RulesetNewResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets">rulesets</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/rulesets#RulesetUpdateResponse">RulesetUpdateResponse</a>
Expand Down Expand Up @@ -3416,7 +3416,6 @@ Methods:
Params Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel">intel</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel#IssueClassParam">IssueClassParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel">intel</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel#IssueTypeParam">IssueTypeParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel">intel</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel#ProductParam">ProductParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel">intel</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel#SeverityQueryParam">SeverityQueryParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel">intel</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/intel#SubjectParam">SubjectParam</a>
Expand Down
230 changes: 186 additions & 44 deletions intel/attacksurfacereportissue.go

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions intel/attacksurfacereportissue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func TestAttackSurfaceReportIssueListWithOptionalParams(t *testing.T) {
Dismissed: cloudflare.F(false),
IssueClass: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueClassNeq: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueType: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueType: cloudflare.F([]intel.AttackSurfaceReportIssueListParamsIssueType{intel.AttackSurfaceReportIssueListParamsIssueTypeComplianceViolation, intel.AttackSurfaceReportIssueListParamsIssueTypeEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.AttackSurfaceReportIssueListParamsIssueTypeNeq{intel.AttackSurfaceReportIssueListParamsIssueTypeNeqComplianceViolation, intel.AttackSurfaceReportIssueListParamsIssueTypeNeqEmailSecurity}),
Page: cloudflare.F(int64(1)),
PerPage: cloudflare.F(int64(25)),
Product: cloudflare.F([]string{"access", "dns"}),
Expand Down Expand Up @@ -72,8 +72,8 @@ func TestAttackSurfaceReportIssueClassWithOptionalParams(t *testing.T) {
Dismissed: cloudflare.F(false),
IssueClass: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueClassNeq: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueType: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueType: cloudflare.F([]intel.AttackSurfaceReportIssueClassParamsIssueType{intel.AttackSurfaceReportIssueClassParamsIssueTypeComplianceViolation, intel.AttackSurfaceReportIssueClassParamsIssueTypeEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.AttackSurfaceReportIssueClassParamsIssueTypeNeq{intel.AttackSurfaceReportIssueClassParamsIssueTypeNeqComplianceViolation, intel.AttackSurfaceReportIssueClassParamsIssueTypeNeqEmailSecurity}),
Product: cloudflare.F([]string{"access", "dns"}),
ProductNeq: cloudflare.F([]string{"access", "dns"}),
Severity: cloudflare.F([]intel.SeverityQueryParam{intel.SeverityQueryParamLow, intel.SeverityQueryParamModerate}),
Expand Down Expand Up @@ -140,8 +140,8 @@ func TestAttackSurfaceReportIssueSeverityWithOptionalParams(t *testing.T) {
Dismissed: cloudflare.F(false),
IssueClass: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueClassNeq: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueType: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueType: cloudflare.F([]intel.AttackSurfaceReportIssueSeverityParamsIssueType{intel.AttackSurfaceReportIssueSeverityParamsIssueTypeComplianceViolation, intel.AttackSurfaceReportIssueSeverityParamsIssueTypeEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.AttackSurfaceReportIssueSeverityParamsIssueTypeNeq{intel.AttackSurfaceReportIssueSeverityParamsIssueTypeNeqComplianceViolation, intel.AttackSurfaceReportIssueSeverityParamsIssueTypeNeqEmailSecurity}),
Product: cloudflare.F([]string{"access", "dns"}),
ProductNeq: cloudflare.F([]string{"access", "dns"}),
Severity: cloudflare.F([]intel.SeverityQueryParam{intel.SeverityQueryParamLow, intel.SeverityQueryParamModerate}),
Expand Down Expand Up @@ -177,8 +177,8 @@ func TestAttackSurfaceReportIssueTypeWithOptionalParams(t *testing.T) {
Dismissed: cloudflare.F(false),
IssueClass: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueClassNeq: cloudflare.F([]string{"a_record_dangling", "always_use_https_not_enabled"}),
IssueType: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.IssueTypeItem{intel.IssueTypeItemComplianceViolation, intel.IssueTypeItemEmailSecurity}),
IssueType: cloudflare.F([]intel.AttackSurfaceReportIssueTypeParamsIssueType{intel.AttackSurfaceReportIssueTypeParamsIssueTypeComplianceViolation, intel.AttackSurfaceReportIssueTypeParamsIssueTypeEmailSecurity}),
IssueTypeNeq: cloudflare.F([]intel.AttackSurfaceReportIssueTypeParamsIssueTypeNeq{intel.AttackSurfaceReportIssueTypeParamsIssueTypeNeqComplianceViolation, intel.AttackSurfaceReportIssueTypeParamsIssueTypeNeqEmailSecurity}),
Product: cloudflare.F([]string{"access", "dns"}),
ProductNeq: cloudflare.F([]string{"access", "dns"}),
Severity: cloudflare.F([]intel.SeverityQueryParam{intel.SeverityQueryParamLow, intel.SeverityQueryParamModerate}),
Expand Down
4 changes: 2 additions & 2 deletions rulesets/phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type PhaseUpdateResponse struct {
// The phase of the ruleset.
Phase PhaseUpdateResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down Expand Up @@ -190,7 +190,7 @@ type PhaseGetResponse struct {
// The phase of the ruleset.
Phase PhaseGetResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down
2 changes: 1 addition & 1 deletion rulesets/phaseversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type PhaseVersionGetResponse struct {
// The phase of the ruleset.
Phase PhaseVersionGetResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down
14 changes: 7 additions & 7 deletions rulesets/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (r blockRuleJSON) RawJSON() string {
return r.raw
}

func (r BlockRule) implementsRulesetsResponeRuleItem() {}
func (r BlockRule) implementsRulesetsResponseRuleItem() {}

// The action to perform when the rule matches.
type BlockRuleAction string
Expand Down Expand Up @@ -318,7 +318,7 @@ func (r executeRuleJSON) RawJSON() string {
return r.raw
}

func (r ExecuteRule) implementsRulesetsResponeRuleItem() {}
func (r ExecuteRule) implementsRulesetsResponseRuleItem() {}

// The action to perform when the rule matches.
type ExecuteRuleAction string
Expand Down Expand Up @@ -704,7 +704,7 @@ func (r logRuleJSON) RawJSON() string {
return r.raw
}

func (r LogRule) implementsRulesetsResponeRuleItem() {}
func (r LogRule) implementsRulesetsResponseRuleItem() {}

// The action to perform when the rule matches.
type LogRuleAction string
Expand Down Expand Up @@ -829,7 +829,7 @@ func (r skipRuleJSON) RawJSON() string {
return r.raw
}

func (r SkipRule) implementsRulesetsResponeRuleItem() {}
func (r SkipRule) implementsRulesetsResponseRuleItem() {}

// The action to perform when the rule matches.
type SkipRuleAction string
Expand Down Expand Up @@ -1019,7 +1019,7 @@ type RuleNewResponse struct {
// The phase of the ruleset.
Phase RuleNewResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down Expand Up @@ -1117,7 +1117,7 @@ type RuleDeleteResponse struct {
// The phase of the ruleset.
Phase RuleDeleteResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down Expand Up @@ -1216,7 +1216,7 @@ type RuleEditResponse struct {
// The phase of the ruleset.
Phase RuleEditResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down
8 changes: 4 additions & 4 deletions rulesets/ruleset.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (r *RulesetService) Get(ctx context.Context, rulesetID string, query Rulese

type RequestRuleParam []RequestRuleUnionItemParam

type ResponeRule []ResponeRuleItem
type ResponseRule []ResponseRuleItem

// A ruleset object.
type Ruleset struct {
Expand Down Expand Up @@ -266,7 +266,7 @@ type RulesetNewResponse struct {
// The phase of the ruleset.
Phase RulesetNewResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down Expand Up @@ -365,7 +365,7 @@ type RulesetUpdateResponse struct {
// The phase of the ruleset.
Phase RulesetUpdateResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down Expand Up @@ -464,7 +464,7 @@ type RulesetGetResponse struct {
// The phase of the ruleset.
Phase RulesetGetResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down
2 changes: 1 addition & 1 deletion rulesets/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ type VersionGetResponse struct {
// The phase of the ruleset.
Phase VersionGetResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down
2 changes: 1 addition & 1 deletion rulesets/versionbytag.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type VersionByTagGetResponse struct {
// The phase of the ruleset.
Phase VersionByTagGetResponsePhase `json:"phase,required"`
// The list of rules in the ruleset.
Rules ResponeRule `json:"rules,required"`
Rules ResponseRule `json:"rules,required"`
// The version of the ruleset.
Version string `json:"version,required"`
// An informative description of the ruleset.
Expand Down