Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#1819)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Apr 24, 2024
1 parent b439f05 commit 80833c3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
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

0 comments on commit 80833c3

Please sign in to comment.