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 #1819

Merged
merged 1 commit into from
Apr 18, 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
6 changes: 3 additions & 3 deletions page_shield/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type Connection struct {
LastSeenAt string `json:"last_seen_at"`
PageURLs []string `json:"page_urls"`
URL string `json:"url"`
URLContainsCDNCgiPath bool `json:"url_contains_cdn_cgi_path"`
URLContainsCDNCGIPath bool `json:"url_contains_cdn_cgi_path"`
JSON connectionJSON `json:"-"`
}

Expand All @@ -89,7 +89,7 @@ type connectionJSON struct {
LastSeenAt apijson.Field
PageURLs apijson.Field
URL apijson.Field
URLContainsCDNCgiPath apijson.Field
URLContainsCDNCGIPath apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand All @@ -109,7 +109,7 @@ type ConnectionListParams struct {
Direction param.Field[ConnectionListParamsDirection] `query:"direction"`
// When true, excludes connections seen in a `/cdn-cgi` path from the returned
// connections. The default value is true.
ExcludeCDNCgi param.Field[bool] `query:"exclude_cdn_cgi"`
ExcludeCDNCGI param.Field[bool] `query:"exclude_cdn_cgi"`
// Excludes connections whose URL contains one of the URL-encoded URLs separated by
// commas.
ExcludeURLs param.Field[string] `query:"exclude_urls"`
Expand Down
2 changes: 1 addition & 1 deletion page_shield/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestConnectionListWithOptionalParams(t *testing.T) {
_, err := client.PageShield.Connections.List(context.TODO(), page_shield.ConnectionListParams{
ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Direction: cloudflare.F(page_shield.ConnectionListParamsDirectionAsc),
ExcludeCDNCgi: cloudflare.F(true),
ExcludeCDNCGI: cloudflare.F(true),
ExcludeURLs: cloudflare.F("blog.cloudflare.com,www.example"),
Export: cloudflare.F(page_shield.ConnectionListParamsExportCsv),
Hosts: cloudflare.F("blog.cloudflare.com,www.example*,*cloudflare.com"),
Expand Down
10 changes: 5 additions & 5 deletions page_shield/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ type Script struct {
ObfuscationScore float64 `json:"obfuscation_score"`
PageURLs []string `json:"page_urls"`
URL string `json:"url"`
URLContainsCDNCgiPath bool `json:"url_contains_cdn_cgi_path"`
URLContainsCDNCGIPath bool `json:"url_contains_cdn_cgi_path"`
JSON scriptJSON `json:"-"`
}

Expand All @@ -99,7 +99,7 @@ type scriptJSON struct {
ObfuscationScore apijson.Field
PageURLs apijson.Field
URL apijson.Field
URLContainsCDNCgiPath apijson.Field
URLContainsCDNCGIPath apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down Expand Up @@ -127,7 +127,7 @@ type ScriptGetResponse struct {
ObfuscationScore float64 `json:"obfuscation_score"`
PageURLs []string `json:"page_urls"`
URL string `json:"url"`
URLContainsCDNCgiPath bool `json:"url_contains_cdn_cgi_path"`
URLContainsCDNCGIPath bool `json:"url_contains_cdn_cgi_path"`
Versions []ScriptGetResponseVersion `json:"versions,nullable"`
JSON scriptGetResponseJSON `json:"-"`
}
Expand All @@ -149,7 +149,7 @@ type scriptGetResponseJSON struct {
ObfuscationScore apijson.Field
PageURLs apijson.Field
URL apijson.Field
URLContainsCDNCgiPath apijson.Field
URLContainsCDNCGIPath apijson.Field
Versions apijson.Field
raw string
ExtraFields map[string]apijson.Field
Expand Down Expand Up @@ -205,7 +205,7 @@ type ScriptListParams struct {
Direction param.Field[ScriptListParamsDirection] `query:"direction"`
// When true, excludes scripts seen in a `/cdn-cgi` path from the returned scripts.
// The default value is true.
ExcludeCDNCgi param.Field[bool] `query:"exclude_cdn_cgi"`
ExcludeCDNCGI param.Field[bool] `query:"exclude_cdn_cgi"`
// When true, excludes duplicate scripts. We consider a script duplicate of another
// if their javascript content matches and they share the same url host and zone
// hostname. In such case, we return the most recent script for the URL host and
Expand Down
2 changes: 1 addition & 1 deletion page_shield/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestScriptListWithOptionalParams(t *testing.T) {
_, err := client.PageShield.Scripts.List(context.TODO(), page_shield.ScriptListParams{
ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Direction: cloudflare.F(page_shield.ScriptListParamsDirectionAsc),
ExcludeCDNCgi: cloudflare.F(true),
ExcludeCDNCGI: cloudflare.F(true),
ExcludeDuplicates: cloudflare.F(true),
ExcludeURLs: cloudflare.F("blog.cloudflare.com,www.example"),
Export: cloudflare.F(page_shield.ScriptListParamsExportCsv),
Expand Down