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): OpenAPI spec update via Stainless API #2733

Merged
merged 1 commit into from
Jul 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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1252
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-08160758435c3d32f9f1d296fcd9664e5b67e7c453403bf02ac81f023ec470a3.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml
2 changes: 1 addition & 1 deletion accounts/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestAccountUpdateWithOptionalParams(t *testing.T) {
Account: accounts.AccountParam{
Name: cloudflare.F("Demo Account"),
Settings: cloudflare.F(accounts.AccountSettingsParam{
AbuseContactEmail: cloudflare.F("string"),
AbuseContactEmail: cloudflare.F("abuse_contact_email"),
DefaultNameservers: cloudflare.F(accounts.AccountSettingsDefaultNameserversCloudflareStandard),
EnforceTwofactor: cloudflare.F(true),
UseAccountCustomNSByDefault: cloudflare.F(true),
Expand Down
4 changes: 2 additions & 2 deletions ai_gateway/aigateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestAIGatewayListWithOptionalParams(t *testing.T) {
_, err := client.AIGateway.List(context.TODO(), ai_gateway.AIGatewayListParams{
AccountID: cloudflare.F("3ebbcb006d4d46d7bb6a8c7f14676cb0"),
ID: cloudflare.F("my-gateway"),
OrderBy: cloudflare.F("string"),
OrderBy: cloudflare.F("order_by"),
Page: cloudflare.F(int64(1)),
PerPage: cloudflare.F(int64(5)),
})
Expand Down Expand Up @@ -125,7 +125,7 @@ func TestAIGatewayDelete(t *testing.T) {
)
_, err := client.AIGateway.Delete(
context.TODO(),
"string",
"id",
ai_gateway.AIGatewayDeleteParams{
AccountID: cloudflare.F("3ebbcb006d4d46d7bb6a8c7f14676cb0"),
},
Expand Down
2 changes: 1 addition & 1 deletion ai_gateway/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestLogListWithOptionalParams(t *testing.T) {
OrderBy: cloudflare.F(ai_gateway.LogListParamsOrderByCreatedAt),
Page: cloudflare.F(int64(1)),
PerPage: cloudflare.F(int64(5)),
Search: cloudflare.F("string"),
Search: cloudflare.F("search"),
StartDate: cloudflare.F(time.Now()),
Success: cloudflare.F(true),
},
Expand Down
4 changes: 2 additions & 2 deletions alerting/destinationwebhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestDestinationWebhookNewWithOptionalParams(t *testing.T) {
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Name: cloudflare.F("Slack Webhook"),
URL: cloudflare.F("https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd"),
Secret: cloudflare.F("string"),
Secret: cloudflare.F("secret"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestDestinationWebhookUpdateWithOptionalParams(t *testing.T) {
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Name: cloudflare.F("Slack Webhook"),
URL: cloudflare.F("https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd"),
Secret: cloudflare.F("string"),
Secret: cloudflare.F("secret"),
},
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion brand_protection/brandprotection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestBrandProtectionURLInfoWithOptionalParams(t *testing.T) {
)
_, err := client.BrandProtection.URLInfo(context.TODO(), brand_protection.BrandProtectionURLInfoParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
URL: cloudflare.F("string"),
URL: cloudflare.F("url"),
URLIDParam: cloudflare.F(brand_protection.BrandProtectionURLInfoParamsURLIDParam{
URLID: cloudflare.F(int64(0)),
}),
Expand Down
2 changes: 1 addition & 1 deletion cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestCachePurgeWithOptionalParams(t *testing.T) {
option.WithAPIEmail("[email protected]"),
)
_, err := client.Cache.Purge(context.TODO(), cache.CachePurgeParams{
ZoneID: cloudflare.F("string"),
ZoneID: cloudflare.F("zone_id"),
Body: cache.CachePurgeParamsBodyCachePurgeFlexPurgeByTags{
Tags: cloudflare.F([]string{"a-cache-tag", "another-cache-tag"}),
},
Expand Down
2 changes: 1 addition & 1 deletion d1/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestDatabaseListWithOptionalParams(t *testing.T) {
)
_, err := client.D1.Database.List(context.TODO(), d1.DatabaseListParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Name: cloudflare.F("string"),
Name: cloudflare.F("name"),
Page: cloudflare.F(1.000000),
PerPage: cloudflare.F(10.000000),
})
Expand Down
4 changes: 2 additions & 2 deletions dns/record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ func TestRecordListWithOptionalParams(t *testing.T) {
_, err := client.DNS.Records.List(context.TODO(), dns.RecordListParams{
ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Comment: cloudflare.F(dns.RecordListParamsComment{
Present: cloudflare.F("string"),
Absent: cloudflare.F("string"),
Present: cloudflare.F("present"),
Absent: cloudflare.F("absent"),
Exact: cloudflare.F("Hello, world"),
Contains: cloudflare.F("ello, worl"),
Startswith: cloudflare.F("Hello, w"),
Expand Down
4 changes: 2 additions & 2 deletions dns/setting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestSettingEditWithOptionalParams(t *testing.T) {
option.WithAPIEmail("[email protected]"),
)
_, err := client.DNS.Settings.Edit(context.TODO(), dns.SettingEditParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
ZoneDefaults: cloudflare.F(dns.DNSSettingParam{
FoundationDNS: cloudflare.F(false),
MultiProvider: cloudflare.F(false),
Expand Down Expand Up @@ -74,7 +74,7 @@ func TestSettingGetWithOptionalParams(t *testing.T) {
option.WithAPIEmail("[email protected]"),
)
_, err := client.DNS.Settings.Get(context.TODO(), dns.SettingGetParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down
10 changes: 5 additions & 5 deletions firewall/accessrule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestAccessRuleNewWithOptionalParams(t *testing.T) {
Value: cloudflare.F("198.51.100.4"),
}),
Mode: cloudflare.F(firewall.AccessRuleNewParamsModeChallenge),
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
Notes: cloudflare.F("This rule is enabled because of an event that occurred on date X."),
})
if err != nil {
Expand All @@ -61,7 +61,7 @@ func TestAccessRuleListWithOptionalParams(t *testing.T) {
option.WithAPIEmail("[email protected]"),
)
_, err := client.Firewall.AccessRules.List(context.TODO(), firewall.AccessRuleListParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
Direction: cloudflare.F(firewall.AccessRuleListParamsDirectionDesc),
EgsPagination: cloudflare.F(firewall.AccessRuleListParamsEgsPagination{
Json: cloudflare.F(firewall.AccessRuleListParamsEgsPaginationJson{
Expand Down Expand Up @@ -107,7 +107,7 @@ func TestAccessRuleDeleteWithOptionalParams(t *testing.T) {
context.TODO(),
map[string]interface{}{},
firewall.AccessRuleDeleteParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
Expand Down Expand Up @@ -142,7 +142,7 @@ func TestAccessRuleEditWithOptionalParams(t *testing.T) {
Value: cloudflare.F("198.51.100.4"),
}),
Mode: cloudflare.F(firewall.AccessRuleEditParamsModeChallenge),
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
Notes: cloudflare.F("This rule is enabled because of an event that occurred on date X."),
},
)
Expand Down Expand Up @@ -173,7 +173,7 @@ func TestAccessRuleGetWithOptionalParams(t *testing.T) {
context.TODO(),
map[string]interface{}{},
firewall.AccessRuleGetParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion firewall/wafpackagerule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestWAFPackageRuleListWithOptionalParams(t *testing.T) {
Order: cloudflare.F(firewall.WAFPackageRuleListParamsOrderPriority),
Page: cloudflare.F(1.000000),
PerPage: cloudflare.F(5.000000),
Priority: cloudflare.F("string"),
Priority: cloudflare.F("priority"),
},
)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions images/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestV1Delete(t *testing.T) {
)
_, err := client.Images.V1.Delete(
context.TODO(),
"string",
"image_id",
images.V1DeleteParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
Expand Down Expand Up @@ -115,7 +115,7 @@ func TestV1EditWithOptionalParams(t *testing.T) {
)
_, err := client.Images.V1.Edit(
context.TODO(),
"string",
"image_id",
images.V1EditParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Metadata: cloudflare.F[any](map[string]interface{}{}),
Expand Down Expand Up @@ -146,7 +146,7 @@ func TestV1Get(t *testing.T) {
)
_, err := client.Images.V1.Get(
context.TODO(),
"string",
"image_id",
images.V1GetParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
Expand Down
2 changes: 1 addition & 1 deletion images/v1blob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestV1BlobGet(t *testing.T) {
)
resp, err := client.Images.V1.Blobs.Get(
context.TODO(),
"string",
"image_id",
images.V1BlobGetParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
},
Expand Down
2 changes: 1 addition & 1 deletion images/v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestV2ListWithOptionalParams(t *testing.T) {
)
_, err := client.Images.V2.List(context.TODO(), images.V2ListParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
ContinuationToken: cloudflare.F("string"),
ContinuationToken: cloudflare.F("continuation_token"),
PerPage: cloudflare.F(10.000000),
SortOrder: cloudflare.F(images.V2ListParamsSortOrderAsc),
})
Expand Down
2 changes: 1 addition & 1 deletion intel/attacksurfacereportissue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func TestAttackSurfaceReportIssueDismissWithOptionalParams(t *testing.T) {
)
_, err := client.Intel.AttackSurfaceReport.Issues.Dismiss(
context.TODO(),
"string",
"issue_id",
intel.AttackSurfaceReportIssueDismissParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Dismiss: cloudflare.F(true),
Expand Down
2 changes: 1 addition & 1 deletion intel/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestDNSListWithOptionalParams(t *testing.T) {
)
_, err := client.Intel.DNS.List(context.TODO(), intel.DNSListParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
IPV4: cloudflare.F("string"),
IPV4: cloudflare.F("ipv4"),
Page: cloudflare.F(1.000000),
PerPage: cloudflare.F(20.000000),
StartEndParams: cloudflare.F(intel.DNSListParamsStartEndParams{
Expand Down
2 changes: 1 addition & 1 deletion intel/domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestDomainGetWithOptionalParams(t *testing.T) {
)
_, err := client.Intel.Domains.Get(context.TODO(), intel.DomainGetParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Domain: cloudflare.F("string"),
Domain: cloudflare.F("domain"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down
4 changes: 2 additions & 2 deletions intel/ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func TestIPGetWithOptionalParams(t *testing.T) {
)
_, err := client.Intel.IPs.Get(context.TODO(), intel.IPGetParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
IPV4: cloudflare.F("string"),
IPV6: cloudflare.F("string"),
IPV4: cloudflare.F("ipv4"),
IPV6: cloudflare.F("ipv6"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down
2 changes: 1 addition & 1 deletion intel/miscategorization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestMiscategorizationNewWithOptionalParams(t *testing.T) {
IP: cloudflare.F[any](map[string]interface{}{}),
SecurityAdds: cloudflare.F([]float64{117.000000, 131.000000}),
SecurityRemoves: cloudflare.F([]float64{83.000000}),
URL: cloudflare.F("string"),
URL: cloudflare.F("url"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down
2 changes: 1 addition & 1 deletion intel/whois_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestWhoisGetWithOptionalParams(t *testing.T) {
)
_, err := client.Intel.Whois.Get(context.TODO(), intel.WhoisGetParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Domain: cloudflare.F("string"),
Domain: cloudflare.F("domain"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down
2 changes: 1 addition & 1 deletion ips/ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestIPListWithOptionalParams(t *testing.T) {
option.WithAPIEmail("[email protected]"),
)
_, err := client.IPs.List(context.TODO(), ips.IPListParams{
Networks: cloudflare.F("string"),
Networks: cloudflare.F("networks"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down
2 changes: 1 addition & 1 deletion logpush/datasetfield_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestDatasetFieldGetWithOptionalParams(t *testing.T) {
context.TODO(),
"http_requests",
logpush.DatasetFieldGetParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion logpush/datasetjob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestDatasetJobGetWithOptionalParams(t *testing.T) {
context.TODO(),
"http_requests",
logpush.DatasetJobGetParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
Expand Down
38 changes: 19 additions & 19 deletions logpush/job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestJobNewWithOptionalParams(t *testing.T) {
)
_, err := client.Logpush.Jobs.New(context.TODO(), logpush.JobNewParams{
DestinationConf: cloudflare.F("s3://mybucket/logs?region=us-west-2"),
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
Dataset: cloudflare.F("http_requests"),
Enabled: cloudflare.F(false),
Frequency: cloudflare.F(logpush.JobNewParamsFrequencyHigh),
Expand All @@ -42,15 +42,15 @@ func TestJobNewWithOptionalParams(t *testing.T) {
Name: cloudflare.F("example.com"),
OutputOptions: cloudflare.F(logpush.OutputOptionsParam{
Cve2021_4428: cloudflare.F(true),
BatchPrefix: cloudflare.F("string"),
BatchSuffix: cloudflare.F("string"),
FieldDelimiter: cloudflare.F("string"),
BatchPrefix: cloudflare.F("batch_prefix"),
BatchSuffix: cloudflare.F("batch_suffix"),
FieldDelimiter: cloudflare.F("field_delimiter"),
FieldNames: cloudflare.F([]string{"ClientIP", "EdgeStartTimestamp", "RayID"}),
OutputType: cloudflare.F(logpush.OutputOptionsOutputTypeNdjson),
RecordDelimiter: cloudflare.F("string"),
RecordPrefix: cloudflare.F("string"),
RecordSuffix: cloudflare.F("string"),
RecordTemplate: cloudflare.F("string"),
RecordDelimiter: cloudflare.F("record_delimiter"),
RecordPrefix: cloudflare.F("record_prefix"),
RecordSuffix: cloudflare.F("record_suffix"),
RecordTemplate: cloudflare.F("record_template"),
SampleRate: cloudflare.F(0.000000),
TimestampFormat: cloudflare.F(logpush.OutputOptionsTimestampFormatUnixnano),
}),
Expand Down Expand Up @@ -83,7 +83,7 @@ func TestJobUpdateWithOptionalParams(t *testing.T) {
context.TODO(),
int64(1),
logpush.JobUpdateParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
DestinationConf: cloudflare.F("s3://mybucket/logs?region=us-west-2"),
Enabled: cloudflare.F(false),
Frequency: cloudflare.F(logpush.JobUpdateParamsFrequencyHigh),
Expand All @@ -94,15 +94,15 @@ func TestJobUpdateWithOptionalParams(t *testing.T) {
MaxUploadRecords: cloudflare.F(int64(1000)),
OutputOptions: cloudflare.F(logpush.OutputOptionsParam{
Cve2021_4428: cloudflare.F(true),
BatchPrefix: cloudflare.F("string"),
BatchSuffix: cloudflare.F("string"),
FieldDelimiter: cloudflare.F("string"),
BatchPrefix: cloudflare.F("batch_prefix"),
BatchSuffix: cloudflare.F("batch_suffix"),
FieldDelimiter: cloudflare.F("field_delimiter"),
FieldNames: cloudflare.F([]string{"ClientIP", "EdgeStartTimestamp", "RayID"}),
OutputType: cloudflare.F(logpush.OutputOptionsOutputTypeNdjson),
RecordDelimiter: cloudflare.F("string"),
RecordPrefix: cloudflare.F("string"),
RecordSuffix: cloudflare.F("string"),
RecordTemplate: cloudflare.F("string"),
RecordDelimiter: cloudflare.F("record_delimiter"),
RecordPrefix: cloudflare.F("record_prefix"),
RecordSuffix: cloudflare.F("record_suffix"),
RecordTemplate: cloudflare.F("record_template"),
SampleRate: cloudflare.F(0.000000),
TimestampFormat: cloudflare.F(logpush.OutputOptionsTimestampFormatUnixnano),
}),
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestJobListWithOptionalParams(t *testing.T) {
option.WithAPIEmail("[email protected]"),
)
_, err := client.Logpush.Jobs.List(context.TODO(), logpush.JobListParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
})
if err != nil {
var apierr *cloudflare.Error
Expand Down Expand Up @@ -162,7 +162,7 @@ func TestJobDeleteWithOptionalParams(t *testing.T) {
context.TODO(),
int64(1),
logpush.JobDeleteParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
Expand Down Expand Up @@ -192,7 +192,7 @@ func TestJobGetWithOptionalParams(t *testing.T) {
context.TODO(),
int64(1),
logpush.JobGetParams{
AccountID: cloudflare.F("string"),
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
Expand Down
Loading