Skip to content

Commit

Permalink
feat: update via SDK Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 20, 2024
1 parent 047efde commit 2ab88b3
Show file tree
Hide file tree
Showing 453 changed files with 51,958 additions and 51,854 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 1110
configured_endpoints: 1111
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ To set a per-retry timeout, use `option.WithRequestTimeout()`.
// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Zones.Update(
client.Zones.Edit(
ctx,
"023e105f4ecef8ad9ca31a8372d0c353",
cloudflare.ZoneUpdateParams{},
cloudflare.ZoneEditParams{},
// This sets the per-retry timeout
option.WithRequestTimeout(20*time.Second),
)
Expand Down
1,203 changes: 601 additions & 602 deletions accessapplication.go

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions accessapplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) {
}
}

func TestAccessApplicationList(t *testing.T) {
func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
Expand All @@ -93,10 +93,44 @@ func TestAccessApplicationList(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("My User Service Key"),
)
_, err := client.Access.Applications.List(
_, err := client.Access.Applications.Update(
context.TODO(),
"string",
"023e105f4ecef8ad9ca31a8372d0c353",
shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"),
cloudflare.AccessApplicationUpdateParamsVariant0{
Domain: cloudflare.F("test.example.com/admin"),
Type: cloudflare.F("self_hosted"),
AllowAuthenticateViaWarp: cloudflare.F(true),
AllowedIdps: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AppLauncherVisible: cloudflare.F(true),
AutoRedirectToIdentity: cloudflare.F(true),
CorsHeaders: cloudflare.F(cloudflare.AccessApplicationUpdateParamsVariant0CorsHeaders{
AllowAllHeaders: cloudflare.F(true),
AllowAllMethods: cloudflare.F(true),
AllowAllOrigins: cloudflare.F(true),
AllowCredentials: cloudflare.F(true),
AllowedHeaders: cloudflare.F([]interface{}{map[string]interface{}{}, map[string]interface{}{}, map[string]interface{}{}}),
AllowedMethods: cloudflare.F([]cloudflare.AccessApplicationUpdateParamsVariant0CorsHeadersAllowedMethod{cloudflare.AccessApplicationUpdateParamsVariant0CorsHeadersAllowedMethodGet}),
AllowedOrigins: cloudflare.F([]interface{}{"https://example.com"}),
MaxAge: cloudflare.F(-1.000000),
}),
CustomDenyMessage: cloudflare.F("string"),
CustomDenyURL: cloudflare.F("string"),
CustomNonIdentityDenyURL: cloudflare.F("string"),
CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
EnableBindingCookie: cloudflare.F(true),
HTTPOnlyCookieAttribute: cloudflare.F(true),
LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"),
Name: cloudflare.F("Admin Site"),
PathCookieAttribute: cloudflare.F(true),
SameSiteCookieAttribute: cloudflare.F("strict"),
SelfHostedDomains: cloudflare.F([]string{"test.example.com/admin", "test.anotherexample.com/staff"}),
ServiceAuth401Redirect: cloudflare.F(true),
SessionDuration: cloudflare.F("24h"),
SkipInterstitial: cloudflare.F(true),
Tags: cloudflare.F([]string{"engineers", "engineers", "engineers"}),
},
)
if err != nil {
var apierr *cloudflare.Error
Expand All @@ -107,7 +141,7 @@ func TestAccessApplicationList(t *testing.T) {
}
}

func TestAccessApplicationDelete(t *testing.T) {
func TestAccessApplicationList(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
Expand All @@ -123,11 +157,10 @@ func TestAccessApplicationDelete(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("My User Service Key"),
)
_, err := client.Access.Applications.Delete(
_, err := client.Access.Applications.List(
context.TODO(),
"string",
"023e105f4ecef8ad9ca31a8372d0c353",
shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"),
)
if err != nil {
var apierr *cloudflare.Error
Expand All @@ -138,7 +171,7 @@ func TestAccessApplicationDelete(t *testing.T) {
}
}

func TestAccessApplicationGet(t *testing.T) {
func TestAccessApplicationDelete(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
Expand All @@ -154,7 +187,7 @@ func TestAccessApplicationGet(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("My User Service Key"),
)
_, err := client.Access.Applications.Get(
_, err := client.Access.Applications.Delete(
context.TODO(),
"string",
"023e105f4ecef8ad9ca31a8372d0c353",
Expand All @@ -169,7 +202,7 @@ func TestAccessApplicationGet(t *testing.T) {
}
}

func TestAccessApplicationReplaceWithOptionalParams(t *testing.T) {
func TestAccessApplicationGet(t *testing.T) {
t.Skip("skipped: tests are disabled for the time being")
baseURL := "http://localhost:4010"
if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
Expand All @@ -185,44 +218,11 @@ func TestAccessApplicationReplaceWithOptionalParams(t *testing.T) {
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
option.WithUserServiceKey("My User Service Key"),
)
_, err := client.Access.Applications.Replace(
_, err := client.Access.Applications.Get(
context.TODO(),
"string",
"023e105f4ecef8ad9ca31a8372d0c353",
shared.UnionString("023e105f4ecef8ad9ca31a8372d0c353"),
cloudflare.AccessApplicationReplaceParamsVariant0{
Domain: cloudflare.F("test.example.com/admin"),
Type: cloudflare.F("self_hosted"),
AllowAuthenticateViaWarp: cloudflare.F(true),
AllowedIdps: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
AppLauncherVisible: cloudflare.F(true),
AutoRedirectToIdentity: cloudflare.F(true),
CorsHeaders: cloudflare.F(cloudflare.AccessApplicationReplaceParamsVariant0CorsHeaders{
AllowAllHeaders: cloudflare.F(true),
AllowAllMethods: cloudflare.F(true),
AllowAllOrigins: cloudflare.F(true),
AllowCredentials: cloudflare.F(true),
AllowedHeaders: cloudflare.F([]interface{}{map[string]interface{}{}, map[string]interface{}{}, map[string]interface{}{}}),
AllowedMethods: cloudflare.F([]cloudflare.AccessApplicationReplaceParamsVariant0CorsHeadersAllowedMethod{cloudflare.AccessApplicationReplaceParamsVariant0CorsHeadersAllowedMethodGet}),
AllowedOrigins: cloudflare.F([]interface{}{"https://example.com"}),
MaxAge: cloudflare.F(-1.000000),
}),
CustomDenyMessage: cloudflare.F("string"),
CustomDenyURL: cloudflare.F("string"),
CustomNonIdentityDenyURL: cloudflare.F("string"),
CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252", "699d98642c564d2e855e9661899b7252"}),
EnableBindingCookie: cloudflare.F(true),
HTTPOnlyCookieAttribute: cloudflare.F(true),
LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"),
Name: cloudflare.F("Admin Site"),
PathCookieAttribute: cloudflare.F(true),
SameSiteCookieAttribute: cloudflare.F("strict"),
SelfHostedDomains: cloudflare.F([]string{"test.example.com/admin", "test.anotherexample.com/staff"}),
ServiceAuth401Redirect: cloudflare.F(true),
SessionDuration: cloudflare.F("24h"),
SkipInterstitial: cloudflare.F(true),
Tags: cloudflare.F([]string{"engineers", "engineers", "engineers"}),
},
)
if err != nil {
var apierr *cloudflare.Error
Expand Down
Loading

0 comments on commit 2ab88b3

Please sign in to comment.