diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b800f6c7b0e..c008a3e4377 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "2.0.0-beta.3"
+ ".": "2.0.0-beta.4"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index cb1412e7ab3..24aae68af57 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1 +1 @@
-configured_endpoints: 1288
+configured_endpoints: 1282
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88e614b6440..afe74cfb0a7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## 2.0.0-beta.4 (2024-03-12)
+
+Full Changelog: [v2.0.0-beta.3...v2.0.0-beta.4](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.3...v2.0.0-beta.4)
+
+### Features
+
+* chore: create issue and pull-request templates ([de5037e](https://github.com/cloudflare/cloudflare-go/commit/de5037e4e27aa68265ea2eb2574932d1a3dbe06e))
+* OpenAPI spec update via Stainless API ([#1545](https://github.com/cloudflare/cloudflare-go/issues/1545)) ([755286e](https://github.com/cloudflare/cloudflare-go/commit/755286e7f5275ddd7ab4b79f895fc551b21911fd))
+* OpenAPI spec update via Stainless API ([#1546](https://github.com/cloudflare/cloudflare-go/issues/1546)) ([c2bbbba](https://github.com/cloudflare/cloudflare-go/commit/c2bbbbaa31cf8ab8779688f3d067b4cd1ef4b710))
+* OpenAPI spec update via Stainless API ([#1547](https://github.com/cloudflare/cloudflare-go/issues/1547)) ([2991edd](https://github.com/cloudflare/cloudflare-go/commit/2991eddb2bafc4e87e9066861c2685e42147b487))
+* OpenAPI spec update via Stainless API ([#1550](https://github.com/cloudflare/cloudflare-go/issues/1550)) ([4ba8991](https://github.com/cloudflare/cloudflare-go/commit/4ba89916744666388d9fc5b6fe67f447f9e1dd77))
+* OpenAPI spec update via Stainless API ([#1551](https://github.com/cloudflare/cloudflare-go/issues/1551)) ([8a14e82](https://github.com/cloudflare/cloudflare-go/commit/8a14e82483d3465bcf20d6e96ed230dd024a53af))
+* update via SDK Studio ([#1543](https://github.com/cloudflare/cloudflare-go/issues/1543)) ([2d66983](https://github.com/cloudflare/cloudflare-go/commit/2d669834707fa2130e04ea07dfc403f0370c528e))
+
## 2.0.0-beta.3 (2024-03-12)
Full Changelog: [v2.0.0-beta.2...v2.0.0-beta.3](https://github.com/cloudflare/cloudflare-go/compare/v2.0.0-beta.2...v2.0.0-beta.3)
diff --git a/README.md b/README.md
index 88b7fa6c298..344b3404bd0 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Or to pin the version:
```sh
-go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.3'
+go get -u 'github.com/cloudflare/cloudflare-go/v2@v2.0.0-beta.4'
```
diff --git a/accounts/account.go b/accounts/account.go
index 5e53377ec64..c066361ca7d 100644
--- a/accounts/account.go
+++ b/accounts/account.go
@@ -81,7 +81,7 @@ func (r *AccountService) Get(ctx context.Context, query AccountGetParams, opts .
opts = append(r.Options[:], opts...)
var env AccountGetResponseEnvelope
path := fmt.Sprintf("accounts/%v", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/accounts/member.go b/accounts/member.go
index 01c445c1519..6da6d2c5590 100644
--- a/accounts/member.go
+++ b/accounts/member.go
@@ -87,7 +87,7 @@ func (r *MemberService) Delete(ctx context.Context, memberID string, body Member
opts = append(r.Options[:], opts...)
var env MemberDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/members/%s", body.AccountID, memberID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -100,7 +100,7 @@ func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGe
opts = append(r.Options[:], opts...)
var env MemberGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/members/%s", query.AccountID, memberID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/accounts/role.go b/accounts/role.go
index 5f06a89613f..c3082280401 100644
--- a/accounts/role.go
+++ b/accounts/role.go
@@ -38,7 +38,7 @@ func (r *RoleService) List(ctx context.Context, query RoleListParams, opts ...op
opts = append(r.Options[:], opts...)
var env RoleListResponseEnvelope
path := fmt.Sprintf("accounts/%v/roles", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -51,7 +51,7 @@ func (r *RoleService) Get(ctx context.Context, roleID interface{}, query RoleGet
opts = append(r.Options[:], opts...)
var env RoleGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/roles/%v", query.AccountID, roleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/acm/totaltls.go b/acm/totaltls.go
index deea9b68dcd..470a80d4224 100644
--- a/acm/totaltls.go
+++ b/acm/totaltls.go
@@ -48,7 +48,7 @@ func (r *TotalTLSService) Get(ctx context.Context, query TotalTLSGetParams, opts
opts = append(r.Options[:], opts...)
var env TotalTLSGetResponseEnvelope
path := fmt.Sprintf("zones/%s/acm/total_tls", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/addressmap.go b/addressing/addressmap.go
index 6784ee0a484..ecedef6a110 100644
--- a/addressing/addressmap.go
+++ b/addressing/addressmap.go
@@ -58,7 +58,7 @@ func (r *AddressMapService) List(ctx context.Context, query AddressMapListParams
opts = append(r.Options[:], opts...)
var env AddressMapListResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/address_maps", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -72,7 +72,7 @@ func (r *AddressMapService) Delete(ctx context.Context, addressMapID string, bod
opts = append(r.Options[:], opts...)
var env AddressMapDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s", body.AccountID, addressMapID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -98,7 +98,7 @@ func (r *AddressMapService) Get(ctx context.Context, addressMapID string, query
opts = append(r.Options[:], opts...)
var env AddressMapGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s", query.AccountID, addressMapID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/addressmapaccount.go b/addressing/addressmapaccount.go
index b0f364bc82b..6eda041bb2d 100644
--- a/addressing/addressmapaccount.go
+++ b/addressing/addressmapaccount.go
@@ -39,7 +39,7 @@ func (r *AddressMapAccountService) Update(ctx context.Context, addressMapID stri
opts = append(r.Options[:], opts...)
var env AddressMapAccountUpdateResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/accounts/%s", body.AccountID, addressMapID, body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...)
if err != nil {
return
}
@@ -52,7 +52,7 @@ func (r *AddressMapAccountService) Delete(ctx context.Context, addressMapID stri
opts = append(r.Options[:], opts...)
var env AddressMapAccountDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/accounts/%s", body.AccountID, addressMapID, body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/addressmapip.go b/addressing/addressmapip.go
index 2a99a6f48d9..5ace3e2e4d6 100644
--- a/addressing/addressmapip.go
+++ b/addressing/addressmapip.go
@@ -39,7 +39,7 @@ func (r *AddressMapIPService) Update(ctx context.Context, addressMapID string, i
opts = append(r.Options[:], opts...)
var env AddressMapIPUpdateResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/ips/%s", body.AccountID, addressMapID, ipAddress)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...)
if err != nil {
return
}
@@ -52,7 +52,7 @@ func (r *AddressMapIPService) Delete(ctx context.Context, addressMapID string, i
opts = append(r.Options[:], opts...)
var env AddressMapIPDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/ips/%s", body.AccountID, addressMapID, ipAddress)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/addressmapzone.go b/addressing/addressmapzone.go
index 9ff611f0866..bfb7b0e8156 100644
--- a/addressing/addressmapzone.go
+++ b/addressing/addressmapzone.go
@@ -48,7 +48,7 @@ func (r *AddressMapZoneService) Update(ctx context.Context, addressMapID string,
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/zones/%s", accountOrZone, addressMapID, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...)
if err != nil {
return
}
@@ -70,7 +70,7 @@ func (r *AddressMapZoneService) Delete(ctx context.Context, addressMapID string,
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("accounts/%s/addressing/address_maps/%s/zones/%s", accountOrZone, addressMapID, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/loadocumentdownload.go b/addressing/loadocumentdownload.go
index aa0bf9537b5..a6e791877cf 100644
--- a/addressing/loadocumentdownload.go
+++ b/addressing/loadocumentdownload.go
@@ -34,7 +34,7 @@ func NewLOADocumentDownloadService(opts ...option.RequestOption) (r *LOADocument
func (r *LOADocumentDownloadService) Get(ctx context.Context, loaDocumentID string, query LOADocumentDownloadGetParams, opts ...option.RequestOption) (res *LOADocumentDownloadGetResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/addressing/loa_documents/%s/download", query.AccountID, loaDocumentID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/addressing/prefix.go b/addressing/prefix.go
index 0062cc6792a..99dddfe04bd 100644
--- a/addressing/prefix.go
+++ b/addressing/prefix.go
@@ -56,7 +56,7 @@ func (r *PrefixService) List(ctx context.Context, query PrefixListParams, opts .
opts = append(r.Options[:], opts...)
var env PrefixListResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -69,7 +69,7 @@ func (r *PrefixService) Delete(ctx context.Context, prefixID string, body Prefix
opts = append(r.Options[:], opts...)
var env PrefixDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s", body.AccountID, prefixID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -95,7 +95,7 @@ func (r *PrefixService) Get(ctx context.Context, prefixID string, query PrefixGe
opts = append(r.Options[:], opts...)
var env PrefixGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s", query.AccountID, prefixID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/prefixbgpbinding.go b/addressing/prefixbgpbinding.go
index 4ff3b8569bb..952106c9189 100644
--- a/addressing/prefixbgpbinding.go
+++ b/addressing/prefixbgpbinding.go
@@ -60,7 +60,7 @@ func (r *PrefixBGPBindingService) List(ctx context.Context, prefixID string, que
opts = append(r.Options[:], opts...)
var env PrefixBGPBindingListResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bindings", query.AccountID, prefixID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -73,7 +73,7 @@ func (r *PrefixBGPBindingService) Delete(ctx context.Context, prefixID string, b
opts = append(r.Options[:], opts...)
var env PrefixBGPBindingDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bindings/%s", body.AccountID, prefixID, bindingID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -86,7 +86,7 @@ func (r *PrefixBGPBindingService) Get(ctx context.Context, prefixID string, bind
opts = append(r.Options[:], opts...)
var env PrefixBGPBindingGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bindings/%s", query.AccountID, prefixID, bindingID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/prefixbgpprefix.go b/addressing/prefixbgpprefix.go
index 54998f14c2f..a8b461d1be4 100644
--- a/addressing/prefixbgpprefix.go
+++ b/addressing/prefixbgpprefix.go
@@ -40,7 +40,7 @@ func (r *PrefixBGPPrefixService) List(ctx context.Context, prefixID string, quer
opts = append(r.Options[:], opts...)
var env PrefixBGPPrefixListResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bgp/prefixes", query.AccountID, prefixID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -67,7 +67,7 @@ func (r *PrefixBGPPrefixService) Get(ctx context.Context, prefixID string, bgpPr
opts = append(r.Options[:], opts...)
var env PrefixBGPPrefixGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bgp/prefixes/%s", query.AccountID, prefixID, bgpPrefixID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/prefixbgpstatus.go b/addressing/prefixbgpstatus.go
index a8e7a5e44ac..965bc81bf3a 100644
--- a/addressing/prefixbgpstatus.go
+++ b/addressing/prefixbgpstatus.go
@@ -50,7 +50,7 @@ func (r *PrefixBGPStatusService) Get(ctx context.Context, prefixID string, query
opts = append(r.Options[:], opts...)
var env PrefixBGPStatusGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/bgp/status", query.AccountID, prefixID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/prefixdelegation.go b/addressing/prefixdelegation.go
index f5d57183936..82028e93f05 100644
--- a/addressing/prefixdelegation.go
+++ b/addressing/prefixdelegation.go
@@ -50,7 +50,7 @@ func (r *PrefixDelegationService) List(ctx context.Context, prefixID string, que
opts = append(r.Options[:], opts...)
var env PrefixDelegationListResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/delegations", query.AccountID, prefixID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -63,7 +63,7 @@ func (r *PrefixDelegationService) Delete(ctx context.Context, prefixID string, d
opts = append(r.Options[:], opts...)
var env PrefixDelegationDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/prefixes/%s/delegations/%s", body.AccountID, prefixID, delegationID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/addressing/service.go b/addressing/service.go
index 857d28913d3..4ce16052f79 100644
--- a/addressing/service.go
+++ b/addressing/service.go
@@ -38,7 +38,7 @@ func (r *ServiceService) List(ctx context.Context, query ServiceListParams, opts
opts = append(r.Options[:], opts...)
var env ServiceListResponseEnvelope
path := fmt.Sprintf("accounts/%s/addressing/services", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/alerting/v3.go b/alerting/v3.go
index a34ed1edc35..8874a97e32f 100644
--- a/alerting/v3.go
+++ b/alerting/v3.go
@@ -44,7 +44,7 @@ func (r *V3Service) List(ctx context.Context, query V3ListParams, opts ...option
opts = append(r.Options[:], opts...)
var env V3ListResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/available_alerts", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/alerting/v3destinationeligible.go b/alerting/v3destinationeligible.go
index ad769b1f9b6..6866ab86f7d 100644
--- a/alerting/v3destinationeligible.go
+++ b/alerting/v3destinationeligible.go
@@ -39,7 +39,7 @@ func (r *V3DestinationEligibleService) Get(ctx context.Context, query V3Destinat
opts = append(r.Options[:], opts...)
var env V3DestinationEligibleGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/eligible", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/alerting/v3destinationpagerduty.go b/alerting/v3destinationpagerduty.go
index 4b5b3bf19e0..db0a7bbd74a 100644
--- a/alerting/v3destinationpagerduty.go
+++ b/alerting/v3destinationpagerduty.go
@@ -39,7 +39,7 @@ func (r *V3DestinationPagerdutyService) New(ctx context.Context, body V3Destinat
opts = append(r.Options[:], opts...)
var env V3DestinationPagerdutyNewResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/pagerduty/connect", body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -52,7 +52,7 @@ func (r *V3DestinationPagerdutyService) Delete(ctx context.Context, body V3Desti
opts = append(r.Options[:], opts...)
var env V3DestinationPagerdutyDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/pagerduty", body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *V3DestinationPagerdutyService) Get(ctx context.Context, query V3Destina
opts = append(r.Options[:], opts...)
var env V3DestinationPagerdutyGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/pagerduty", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -78,7 +78,7 @@ func (r *V3DestinationPagerdutyService) Link(ctx context.Context, tokenID string
opts = append(r.Options[:], opts...)
var env V3DestinationPagerdutyLinkResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/pagerduty/connect/%s", query.AccountID, tokenID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/alerting/v3destinationwebhook.go b/alerting/v3destinationwebhook.go
index 55e5d736f48..f7619d93fa4 100644
--- a/alerting/v3destinationwebhook.go
+++ b/alerting/v3destinationwebhook.go
@@ -66,7 +66,7 @@ func (r *V3DestinationWebhookService) List(ctx context.Context, query V3Destinat
opts = append(r.Options[:], opts...)
var env V3DestinationWebhookListResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/webhooks", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *V3DestinationWebhookService) Delete(ctx context.Context, webhookID stri
opts = append(r.Options[:], opts...)
var env V3DestinationWebhookDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/webhooks/%s", body.AccountID, webhookID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *V3DestinationWebhookService) Get(ctx context.Context, webhookID string,
opts = append(r.Options[:], opts...)
var env V3DestinationWebhookGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/destinations/webhooks/%s", query.AccountID, webhookID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/alerting/v3policy.go b/alerting/v3policy.go
index 73814c3afbe..d8ed548cc0b 100644
--- a/alerting/v3policy.go
+++ b/alerting/v3policy.go
@@ -65,7 +65,7 @@ func (r *V3PolicyService) List(ctx context.Context, query V3PolicyListParams, op
opts = append(r.Options[:], opts...)
var env V3PolicyListResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/policies", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -78,7 +78,7 @@ func (r *V3PolicyService) Delete(ctx context.Context, policyID string, body V3Po
opts = append(r.Options[:], opts...)
var env V3PolicyDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/policies/%s", body.AccountID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -91,7 +91,7 @@ func (r *V3PolicyService) Get(ctx context.Context, policyID string, query V3Poli
opts = append(r.Options[:], opts...)
var env V3PolicyGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/alerting/v3/policies/%s", query.AccountID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/api.md b/api.md
index f34c9a068f1..6a4de255232 100644
--- a/api.md
+++ b/api.md
@@ -4669,31 +4669,24 @@ Methods:
### FleetStatus
-#### Devices
-
Response Types:
-- zero_trust.DigitalExperienceMonitoringDevice
+- zero_trust.DEXFleetStatusLiveResponse
Methods:
-- client.ZeroTrust.DEX.FleetStatus.Devices.List(ctx context.Context, params zero_trust.DEXFleetStatusDeviceListParams) (shared.V4PagePaginationArray[zero_trust.DigitalExperienceMonitoringDevice], error)
+- client.ZeroTrust.DEX.FleetStatus.Live(ctx context.Context, params zero_trust.DEXFleetStatusLiveParams) (zero_trust.DEXFleetStatusLiveResponse, error)
+- client.ZeroTrust.DEX.FleetStatus.OverTime(ctx context.Context, params zero_trust.DEXFleetStatusOverTimeParams) error
-#### Live
+#### Devices
Response Types:
-- zero_trust.DEXFleetStatusLiveListResponse
-
-Methods:
-
-- client.ZeroTrust.DEX.FleetStatus.Live.List(ctx context.Context, params zero_trust.DEXFleetStatusLiveListParams) (zero_trust.DEXFleetStatusLiveListResponse, error)
-
-#### OverTime
+- zero_trust.DigitalExperienceMonitoringDevice
Methods:
-- client.ZeroTrust.DEX.FleetStatus.OverTime.List(ctx context.Context, params zero_trust.DEXFleetStatusOverTimeListParams) error
+- client.ZeroTrust.DEX.FleetStatus.Devices.List(ctx context.Context, params zero_trust.DEXFleetStatusDeviceListParams) (shared.V4PagePaginationArray[zero_trust.DigitalExperienceMonitoringDevice], error)
### HTTPTests
@@ -4713,7 +4706,7 @@ Response Types:
Methods:
-- client.ZeroTrust.DEX.HTTPTests.Percentiles.List(ctx context.Context, testID string, params zero_trust.DEXHTTPTestPercentileListParams) (zero_trust.DigitalExperienceMonitoringHTTPDetailsPercentiles, error)
+- client.ZeroTrust.DEX.HTTPTests.Percentiles.Get(ctx context.Context, testID string, params zero_trust.DEXHTTPTestPercentileGetParams) (zero_trust.DigitalExperienceMonitoringHTTPDetailsPercentiles, error)
### Tests
@@ -4746,7 +4739,7 @@ Response Types:
Methods:
-- client.ZeroTrust.DEX.TracerouteTestResults.NetworkPath.List(ctx context.Context, testResultID string, query zero_trust.DEXTracerouteTestResultNetworkPathListParams) (zero_trust.DigitalExperienceMonitoringTracerouteTestResultNetworkPath, error)
+- client.ZeroTrust.DEX.TracerouteTestResults.NetworkPath.Get(ctx context.Context, testResultID string, query zero_trust.DEXTracerouteTestResultNetworkPathGetParams) (zero_trust.DigitalExperienceMonitoringTracerouteTestResultNetworkPath, error)
### TracerouteTests
@@ -5118,20 +5111,6 @@ Methods:
## Widgets
-Response Types:
-
-- challenges.NcChallengesAdminWidgetDetail
-- challenges.NcChallengesAdminWidgetList
-
-Methods:
-
-- client.Challenges.Widgets.New(ctx context.Context, accountIdentifier string, params challenges.WidgetNewParams) (challenges.NcChallengesAdminWidgetDetail, error)
-- client.Challenges.Widgets.Update(ctx context.Context, accountIdentifier string, sitekey string, body challenges.WidgetUpdateParams) (challenges.NcChallengesAdminWidgetDetail, error)
-- client.Challenges.Widgets.List(ctx context.Context, accountIdentifier string, query challenges.WidgetListParams) (shared.V4PagePaginationArray[challenges.NcChallengesAdminWidgetList], error)
-- client.Challenges.Widgets.Delete(ctx context.Context, accountIdentifier string, sitekey string) (challenges.NcChallengesAdminWidgetDetail, error)
-- client.Challenges.Widgets.Get(ctx context.Context, accountIdentifier string, sitekey string) (challenges.NcChallengesAdminWidgetDetail, error)
-- client.Challenges.Widgets.RotateSecret(ctx context.Context, accountIdentifier string, sitekey string, body challenges.WidgetRotateSecretParams) (challenges.NcChallengesAdminWidgetDetail, error)
-
# Hyperdrive
## Configs
diff --git a/argo/smartrouting.go b/argo/smartrouting.go
index 06e57f57e12..dfec2ef3983 100644
--- a/argo/smartrouting.go
+++ b/argo/smartrouting.go
@@ -52,7 +52,7 @@ func (r *SmartRoutingService) Get(ctx context.Context, query SmartRoutingGetPara
opts = append(r.Options[:], opts...)
var env SmartRoutingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/argo/smart_routing", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/argo/tieredcaching.go b/argo/tieredcaching.go
index d31489562b0..8f969163e8d 100644
--- a/argo/tieredcaching.go
+++ b/argo/tieredcaching.go
@@ -52,7 +52,7 @@ func (r *TieredCachingService) Get(ctx context.Context, query TieredCachingGetPa
opts = append(r.Options[:], opts...)
var env TieredCachingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/argo/tiered_caching", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/bot_management/botmanagement.go b/bot_management/botmanagement.go
index 03a8228a8fa..1001c3fa5d0 100644
--- a/bot_management/botmanagement.go
+++ b/bot_management/botmanagement.go
@@ -60,7 +60,7 @@ func (r *BotManagementService) Get(ctx context.Context, query BotManagementGetPa
opts = append(r.Options[:], opts...)
var env BotManagementGetResponseEnvelope
path := fmt.Sprintf("zones/%s/bot_management", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/cache/cachereserve.go b/cache/cachereserve.go
index abecf07ce30..c41890691a1 100644
--- a/cache/cachereserve.go
+++ b/cache/cachereserve.go
@@ -40,7 +40,7 @@ func (r *CacheReserveService) Clear(ctx context.Context, body CacheReserveClearP
opts = append(r.Options[:], opts...)
var env CacheReserveClearResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/cache_reserve_clear", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -76,7 +76,7 @@ func (r *CacheReserveService) Get(ctx context.Context, query CacheReserveGetPara
opts = append(r.Options[:], opts...)
var env CacheReserveGetResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/cache_reserve", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *CacheReserveService) Status(ctx context.Context, query CacheReserveStat
opts = append(r.Options[:], opts...)
var env CacheReserveStatusResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/cache_reserve_clear", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/cache/regionaltieredcache.go b/cache/regionaltieredcache.go
index b6a79ea9166..f35f6563c61 100644
--- a/cache/regionaltieredcache.go
+++ b/cache/regionaltieredcache.go
@@ -54,7 +54,7 @@ func (r *RegionalTieredCacheService) Get(ctx context.Context, query RegionalTier
opts = append(r.Options[:], opts...)
var env RegionalTieredCacheGetResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/regional_tiered_cache", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/cache/smarttieredcache.go b/cache/smarttieredcache.go
index a28177ff68c..6add140610b 100644
--- a/cache/smarttieredcache.go
+++ b/cache/smarttieredcache.go
@@ -39,7 +39,7 @@ func (r *SmartTieredCacheService) Delete(ctx context.Context, body SmartTieredCa
opts = append(r.Options[:], opts...)
var env SmartTieredCacheDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/tiered_cache_smart_topology_enable", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *SmartTieredCacheService) Get(ctx context.Context, query SmartTieredCach
opts = append(r.Options[:], opts...)
var env SmartTieredCacheGetResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/tiered_cache_smart_topology_enable", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/cache/variant.go b/cache/variant.go
index 803062cc94b..4e14bd07ab9 100644
--- a/cache/variant.go
+++ b/cache/variant.go
@@ -40,7 +40,7 @@ func (r *VariantService) Delete(ctx context.Context, body VariantDeleteParams, o
opts = append(r.Options[:], opts...)
var env VariantDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/variants", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *VariantService) Get(ctx context.Context, query VariantGetParams, opts .
opts = append(r.Options[:], opts...)
var env VariantGetResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/variants", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/calls/call.go b/calls/call.go
index c0b2dced75b..e16de5d7ce4 100644
--- a/calls/call.go
+++ b/calls/call.go
@@ -63,7 +63,7 @@ func (r *CallService) List(ctx context.Context, query CallListParams, opts ...op
opts = append(r.Options[:], opts...)
var env CallListResponseEnvelope
path := fmt.Sprintf("accounts/%s/calls/apps", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -76,7 +76,7 @@ func (r *CallService) Delete(ctx context.Context, appID string, body CallDeleteP
opts = append(r.Options[:], opts...)
var env CallDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/calls/apps/%s", body.AccountID, appID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -89,7 +89,7 @@ func (r *CallService) Get(ctx context.Context, appID string, query CallGetParams
opts = append(r.Options[:], opts...)
var env CallGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/calls/apps/%s", query.AccountID, appID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/challenges/widget.go b/challenges/widget.go
index 77a2fa6f118..e2a0ba7e7ce 100644
--- a/challenges/widget.go
+++ b/challenges/widget.go
@@ -3,17 +3,6 @@
package challenges
import (
- "context"
- "fmt"
- "net/http"
- "net/url"
- "time"
-
- "github.com/cloudflare/cloudflare-go/v2/internal/apijson"
- "github.com/cloudflare/cloudflare-go/v2/internal/apiquery"
- "github.com/cloudflare/cloudflare-go/v2/internal/param"
- "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
- "github.com/cloudflare/cloudflare-go/v2/internal/shared"
"github.com/cloudflare/cloudflare-go/v2/option"
)
@@ -33,842 +22,3 @@ func NewWidgetService(opts ...option.RequestOption) (r *WidgetService) {
r.Options = opts
return
}
-
-// Lists challenge widgets.
-func (r *WidgetService) New(ctx context.Context, accountIdentifier string, params WidgetNewParams, opts ...option.RequestOption) (res *NcChallengesAdminWidgetDetail, err error) {
- opts = append(r.Options[:], opts...)
- var env WidgetNewResponseEnvelope
- path := fmt.Sprintf("accounts/%s/challenges/widgets", accountIdentifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...)
- if err != nil {
- return
- }
- res = &env.Result
- return
-}
-
-// Update the configuration of a widget.
-func (r *WidgetService) Update(ctx context.Context, accountIdentifier string, sitekey string, body WidgetUpdateParams, opts ...option.RequestOption) (res *NcChallengesAdminWidgetDetail, err error) {
- opts = append(r.Options[:], opts...)
- var env WidgetUpdateResponseEnvelope
- path := fmt.Sprintf("accounts/%s/challenges/widgets/%s", accountIdentifier, sitekey)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...)
- if err != nil {
- return
- }
- res = &env.Result
- return
-}
-
-// Lists all turnstile widgets of an account.
-func (r *WidgetService) List(ctx context.Context, accountIdentifier string, query WidgetListParams, opts ...option.RequestOption) (res *shared.V4PagePaginationArray[NcChallengesAdminWidgetList], err error) {
- var raw *http.Response
- opts = append(r.Options, opts...)
- opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
- path := fmt.Sprintf("accounts/%s/challenges/widgets", accountIdentifier)
- cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...)
- if err != nil {
- return nil, err
- }
- err = cfg.Execute()
- if err != nil {
- return nil, err
- }
- res.SetPageConfig(cfg, raw)
- return res, nil
-}
-
-// Lists all turnstile widgets of an account.
-func (r *WidgetService) ListAutoPaging(ctx context.Context, accountIdentifier string, query WidgetListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[NcChallengesAdminWidgetList] {
- return shared.NewV4PagePaginationArrayAutoPager(r.List(ctx, accountIdentifier, query, opts...))
-}
-
-// Destroy a Turnstile Widget.
-func (r *WidgetService) Delete(ctx context.Context, accountIdentifier string, sitekey string, opts ...option.RequestOption) (res *NcChallengesAdminWidgetDetail, err error) {
- opts = append(r.Options[:], opts...)
- var env WidgetDeleteResponseEnvelope
- path := fmt.Sprintf("accounts/%s/challenges/widgets/%s", accountIdentifier, sitekey)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
- if err != nil {
- return
- }
- res = &env.Result
- return
-}
-
-// Show a single challenge widget configuration.
-func (r *WidgetService) Get(ctx context.Context, accountIdentifier string, sitekey string, opts ...option.RequestOption) (res *NcChallengesAdminWidgetDetail, err error) {
- opts = append(r.Options[:], opts...)
- var env WidgetGetResponseEnvelope
- path := fmt.Sprintf("accounts/%s/challenges/widgets/%s", accountIdentifier, sitekey)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
- if err != nil {
- return
- }
- res = &env.Result
- return
-}
-
-// Generate a new secret key for this widget. If `invalidate_immediately` is set to
-// `false`, the previous secret remains valid for 2 hours.
-//
-// Note that secrets cannot be rotated again during the grace period.
-func (r *WidgetService) RotateSecret(ctx context.Context, accountIdentifier string, sitekey string, body WidgetRotateSecretParams, opts ...option.RequestOption) (res *NcChallengesAdminWidgetDetail, err error) {
- opts = append(r.Options[:], opts...)
- var env WidgetRotateSecretResponseEnvelope
- path := fmt.Sprintf("accounts/%s/challenges/widgets/%s/rotate_secret", accountIdentifier, sitekey)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
- if err != nil {
- return
- }
- res = &env.Result
- return
-}
-
-// A Turnstile widget's detailed configuration
-type NcChallengesAdminWidgetDetail struct {
- // If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive
- // challenges in response to malicious bots (ENT only).
- BotFightMode bool `json:"bot_fight_mode,required"`
- // If Turnstile is embedded on a Cloudflare site and the widget should grant
- // challenge clearance, this setting can determine the clearance level to be set
- ClearanceLevel NcChallengesAdminWidgetDetailClearanceLevel `json:"clearance_level,required"`
- // When the widget was created.
- CreatedOn time.Time `json:"created_on,required" format:"date-time"`
- Domains []string `json:"domains,required"`
- // Widget Mode
- Mode NcChallengesAdminWidgetDetailMode `json:"mode,required"`
- // When the widget was modified.
- ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
- // Human readable widget name. Not unique. Cloudflare suggests that you set this to
- // a meaningful string to make it easier to identify your widget, and where it is
- // used.
- Name string `json:"name,required"`
- // Do not show any Cloudflare branding on the widget (ENT only).
- Offlabel bool `json:"offlabel,required"`
- // Region where this widget can be used.
- Region NcChallengesAdminWidgetDetailRegion `json:"region,required"`
- // Secret key for this widget.
- Secret string `json:"secret,required"`
- // Widget item identifier tag.
- Sitekey string `json:"sitekey,required"`
- JSON ncChallengesAdminWidgetDetailJSON `json:"-"`
-}
-
-// ncChallengesAdminWidgetDetailJSON contains the JSON metadata for the struct
-// [NcChallengesAdminWidgetDetail]
-type ncChallengesAdminWidgetDetailJSON struct {
- BotFightMode apijson.Field
- ClearanceLevel apijson.Field
- CreatedOn apijson.Field
- Domains apijson.Field
- Mode apijson.Field
- ModifiedOn apijson.Field
- Name apijson.Field
- Offlabel apijson.Field
- Region apijson.Field
- Secret apijson.Field
- Sitekey apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NcChallengesAdminWidgetDetail) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r ncChallengesAdminWidgetDetailJSON) RawJSON() string {
- return r.raw
-}
-
-// If Turnstile is embedded on a Cloudflare site and the widget should grant
-// challenge clearance, this setting can determine the clearance level to be set
-type NcChallengesAdminWidgetDetailClearanceLevel string
-
-const (
- NcChallengesAdminWidgetDetailClearanceLevelNoClearance NcChallengesAdminWidgetDetailClearanceLevel = "no_clearance"
- NcChallengesAdminWidgetDetailClearanceLevelJschallenge NcChallengesAdminWidgetDetailClearanceLevel = "jschallenge"
- NcChallengesAdminWidgetDetailClearanceLevelManaged NcChallengesAdminWidgetDetailClearanceLevel = "managed"
- NcChallengesAdminWidgetDetailClearanceLevelInteractive NcChallengesAdminWidgetDetailClearanceLevel = "interactive"
-)
-
-// Widget Mode
-type NcChallengesAdminWidgetDetailMode string
-
-const (
- NcChallengesAdminWidgetDetailModeNonInteractive NcChallengesAdminWidgetDetailMode = "non-interactive"
- NcChallengesAdminWidgetDetailModeInvisible NcChallengesAdminWidgetDetailMode = "invisible"
- NcChallengesAdminWidgetDetailModeManaged NcChallengesAdminWidgetDetailMode = "managed"
-)
-
-// Region where this widget can be used.
-type NcChallengesAdminWidgetDetailRegion string
-
-const (
- NcChallengesAdminWidgetDetailRegionWorld NcChallengesAdminWidgetDetailRegion = "world"
-)
-
-// A Turnstile Widgets configuration as it appears in listings
-type NcChallengesAdminWidgetList struct {
- // If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive
- // challenges in response to malicious bots (ENT only).
- BotFightMode bool `json:"bot_fight_mode,required"`
- // If Turnstile is embedded on a Cloudflare site and the widget should grant
- // challenge clearance, this setting can determine the clearance level to be set
- ClearanceLevel NcChallengesAdminWidgetListClearanceLevel `json:"clearance_level,required"`
- // When the widget was created.
- CreatedOn time.Time `json:"created_on,required" format:"date-time"`
- Domains []string `json:"domains,required"`
- // Widget Mode
- Mode NcChallengesAdminWidgetListMode `json:"mode,required"`
- // When the widget was modified.
- ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
- // Human readable widget name. Not unique. Cloudflare suggests that you set this to
- // a meaningful string to make it easier to identify your widget, and where it is
- // used.
- Name string `json:"name,required"`
- // Do not show any Cloudflare branding on the widget (ENT only).
- Offlabel bool `json:"offlabel,required"`
- // Region where this widget can be used.
- Region NcChallengesAdminWidgetListRegion `json:"region,required"`
- // Widget item identifier tag.
- Sitekey string `json:"sitekey,required"`
- JSON ncChallengesAdminWidgetListJSON `json:"-"`
-}
-
-// ncChallengesAdminWidgetListJSON contains the JSON metadata for the struct
-// [NcChallengesAdminWidgetList]
-type ncChallengesAdminWidgetListJSON struct {
- BotFightMode apijson.Field
- ClearanceLevel apijson.Field
- CreatedOn apijson.Field
- Domains apijson.Field
- Mode apijson.Field
- ModifiedOn apijson.Field
- Name apijson.Field
- Offlabel apijson.Field
- Region apijson.Field
- Sitekey apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *NcChallengesAdminWidgetList) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r ncChallengesAdminWidgetListJSON) RawJSON() string {
- return r.raw
-}
-
-// If Turnstile is embedded on a Cloudflare site and the widget should grant
-// challenge clearance, this setting can determine the clearance level to be set
-type NcChallengesAdminWidgetListClearanceLevel string
-
-const (
- NcChallengesAdminWidgetListClearanceLevelNoClearance NcChallengesAdminWidgetListClearanceLevel = "no_clearance"
- NcChallengesAdminWidgetListClearanceLevelJschallenge NcChallengesAdminWidgetListClearanceLevel = "jschallenge"
- NcChallengesAdminWidgetListClearanceLevelManaged NcChallengesAdminWidgetListClearanceLevel = "managed"
- NcChallengesAdminWidgetListClearanceLevelInteractive NcChallengesAdminWidgetListClearanceLevel = "interactive"
-)
-
-// Widget Mode
-type NcChallengesAdminWidgetListMode string
-
-const (
- NcChallengesAdminWidgetListModeNonInteractive NcChallengesAdminWidgetListMode = "non-interactive"
- NcChallengesAdminWidgetListModeInvisible NcChallengesAdminWidgetListMode = "invisible"
- NcChallengesAdminWidgetListModeManaged NcChallengesAdminWidgetListMode = "managed"
-)
-
-// Region where this widget can be used.
-type NcChallengesAdminWidgetListRegion string
-
-const (
- NcChallengesAdminWidgetListRegionWorld NcChallengesAdminWidgetListRegion = "world"
-)
-
-type WidgetNewParams struct {
- Domains param.Field[[]string] `json:"domains,required"`
- // Widget Mode
- Mode param.Field[WidgetNewParamsMode] `json:"mode,required"`
- // Human readable widget name. Not unique. Cloudflare suggests that you set this to
- // a meaningful string to make it easier to identify your widget, and where it is
- // used.
- Name param.Field[string] `json:"name,required"`
- // Direction to order widgets.
- Direction param.Field[WidgetNewParamsDirection] `query:"direction"`
- // Field to order widgets by.
- Order param.Field[WidgetNewParamsOrder] `query:"order"`
- // Page number of paginated results.
- Page param.Field[float64] `query:"page"`
- // Number of items per page.
- PerPage param.Field[float64] `query:"per_page"`
- // If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive
- // challenges in response to malicious bots (ENT only).
- BotFightMode param.Field[bool] `json:"bot_fight_mode"`
- // If Turnstile is embedded on a Cloudflare site and the widget should grant
- // challenge clearance, this setting can determine the clearance level to be set
- ClearanceLevel param.Field[WidgetNewParamsClearanceLevel] `json:"clearance_level"`
- // Do not show any Cloudflare branding on the widget (ENT only).
- Offlabel param.Field[bool] `json:"offlabel"`
- // Region where this widget can be used.
- Region param.Field[WidgetNewParamsRegion] `json:"region"`
-}
-
-func (r WidgetNewParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
-// URLQuery serializes [WidgetNewParams]'s query parameters as `url.Values`.
-func (r WidgetNewParams) URLQuery() (v url.Values) {
- return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
- ArrayFormat: apiquery.ArrayQueryFormatComma,
- NestedFormat: apiquery.NestedQueryFormatBrackets,
- })
-}
-
-// Widget Mode
-type WidgetNewParamsMode string
-
-const (
- WidgetNewParamsModeNonInteractive WidgetNewParamsMode = "non-interactive"
- WidgetNewParamsModeInvisible WidgetNewParamsMode = "invisible"
- WidgetNewParamsModeManaged WidgetNewParamsMode = "managed"
-)
-
-// Direction to order widgets.
-type WidgetNewParamsDirection string
-
-const (
- WidgetNewParamsDirectionAsc WidgetNewParamsDirection = "asc"
- WidgetNewParamsDirectionDesc WidgetNewParamsDirection = "desc"
-)
-
-// Field to order widgets by.
-type WidgetNewParamsOrder string
-
-const (
- WidgetNewParamsOrderID WidgetNewParamsOrder = "id"
- WidgetNewParamsOrderSitekey WidgetNewParamsOrder = "sitekey"
- WidgetNewParamsOrderName WidgetNewParamsOrder = "name"
- WidgetNewParamsOrderCreatedOn WidgetNewParamsOrder = "created_on"
- WidgetNewParamsOrderModifiedOn WidgetNewParamsOrder = "modified_on"
-)
-
-// If Turnstile is embedded on a Cloudflare site and the widget should grant
-// challenge clearance, this setting can determine the clearance level to be set
-type WidgetNewParamsClearanceLevel string
-
-const (
- WidgetNewParamsClearanceLevelNoClearance WidgetNewParamsClearanceLevel = "no_clearance"
- WidgetNewParamsClearanceLevelJschallenge WidgetNewParamsClearanceLevel = "jschallenge"
- WidgetNewParamsClearanceLevelManaged WidgetNewParamsClearanceLevel = "managed"
- WidgetNewParamsClearanceLevelInteractive WidgetNewParamsClearanceLevel = "interactive"
-)
-
-// Region where this widget can be used.
-type WidgetNewParamsRegion string
-
-const (
- WidgetNewParamsRegionWorld WidgetNewParamsRegion = "world"
-)
-
-type WidgetNewResponseEnvelope struct {
- Errors []WidgetNewResponseEnvelopeErrors `json:"errors,required"`
- Messages []WidgetNewResponseEnvelopeMessages `json:"messages,required"`
- // Whether the API call was successful
- Success bool `json:"success,required"`
- // A Turnstile widget's detailed configuration
- Result NcChallengesAdminWidgetDetail `json:"result"`
- ResultInfo WidgetNewResponseEnvelopeResultInfo `json:"result_info"`
- JSON widgetNewResponseEnvelopeJSON `json:"-"`
-}
-
-// widgetNewResponseEnvelopeJSON contains the JSON metadata for the struct
-// [WidgetNewResponseEnvelope]
-type widgetNewResponseEnvelopeJSON struct {
- Errors apijson.Field
- Messages apijson.Field
- Success apijson.Field
- Result apijson.Field
- ResultInfo apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetNewResponseEnvelopeJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetNewResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetNewResponseEnvelopeErrorsJSON `json:"-"`
-}
-
-// widgetNewResponseEnvelopeErrorsJSON contains the JSON metadata for the struct
-// [WidgetNewResponseEnvelopeErrors]
-type widgetNewResponseEnvelopeErrorsJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetNewResponseEnvelopeErrorsJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetNewResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetNewResponseEnvelopeMessagesJSON `json:"-"`
-}
-
-// widgetNewResponseEnvelopeMessagesJSON contains the JSON metadata for the struct
-// [WidgetNewResponseEnvelopeMessages]
-type widgetNewResponseEnvelopeMessagesJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetNewResponseEnvelopeMessagesJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetNewResponseEnvelopeResultInfo struct {
- // Total number of results for the requested service
- Count float64 `json:"count,required"`
- // Current page within paginated list of results
- Page float64 `json:"page,required"`
- // Number of results per page of results
- PerPage float64 `json:"per_page,required"`
- // Total results available without any search parameters
- TotalCount float64 `json:"total_count,required"`
- JSON widgetNewResponseEnvelopeResultInfoJSON `json:"-"`
-}
-
-// widgetNewResponseEnvelopeResultInfoJSON contains the JSON metadata for the
-// struct [WidgetNewResponseEnvelopeResultInfo]
-type widgetNewResponseEnvelopeResultInfoJSON struct {
- Count apijson.Field
- Page apijson.Field
- PerPage apijson.Field
- TotalCount apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetNewResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetNewResponseEnvelopeResultInfoJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetUpdateParams struct {
- Domains param.Field[[]string] `json:"domains,required"`
- // Widget Mode
- Mode param.Field[WidgetUpdateParamsMode] `json:"mode,required"`
- // Human readable widget name. Not unique. Cloudflare suggests that you set this to
- // a meaningful string to make it easier to identify your widget, and where it is
- // used.
- Name param.Field[string] `json:"name,required"`
- // If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive
- // challenges in response to malicious bots (ENT only).
- BotFightMode param.Field[bool] `json:"bot_fight_mode"`
- // If Turnstile is embedded on a Cloudflare site and the widget should grant
- // challenge clearance, this setting can determine the clearance level to be set
- ClearanceLevel param.Field[WidgetUpdateParamsClearanceLevel] `json:"clearance_level"`
- // Do not show any Cloudflare branding on the widget (ENT only).
- Offlabel param.Field[bool] `json:"offlabel"`
-}
-
-func (r WidgetUpdateParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
-// Widget Mode
-type WidgetUpdateParamsMode string
-
-const (
- WidgetUpdateParamsModeNonInteractive WidgetUpdateParamsMode = "non-interactive"
- WidgetUpdateParamsModeInvisible WidgetUpdateParamsMode = "invisible"
- WidgetUpdateParamsModeManaged WidgetUpdateParamsMode = "managed"
-)
-
-// If Turnstile is embedded on a Cloudflare site and the widget should grant
-// challenge clearance, this setting can determine the clearance level to be set
-type WidgetUpdateParamsClearanceLevel string
-
-const (
- WidgetUpdateParamsClearanceLevelNoClearance WidgetUpdateParamsClearanceLevel = "no_clearance"
- WidgetUpdateParamsClearanceLevelJschallenge WidgetUpdateParamsClearanceLevel = "jschallenge"
- WidgetUpdateParamsClearanceLevelManaged WidgetUpdateParamsClearanceLevel = "managed"
- WidgetUpdateParamsClearanceLevelInteractive WidgetUpdateParamsClearanceLevel = "interactive"
-)
-
-type WidgetUpdateResponseEnvelope struct {
- Errors []WidgetUpdateResponseEnvelopeErrors `json:"errors,required"`
- Messages []WidgetUpdateResponseEnvelopeMessages `json:"messages,required"`
- // Whether the API call was successful
- Success bool `json:"success,required"`
- // A Turnstile widget's detailed configuration
- Result NcChallengesAdminWidgetDetail `json:"result"`
- JSON widgetUpdateResponseEnvelopeJSON `json:"-"`
-}
-
-// widgetUpdateResponseEnvelopeJSON contains the JSON metadata for the struct
-// [WidgetUpdateResponseEnvelope]
-type widgetUpdateResponseEnvelopeJSON struct {
- Errors apijson.Field
- Messages apijson.Field
- Success apijson.Field
- Result apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetUpdateResponseEnvelopeJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetUpdateResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetUpdateResponseEnvelopeErrorsJSON `json:"-"`
-}
-
-// widgetUpdateResponseEnvelopeErrorsJSON contains the JSON metadata for the struct
-// [WidgetUpdateResponseEnvelopeErrors]
-type widgetUpdateResponseEnvelopeErrorsJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetUpdateResponseEnvelopeErrorsJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetUpdateResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetUpdateResponseEnvelopeMessagesJSON `json:"-"`
-}
-
-// widgetUpdateResponseEnvelopeMessagesJSON contains the JSON metadata for the
-// struct [WidgetUpdateResponseEnvelopeMessages]
-type widgetUpdateResponseEnvelopeMessagesJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetUpdateResponseEnvelopeMessagesJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetListParams struct {
- // Direction to order widgets.
- Direction param.Field[WidgetListParamsDirection] `query:"direction"`
- // Field to order widgets by.
- Order param.Field[WidgetListParamsOrder] `query:"order"`
- // Page number of paginated results.
- Page param.Field[float64] `query:"page"`
- // Number of items per page.
- PerPage param.Field[float64] `query:"per_page"`
-}
-
-// URLQuery serializes [WidgetListParams]'s query parameters as `url.Values`.
-func (r WidgetListParams) URLQuery() (v url.Values) {
- return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
- ArrayFormat: apiquery.ArrayQueryFormatComma,
- NestedFormat: apiquery.NestedQueryFormatBrackets,
- })
-}
-
-// Direction to order widgets.
-type WidgetListParamsDirection string
-
-const (
- WidgetListParamsDirectionAsc WidgetListParamsDirection = "asc"
- WidgetListParamsDirectionDesc WidgetListParamsDirection = "desc"
-)
-
-// Field to order widgets by.
-type WidgetListParamsOrder string
-
-const (
- WidgetListParamsOrderID WidgetListParamsOrder = "id"
- WidgetListParamsOrderSitekey WidgetListParamsOrder = "sitekey"
- WidgetListParamsOrderName WidgetListParamsOrder = "name"
- WidgetListParamsOrderCreatedOn WidgetListParamsOrder = "created_on"
- WidgetListParamsOrderModifiedOn WidgetListParamsOrder = "modified_on"
-)
-
-type WidgetDeleteResponseEnvelope struct {
- Errors []WidgetDeleteResponseEnvelopeErrors `json:"errors,required"`
- Messages []WidgetDeleteResponseEnvelopeMessages `json:"messages,required"`
- // Whether the API call was successful
- Success bool `json:"success,required"`
- // A Turnstile widget's detailed configuration
- Result NcChallengesAdminWidgetDetail `json:"result"`
- JSON widgetDeleteResponseEnvelopeJSON `json:"-"`
-}
-
-// widgetDeleteResponseEnvelopeJSON contains the JSON metadata for the struct
-// [WidgetDeleteResponseEnvelope]
-type widgetDeleteResponseEnvelopeJSON struct {
- Errors apijson.Field
- Messages apijson.Field
- Success apijson.Field
- Result apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetDeleteResponseEnvelopeJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetDeleteResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetDeleteResponseEnvelopeErrorsJSON `json:"-"`
-}
-
-// widgetDeleteResponseEnvelopeErrorsJSON contains the JSON metadata for the struct
-// [WidgetDeleteResponseEnvelopeErrors]
-type widgetDeleteResponseEnvelopeErrorsJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetDeleteResponseEnvelopeErrorsJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetDeleteResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetDeleteResponseEnvelopeMessagesJSON `json:"-"`
-}
-
-// widgetDeleteResponseEnvelopeMessagesJSON contains the JSON metadata for the
-// struct [WidgetDeleteResponseEnvelopeMessages]
-type widgetDeleteResponseEnvelopeMessagesJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetDeleteResponseEnvelopeMessagesJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetGetResponseEnvelope struct {
- Errors []WidgetGetResponseEnvelopeErrors `json:"errors,required"`
- Messages []WidgetGetResponseEnvelopeMessages `json:"messages,required"`
- // Whether the API call was successful
- Success bool `json:"success,required"`
- // A Turnstile widget's detailed configuration
- Result NcChallengesAdminWidgetDetail `json:"result"`
- JSON widgetGetResponseEnvelopeJSON `json:"-"`
-}
-
-// widgetGetResponseEnvelopeJSON contains the JSON metadata for the struct
-// [WidgetGetResponseEnvelope]
-type widgetGetResponseEnvelopeJSON struct {
- Errors apijson.Field
- Messages apijson.Field
- Success apijson.Field
- Result apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetGetResponseEnvelopeJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetGetResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetGetResponseEnvelopeErrorsJSON `json:"-"`
-}
-
-// widgetGetResponseEnvelopeErrorsJSON contains the JSON metadata for the struct
-// [WidgetGetResponseEnvelopeErrors]
-type widgetGetResponseEnvelopeErrorsJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetGetResponseEnvelopeErrorsJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetGetResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetGetResponseEnvelopeMessagesJSON `json:"-"`
-}
-
-// widgetGetResponseEnvelopeMessagesJSON contains the JSON metadata for the struct
-// [WidgetGetResponseEnvelopeMessages]
-type widgetGetResponseEnvelopeMessagesJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetGetResponseEnvelopeMessagesJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetRotateSecretParams struct {
- // If `invalidate_immediately` is set to `false`, the previous secret will remain
- // valid for two hours. Otherwise, the secret is immediately invalidated, and
- // requests using it will be rejected.
- InvalidateImmediately param.Field[bool] `json:"invalidate_immediately"`
-}
-
-func (r WidgetRotateSecretParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
-type WidgetRotateSecretResponseEnvelope struct {
- Errors []WidgetRotateSecretResponseEnvelopeErrors `json:"errors,required"`
- Messages []WidgetRotateSecretResponseEnvelopeMessages `json:"messages,required"`
- // Whether the API call was successful
- Success bool `json:"success,required"`
- // A Turnstile widget's detailed configuration
- Result NcChallengesAdminWidgetDetail `json:"result"`
- JSON widgetRotateSecretResponseEnvelopeJSON `json:"-"`
-}
-
-// widgetRotateSecretResponseEnvelopeJSON contains the JSON metadata for the struct
-// [WidgetRotateSecretResponseEnvelope]
-type widgetRotateSecretResponseEnvelopeJSON struct {
- Errors apijson.Field
- Messages apijson.Field
- Success apijson.Field
- Result apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetRotateSecretResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetRotateSecretResponseEnvelopeJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetRotateSecretResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetRotateSecretResponseEnvelopeErrorsJSON `json:"-"`
-}
-
-// widgetRotateSecretResponseEnvelopeErrorsJSON contains the JSON metadata for the
-// struct [WidgetRotateSecretResponseEnvelopeErrors]
-type widgetRotateSecretResponseEnvelopeErrorsJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetRotateSecretResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetRotateSecretResponseEnvelopeErrorsJSON) RawJSON() string {
- return r.raw
-}
-
-type WidgetRotateSecretResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON widgetRotateSecretResponseEnvelopeMessagesJSON `json:"-"`
-}
-
-// widgetRotateSecretResponseEnvelopeMessagesJSON contains the JSON metadata for
-// the struct [WidgetRotateSecretResponseEnvelopeMessages]
-type widgetRotateSecretResponseEnvelopeMessagesJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WidgetRotateSecretResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r widgetRotateSecretResponseEnvelopeMessagesJSON) RawJSON() string {
- return r.raw
-}
diff --git a/challenges/widget_test.go b/challenges/widget_test.go
deleted file mode 100644
index 5be4571a267..00000000000
--- a/challenges/widget_test.go
+++ /dev/null
@@ -1,211 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package challenges_test
-
-import (
- "context"
- "errors"
- "os"
- "testing"
-
- "github.com/cloudflare/cloudflare-go/v2"
- "github.com/cloudflare/cloudflare-go/v2/challenges"
- "github.com/cloudflare/cloudflare-go/v2/internal/testutil"
- "github.com/cloudflare/cloudflare-go/v2/option"
-)
-
-func TestWidgetNewWithOptionalParams(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 {
- baseURL = envURL
- }
- if !testutil.CheckTestServer(t, baseURL) {
- return
- }
- client := cloudflare.NewClient(
- option.WithBaseURL(baseURL),
- option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
- option.WithAPIEmail("user@example.com"),
- )
- _, err := client.Challenges.Widgets.New(
- context.TODO(),
- "023e105f4ecef8ad9ca31a8372d0c353",
- challenges.WidgetNewParams{
- Domains: cloudflare.F([]string{"203.0.113.1", "cloudflare.com", "blog.example.com"}),
- Mode: cloudflare.F(challenges.WidgetNewParamsModeInvisible),
- Name: cloudflare.F("blog.cloudflare.com login form"),
- Direction: cloudflare.F(challenges.WidgetNewParamsDirectionAsc),
- Order: cloudflare.F(challenges.WidgetNewParamsOrderID),
- Page: cloudflare.F(1.000000),
- PerPage: cloudflare.F(5.000000),
- BotFightMode: cloudflare.F(true),
- ClearanceLevel: cloudflare.F(challenges.WidgetNewParamsClearanceLevelInteractive),
- Offlabel: cloudflare.F(true),
- Region: cloudflare.F(challenges.WidgetNewParamsRegionWorld),
- },
- )
- if err != nil {
- var apierr *cloudflare.Error
- if errors.As(err, &apierr) {
- t.Log(string(apierr.DumpRequest(true)))
- }
- t.Fatalf("err should be nil: %s", err.Error())
- }
-}
-
-func TestWidgetUpdateWithOptionalParams(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 {
- baseURL = envURL
- }
- if !testutil.CheckTestServer(t, baseURL) {
- return
- }
- client := cloudflare.NewClient(
- option.WithBaseURL(baseURL),
- option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
- option.WithAPIEmail("user@example.com"),
- )
- _, err := client.Challenges.Widgets.Update(
- context.TODO(),
- "023e105f4ecef8ad9ca31a8372d0c353",
- "0x4AAF00AAAABn0R22HWm-YUc",
- challenges.WidgetUpdateParams{
- Domains: cloudflare.F([]string{"203.0.113.1", "cloudflare.com", "blog.example.com"}),
- Mode: cloudflare.F(challenges.WidgetUpdateParamsModeInvisible),
- Name: cloudflare.F("blog.cloudflare.com login form"),
- BotFightMode: cloudflare.F(true),
- ClearanceLevel: cloudflare.F(challenges.WidgetUpdateParamsClearanceLevelInteractive),
- Offlabel: cloudflare.F(true),
- },
- )
- if err != nil {
- var apierr *cloudflare.Error
- if errors.As(err, &apierr) {
- t.Log(string(apierr.DumpRequest(true)))
- }
- t.Fatalf("err should be nil: %s", err.Error())
- }
-}
-
-func TestWidgetListWithOptionalParams(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 {
- baseURL = envURL
- }
- if !testutil.CheckTestServer(t, baseURL) {
- return
- }
- client := cloudflare.NewClient(
- option.WithBaseURL(baseURL),
- option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
- option.WithAPIEmail("user@example.com"),
- )
- _, err := client.Challenges.Widgets.List(
- context.TODO(),
- "023e105f4ecef8ad9ca31a8372d0c353",
- challenges.WidgetListParams{
- Direction: cloudflare.F(challenges.WidgetListParamsDirectionAsc),
- Order: cloudflare.F(challenges.WidgetListParamsOrderID),
- Page: cloudflare.F(1.000000),
- PerPage: cloudflare.F(5.000000),
- },
- )
- if err != nil {
- var apierr *cloudflare.Error
- if errors.As(err, &apierr) {
- t.Log(string(apierr.DumpRequest(true)))
- }
- t.Fatalf("err should be nil: %s", err.Error())
- }
-}
-
-func TestWidgetDelete(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 {
- baseURL = envURL
- }
- if !testutil.CheckTestServer(t, baseURL) {
- return
- }
- client := cloudflare.NewClient(
- option.WithBaseURL(baseURL),
- option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
- option.WithAPIEmail("user@example.com"),
- )
- _, err := client.Challenges.Widgets.Delete(
- context.TODO(),
- "023e105f4ecef8ad9ca31a8372d0c353",
- "0x4AAF00AAAABn0R22HWm-YUc",
- )
- if err != nil {
- var apierr *cloudflare.Error
- if errors.As(err, &apierr) {
- t.Log(string(apierr.DumpRequest(true)))
- }
- t.Fatalf("err should be nil: %s", err.Error())
- }
-}
-
-func TestWidgetGet(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 {
- baseURL = envURL
- }
- if !testutil.CheckTestServer(t, baseURL) {
- return
- }
- client := cloudflare.NewClient(
- option.WithBaseURL(baseURL),
- option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
- option.WithAPIEmail("user@example.com"),
- )
- _, err := client.Challenges.Widgets.Get(
- context.TODO(),
- "023e105f4ecef8ad9ca31a8372d0c353",
- "0x4AAF00AAAABn0R22HWm-YUc",
- )
- if err != nil {
- var apierr *cloudflare.Error
- if errors.As(err, &apierr) {
- t.Log(string(apierr.DumpRequest(true)))
- }
- t.Fatalf("err should be nil: %s", err.Error())
- }
-}
-
-func TestWidgetRotateSecretWithOptionalParams(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 {
- baseURL = envURL
- }
- if !testutil.CheckTestServer(t, baseURL) {
- return
- }
- client := cloudflare.NewClient(
- option.WithBaseURL(baseURL),
- option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
- option.WithAPIEmail("user@example.com"),
- )
- _, err := client.Challenges.Widgets.RotateSecret(
- context.TODO(),
- "023e105f4ecef8ad9ca31a8372d0c353",
- "0x4AAF00AAAABn0R22HWm-YUc",
- challenges.WidgetRotateSecretParams{
- InvalidateImmediately: cloudflare.F(true),
- },
- )
- if err != nil {
- var apierr *cloudflare.Error
- if errors.As(err, &apierr) {
- t.Log(string(apierr.DumpRequest(true)))
- }
- t.Fatalf("err should be nil: %s", err.Error())
- }
-}
diff --git a/client_certificates/clientcertificate.go b/client_certificates/clientcertificate.go
index 20e02ce6047..af86ea8cf30 100644
--- a/client_certificates/clientcertificate.go
+++ b/client_certificates/clientcertificate.go
@@ -78,7 +78,7 @@ func (r *ClientCertificateService) Delete(ctx context.Context, clientCertificate
opts = append(r.Options[:], opts...)
var env ClientCertificateDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/client_certificates/%s", body.ZoneID, clientCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *ClientCertificateService) Edit(ctx context.Context, clientCertificateID
opts = append(r.Options[:], opts...)
var env ClientCertificateEditResponseEnvelope
path := fmt.Sprintf("zones/%s/client_certificates/%s", body.ZoneID, clientCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...)
if err != nil {
return
}
@@ -105,7 +105,7 @@ func (r *ClientCertificateService) Get(ctx context.Context, clientCertificateID
opts = append(r.Options[:], opts...)
var env ClientCertificateGetResponseEnvelope
path := fmt.Sprintf("zones/%s/client_certificates/%s", query.ZoneID, clientCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/custom_certificates/customcertificate.go b/custom_certificates/customcertificate.go
index 639d5619f76..edcd90653c5 100644
--- a/custom_certificates/customcertificate.go
+++ b/custom_certificates/customcertificate.go
@@ -85,7 +85,7 @@ func (r *CustomCertificateService) Delete(ctx context.Context, customCertificate
opts = append(r.Options[:], opts...)
var env CustomCertificateDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_certificates/%s", body.ZoneID, customCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -113,7 +113,7 @@ func (r *CustomCertificateService) Get(ctx context.Context, customCertificateID
opts = append(r.Options[:], opts...)
var env CustomCertificateGetResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_certificates/%s", query.ZoneID, customCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go
index e6c4e36df3e..8ad2a90cc5d 100644
--- a/custom_hostnames/customhostname.go
+++ b/custom_hostnames/customhostname.go
@@ -83,7 +83,7 @@ func (r *CustomHostnameService) ListAutoPaging(ctx context.Context, params Custo
func (r *CustomHostnameService) Delete(ctx context.Context, customHostnameID string, body CustomHostnameDeleteParams, opts ...option.RequestOption) (res *CustomHostnameDeleteResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("zones/%s/custom_hostnames/%s", body.ZoneID, customHostnameID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...)
return
}
@@ -108,7 +108,7 @@ func (r *CustomHostnameService) Get(ctx context.Context, customHostnameID string
opts = append(r.Options[:], opts...)
var env CustomHostnameGetResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_hostnames/%s", query.ZoneID, customHostnameID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/custom_hostnames/fallbackorigin.go b/custom_hostnames/fallbackorigin.go
index 731bf647f70..cb2329f037a 100644
--- a/custom_hostnames/fallbackorigin.go
+++ b/custom_hostnames/fallbackorigin.go
@@ -52,7 +52,7 @@ func (r *FallbackOriginService) Delete(ctx context.Context, body FallbackOriginD
opts = append(r.Options[:], opts...)
var env FallbackOriginDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_hostnames/fallback_origin", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *FallbackOriginService) Get(ctx context.Context, query FallbackOriginGet
opts = append(r.Options[:], opts...)
var env FallbackOriginGetResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_hostnames/fallback_origin", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/custom_nameservers/customnameserver.go b/custom_nameservers/customnameserver.go
index 20e61b8887f..4cba4b8709a 100644
--- a/custom_nameservers/customnameserver.go
+++ b/custom_nameservers/customnameserver.go
@@ -52,7 +52,7 @@ func (r *CustomNameserverService) Delete(ctx context.Context, customNSID string,
opts = append(r.Options[:], opts...)
var env CustomNameserverDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/custom_ns/%s", body.AccountID, customNSID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *CustomNameserverService) Availabilty(ctx context.Context, query CustomN
opts = append(r.Options[:], opts...)
var env CustomNameserverAvailabiltyResponseEnvelope
path := fmt.Sprintf("accounts/%s/custom_ns/availability", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -78,7 +78,7 @@ func (r *CustomNameserverService) Get(ctx context.Context, query CustomNameserve
opts = append(r.Options[:], opts...)
var env CustomNameserverGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/custom_ns", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -91,7 +91,7 @@ func (r *CustomNameserverService) Verify(ctx context.Context, body CustomNameser
opts = append(r.Options[:], opts...)
var env CustomNameserverVerifyResponseEnvelope
path := fmt.Sprintf("accounts/%s/custom_ns/verify", body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/dcv_delegation/uuid.go b/dcv_delegation/uuid.go
index ba84409a8fb..b8d36bcbdeb 100644
--- a/dcv_delegation/uuid.go
+++ b/dcv_delegation/uuid.go
@@ -36,7 +36,7 @@ func (r *UUIDService) Get(ctx context.Context, query UUIDGetParams, opts ...opti
opts = append(r.Options[:], opts...)
var env UUIDGetResponseEnvelope
path := fmt.Sprintf("zones/%s/dcv_delegation/uuid", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/dns/firewall.go b/dns/firewall.go
index 1568a4d7c4e..c4df75a1b1d 100644
--- a/dns/firewall.go
+++ b/dns/firewall.go
@@ -79,7 +79,7 @@ func (r *FirewallService) Delete(ctx context.Context, dnsFirewallID string, body
opts = append(r.Options[:], opts...)
var env FirewallDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/dns_firewall/%s", body.AccountID, dnsFirewallID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -105,7 +105,7 @@ func (r *FirewallService) Get(ctx context.Context, dnsFirewallID string, query F
opts = append(r.Options[:], opts...)
var env FirewallGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dns_firewall/%s", query.AccountID, dnsFirewallID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/dns/record.go b/dns/record.go
index 87dd3e7e6ba..43874c1a8bd 100644
--- a/dns/record.go
+++ b/dns/record.go
@@ -102,7 +102,7 @@ func (r *RecordService) Delete(ctx context.Context, dnsRecordID string, body Rec
opts = append(r.Options[:], opts...)
var env RecordDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/dns_records/%s", body.ZoneID, dnsRecordID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -139,7 +139,7 @@ func (r *RecordService) Export(ctx context.Context, query RecordExportParams, op
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "text/plain")}, opts...)
path := fmt.Sprintf("zones/%s/dns_records/export", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
@@ -148,7 +148,7 @@ func (r *RecordService) Get(ctx context.Context, dnsRecordID string, query Recor
opts = append(r.Options[:], opts...)
var env RecordGetResponseEnvelope
path := fmt.Sprintf("zones/%s/dns_records/%s", query.ZoneID, dnsRecordID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -182,7 +182,7 @@ func (r *RecordService) Scan(ctx context.Context, body RecordScanParams, opts ..
opts = append(r.Options[:], opts...)
var env RecordScanResponseEnvelope
path := fmt.Sprintf("zones/%s/dns_records/scan", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/dnssec/dnssec.go b/dnssec/dnssec.go
index 1425546a250..081bf0d76fb 100644
--- a/dnssec/dnssec.go
+++ b/dnssec/dnssec.go
@@ -39,7 +39,7 @@ func (r *DNSSECService) Delete(ctx context.Context, body DNSSECDeleteParams, opt
opts = append(r.Options[:], opts...)
var env DNSSECDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/dnssec", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *DNSSECService) Get(ctx context.Context, query DNSSECGetParams, opts ...
opts = append(r.Options[:], opts...)
var env DNSSECGetResponseEnvelope
path := fmt.Sprintf("zones/%s/dnssec", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/durable_objects/namespace.go b/durable_objects/namespace.go
index 606f79f4028..109f5a0fcb3 100644
--- a/durable_objects/namespace.go
+++ b/durable_objects/namespace.go
@@ -37,7 +37,7 @@ func (r *NamespaceService) List(ctx context.Context, query NamespaceListParams,
opts = append(r.Options[:], opts...)
var env NamespaceListResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/durable_objects/namespaces", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/firewall/accessrule.go b/firewall/accessrule.go
index 3668256cafc..73ea80e0201 100644
--- a/firewall/accessrule.go
+++ b/firewall/accessrule.go
@@ -113,7 +113,7 @@ func (r *AccessRuleService) Delete(ctx context.Context, identifier interface{},
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/firewall/access_rules/rules/%v", accountOrZone, accountOrZoneID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -159,7 +159,7 @@ func (r *AccessRuleService) Get(ctx context.Context, identifier interface{}, que
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/firewall/access_rules/rules/%v", accountOrZone, accountOrZoneID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/firewall/rule.go b/firewall/rule.go
index 5806a115d91..6d18859ad4a 100644
--- a/firewall/rule.go
+++ b/firewall/rule.go
@@ -118,7 +118,7 @@ func (r *RuleService) Get(ctx context.Context, zoneIdentifier string, id string,
opts = append(r.Options[:], opts...)
var env RuleGetResponseEnvelope
path := fmt.Sprintf("zones/%s/firewall/rules/%s", zoneIdentifier, id)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/firewall/wafpackagegroup.go b/firewall/wafpackagegroup.go
index a232356ebeb..5f94fbd832e 100644
--- a/firewall/wafpackagegroup.go
+++ b/firewall/wafpackagegroup.go
@@ -90,7 +90,7 @@ func (r *WAFPackageGroupService) Get(ctx context.Context, packageID string, grou
opts = append(r.Options[:], opts...)
var env WAFPackageGroupGetResponseEnvelope
path := fmt.Sprintf("zones/%s/firewall/waf/packages/%s/groups/%s", query.ZoneID, packageID, groupID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/firewall/wafpackagerule.go b/firewall/wafpackagerule.go
index b553e9a5405..94c87c313af 100644
--- a/firewall/wafpackagerule.go
+++ b/firewall/wafpackagerule.go
@@ -89,7 +89,7 @@ func (r *WAFPackageRuleService) Get(ctx context.Context, packageID string, ruleI
opts = append(r.Options[:], opts...)
var env WAFPackageRuleGetResponseEnvelope
path := fmt.Sprintf("zones/%s/firewall/waf/packages/%s/rules/%s", query.ZoneID, packageID, ruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/hostnames/settingtls.go b/hostnames/settingtls.go
index 36614e3f1d2..441ad4925d4 100644
--- a/hostnames/settingtls.go
+++ b/hostnames/settingtls.go
@@ -52,7 +52,7 @@ func (r *SettingTLSService) Delete(ctx context.Context, settingID SettingTLSDele
opts = append(r.Options[:], opts...)
var env SettingTLSDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/hostnames/settings/%v/%s", body.ZoneID, settingID, hostname)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *SettingTLSService) Get(ctx context.Context, settingID SettingTLSGetPara
opts = append(r.Options[:], opts...)
var env SettingTLSGetResponseEnvelope
path := fmt.Sprintf("zones/%s/hostnames/settings/%v", query.ZoneID, settingID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/hyperdrive/config.go b/hyperdrive/config.go
index 415a0a81727..d8b8840617b 100644
--- a/hyperdrive/config.go
+++ b/hyperdrive/config.go
@@ -64,7 +64,7 @@ func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts .
opts = append(r.Options[:], opts...)
var env ConfigListResponseEnvelope
path := fmt.Sprintf("accounts/%s/hyperdrive/configs", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -77,7 +77,7 @@ func (r *ConfigService) Delete(ctx context.Context, hyperdriveID string, body Co
opts = append(r.Options[:], opts...)
var env ConfigDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/hyperdrive/configs/%s", body.AccountID, hyperdriveID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -104,7 +104,7 @@ func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query Conf
opts = append(r.Options[:], opts...)
var env ConfigGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/hyperdrive/configs/%s", query.AccountID, hyperdriveID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/images/v1.go b/images/v1.go
index c1bcd9c50e7..ad8dec9464b 100644
--- a/images/v1.go
+++ b/images/v1.go
@@ -90,7 +90,7 @@ func (r *V1Service) Delete(ctx context.Context, imageID string, body V1DeletePar
opts = append(r.Options[:], opts...)
var env V1DeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/%s", body.AccountID, imageID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -117,7 +117,7 @@ func (r *V1Service) Get(ctx context.Context, imageID string, query V1GetParams,
opts = append(r.Options[:], opts...)
var env V1GetResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/%s", query.AccountID, imageID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/images/v1blob.go b/images/v1blob.go
index df2118da2e3..44277d4974e 100644
--- a/images/v1blob.go
+++ b/images/v1blob.go
@@ -35,7 +35,7 @@ func (r *V1BlobService) Get(ctx context.Context, imageID string, query V1BlobGet
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "image/*")}, opts...)
path := fmt.Sprintf("accounts/%s/images/v1/%s/blob", query.AccountID, imageID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/images/v1key.go b/images/v1key.go
index 3749f527189..72136503d31 100644
--- a/images/v1key.go
+++ b/images/v1key.go
@@ -35,7 +35,7 @@ func (r *V1KeyService) Update(ctx context.Context, signingKeyName interface{}, b
opts = append(r.Options[:], opts...)
var env V1KeyUpdateResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/keys/%v", body.AccountID, signingKeyName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...)
if err != nil {
return
}
@@ -48,7 +48,7 @@ func (r *V1KeyService) List(ctx context.Context, query V1KeyListParams, opts ...
opts = append(r.Options[:], opts...)
var env V1KeyListResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/keys", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -62,7 +62,7 @@ func (r *V1KeyService) Delete(ctx context.Context, signingKeyName interface{}, b
opts = append(r.Options[:], opts...)
var env V1KeyDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/keys/%v", body.AccountID, signingKeyName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/images/v1stat.go b/images/v1stat.go
index adf266d2a57..81eca7989f5 100644
--- a/images/v1stat.go
+++ b/images/v1stat.go
@@ -35,7 +35,7 @@ func (r *V1StatService) Get(ctx context.Context, query V1StatGetParams, opts ...
opts = append(r.Options[:], opts...)
var env V1StatGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/stats", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/images/v1variant.go b/images/v1variant.go
index b8d1cafcf3f..9095639993f 100644
--- a/images/v1variant.go
+++ b/images/v1variant.go
@@ -51,7 +51,7 @@ func (r *V1VariantService) List(ctx context.Context, query V1VariantListParams,
opts = append(r.Options[:], opts...)
var env V1VariantListResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/variants", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *V1VariantService) Delete(ctx context.Context, variantID interface{}, bo
opts = append(r.Options[:], opts...)
var env V1VariantDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", body.AccountID, variantID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -90,7 +90,7 @@ func (r *V1VariantService) Get(ctx context.Context, variantID interface{}, query
opts = append(r.Options[:], opts...)
var env V1VariantGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/images/v1/variants/%v", query.AccountID, variantID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/intel/asn.go b/intel/asn.go
index 633bb3e9337..2669ce735e6 100644
--- a/intel/asn.go
+++ b/intel/asn.go
@@ -37,7 +37,7 @@ func (r *ASNService) Get(ctx context.Context, asn IntelASNParam, query ASNGetPar
opts = append(r.Options[:], opts...)
var env ASNGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/intel/asn/%v", query.AccountID, asn)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/intel/asnsubnet.go b/intel/asnsubnet.go
index 8e5a4a31dc6..64344228607 100644
--- a/intel/asnsubnet.go
+++ b/intel/asnsubnet.go
@@ -34,7 +34,7 @@ func NewASNSubnetService(opts ...option.RequestOption) (r *ASNSubnetService) {
func (r *ASNSubnetService) Get(ctx context.Context, asn IntelASNParam, query ASNSubnetGetParams, opts ...option.RequestOption) (res *ASNSubnetGetResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/intel/asn/%v/subnets", query.AccountID, asn)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/intel/attacksurfacereportissuetype.go b/intel/attacksurfacereportissuetype.go
index 81d3a1e9e53..3fa2f97ce3a 100644
--- a/intel/attacksurfacereportissuetype.go
+++ b/intel/attacksurfacereportissuetype.go
@@ -36,7 +36,7 @@ func (r *AttackSurfaceReportIssueTypeService) Get(ctx context.Context, query Att
opts = append(r.Options[:], opts...)
var env AttackSurfaceReportIssueTypeGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/intel/attack-surface-report/issue-types", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/intel/indicatorfeed.go b/intel/indicatorfeed.go
index 814d6265f65..10c04ca2864 100644
--- a/intel/indicatorfeed.go
+++ b/intel/indicatorfeed.go
@@ -65,7 +65,7 @@ func (r *IndicatorFeedService) List(ctx context.Context, query IndicatorFeedList
opts = append(r.Options[:], opts...)
var env IndicatorFeedListResponseEnvelope
path := fmt.Sprintf("accounts/%s/intel/indicator-feeds", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -78,7 +78,7 @@ func (r *IndicatorFeedService) Data(ctx context.Context, feedID int64, query Ind
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "text/csv")}, opts...)
path := fmt.Sprintf("accounts/%s/intel/indicator-feeds/%v/data", query.AccountID, feedID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
@@ -87,7 +87,7 @@ func (r *IndicatorFeedService) Get(ctx context.Context, feedID int64, query Indi
opts = append(r.Options[:], opts...)
var env IndicatorFeedGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/intel/indicator-feeds/%v", query.AccountID, feedID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/intel/indicatorfeedpermission.go b/intel/indicatorfeedpermission.go
index 15b00bd2c47..1d2192361cc 100644
--- a/intel/indicatorfeedpermission.go
+++ b/intel/indicatorfeedpermission.go
@@ -49,7 +49,7 @@ func (r *IndicatorFeedPermissionService) List(ctx context.Context, query Indicat
opts = append(r.Options[:], opts...)
var env IndicatorFeedPermissionListResponseEnvelope
path := fmt.Sprintf("accounts/%s/intel/indicator-feeds/permissions/view", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/intel/iplist.go b/intel/iplist.go
index dc518ad35c5..5fd8810e038 100644
--- a/intel/iplist.go
+++ b/intel/iplist.go
@@ -35,7 +35,7 @@ func (r *IPListService) Get(ctx context.Context, query IPListGetParams, opts ...
opts = append(r.Options[:], opts...)
var env IPListGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/intel/ip-list", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/intel/sinkhole.go b/intel/sinkhole.go
index 158b51d0d25..e253a237eb4 100644
--- a/intel/sinkhole.go
+++ b/intel/sinkhole.go
@@ -36,7 +36,7 @@ func (r *SinkholeService) List(ctx context.Context, query SinkholeListParams, op
opts = append(r.Options[:], opts...)
var env SinkholeListResponseEnvelope
path := fmt.Sprintf("accounts/%s/intel/sinkholes", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/internal/requestconfig/requestconfig.go b/internal/requestconfig/requestconfig.go
index 36ea1650ff8..7f5fc8730d1 100644
--- a/internal/requestconfig/requestconfig.go
+++ b/internal/requestconfig/requestconfig.go
@@ -92,8 +92,11 @@ func NewRequestConfig(ctx context.Context, method string, u string, body interfa
hasSerializationFunc = true
}
if body, ok := body.(apiquery.Queryer); ok {
- u = u + "?" + body.URLQuery().Encode()
hasSerializationFunc = true
+ params := body.URLQuery().Encode()
+ if params != "" {
+ u = u + "?" + params
+ }
}
// Fallback to json serialization if none of the serialization functions that we expect
diff --git a/internal/version.go b/internal/version.go
index 17f980fc196..9403a6ab84f 100644
--- a/internal/version.go
+++ b/internal/version.go
@@ -2,4 +2,4 @@
package internal
-const PackageVersion = "2.0.0-beta.3" // x-release-please-version
+const PackageVersion = "2.0.0-beta.4" // x-release-please-version
diff --git a/keyless_certificates/keylesscertificate.go b/keyless_certificates/keylesscertificate.go
index 6f06f053c29..25b1593a501 100644
--- a/keyless_certificates/keylesscertificate.go
+++ b/keyless_certificates/keylesscertificate.go
@@ -50,7 +50,7 @@ func (r *KeylessCertificateService) List(ctx context.Context, query KeylessCerti
opts = append(r.Options[:], opts...)
var env KeylessCertificateListResponseEnvelope
path := fmt.Sprintf("zones/%s/keyless_certificates", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -63,7 +63,7 @@ func (r *KeylessCertificateService) Delete(ctx context.Context, keylessCertifica
opts = append(r.Options[:], opts...)
var env KeylessCertificateDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/keyless_certificates/%s", body.ZoneID, keylessCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -90,7 +90,7 @@ func (r *KeylessCertificateService) Get(ctx context.Context, keylessCertificateI
opts = append(r.Options[:], opts...)
var env KeylessCertificateGetResponseEnvelope
path := fmt.Sprintf("zones/%s/keyless_certificates/%s", query.ZoneID, keylessCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/kv/namespace.go b/kv/namespace.go
index c13d90a1014..b4e015bd736 100644
--- a/kv/namespace.go
+++ b/kv/namespace.go
@@ -99,7 +99,7 @@ func (r *NamespaceService) Delete(ctx context.Context, namespaceID string, body
opts = append(r.Options[:], opts...)
var env NamespaceDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s", body.AccountID, namespaceID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/kv/namespacemetadata.go b/kv/namespacemetadata.go
index 281d446e95a..ebe588d75a6 100644
--- a/kv/namespacemetadata.go
+++ b/kv/namespacemetadata.go
@@ -38,7 +38,7 @@ func (r *NamespaceMetadataService) Get(ctx context.Context, namespaceID string,
opts = append(r.Options[:], opts...)
var env NamespaceMetadataGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s/metadata/%s", query.AccountID, namespaceID, keyName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/kv/namespacevalue.go b/kv/namespacevalue.go
index a3705ad3b90..e3ab1815957 100644
--- a/kv/namespacevalue.go
+++ b/kv/namespacevalue.go
@@ -58,7 +58,7 @@ func (r *NamespaceValueService) Delete(ctx context.Context, namespaceID string,
opts = append(r.Options[:], opts...)
var env NamespaceValueDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s/values/%s", body.AccountID, namespaceID, keyName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *NamespaceValueService) Delete(ctx context.Context, namespaceID string,
func (r *NamespaceValueService) Get(ctx context.Context, namespaceID string, keyName string, query NamespaceValueGetParams, opts ...option.RequestOption) (res *string, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/storage/kv/namespaces/%s/values/%s", query.AccountID, namespaceID, keyName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/load_balancers/loadbalancer.go b/load_balancers/loadbalancer.go
index d3f58eefe6a..28b83af47bd 100644
--- a/load_balancers/loadbalancer.go
+++ b/load_balancers/loadbalancer.go
@@ -73,7 +73,7 @@ func (r *LoadBalancerService) List(ctx context.Context, query LoadBalancerListPa
opts = append(r.Options[:], opts...)
var env LoadBalancerListResponseEnvelope
path := fmt.Sprintf("zones/%s/load_balancers", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -86,7 +86,7 @@ func (r *LoadBalancerService) Delete(ctx context.Context, loadBalancerID string,
opts = append(r.Options[:], opts...)
var env LoadBalancerDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/load_balancers/%s", body.ZoneID, loadBalancerID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -112,7 +112,7 @@ func (r *LoadBalancerService) Get(ctx context.Context, loadBalancerID string, qu
opts = append(r.Options[:], opts...)
var env LoadBalancerGetResponseEnvelope
path := fmt.Sprintf("zones/%s/load_balancers/%s", query.ZoneID, loadBalancerID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/load_balancers/monitor.go b/load_balancers/monitor.go
index ce9ffa4954c..a3f2dc29b50 100644
--- a/load_balancers/monitor.go
+++ b/load_balancers/monitor.go
@@ -66,7 +66,7 @@ func (r *MonitorService) List(ctx context.Context, query MonitorListParams, opts
opts = append(r.Options[:], opts...)
var env MonitorListResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/monitors", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *MonitorService) Delete(ctx context.Context, monitorID string, body Moni
opts = append(r.Options[:], opts...)
var env MonitorDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s", body.AccountID, monitorID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -105,7 +105,7 @@ func (r *MonitorService) Get(ctx context.Context, monitorID string, query Monito
opts = append(r.Options[:], opts...)
var env MonitorGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s", query.AccountID, monitorID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/load_balancers/monitorreference.go b/load_balancers/monitorreference.go
index 7b3fe7f1df4..878902c1950 100644
--- a/load_balancers/monitorreference.go
+++ b/load_balancers/monitorreference.go
@@ -36,7 +36,7 @@ func (r *MonitorReferenceService) Get(ctx context.Context, monitorID string, que
opts = append(r.Options[:], opts...)
var env MonitorReferenceGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/monitors/%s/references", query.AccountID, monitorID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/load_balancers/pool.go b/load_balancers/pool.go
index 7fd4ff04be9..e9115a90d17 100644
--- a/load_balancers/pool.go
+++ b/load_balancers/pool.go
@@ -81,7 +81,7 @@ func (r *PoolService) Delete(ctx context.Context, poolID string, body PoolDelete
opts = append(r.Options[:], opts...)
var env PoolDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s", body.AccountID, poolID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -107,7 +107,7 @@ func (r *PoolService) Get(ctx context.Context, poolID string, query PoolGetParam
opts = append(r.Options[:], opts...)
var env PoolGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s", query.AccountID, poolID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/load_balancers/poolhealth.go b/load_balancers/poolhealth.go
index 0623b78c76d..61e16059d48 100644
--- a/load_balancers/poolhealth.go
+++ b/load_balancers/poolhealth.go
@@ -52,7 +52,7 @@ func (r *PoolHealthService) Get(ctx context.Context, poolID string, query PoolHe
opts = append(r.Options[:], opts...)
var env PoolHealthGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s/health", query.AccountID, poolID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/load_balancers/poolreference.go b/load_balancers/poolreference.go
index f4022fd1a24..495932d2108 100644
--- a/load_balancers/poolreference.go
+++ b/load_balancers/poolreference.go
@@ -36,7 +36,7 @@ func (r *PoolReferenceService) Get(ctx context.Context, poolID string, query Poo
opts = append(r.Options[:], opts...)
var env PoolReferenceGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/pools/%s/references", query.AccountID, poolID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/load_balancers/preview.go b/load_balancers/preview.go
index d90bd70ed0b..983c28bb19b 100644
--- a/load_balancers/preview.go
+++ b/load_balancers/preview.go
@@ -36,7 +36,7 @@ func (r *PreviewService) Get(ctx context.Context, previewID interface{}, query P
opts = append(r.Options[:], opts...)
var env PreviewGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/preview/%v", query.AccountID, previewID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/load_balancers/region.go b/load_balancers/region.go
index 21e2089eb83..097a576540b 100644
--- a/load_balancers/region.go
+++ b/load_balancers/region.go
@@ -53,7 +53,7 @@ func (r *RegionService) Get(ctx context.Context, regionID RegionGetParamsRegionI
opts = append(r.Options[:], opts...)
var env RegionGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/load_balancers/regions/%v", query.AccountID, regionID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/logpush/datasetfield.go b/logpush/datasetfield.go
index b001640c39a..371a2530168 100644
--- a/logpush/datasetfield.go
+++ b/logpush/datasetfield.go
@@ -46,7 +46,7 @@ func (r *DatasetFieldService) Get(ctx context.Context, datasetID string, query D
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/logpush/datasets/%s/fields", accountOrZone, accountOrZoneID, datasetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/logpush/datasetjob.go b/logpush/datasetjob.go
index 667fd0dd39c..0856f4b43f5 100644
--- a/logpush/datasetjob.go
+++ b/logpush/datasetjob.go
@@ -45,7 +45,7 @@ func (r *DatasetJobService) Get(ctx context.Context, datasetID string, query Dat
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/logpush/datasets/%s/jobs", accountOrZone, accountOrZoneID, datasetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/logpush/edge.go b/logpush/edge.go
index ddf435c2983..265ea36a175 100644
--- a/logpush/edge.go
+++ b/logpush/edge.go
@@ -48,7 +48,7 @@ func (r *EdgeService) Get(ctx context.Context, query EdgeGetParams, opts ...opti
opts = append(r.Options[:], opts...)
var env EdgeGetResponseEnvelope
path := fmt.Sprintf("zones/%s/logpush/edge", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/logpush/job.go b/logpush/job.go
index a91e529bf69..15c33ecd6a9 100644
--- a/logpush/job.go
+++ b/logpush/job.go
@@ -91,7 +91,7 @@ func (r *JobService) List(ctx context.Context, query JobListParams, opts ...opti
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/logpush/jobs", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -113,7 +113,7 @@ func (r *JobService) Delete(ctx context.Context, jobID int64, body JobDeletePara
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/logpush/jobs/%v", accountOrZone, accountOrZoneID, jobID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -135,7 +135,7 @@ func (r *JobService) Get(ctx context.Context, jobID int64, query JobGetParams, o
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/logpush/jobs/%v", accountOrZone, accountOrZoneID, jobID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/logs/controlcmbconfig.go b/logs/controlcmbconfig.go
index 871fb5cfd94..6ba9c584d69 100644
--- a/logs/controlcmbconfig.go
+++ b/logs/controlcmbconfig.go
@@ -52,7 +52,7 @@ func (r *ControlCmbConfigService) Delete(ctx context.Context, body ControlCmbCon
opts = append(r.Options[:], opts...)
var env ControlCmbConfigDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/logs/control/cmb/config", body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *ControlCmbConfigService) Get(ctx context.Context, query ControlCmbConfi
opts = append(r.Options[:], opts...)
var env ControlCmbConfigGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/logs/control/cmb/config", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/magic_transit/site.go b/magic_transit/site.go
index cc9983595b3..b8e1e91e813 100644
--- a/magic_transit/site.go
+++ b/magic_transit/site.go
@@ -69,7 +69,7 @@ func (r *SiteService) List(ctx context.Context, accountIdentifier string, query
opts = append(r.Options[:], opts...)
var env SiteListResponseEnvelope
path := fmt.Sprintf("accounts/%s/magic/sites", accountIdentifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/managed_headers/managedheader.go b/managed_headers/managedheader.go
index 5d6cb5d9fb0..98c1c4fb1ad 100644
--- a/managed_headers/managedheader.go
+++ b/managed_headers/managedheader.go
@@ -35,7 +35,7 @@ func NewManagedHeaderService(opts ...option.RequestOption) (r *ManagedHeaderServ
func (r *ManagedHeaderService) List(ctx context.Context, query ManagedHeaderListParams, opts ...option.RequestOption) (res *ManagedHeaderListResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("zones/%s/managed_headers", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/mtls_certificates/association.go b/mtls_certificates/association.go
index 109be14e9a6..9dc1cbfecdc 100644
--- a/mtls_certificates/association.go
+++ b/mtls_certificates/association.go
@@ -36,7 +36,7 @@ func (r *AssociationService) Get(ctx context.Context, mtlsCertificateID string,
opts = append(r.Options[:], opts...)
var env AssociationGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/mtls_certificates/%s/associations", query.AccountID, mtlsCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/mtls_certificates/mtlscertificate.go b/mtls_certificates/mtlscertificate.go
index 2263bd3e51a..9550ca4f2d2 100644
--- a/mtls_certificates/mtlscertificate.go
+++ b/mtls_certificates/mtlscertificate.go
@@ -52,7 +52,7 @@ func (r *MTLSCertificateService) List(ctx context.Context, query MTLSCertificate
opts = append(r.Options[:], opts...)
var env MTLSCertificateListResponseEnvelope
path := fmt.Sprintf("accounts/%s/mtls_certificates", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -66,7 +66,7 @@ func (r *MTLSCertificateService) Delete(ctx context.Context, mtlsCertificateID s
opts = append(r.Options[:], opts...)
var env MTLSCertificateDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/mtls_certificates/%s", body.AccountID, mtlsCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *MTLSCertificateService) Get(ctx context.Context, mtlsCertificateID stri
opts = append(r.Options[:], opts...)
var env MTLSCertificateGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/mtls_certificates/%s", query.AccountID, mtlsCertificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go
index 2ea68c33ab7..bb420beabf1 100644
--- a/origin_ca_certificates/origincacertificate.go
+++ b/origin_ca_certificates/origincacertificate.go
@@ -56,7 +56,7 @@ func (r *OriginCACertificateService) List(ctx context.Context, query OriginCACer
opts = append(r.Options[:], opts...)
var env OriginCACertificateListResponseEnvelope
path := "certificates"
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/origin_post_quantum_encryption/originpostquantumencryption.go b/origin_post_quantum_encryption/originpostquantumencryption.go
index e1a77406f13..3cbc02fe650 100644
--- a/origin_post_quantum_encryption/originpostquantumencryption.go
+++ b/origin_post_quantum_encryption/originpostquantumencryption.go
@@ -62,7 +62,7 @@ func (r *OriginPostQuantumEncryptionService) Get(ctx context.Context, query Orig
opts = append(r.Options[:], opts...)
var env OriginPostQuantumEncryptionGetResponseEnvelope
path := fmt.Sprintf("zones/%s/cache/origin_post_quantum_encryption", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/origin_tls_client_auth/hostname.go b/origin_tls_client_auth/hostname.go
index d36480a48cc..f219910163f 100644
--- a/origin_tls_client_auth/hostname.go
+++ b/origin_tls_client_auth/hostname.go
@@ -55,7 +55,7 @@ func (r *HostnameService) Get(ctx context.Context, hostname string, query Hostna
opts = append(r.Options[:], opts...)
var env HostnameGetResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames/%s", query.ZoneID, hostname)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/origin_tls_client_auth/hostnamecertificate.go b/origin_tls_client_auth/hostnamecertificate.go
index 8f32eca3823..48f2d90a351 100644
--- a/origin_tls_client_auth/hostnamecertificate.go
+++ b/origin_tls_client_auth/hostnamecertificate.go
@@ -51,7 +51,7 @@ func (r *HostnameCertificateService) List(ctx context.Context, query HostnameCer
opts = append(r.Options[:], opts...)
var env HostnameCertificateListResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames/certificates", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *HostnameCertificateService) Delete(ctx context.Context, certificateID s
opts = append(r.Options[:], opts...)
var env HostnameCertificateDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames/certificates/%s", body.ZoneID, certificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -77,7 +77,7 @@ func (r *HostnameCertificateService) Get(ctx context.Context, certificateID stri
opts = append(r.Options[:], opts...)
var env HostnameCertificateGetResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames/certificates/%s", query.ZoneID, certificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/origin_tls_client_auth/origintlsclientauth.go b/origin_tls_client_auth/origintlsclientauth.go
index e9cb429e58c..941f2b0f5b2 100644
--- a/origin_tls_client_auth/origintlsclientauth.go
+++ b/origin_tls_client_auth/origintlsclientauth.go
@@ -60,7 +60,7 @@ func (r *OriginTLSClientAuthService) List(ctx context.Context, query OriginTLSCl
opts = append(r.Options[:], opts...)
var env OriginTLSClientAuthListResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -73,7 +73,7 @@ func (r *OriginTLSClientAuthService) Delete(ctx context.Context, certificateID s
opts = append(r.Options[:], opts...)
var env OriginTLSClientAuthDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/%s", body.ZoneID, certificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -86,7 +86,7 @@ func (r *OriginTLSClientAuthService) Get(ctx context.Context, certificateID stri
opts = append(r.Options[:], opts...)
var env OriginTLSClientAuthGetResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/%s", query.ZoneID, certificateID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/origin_tls_client_auth/setting.go b/origin_tls_client_auth/setting.go
index a944a1827f8..190a14ed51d 100644
--- a/origin_tls_client_auth/setting.go
+++ b/origin_tls_client_auth/setting.go
@@ -51,7 +51,7 @@ func (r *SettingService) Get(ctx context.Context, query SettingGetParams, opts .
opts = append(r.Options[:], opts...)
var env SettingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/settings", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/page_shield/connection.go b/page_shield/connection.go
index 238cdda2ccb..a9461d6f698 100644
--- a/page_shield/connection.go
+++ b/page_shield/connection.go
@@ -49,7 +49,7 @@ func (r *ConnectionService) List(ctx context.Context, params ConnectionListParam
func (r *ConnectionService) Get(ctx context.Context, connectionID string, query ConnectionGetParams, opts ...option.RequestOption) (res *PageShieldConnection, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("zones/%s/page_shield/connections/%s", query.ZoneID, connectionID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/page_shield/pageshield.go b/page_shield/pageshield.go
index f88e588d39a..fb1e93f4bde 100644
--- a/page_shield/pageshield.go
+++ b/page_shield/pageshield.go
@@ -54,7 +54,7 @@ func (r *PageShieldService) Get(ctx context.Context, query PageShieldGetParams,
opts = append(r.Options[:], opts...)
var env PageShieldGetResponseEnvelope
path := fmt.Sprintf("zones/%s/page_shield", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/page_shield/policy.go b/page_shield/policy.go
index c9c3bc45988..de6066feda6 100644
--- a/page_shield/policy.go
+++ b/page_shield/policy.go
@@ -51,7 +51,7 @@ func (r *PolicyService) List(ctx context.Context, query PolicyListParams, opts .
opts = append(r.Options[:], opts...)
var env PolicyListResponseEnvelope
path := fmt.Sprintf("zones/%s/page_shield/policies", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *PolicyService) Delete(ctx context.Context, policyID string, body Policy
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("zones/%s/page_shield/policies/%s", body.ZoneID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -72,7 +72,7 @@ func (r *PolicyService) Delete(ctx context.Context, policyID string, body Policy
func (r *PolicyService) Get(ctx context.Context, policyID string, query PolicyGetParams, opts ...option.RequestOption) (res *PageShieldPageshieldPolicy, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("zones/%s/page_shield/policies/%s", query.ZoneID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/page_shield/script.go b/page_shield/script.go
index 80c3d03cc20..a39d9b2534d 100644
--- a/page_shield/script.go
+++ b/page_shield/script.go
@@ -49,7 +49,7 @@ func (r *ScriptService) List(ctx context.Context, params ScriptListParams, opts
func (r *ScriptService) Get(ctx context.Context, scriptID string, query ScriptGetParams, opts ...option.RequestOption) (res *ScriptGetResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("zones/%s/page_shield/scripts/%s", query.ZoneID, scriptID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/pagerules/pagerule.go b/pagerules/pagerule.go
index 54aa1369736..9c93b17f746 100644
--- a/pagerules/pagerule.go
+++ b/pagerules/pagerule.go
@@ -83,7 +83,7 @@ func (r *PageruleService) Delete(ctx context.Context, pageruleID string, body Pa
opts = append(r.Options[:], opts...)
var env PageruleDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/pagerules/%s", body.ZoneID, pageruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -109,7 +109,7 @@ func (r *PageruleService) Get(ctx context.Context, pageruleID string, query Page
opts = append(r.Options[:], opts...)
var env PageruleGetResponseEnvelope
path := fmt.Sprintf("zones/%s/pagerules/%s", query.ZoneID, pageruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/pagerules/setting.go b/pagerules/setting.go
index 1e23d4a8d29..d03cd659bad 100644
--- a/pagerules/setting.go
+++ b/pagerules/setting.go
@@ -36,7 +36,7 @@ func (r *SettingService) List(ctx context.Context, query SettingListParams, opts
opts = append(r.Options[:], opts...)
var env SettingListResponseEnvelope
path := fmt.Sprintf("zones/%s/pagerules/settings", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/pages/project.go b/pages/project.go
index e05d7d452d0..4c5780d6694 100644
--- a/pages/project.go
+++ b/pages/project.go
@@ -56,7 +56,7 @@ func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts
opts = append(r.Options[:], opts...)
var env ProjectListResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -68,7 +68,7 @@ func (r *ProjectService) List(ctx context.Context, query ProjectListParams, opts
func (r *ProjectService) Delete(ctx context.Context, projectName string, body ProjectDeleteParams, opts ...option.RequestOption) (res *ProjectDeleteResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/pages/projects/%s", body.AccountID, projectName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...)
return
}
@@ -91,7 +91,7 @@ func (r *ProjectService) Get(ctx context.Context, projectName string, query Proj
opts = append(r.Options[:], opts...)
var env ProjectGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s", query.AccountID, projectName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -103,7 +103,7 @@ func (r *ProjectService) Get(ctx context.Context, projectName string, query Proj
func (r *ProjectService) PurgeBuildCache(ctx context.Context, projectName string, body ProjectPurgeBuildCacheParams, opts ...option.RequestOption) (res *ProjectPurgeBuildCacheResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/pages/projects/%s/purge_build_cache", body.AccountID, projectName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &res, opts...)
return
}
diff --git a/pages/projectdeployment.go b/pages/projectdeployment.go
index 0c97ad3580b..469524332a9 100644
--- a/pages/projectdeployment.go
+++ b/pages/projectdeployment.go
@@ -52,7 +52,7 @@ func (r *ProjectDeploymentService) List(ctx context.Context, projectName string,
opts = append(r.Options[:], opts...)
var env ProjectDeploymentListResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments", query.AccountID, projectName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *ProjectDeploymentService) List(ctx context.Context, projectName string,
func (r *ProjectDeploymentService) Delete(ctx context.Context, projectName string, deploymentID string, body ProjectDeploymentDeleteParams, opts ...option.RequestOption) (res *ProjectDeploymentDeleteResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s", body.AccountID, projectName, deploymentID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...)
return
}
@@ -73,7 +73,7 @@ func (r *ProjectDeploymentService) Get(ctx context.Context, projectName string,
opts = append(r.Options[:], opts...)
var env ProjectDeploymentGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s", query.AccountID, projectName, deploymentID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -86,7 +86,7 @@ func (r *ProjectDeploymentService) Retry(ctx context.Context, projectName string
opts = append(r.Options[:], opts...)
var env ProjectDeploymentRetryResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/retry", body.AccountID, projectName, deploymentID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -100,7 +100,7 @@ func (r *ProjectDeploymentService) Rollback(ctx context.Context, projectName str
opts = append(r.Options[:], opts...)
var env ProjectDeploymentRollbackResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/rollback", body.AccountID, projectName, deploymentID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/pages/projectdeploymenthistorylog.go b/pages/projectdeploymenthistorylog.go
index e6870b745cf..86ec5587d9c 100644
--- a/pages/projectdeploymenthistorylog.go
+++ b/pages/projectdeploymenthistorylog.go
@@ -39,7 +39,7 @@ func (r *ProjectDeploymentHistoryLogService) Get(ctx context.Context, projectNam
opts = append(r.Options[:], opts...)
var env ProjectDeploymentHistoryLogGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/history/logs", query.AccountID, projectName, deploymentID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/pages/projectdomain.go b/pages/projectdomain.go
index 4fea4b34b0e..9aa64d6bf52 100644
--- a/pages/projectdomain.go
+++ b/pages/projectdomain.go
@@ -52,7 +52,7 @@ func (r *ProjectDomainService) List(ctx context.Context, projectName string, que
opts = append(r.Options[:], opts...)
var env ProjectDomainListResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains", query.AccountID, projectName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *ProjectDomainService) List(ctx context.Context, projectName string, que
func (r *ProjectDomainService) Delete(ctx context.Context, projectName string, domainName string, body ProjectDomainDeleteParams, opts ...option.RequestOption) (res *ProjectDomainDeleteResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", body.AccountID, projectName, domainName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...)
return
}
@@ -73,7 +73,7 @@ func (r *ProjectDomainService) Edit(ctx context.Context, projectName string, dom
opts = append(r.Options[:], opts...)
var env ProjectDomainEditResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", body.AccountID, projectName, domainName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...)
if err != nil {
return
}
@@ -86,7 +86,7 @@ func (r *ProjectDomainService) Get(ctx context.Context, projectName string, doma
opts = append(r.Options[:], opts...)
var env ProjectDomainGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", query.AccountID, projectName, domainName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/pcaps/download.go b/pcaps/download.go
index b81ce6a50d4..f66897c24ae 100644
--- a/pcaps/download.go
+++ b/pcaps/download.go
@@ -34,7 +34,7 @@ func (r *DownloadService) Get(ctx context.Context, pcapID string, query Download
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "application/vnd.tcpdump.pcap")}, opts...)
path := fmt.Sprintf("accounts/%s/pcaps/%s/download", query.AccountID, pcapID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/pcaps/ownership.go b/pcaps/ownership.go
index 136bccadf99..5126853b18c 100644
--- a/pcaps/ownership.go
+++ b/pcaps/ownership.go
@@ -48,7 +48,7 @@ func (r *OwnershipService) Delete(ctx context.Context, ownershipID string, body
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("accounts/%s/pcaps/ownership/%s", body.AccountID, ownershipID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -57,7 +57,7 @@ func (r *OwnershipService) Get(ctx context.Context, query OwnershipGetParams, op
opts = append(r.Options[:], opts...)
var env OwnershipGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/pcaps/ownership", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/pcaps/pcap.go b/pcaps/pcap.go
index c34599b61f7..92e35d58e77 100644
--- a/pcaps/pcap.go
+++ b/pcaps/pcap.go
@@ -54,7 +54,7 @@ func (r *PCAPService) List(ctx context.Context, query PCAPListParams, opts ...op
opts = append(r.Options[:], opts...)
var env PCAPListResponseEnvelope
path := fmt.Sprintf("accounts/%s/pcaps", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -67,7 +67,7 @@ func (r *PCAPService) Get(ctx context.Context, pcapID string, query PCAPGetParam
opts = append(r.Options[:], opts...)
var env PCAPGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/pcaps/%s", query.AccountID, pcapID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/queues/consumer.go b/queues/consumer.go
index 641eb19c3b7..b28e1d70ad7 100644
--- a/queues/consumer.go
+++ b/queues/consumer.go
@@ -64,7 +64,7 @@ func (r *ConsumerService) Delete(ctx context.Context, name string, consumerName
opts = append(r.Options[:], opts...)
var env ConsumerDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/queues/%s/consumers/%s", body.AccountID, name, consumerName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -77,7 +77,7 @@ func (r *ConsumerService) Get(ctx context.Context, name string, query ConsumerGe
opts = append(r.Options[:], opts...)
var env ConsumerGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/queues/%s/consumers", query.AccountID, name)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/queues/queue.go b/queues/queue.go
index a9923008cb9..1e2a596c3d7 100644
--- a/queues/queue.go
+++ b/queues/queue.go
@@ -66,7 +66,7 @@ func (r *QueueService) List(ctx context.Context, query QueueListParams, opts ...
opts = append(r.Options[:], opts...)
var env QueueListResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/queues", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *QueueService) Delete(ctx context.Context, name string, body QueueDelete
opts = append(r.Options[:], opts...)
var env QueueDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/queues/%s", body.AccountID, name)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *QueueService) Get(ctx context.Context, name string, query QueueGetParam
opts = append(r.Options[:], opts...)
var env QueueGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/queues/%s", query.AccountID, name)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/r2/bucket.go b/r2/bucket.go
index c6797f5d3a0..327dd1cde0f 100644
--- a/r2/bucket.go
+++ b/r2/bucket.go
@@ -74,7 +74,7 @@ func (r *BucketService) Delete(ctx context.Context, bucketName string, body Buck
opts = append(r.Options[:], opts...)
var env BucketDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/r2/buckets/%s", body.AccountID, bucketName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -87,7 +87,7 @@ func (r *BucketService) Get(ctx context.Context, bucketName string, query Bucket
opts = append(r.Options[:], opts...)
var env BucketGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/r2/buckets/%s", query.AccountID, bucketName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/r2/sippy.go b/r2/sippy.go
index a68ac0e62fd..36b057a4f8c 100644
--- a/r2/sippy.go
+++ b/r2/sippy.go
@@ -48,7 +48,7 @@ func (r *SippyService) Delete(ctx context.Context, bucketName string, body Sippy
opts = append(r.Options[:], opts...)
var env SippyDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/r2/buckets/%s/sippy", body.AccountID, bucketName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -61,7 +61,7 @@ func (r *SippyService) Get(ctx context.Context, bucketName string, query SippyGe
opts = append(r.Options[:], opts...)
var env SippyGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/r2/buckets/%s/sippy", query.AccountID, bucketName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/registrar/domain.go b/registrar/domain.go
index 8c42d24dc25..b72d6e023ed 100644
--- a/registrar/domain.go
+++ b/registrar/domain.go
@@ -52,7 +52,7 @@ func (r *DomainService) List(ctx context.Context, query DomainListParams, opts .
opts = append(r.Options[:], opts...)
var env DomainListResponseEnvelope
path := fmt.Sprintf("accounts/%s/registrar/domains", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *DomainService) Get(ctx context.Context, domainName string, query Domain
opts = append(r.Options[:], opts...)
var env DomainGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/registrar/domains/%s", query.AccountID, domainName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rules/list.go b/rules/list.go
index 33d466698cb..d4e38878b95 100644
--- a/rules/list.go
+++ b/rules/list.go
@@ -65,7 +65,7 @@ func (r *ListService) List(ctx context.Context, query ListListParams, opts ...op
opts = append(r.Options[:], opts...)
var env ListListResponseEnvelope
path := fmt.Sprintf("accounts/%s/rules/lists", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -78,7 +78,7 @@ func (r *ListService) Delete(ctx context.Context, listID string, body ListDelete
opts = append(r.Options[:], opts...)
var env ListDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/rules/lists/%s", body.AccountID, listID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -91,7 +91,7 @@ func (r *ListService) Get(ctx context.Context, listID string, query ListGetParam
opts = append(r.Options[:], opts...)
var env ListGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/rules/lists/%s", query.AccountID, listID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rulesets/phase.go b/rulesets/phase.go
index 899292ca490..c7d0600b89a 100644
--- a/rulesets/phase.go
+++ b/rulesets/phase.go
@@ -69,7 +69,7 @@ func (r *PhaseService) Get(ctx context.Context, rulesetPhase PhaseGetParamsRules
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/phases/%v/entrypoint", accountOrZone, accountOrZoneID, rulesetPhase)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rulesets/phaseversion.go b/rulesets/phaseversion.go
index efeaa4a36e7..460c30e0d70 100644
--- a/rulesets/phaseversion.go
+++ b/rulesets/phaseversion.go
@@ -46,7 +46,7 @@ func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase PhaseVersio
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/phases/%v/entrypoint/versions", accountOrZone, accountOrZoneID, rulesetPhase)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -68,7 +68,7 @@ func (r *PhaseVersionService) Get(ctx context.Context, rulesetPhase PhaseVersion
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/phases/%v/entrypoint/versions/%s", accountOrZone, accountOrZoneID, rulesetPhase, rulesetVersion)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rulesets/rule.go b/rulesets/rule.go
index 206b51d4134..e97487b7d34 100644
--- a/rulesets/rule.go
+++ b/rulesets/rule.go
@@ -67,7 +67,7 @@ func (r *RuleService) Delete(ctx context.Context, rulesetID string, ruleID strin
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/%s/rules/%s", accountOrZone, accountOrZoneID, rulesetID, ruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rulesets/ruleset.go b/rulesets/ruleset.go
index f97c1b4e04b..5a1c331667c 100644
--- a/rulesets/ruleset.go
+++ b/rulesets/ruleset.go
@@ -97,7 +97,7 @@ func (r *RulesetService) List(ctx context.Context, query RulesetListParams, opts
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -119,7 +119,7 @@ func (r *RulesetService) Delete(ctx context.Context, rulesetID string, body Rule
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/%s", accountOrZone, accountOrZoneID, rulesetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -137,7 +137,7 @@ func (r *RulesetService) Get(ctx context.Context, rulesetID string, query Rulese
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/%s", accountOrZone, accountOrZoneID, rulesetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rulesets/version.go b/rulesets/version.go
index 4e6b95e8297..f8d69569beb 100644
--- a/rulesets/version.go
+++ b/rulesets/version.go
@@ -47,7 +47,7 @@ func (r *VersionService) List(ctx context.Context, rulesetID string, query Versi
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/%s/versions", accountOrZone, accountOrZoneID, rulesetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -69,7 +69,7 @@ func (r *VersionService) Delete(ctx context.Context, rulesetID string, rulesetVe
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/%s/versions/%s", accountOrZone, accountOrZoneID, rulesetID, rulesetVersion)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -87,7 +87,7 @@ func (r *VersionService) Get(ctx context.Context, rulesetID string, rulesetVersi
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/rulesets/%s/versions/%s", accountOrZone, accountOrZoneID, rulesetID, rulesetVersion)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rulesets/versionbytag.go b/rulesets/versionbytag.go
index 1fb34c672a2..b2f9ea4a804 100644
--- a/rulesets/versionbytag.go
+++ b/rulesets/versionbytag.go
@@ -36,7 +36,7 @@ func (r *VersionByTagService) Get(ctx context.Context, rulesetID string, ruleset
opts = append(r.Options[:], opts...)
var env VersionByTagGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/rulesets/%s/versions/%s/by_tag/%s", query.AccountID, rulesetID, rulesetVersion, ruleTag)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rum/rule.go b/rum/rule.go
index 97ee85f93f2..cd6d797fb51 100644
--- a/rum/rule.go
+++ b/rum/rule.go
@@ -62,7 +62,7 @@ func (r *RuleService) List(ctx context.Context, rulesetID string, query RuleList
opts = append(r.Options[:], opts...)
var env RuleListResponseEnvelope
path := fmt.Sprintf("accounts/%s/rum/v2/%s/rules", query.AccountID, rulesetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -75,7 +75,7 @@ func (r *RuleService) Delete(ctx context.Context, rulesetID string, ruleID strin
opts = append(r.Options[:], opts...)
var env RuleDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/rum/v2/%s/rule/%s", body.AccountID, rulesetID, ruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/rum/siteinfo.go b/rum/siteinfo.go
index 5452a00c3aa..4e4c9424a7a 100644
--- a/rum/siteinfo.go
+++ b/rum/siteinfo.go
@@ -88,7 +88,7 @@ func (r *SiteInfoService) Delete(ctx context.Context, siteID string, body SiteIn
opts = append(r.Options[:], opts...)
var env SiteInfoDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/rum/site_info/%s", body.AccountID, siteID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -101,7 +101,7 @@ func (r *SiteInfoService) Get(ctx context.Context, siteID string, query SiteInfo
opts = append(r.Options[:], opts...)
var env SiteInfoGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/rum/site_info/%s", query.AccountID, siteID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/secondary_dns/acl.go b/secondary_dns/acl.go
index 7fe11202305..9633f48cb3d 100644
--- a/secondary_dns/acl.go
+++ b/secondary_dns/acl.go
@@ -61,7 +61,7 @@ func (r *ACLService) List(ctx context.Context, query ACLListParams, opts ...opti
opts = append(r.Options[:], opts...)
var env ACLListResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/acls", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *ACLService) Delete(ctx context.Context, aclID interface{}, body ACLDele
opts = append(r.Options[:], opts...)
var env ACLDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/acls/%v", body.AccountID, aclID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -87,7 +87,7 @@ func (r *ACLService) Get(ctx context.Context, aclID interface{}, query ACLGetPar
opts = append(r.Options[:], opts...)
var env ACLGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/acls/%v", query.AccountID, aclID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/secondary_dns/forceaxfr.go b/secondary_dns/forceaxfr.go
index 0ccd1deac35..3dcd510937c 100644
--- a/secondary_dns/forceaxfr.go
+++ b/secondary_dns/forceaxfr.go
@@ -35,7 +35,7 @@ func (r *ForceAXFRService) New(ctx context.Context, body ForceAXFRNewParams, opt
opts = append(r.Options[:], opts...)
var env ForceAXFRNewResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/force_axfr", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/secondary_dns/incoming.go b/secondary_dns/incoming.go
index 9ce52bb41d2..e3ef3b2e8c6 100644
--- a/secondary_dns/incoming.go
+++ b/secondary_dns/incoming.go
@@ -61,7 +61,7 @@ func (r *IncomingService) Delete(ctx context.Context, body IncomingDeleteParams,
opts = append(r.Options[:], opts...)
var env IncomingDeleteResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/incoming", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *IncomingService) Get(ctx context.Context, query IncomingGetParams, opts
opts = append(r.Options[:], opts...)
var env IncomingGetResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/incoming", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/secondary_dns/outgoing.go b/secondary_dns/outgoing.go
index bad74d0cb7c..91e7981b3a6 100644
--- a/secondary_dns/outgoing.go
+++ b/secondary_dns/outgoing.go
@@ -63,7 +63,7 @@ func (r *OutgoingService) Delete(ctx context.Context, body OutgoingDeleteParams,
opts = append(r.Options[:], opts...)
var env OutgoingDeleteResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/outgoing", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -77,7 +77,7 @@ func (r *OutgoingService) Disable(ctx context.Context, body OutgoingDisableParam
opts = append(r.Options[:], opts...)
var env OutgoingDisableResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/disable", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -90,7 +90,7 @@ func (r *OutgoingService) Enable(ctx context.Context, body OutgoingEnableParams,
opts = append(r.Options[:], opts...)
var env OutgoingEnableResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/enable", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -103,7 +103,7 @@ func (r *OutgoingService) ForceNotify(ctx context.Context, body OutgoingForceNot
opts = append(r.Options[:], opts...)
var env OutgoingForceNotifyResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/force_notify", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -116,7 +116,7 @@ func (r *OutgoingService) Get(ctx context.Context, query OutgoingGetParams, opts
opts = append(r.Options[:], opts...)
var env OutgoingGetResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/outgoing", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/secondary_dns/outgoingstatus.go b/secondary_dns/outgoingstatus.go
index bd60e8bd880..27e5a40d7b7 100644
--- a/secondary_dns/outgoingstatus.go
+++ b/secondary_dns/outgoingstatus.go
@@ -36,7 +36,7 @@ func (r *OutgoingStatusService) Get(ctx context.Context, query OutgoingStatusGet
opts = append(r.Options[:], opts...)
var env OutgoingStatusGetResponseEnvelope
path := fmt.Sprintf("zones/%v/secondary_dns/outgoing/status", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/secondary_dns/peer.go b/secondary_dns/peer.go
index 67d3baabb92..935061d89ee 100644
--- a/secondary_dns/peer.go
+++ b/secondary_dns/peer.go
@@ -61,7 +61,7 @@ func (r *PeerService) List(ctx context.Context, query PeerListParams, opts ...op
opts = append(r.Options[:], opts...)
var env PeerListResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/peers", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *PeerService) Delete(ctx context.Context, peerID interface{}, body PeerD
opts = append(r.Options[:], opts...)
var env PeerDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/peers/%v", body.AccountID, peerID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -87,7 +87,7 @@ func (r *PeerService) Get(ctx context.Context, peerID interface{}, query PeerGet
opts = append(r.Options[:], opts...)
var env PeerGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/peers/%v", query.AccountID, peerID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/secondary_dns/tsig.go b/secondary_dns/tsig.go
index dae976f09b7..5d18923e671 100644
--- a/secondary_dns/tsig.go
+++ b/secondary_dns/tsig.go
@@ -61,7 +61,7 @@ func (r *TSIGService) List(ctx context.Context, query TSIGListParams, opts ...op
opts = append(r.Options[:], opts...)
var env TSIGListResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *TSIGService) Delete(ctx context.Context, tsigID interface{}, body TSIGD
opts = append(r.Options[:], opts...)
var env TSIGDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs/%v", body.AccountID, tsigID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -87,7 +87,7 @@ func (r *TSIGService) Get(ctx context.Context, tsigID interface{}, query TSIGGet
opts = append(r.Options[:], opts...)
var env TSIGGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/secondary_dns/tsigs/%v", query.AccountID, tsigID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/speed/availability.go b/speed/availability.go
index a22a4048723..10ee95e6fb5 100644
--- a/speed/availability.go
+++ b/speed/availability.go
@@ -36,7 +36,7 @@ func (r *AvailabilityService) List(ctx context.Context, query AvailabilityListPa
opts = append(r.Options[:], opts...)
var env AvailabilityListResponseEnvelope
path := fmt.Sprintf("zones/%s/speed_api/availabilities", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/speed/page.go b/speed/page.go
index 1677b22c760..2614a1082fe 100644
--- a/speed/page.go
+++ b/speed/page.go
@@ -35,7 +35,7 @@ func (r *PageService) List(ctx context.Context, query PageListParams, opts ...op
opts = append(r.Options[:], opts...)
var env PageListResponseEnvelope
path := fmt.Sprintf("zones/%s/speed_api/pages", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/speed/test.go b/speed/test.go
index eccdd7392a5..93739fa0b6a 100644
--- a/speed/test.go
+++ b/speed/test.go
@@ -73,7 +73,7 @@ func (r *TestService) Get(ctx context.Context, url string, testID string, query
opts = append(r.Options[:], opts...)
var env TestGetResponseEnvelope
path := fmt.Sprintf("zones/%s/speed_api/pages/%s/tests/%s", query.ZoneID, url, testID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go
index 31d7c632a92..2f96ddabf5d 100644
--- a/ssl/certificatepack.go
+++ b/ssl/certificatepack.go
@@ -58,7 +58,7 @@ func (r *CertificatePackService) Delete(ctx context.Context, certificatePackID s
opts = append(r.Options[:], opts...)
var env CertificatePackDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/ssl/certificate_packs/%s", body.ZoneID, certificatePackID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -73,7 +73,7 @@ func (r *CertificatePackService) Edit(ctx context.Context, certificatePackID str
opts = append(r.Options[:], opts...)
var env CertificatePackEditResponseEnvelope
path := fmt.Sprintf("zones/%s/ssl/certificate_packs/%s", body.ZoneID, certificatePackID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...)
if err != nil {
return
}
@@ -86,7 +86,7 @@ func (r *CertificatePackService) Get(ctx context.Context, certificatePackID stri
opts = append(r.Options[:], opts...)
var env CertificatePackGetResponseEnvelope
path := fmt.Sprintf("zones/%s/ssl/certificate_packs/%s", query.ZoneID, certificatePackID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/ssl/certificatepackquota.go b/ssl/certificatepackquota.go
index 8d5f0e19862..1e636fe7cbe 100644
--- a/ssl/certificatepackquota.go
+++ b/ssl/certificatepackquota.go
@@ -36,7 +36,7 @@ func (r *CertificatePackQuotaService) Get(ctx context.Context, query Certificate
opts = append(r.Options[:], opts...)
var env CertificatePackQuotaGetResponseEnvelope
path := fmt.Sprintf("zones/%s/ssl/certificate_packs/quota", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/ssl/universalsetting.go b/ssl/universalsetting.go
index 14fe4b4819c..0142c21f935 100644
--- a/ssl/universalsetting.go
+++ b/ssl/universalsetting.go
@@ -49,7 +49,7 @@ func (r *UniversalSettingService) Get(ctx context.Context, query UniversalSettin
opts = append(r.Options[:], opts...)
var env UniversalSettingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/ssl/universal/settings", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/audiotrack.go b/stream/audiotrack.go
index 26ce53a2c37..c89938dec5e 100644
--- a/stream/audiotrack.go
+++ b/stream/audiotrack.go
@@ -39,7 +39,7 @@ func (r *AudioTrackService) Delete(ctx context.Context, identifier string, audio
opts = append(r.Options[:], opts...)
var env AudioTrackDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s/audio/%s", body.AccountID, identifier, audioIdentifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -81,7 +81,7 @@ func (r *AudioTrackService) Get(ctx context.Context, identifier string, query Au
opts = append(r.Options[:], opts...)
var env AudioTrackGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s/audio", query.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/caption.go b/stream/caption.go
index b85b33e4ad4..6b15257b057 100644
--- a/stream/caption.go
+++ b/stream/caption.go
@@ -52,7 +52,7 @@ func (r *CaptionService) Delete(ctx context.Context, identifier string, language
opts = append(r.Options[:], opts...)
var env CaptionDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s/captions/%s", body.AccountID, identifier, language)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *CaptionService) Get(ctx context.Context, identifier string, query Capti
opts = append(r.Options[:], opts...)
var env CaptionGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s/captions", query.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/download.go b/stream/download.go
index 73005e35870..6afddb576db 100644
--- a/stream/download.go
+++ b/stream/download.go
@@ -38,7 +38,7 @@ func (r *DownloadService) New(ctx context.Context, identifier string, body Downl
opts = append(r.Options[:], opts...)
var env DownloadNewResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s/downloads", body.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -51,7 +51,7 @@ func (r *DownloadService) Delete(ctx context.Context, identifier string, body Do
opts = append(r.Options[:], opts...)
var env DownloadDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s/downloads", body.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *DownloadService) Get(ctx context.Context, identifier string, query Down
opts = append(r.Options[:], opts...)
var env DownloadGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s/downloads", query.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/embed.go b/stream/embed.go
index 139a8064a8b..ce75d02cf2d 100644
--- a/stream/embed.go
+++ b/stream/embed.go
@@ -35,7 +35,7 @@ func NewEmbedService(opts ...option.RequestOption) (r *EmbedService) {
func (r *EmbedService) Get(ctx context.Context, identifier string, query EmbedGetParams, opts ...option.RequestOption) (res *EmbedGetResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/stream/%s/embed", query.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/stream/key.go b/stream/key.go
index 87a29649167..c1cd3fd1c93 100644
--- a/stream/key.go
+++ b/stream/key.go
@@ -41,7 +41,7 @@ func (r *KeyService) New(ctx context.Context, body KeyNewParams, opts ...option.
opts = append(r.Options[:], opts...)
var env KeyNewResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/keys", body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -54,7 +54,7 @@ func (r *KeyService) Delete(ctx context.Context, identifier string, body KeyDele
opts = append(r.Options[:], opts...)
var env KeyDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/keys/%s", body.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -67,7 +67,7 @@ func (r *KeyService) Get(ctx context.Context, query KeyGetParams, opts ...option
opts = append(r.Options[:], opts...)
var env KeyGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/keys", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/liveinput.go b/stream/liveinput.go
index b7d5c9a7a3d..4863b1b90b5 100644
--- a/stream/liveinput.go
+++ b/stream/liveinput.go
@@ -82,7 +82,7 @@ func (r *LiveInputService) Delete(ctx context.Context, liveInputIdentifier strin
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s", body.AccountID, liveInputIdentifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -91,7 +91,7 @@ func (r *LiveInputService) Get(ctx context.Context, liveInputIdentifier string,
opts = append(r.Options[:], opts...)
var env LiveInputGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s", query.AccountID, liveInputIdentifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/liveinputoutput.go b/stream/liveinputoutput.go
index daa714a3fc5..ebf3523d280 100644
--- a/stream/liveinputoutput.go
+++ b/stream/liveinputoutput.go
@@ -64,7 +64,7 @@ func (r *LiveInputOutputService) List(ctx context.Context, liveInputIdentifier s
opts = append(r.Options[:], opts...)
var env LiveInputOutputListResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s/outputs", query.AccountID, liveInputIdentifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -77,7 +77,7 @@ func (r *LiveInputOutputService) Delete(ctx context.Context, liveInputIdentifier
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("accounts/%s/stream/live_inputs/%s/outputs/%s", body.AccountID, liveInputIdentifier, outputIdentifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
diff --git a/stream/stream.go b/stream/stream.go
index f993836d3a4..8d21b537d85 100644
--- a/stream/stream.go
+++ b/stream/stream.go
@@ -67,7 +67,7 @@ func (r *StreamService) New(ctx context.Context, params StreamNewParams, opts ..
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("accounts/%s/stream", params.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, nil, opts...)
return
}
@@ -90,7 +90,7 @@ func (r *StreamService) Delete(ctx context.Context, identifier string, body Stre
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("accounts/%s/stream/%s", body.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -99,7 +99,7 @@ func (r *StreamService) Get(ctx context.Context, identifier string, query Stream
opts = append(r.Options[:], opts...)
var env StreamGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/%s", query.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/watermark.go b/stream/watermark.go
index 63a39d1bbc2..07f301b050c 100644
--- a/stream/watermark.go
+++ b/stream/watermark.go
@@ -53,7 +53,7 @@ func (r *WatermarkService) List(ctx context.Context, query WatermarkListParams,
opts = append(r.Options[:], opts...)
var env WatermarkListResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/watermarks", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -66,7 +66,7 @@ func (r *WatermarkService) Delete(ctx context.Context, identifier string, body W
opts = append(r.Options[:], opts...)
var env WatermarkDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/watermarks/%s", body.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *WatermarkService) Get(ctx context.Context, identifier string, query Wat
opts = append(r.Options[:], opts...)
var env WatermarkGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/watermarks/%s", query.AccountID, identifier)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/stream/webhook.go b/stream/webhook.go
index bae04702632..395ddad84f7 100644
--- a/stream/webhook.go
+++ b/stream/webhook.go
@@ -51,7 +51,7 @@ func (r *WebhookService) Delete(ctx context.Context, body WebhookDeleteParams, o
opts = append(r.Options[:], opts...)
var env WebhookDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/webhook", body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *WebhookService) Get(ctx context.Context, query WebhookGetParams, opts .
opts = append(r.Options[:], opts...)
var env WebhookGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/stream/webhook", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/url_normalization/urlnormalization.go b/url_normalization/urlnormalization.go
index 9c211d5f499..a888651bc2a 100644
--- a/url_normalization/urlnormalization.go
+++ b/url_normalization/urlnormalization.go
@@ -43,7 +43,7 @@ func (r *URLNormalizationService) Update(ctx context.Context, params URLNormaliz
func (r *URLNormalizationService) Get(ctx context.Context, query URLNormalizationGetParams, opts ...option.RequestOption) (res *URLNormalizationGetResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("zones/%s/url_normalization", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/url_scanner/urlscanner.go b/url_scanner/urlscanner.go
index 83cbb5e1159..474d65c5fe6 100644
--- a/url_scanner/urlscanner.go
+++ b/url_scanner/urlscanner.go
@@ -114,6 +114,9 @@ func (r urlScannerScanResponseTaskJSON) RawJSON() string {
type URLScannerScanParams struct {
// Return only scans created by account.
AccountScans param.Field[bool] `query:"account_scans"`
+ // Filter scans by Autonomous System Number (ASN) of _any_ request made by the
+ // webpage.
+ ASN param.Field[string] `query:"asn"`
// Filter scans requested before date (inclusive).
DateEnd param.Field[time.Time] `query:"date_end" format:"date-time"`
// Filter scans requested after date (inclusive).
@@ -122,10 +125,14 @@ type URLScannerScanParams struct {
Hostname param.Field[string] `query:"hostname"`
// Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
IP param.Field[string] `query:"ip"`
+ // Filter scans by malicious verdict.
+ IsMalicious param.Field[bool] `query:"is_malicious"`
// Limit the number of objects in the response.
Limit param.Field[int64] `query:"limit"`
// Pagination cursor to get the next set of results.
NextCursor param.Field[string] `query:"next_cursor"`
+ // Filter scans by main page Autonomous System Number (ASN).
+ PageASN param.Field[string] `query:"page_asn"`
// Filter scans by main page hostname .
PageHostname param.Field[string] `query:"page_hostname"`
// Filter scans by main page IP address (IPv4 or IPv6).
diff --git a/url_scanner/urlscanner_test.go b/url_scanner/urlscanner_test.go
index a7250244c94..87f5c5446a8 100644
--- a/url_scanner/urlscanner_test.go
+++ b/url_scanner/urlscanner_test.go
@@ -34,12 +34,15 @@ func TestURLScannerScanWithOptionalParams(t *testing.T) {
"string",
url_scanner.URLScannerScanParams{
AccountScans: cloudflare.F(true),
+ ASN: cloudflare.F("13335"),
DateEnd: cloudflare.F(time.Now()),
DateStart: cloudflare.F(time.Now()),
Hostname: cloudflare.F("example.com"),
IP: cloudflare.F("1.1.1.1"),
+ IsMalicious: cloudflare.F(true),
Limit: cloudflare.F(int64(100)),
NextCursor: cloudflare.F("string"),
+ PageASN: cloudflare.F("string"),
PageHostname: cloudflare.F("string"),
PageIP: cloudflare.F("string"),
PagePath: cloudflare.F("string"),
diff --git a/warp_connector/warpconnector.go b/warp_connector/warpconnector.go
index ec816e70d75..2f42899f8a5 100644
--- a/warp_connector/warpconnector.go
+++ b/warp_connector/warpconnector.go
@@ -104,7 +104,7 @@ func (r *WARPConnectorService) Get(ctx context.Context, tunnelID string, query W
opts = append(r.Options[:], opts...)
var env WARPConnectorGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/warp_connector/%s", query.AccountID, tunnelID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -118,7 +118,7 @@ func (r *WARPConnectorService) Token(ctx context.Context, tunnelID string, query
opts = append(r.Options[:], opts...)
var env WARPConnectorTokenResponseEnvelope
path := fmt.Sprintf("accounts/%s/warp_connector/%s/token", query.AccountID, tunnelID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/accountsetting.go b/workers/accountsetting.go
index 52440018683..a425d89cc17 100644
--- a/workers/accountsetting.go
+++ b/workers/accountsetting.go
@@ -49,7 +49,7 @@ func (r *AccountSettingService) Get(ctx context.Context, query AccountSettingGet
opts = append(r.Options[:], opts...)
var env AccountSettingGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/account-settings", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/deploymentbyscript.go b/workers/deploymentbyscript.go
index 0ad23c72a0a..8f9fddef807 100644
--- a/workers/deploymentbyscript.go
+++ b/workers/deploymentbyscript.go
@@ -38,7 +38,7 @@ func (r *DeploymentByScriptService) Get(ctx context.Context, scriptID string, qu
opts = append(r.Options[:], opts...)
var env DeploymentByScriptGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/deployments/by-script/%s", query.AccountID, scriptID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/deploymentbyscriptdetail.go b/workers/deploymentbyscriptdetail.go
index ab85514d211..55880ecbde1 100644
--- a/workers/deploymentbyscriptdetail.go
+++ b/workers/deploymentbyscriptdetail.go
@@ -36,7 +36,7 @@ func (r *DeploymentByScriptDetailService) Get(ctx context.Context, scriptID stri
opts = append(r.Options[:], opts...)
var env DeploymentByScriptDetailGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/deployments/by-script/%s/detail/%s", query.AccountID, scriptID, deploymentID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/domain.go b/workers/domain.go
index edaa66b666e..46295b5bd89 100644
--- a/workers/domain.go
+++ b/workers/domain.go
@@ -63,7 +63,7 @@ func (r *DomainService) Delete(ctx context.Context, domainID interface{}, body D
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("accounts/%v/workers/domains/%v", body.AccountID, domainID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -72,7 +72,7 @@ func (r *DomainService) Get(ctx context.Context, domainID interface{}, query Dom
opts = append(r.Options[:], opts...)
var env DomainGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/workers/domains/%v", query.AccountID, domainID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/filter.go b/workers/filter.go
index a3474390985..85ccd819cee 100644
--- a/workers/filter.go
+++ b/workers/filter.go
@@ -61,7 +61,7 @@ func (r *FilterService) List(ctx context.Context, query FilterListParams, opts .
opts = append(r.Options[:], opts...)
var env FilterListResponseEnvelope
path := fmt.Sprintf("zones/%s/workers/filters", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *FilterService) Delete(ctx context.Context, filterID string, body Filter
opts = append(r.Options[:], opts...)
var env FilterDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/workers/filters/%s", body.ZoneID, filterID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/route.go b/workers/route.go
index aef4f9af4aa..ae27a77ace9 100644
--- a/workers/route.go
+++ b/workers/route.go
@@ -64,7 +64,7 @@ func (r *RouteService) List(ctx context.Context, query RouteListParams, opts ...
opts = append(r.Options[:], opts...)
var env RouteListResponseEnvelope
path := fmt.Sprintf("zones/%s/workers/routes", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -77,7 +77,7 @@ func (r *RouteService) Delete(ctx context.Context, routeID string, body RouteDel
opts = append(r.Options[:], opts...)
var env RouteDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/workers/routes/%s", body.ZoneID, routeID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -90,7 +90,7 @@ func (r *RouteService) Get(ctx context.Context, routeID string, query RouteGetPa
opts = append(r.Options[:], opts...)
var env RouteGetResponseEnvelope
path := fmt.Sprintf("zones/%s/workers/routes/%s", query.ZoneID, routeID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/script.go b/workers/script.go
index e77557f57c3..3697112a38a 100644
--- a/workers/script.go
+++ b/workers/script.go
@@ -69,7 +69,7 @@ func (r *ScriptService) List(ctx context.Context, query ScriptListParams, opts .
opts = append(r.Options[:], opts...)
var env ScriptListResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/scripts", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *ScriptService) Get(ctx context.Context, scriptName string, query Script
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "undefined")}, opts...)
path := fmt.Sprintf("accounts/%s/workers/scripts/%s", query.AccountID, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/workers/scriptbinding.go b/workers/scriptbinding.go
index 3ad55cba52e..baf7c4dda52 100644
--- a/workers/scriptbinding.go
+++ b/workers/scriptbinding.go
@@ -38,7 +38,7 @@ func (r *ScriptBindingService) Get(ctx context.Context, query ScriptBindingGetPa
opts = append(r.Options[:], opts...)
var env ScriptBindingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/workers/script/bindings", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/scriptcontentv2.go b/workers/scriptcontentv2.go
index f6bf522f64f..82e8cdbb5bc 100644
--- a/workers/scriptcontentv2.go
+++ b/workers/scriptcontentv2.go
@@ -35,7 +35,7 @@ func (r *ScriptContentV2Service) Get(ctx context.Context, scriptName string, que
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "string")}, opts...)
path := fmt.Sprintf("accounts/%s/workers/scripts/%s/content/v2", query.AccountID, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/workers/scriptschedule.go b/workers/scriptschedule.go
index 1f1385c298d..b7a8e4d25e3 100644
--- a/workers/scriptschedule.go
+++ b/workers/scriptschedule.go
@@ -49,7 +49,7 @@ func (r *ScriptScheduleService) Get(ctx context.Context, scriptName string, quer
opts = append(r.Options[:], opts...)
var env ScriptScheduleGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/scripts/%s/schedules", query.AccountID, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/scriptsetting.go b/workers/scriptsetting.go
index 967b92a838b..afe886ddaa5 100644
--- a/workers/scriptsetting.go
+++ b/workers/scriptsetting.go
@@ -51,7 +51,7 @@ func (r *ScriptSettingService) Get(ctx context.Context, scriptName string, query
opts = append(r.Options[:], opts...)
var env ScriptSettingGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/scripts/%s/settings", query.AccountID, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/scripttail.go b/workers/scripttail.go
index 9ad01d933e8..0f42fc29cfd 100644
--- a/workers/scripttail.go
+++ b/workers/scripttail.go
@@ -38,7 +38,7 @@ func (r *ScriptTailService) New(ctx context.Context, scriptName string, body Scr
opts = append(r.Options[:], opts...)
var env ScriptTailNewResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/scripts/%s/tails", body.AccountID, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -51,7 +51,7 @@ func (r *ScriptTailService) Delete(ctx context.Context, scriptName string, id st
opts = append(r.Options[:], opts...)
var env ScriptTailDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/scripts/%s/tails/%s", body.AccountID, scriptName, id)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -64,7 +64,7 @@ func (r *ScriptTailService) Get(ctx context.Context, scriptName string, query Sc
opts = append(r.Options[:], opts...)
var env ScriptTailGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/scripts/%s/tails", query.AccountID, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/scriptusagemodel.go b/workers/scriptusagemodel.go
index dcd3d78f1c9..24460cc6d30 100644
--- a/workers/scriptusagemodel.go
+++ b/workers/scriptusagemodel.go
@@ -50,7 +50,7 @@ func (r *ScriptUsageModelService) Get(ctx context.Context, scriptName string, qu
opts = append(r.Options[:], opts...)
var env ScriptUsageModelGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/scripts/%s/usage-model", query.AccountID, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/serviceenvironmentcontent.go b/workers/serviceenvironmentcontent.go
index 99cac869902..753ace5340a 100644
--- a/workers/serviceenvironmentcontent.go
+++ b/workers/serviceenvironmentcontent.go
@@ -53,7 +53,7 @@ func (r *ServiceEnvironmentContentService) Get(ctx context.Context, serviceName
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "string")}, opts...)
path := fmt.Sprintf("accounts/%s/workers/services/%s/environments/%s/content", query.AccountID, serviceName, environmentName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/workers/serviceenvironmentsetting.go b/workers/serviceenvironmentsetting.go
index 0215758194b..a3d2283bc73 100644
--- a/workers/serviceenvironmentsetting.go
+++ b/workers/serviceenvironmentsetting.go
@@ -51,7 +51,7 @@ func (r *ServiceEnvironmentSettingService) Get(ctx context.Context, serviceName
opts = append(r.Options[:], opts...)
var env ServiceEnvironmentSettingGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/services/%s/environments/%s/settings", query.AccountID, serviceName, environmentName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers/subdomain.go b/workers/subdomain.go
index 582063cba9f..ed665676b71 100644
--- a/workers/subdomain.go
+++ b/workers/subdomain.go
@@ -48,7 +48,7 @@ func (r *SubdomainService) Get(ctx context.Context, query SubdomainGetParams, op
opts = append(r.Options[:], opts...)
var env SubdomainGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/subdomain", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers_for_platforms/dispatchnamespace.go b/workers_for_platforms/dispatchnamespace.go
index c6648e2f9fb..1ba382b5777 100644
--- a/workers_for_platforms/dispatchnamespace.go
+++ b/workers_for_platforms/dispatchnamespace.go
@@ -52,7 +52,7 @@ func (r *DispatchNamespaceService) List(ctx context.Context, query DispatchNames
opts = append(r.Options[:], opts...)
var env DispatchNamespaceListResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *DispatchNamespaceService) Delete(ctx context.Context, dispatchNamespace
opts = append(r.Options[:], opts...)
var env DispatchNamespaceDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s", body.AccountID, dispatchNamespace)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -78,7 +78,7 @@ func (r *DispatchNamespaceService) Get(ctx context.Context, dispatchNamespace st
opts = append(r.Options[:], opts...)
var env DispatchNamespaceGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s", query.AccountID, dispatchNamespace)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers_for_platforms/dispatchnamespacescript.go b/workers_for_platforms/dispatchnamespacescript.go
index c20adf409d5..f6f685effff 100644
--- a/workers_for_platforms/dispatchnamespacescript.go
+++ b/workers_for_platforms/dispatchnamespacescript.go
@@ -69,7 +69,7 @@ func (r *DispatchNamespaceScriptService) Get(ctx context.Context, dispatchNamesp
opts = append(r.Options[:], opts...)
var env DispatchNamespaceScriptGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s/scripts/%s", query.AccountID, dispatchNamespace, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/workers_for_platforms/dispatchnamespacescriptcontentbinding.go b/workers_for_platforms/dispatchnamespacescriptcontentbinding.go
index e895176df6a..d7ad8129cfb 100644
--- a/workers_for_platforms/dispatchnamespacescriptcontentbinding.go
+++ b/workers_for_platforms/dispatchnamespacescriptcontentbinding.go
@@ -39,7 +39,7 @@ func NewDispatchNamespaceScriptContentBindingService(opts ...option.RequestOptio
func (r *DispatchNamespaceScriptContentBindingService) Get(ctx context.Context, dispatchNamespace string, scriptName string, query DispatchNamespaceScriptContentBindingGetParams, opts ...option.RequestOption) (res *DispatchNamespaceScriptContentBindingGetResponse, err error) {
opts = append(r.Options[:], opts...)
path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s/scripts/%s/bindings", query.AccountID, dispatchNamespace, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/workers_for_platforms/dispatchnamespacescriptcontentscript.go b/workers_for_platforms/dispatchnamespacescriptcontentscript.go
index 8c94bac2c68..31f28ae24f6 100644
--- a/workers_for_platforms/dispatchnamespacescriptcontentscript.go
+++ b/workers_for_platforms/dispatchnamespacescriptcontentscript.go
@@ -56,7 +56,7 @@ func (r *DispatchNamespaceScriptContentScriptService) Get(ctx context.Context, d
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "string")}, opts...)
path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s/scripts/%s/content", query.AccountID, dispatchNamespace, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/workers_for_platforms/dispatchnamespacescriptcontentsetting.go b/workers_for_platforms/dispatchnamespacescriptcontentsetting.go
index 054b46721fe..a04574dd3ee 100644
--- a/workers_for_platforms/dispatchnamespacescriptcontentsetting.go
+++ b/workers_for_platforms/dispatchnamespacescriptcontentsetting.go
@@ -52,7 +52,7 @@ func (r *DispatchNamespaceScriptContentSettingService) Get(ctx context.Context,
opts = append(r.Options[:], opts...)
var env DispatchNamespaceScriptContentSettingGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/workers/dispatch/namespaces/%s/scripts/%s/settings", query.AccountID, dispatchNamespace, scriptName)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go
index c1248b40572..1f034a98308 100644
--- a/zero_trust/accessapplication.go
+++ b/zero_trust/accessapplication.go
@@ -98,7 +98,7 @@ func (r *AccessApplicationService) List(ctx context.Context, query AccessApplica
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -120,7 +120,7 @@ func (r *AccessApplicationService) Delete(ctx context.Context, appID AccessAppli
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%v", accountOrZone, accountOrZoneID, appID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -142,7 +142,7 @@ func (r *AccessApplicationService) Get(ctx context.Context, appID AccessApplicat
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%v", accountOrZone, accountOrZoneID, appID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -164,7 +164,7 @@ func (r *AccessApplicationService) RevokeTokens(ctx context.Context, appID Acces
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%v/revoke_tokens", accountOrZone, accountOrZoneID, appID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accessapplicationca.go b/zero_trust/accessapplicationca.go
index 2828eabb06c..9d0b5441f6f 100644
--- a/zero_trust/accessapplicationca.go
+++ b/zero_trust/accessapplicationca.go
@@ -48,7 +48,7 @@ func (r *AccessApplicationCAService) New(ctx context.Context, uuid string, body
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%s/ca", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -70,7 +70,7 @@ func (r *AccessApplicationCAService) List(ctx context.Context, query AccessAppli
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/ca", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *AccessApplicationCAService) Delete(ctx context.Context, uuid string, bo
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%s/ca", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -114,7 +114,7 @@ func (r *AccessApplicationCAService) Get(ctx context.Context, uuid string, query
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%s/ca", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accessapplicationpolicy.go b/zero_trust/accessapplicationpolicy.go
index 74007102b9c..800a7f43d71 100644
--- a/zero_trust/accessapplicationpolicy.go
+++ b/zero_trust/accessapplicationpolicy.go
@@ -92,7 +92,7 @@ func (r *AccessApplicationPolicyService) List(ctx context.Context, uuid string,
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%s/policies", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -114,7 +114,7 @@ func (r *AccessApplicationPolicyService) Delete(ctx context.Context, uuid1 strin
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%s/policies/%s", accountOrZone, accountOrZoneID, uuid1, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -136,7 +136,7 @@ func (r *AccessApplicationPolicyService) Get(ctx context.Context, uuid1 string,
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%s/policies/%s", accountOrZone, accountOrZoneID, uuid1, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accessapplicationuserpolicycheck.go b/zero_trust/accessapplicationuserpolicycheck.go
index 140fd4b8132..7bf4f9473bb 100644
--- a/zero_trust/accessapplicationuserpolicycheck.go
+++ b/zero_trust/accessapplicationuserpolicycheck.go
@@ -45,7 +45,7 @@ func (r *AccessApplicationUserPolicyCheckService) List(ctx context.Context, appI
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/apps/%v/user_policy_checks", accountOrZone, accountOrZoneID, appID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accesscertificate.go b/zero_trust/accesscertificate.go
index 475e0a06058..8e9f99c4c7f 100644
--- a/zero_trust/accesscertificate.go
+++ b/zero_trust/accesscertificate.go
@@ -92,7 +92,7 @@ func (r *AccessCertificateService) List(ctx context.Context, query AccessCertifi
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/certificates", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -114,7 +114,7 @@ func (r *AccessCertificateService) Delete(ctx context.Context, uuid string, body
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/certificates/%s", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -136,7 +136,7 @@ func (r *AccessCertificateService) Get(ctx context.Context, uuid string, query A
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/certificates/%s", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accesscertificatesetting.go b/zero_trust/accesscertificatesetting.go
index 7701fb810fe..00ceccb4f22 100644
--- a/zero_trust/accesscertificatesetting.go
+++ b/zero_trust/accesscertificatesetting.go
@@ -67,7 +67,7 @@ func (r *AccessCertificateSettingService) List(ctx context.Context, query Access
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/certificates/settings", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accessgroup.go b/zero_trust/accessgroup.go
index 075ce72a23e..9cb5d79078f 100644
--- a/zero_trust/accessgroup.go
+++ b/zero_trust/accessgroup.go
@@ -92,7 +92,7 @@ func (r *AccessGroupService) List(ctx context.Context, query AccessGroupListPara
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/groups", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -114,7 +114,7 @@ func (r *AccessGroupService) Delete(ctx context.Context, uuid string, body Acces
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/groups/%s", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -136,7 +136,7 @@ func (r *AccessGroupService) Get(ctx context.Context, uuid string, query AccessG
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/groups/%s", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/accessservicetoken.go b/zero_trust/accessservicetoken.go
index a643f72a2a6..7d5e44235a2 100644
--- a/zero_trust/accessservicetoken.go
+++ b/zero_trust/accessservicetoken.go
@@ -92,7 +92,7 @@ func (r *AccessServiceTokenService) List(ctx context.Context, query AccessServic
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/service_tokens", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -114,7 +114,7 @@ func (r *AccessServiceTokenService) Delete(ctx context.Context, uuid string, bod
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/service_tokens/%s", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/connectivitysetting.go b/zero_trust/connectivitysetting.go
index 6ab9af280c4..64788b27ba8 100644
--- a/zero_trust/connectivitysetting.go
+++ b/zero_trust/connectivitysetting.go
@@ -49,7 +49,7 @@ func (r *ConnectivitySettingService) Get(ctx context.Context, query Connectivity
opts = append(r.Options[:], opts...)
var env ConnectivitySettingGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/zerotrust/connectivity_settings", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/device.go b/zero_trust/device.go
index b1235787f00..f7bb3bd2768 100644
--- a/zero_trust/device.go
+++ b/zero_trust/device.go
@@ -55,7 +55,7 @@ func (r *DeviceService) List(ctx context.Context, query DeviceListParams, opts .
opts = append(r.Options[:], opts...)
var env DeviceListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -68,7 +68,7 @@ func (r *DeviceService) Get(ctx context.Context, deviceID string, query DeviceGe
opts = append(r.Options[:], opts...)
var env DeviceGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/%s", query.AccountID, deviceID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicedextest.go b/zero_trust/devicedextest.go
index 8651c87a99a..428ace8105c 100644
--- a/zero_trust/devicedextest.go
+++ b/zero_trust/devicedextest.go
@@ -62,7 +62,7 @@ func (r *DeviceDEXTestService) List(ctx context.Context, query DeviceDEXTestList
opts = append(r.Options[:], opts...)
var env DeviceDEXTestListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/dex_tests", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -76,7 +76,7 @@ func (r *DeviceDEXTestService) Delete(ctx context.Context, dexTestID string, bod
opts = append(r.Options[:], opts...)
var env DeviceDEXTestDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/dex_tests/%s", body.AccountID, dexTestID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -89,7 +89,7 @@ func (r *DeviceDEXTestService) Get(ctx context.Context, dexTestID string, query
opts = append(r.Options[:], opts...)
var env DeviceDEXTestGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/dex_tests/%s", query.AccountID, dexTestID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicenetwork.go b/zero_trust/devicenetwork.go
index f2d508dbe57..735dae9cefd 100644
--- a/zero_trust/devicenetwork.go
+++ b/zero_trust/devicenetwork.go
@@ -62,7 +62,7 @@ func (r *DeviceNetworkService) List(ctx context.Context, query DeviceNetworkList
opts = append(r.Options[:], opts...)
var env DeviceNetworkListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/networks", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -76,7 +76,7 @@ func (r *DeviceNetworkService) Delete(ctx context.Context, networkID string, bod
opts = append(r.Options[:], opts...)
var env DeviceNetworkDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/networks/%s", body.AccountID, networkID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -89,7 +89,7 @@ func (r *DeviceNetworkService) Get(ctx context.Context, networkID string, query
opts = append(r.Options[:], opts...)
var env DeviceNetworkGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/networks/%s", query.AccountID, networkID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/deviceoverridecode.go b/zero_trust/deviceoverridecode.go
index 49105316456..e36c37d3e9b 100644
--- a/zero_trust/deviceoverridecode.go
+++ b/zero_trust/deviceoverridecode.go
@@ -37,7 +37,7 @@ func (r *DeviceOverrideCodeService) List(ctx context.Context, deviceID string, q
opts = append(r.Options[:], opts...)
var env DeviceOverrideCodeListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/%s/override_codes", query.AccountID, deviceID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicepolicy.go b/zero_trust/devicepolicy.go
index 05e15f4557d..b4baa490a31 100644
--- a/zero_trust/devicepolicy.go
+++ b/zero_trust/devicepolicy.go
@@ -58,7 +58,7 @@ func (r *DevicePolicyService) List(ctx context.Context, query DevicePolicyListPa
opts = append(r.Options[:], opts...)
var env DevicePolicyListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policies", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -72,7 +72,7 @@ func (r *DevicePolicyService) Delete(ctx context.Context, policyID string, body
opts = append(r.Options[:], opts...)
var env DevicePolicyDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/%s", body.AccountID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -98,7 +98,7 @@ func (r *DevicePolicyService) Get(ctx context.Context, policyID string, query De
opts = append(r.Options[:], opts...)
var env DevicePolicyGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/%s", query.AccountID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicepolicydefaultpolicy.go b/zero_trust/devicepolicydefaultpolicy.go
index 1fe86129326..46e236f10aa 100644
--- a/zero_trust/devicepolicydefaultpolicy.go
+++ b/zero_trust/devicepolicydefaultpolicy.go
@@ -36,7 +36,7 @@ func (r *DevicePolicyDefaultPolicyService) Get(ctx context.Context, query Device
opts = append(r.Options[:], opts...)
var env DevicePolicyDefaultPolicyGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicepolicyexclude.go b/zero_trust/devicepolicyexclude.go
index 1e21e4b7469..188d6077558 100644
--- a/zero_trust/devicepolicyexclude.go
+++ b/zero_trust/devicepolicyexclude.go
@@ -49,7 +49,7 @@ func (r *DevicePolicyExcludeService) List(ctx context.Context, query DevicePolic
opts = append(r.Options[:], opts...)
var env DevicePolicyExcludeListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/exclude", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -63,7 +63,7 @@ func (r *DevicePolicyExcludeService) Get(ctx context.Context, policyID string, q
opts = append(r.Options[:], opts...)
var env DevicePolicyExcludeGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/%s/exclude", query.AccountID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicepolicyfallbackdomain.go b/zero_trust/devicepolicyfallbackdomain.go
index cc47d674bc4..bb8d98dc9a6 100644
--- a/zero_trust/devicepolicyfallbackdomain.go
+++ b/zero_trust/devicepolicyfallbackdomain.go
@@ -52,7 +52,7 @@ func (r *DevicePolicyFallbackDomainService) List(ctx context.Context, query Devi
opts = append(r.Options[:], opts...)
var env DevicePolicyFallbackDomainListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/fallback_domains", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -67,7 +67,7 @@ func (r *DevicePolicyFallbackDomainService) Get(ctx context.Context, policyID st
opts = append(r.Options[:], opts...)
var env DevicePolicyFallbackDomainGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/%s/fallback_domains", query.AccountID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicepolicyinclude.go b/zero_trust/devicepolicyinclude.go
index 11e5ef5347a..1a88c7b2a3e 100644
--- a/zero_trust/devicepolicyinclude.go
+++ b/zero_trust/devicepolicyinclude.go
@@ -49,7 +49,7 @@ func (r *DevicePolicyIncludeService) List(ctx context.Context, query DevicePolic
opts = append(r.Options[:], opts...)
var env DevicePolicyIncludeListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/include", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -63,7 +63,7 @@ func (r *DevicePolicyIncludeService) Get(ctx context.Context, policyID string, q
opts = append(r.Options[:], opts...)
var env DevicePolicyIncludeGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/policy/%s/include", query.AccountID, policyID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/deviceposture.go b/zero_trust/deviceposture.go
index 6b1cc0f04b1..5934bb8a7da 100644
--- a/zero_trust/deviceposture.go
+++ b/zero_trust/deviceposture.go
@@ -66,7 +66,7 @@ func (r *DevicePostureService) List(ctx context.Context, query DevicePostureList
opts = append(r.Options[:], opts...)
var env DevicePostureListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/posture", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *DevicePostureService) Delete(ctx context.Context, ruleID string, body D
opts = append(r.Options[:], opts...)
var env DevicePostureDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/posture/%s", body.AccountID, ruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *DevicePostureService) Get(ctx context.Context, ruleID string, query Dev
opts = append(r.Options[:], opts...)
var env DevicePostureGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/posture/%s", query.AccountID, ruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicepostureintegration.go b/zero_trust/devicepostureintegration.go
index 7c2cdf223d0..cdc49d015ca 100644
--- a/zero_trust/devicepostureintegration.go
+++ b/zero_trust/devicepostureintegration.go
@@ -52,7 +52,7 @@ func (r *DevicePostureIntegrationService) List(ctx context.Context, query Device
opts = append(r.Options[:], opts...)
var env DevicePostureIntegrationListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/posture/integration", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -65,7 +65,7 @@ func (r *DevicePostureIntegrationService) Delete(ctx context.Context, integratio
opts = append(r.Options[:], opts...)
var env DevicePostureIntegrationDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/posture/integration/%s", body.AccountID, integrationID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -91,7 +91,7 @@ func (r *DevicePostureIntegrationService) Get(ctx context.Context, integrationID
opts = append(r.Options[:], opts...)
var env DevicePostureIntegrationGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/posture/integration/%s", query.AccountID, integrationID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/devicesetting.go b/zero_trust/devicesetting.go
index 40f3ecde07f..7da2b9233e6 100644
--- a/zero_trust/devicesetting.go
+++ b/zero_trust/devicesetting.go
@@ -49,7 +49,7 @@ func (r *DeviceSettingService) List(ctx context.Context, query DeviceSettingList
opts = append(r.Options[:], opts...)
var env DeviceSettingListResponseEnvelope
path := fmt.Sprintf("accounts/%v/devices/settings", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/dexfleetstatus.go b/zero_trust/dexfleetstatus.go
index d550e862ff2..4eb49f6a362 100644
--- a/zero_trust/dexfleetstatus.go
+++ b/zero_trust/dexfleetstatus.go
@@ -3,6 +3,15 @@
package zero_trust
import (
+ "context"
+ "fmt"
+ "net/http"
+ "net/url"
+
+ "github.com/cloudflare/cloudflare-go/v2/internal/apijson"
+ "github.com/cloudflare/cloudflare-go/v2/internal/apiquery"
+ "github.com/cloudflare/cloudflare-go/v2/internal/param"
+ "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
"github.com/cloudflare/cloudflare-go/v2/option"
)
@@ -12,10 +21,8 @@ import (
// this service directly, and instead use the [NewDEXFleetStatusService] method
// instead.
type DEXFleetStatusService struct {
- Options []option.RequestOption
- Devices *DEXFleetStatusDeviceService
- Live *DEXFleetStatusLiveService
- OverTime *DEXFleetStatusOverTimeService
+ Options []option.RequestOption
+ Devices *DEXFleetStatusDeviceService
}
// NewDEXFleetStatusService generates a new service that applies the given options
@@ -25,7 +32,317 @@ func NewDEXFleetStatusService(opts ...option.RequestOption) (r *DEXFleetStatusSe
r = &DEXFleetStatusService{}
r.Options = opts
r.Devices = NewDEXFleetStatusDeviceService(opts...)
- r.Live = NewDEXFleetStatusLiveService(opts...)
- r.OverTime = NewDEXFleetStatusOverTimeService(opts...)
return
}
+
+// List details for live (up to 60 minutes) devices using WARP
+func (r *DEXFleetStatusService) Live(ctx context.Context, params DEXFleetStatusLiveParams, opts ...option.RequestOption) (res *DEXFleetStatusLiveResponse, err error) {
+ opts = append(r.Options[:], opts...)
+ var env DEXFleetStatusLiveResponseEnvelope
+ path := fmt.Sprintf("accounts/%s/dex/fleet-status/live", params.AccountID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// List details for devices using WARP, up to 7 days
+func (r *DEXFleetStatusService) OverTime(ctx context.Context, params DEXFleetStatusOverTimeParams, opts ...option.RequestOption) (err error) {
+ opts = append(r.Options[:], opts...)
+ opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
+ path := fmt.Sprintf("accounts/%s/dex/fleet-status/over-time", params.AccountID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, nil, opts...)
+ return
+}
+
+type DEXFleetStatusLiveResponse struct {
+ DeviceStats DEXFleetStatusLiveResponseDeviceStats `json:"deviceStats"`
+ JSON dexFleetStatusLiveResponseJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseJSON contains the JSON metadata for the struct
+// [DEXFleetStatusLiveResponse]
+type dexFleetStatusLiveResponseJSON struct {
+ DeviceStats apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseDeviceStats struct {
+ ByColo []DEXFleetStatusLiveResponseDeviceStatsByColo `json:"byColo,nullable"`
+ ByMode []DEXFleetStatusLiveResponseDeviceStatsByMode `json:"byMode,nullable"`
+ ByPlatform []DEXFleetStatusLiveResponseDeviceStatsByPlatform `json:"byPlatform,nullable"`
+ ByStatus []DEXFleetStatusLiveResponseDeviceStatsByStatus `json:"byStatus,nullable"`
+ ByVersion []DEXFleetStatusLiveResponseDeviceStatsByVersion `json:"byVersion,nullable"`
+ // Number of unique devices
+ UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
+ JSON dexFleetStatusLiveResponseDeviceStatsJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseDeviceStatsJSON contains the JSON metadata for the
+// struct [DEXFleetStatusLiveResponseDeviceStats]
+type dexFleetStatusLiveResponseDeviceStatsJSON struct {
+ ByColo apijson.Field
+ ByMode apijson.Field
+ ByPlatform apijson.Field
+ ByStatus apijson.Field
+ ByVersion apijson.Field
+ UniqueDevicesTotal apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseDeviceStats) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseDeviceStatsJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseDeviceStatsByColo struct {
+ // Number of unique devices
+ UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
+ Value string `json:"value"`
+ JSON dexFleetStatusLiveResponseDeviceStatsByColoJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseDeviceStatsByColoJSON contains the JSON metadata for
+// the struct [DEXFleetStatusLiveResponseDeviceStatsByColo]
+type dexFleetStatusLiveResponseDeviceStatsByColoJSON struct {
+ UniqueDevicesTotal apijson.Field
+ Value apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseDeviceStatsByColo) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseDeviceStatsByColoJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseDeviceStatsByMode struct {
+ // Number of unique devices
+ UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
+ Value string `json:"value"`
+ JSON dexFleetStatusLiveResponseDeviceStatsByModeJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseDeviceStatsByModeJSON contains the JSON metadata for
+// the struct [DEXFleetStatusLiveResponseDeviceStatsByMode]
+type dexFleetStatusLiveResponseDeviceStatsByModeJSON struct {
+ UniqueDevicesTotal apijson.Field
+ Value apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseDeviceStatsByMode) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseDeviceStatsByModeJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseDeviceStatsByPlatform struct {
+ // Number of unique devices
+ UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
+ Value string `json:"value"`
+ JSON dexFleetStatusLiveResponseDeviceStatsByPlatformJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseDeviceStatsByPlatformJSON contains the JSON metadata
+// for the struct [DEXFleetStatusLiveResponseDeviceStatsByPlatform]
+type dexFleetStatusLiveResponseDeviceStatsByPlatformJSON struct {
+ UniqueDevicesTotal apijson.Field
+ Value apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseDeviceStatsByPlatform) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseDeviceStatsByPlatformJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseDeviceStatsByStatus struct {
+ // Number of unique devices
+ UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
+ Value string `json:"value"`
+ JSON dexFleetStatusLiveResponseDeviceStatsByStatusJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseDeviceStatsByStatusJSON contains the JSON metadata for
+// the struct [DEXFleetStatusLiveResponseDeviceStatsByStatus]
+type dexFleetStatusLiveResponseDeviceStatsByStatusJSON struct {
+ UniqueDevicesTotal apijson.Field
+ Value apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseDeviceStatsByStatus) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseDeviceStatsByStatusJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseDeviceStatsByVersion struct {
+ // Number of unique devices
+ UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
+ Value string `json:"value"`
+ JSON dexFleetStatusLiveResponseDeviceStatsByVersionJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseDeviceStatsByVersionJSON contains the JSON metadata
+// for the struct [DEXFleetStatusLiveResponseDeviceStatsByVersion]
+type dexFleetStatusLiveResponseDeviceStatsByVersionJSON struct {
+ UniqueDevicesTotal apijson.Field
+ Value apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseDeviceStatsByVersion) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseDeviceStatsByVersionJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ // Number of minutes before current time
+ SinceMinutes param.Field[float64] `query:"since_minutes,required"`
+}
+
+// URLQuery serializes [DEXFleetStatusLiveParams]'s query parameters as
+// `url.Values`.
+func (r DEXFleetStatusLiveParams) URLQuery() (v url.Values) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatComma,
+ NestedFormat: apiquery.NestedQueryFormatBrackets,
+ })
+}
+
+type DEXFleetStatusLiveResponseEnvelope struct {
+ Errors []DEXFleetStatusLiveResponseEnvelopeErrors `json:"errors,required"`
+ Messages []DEXFleetStatusLiveResponseEnvelopeMessages `json:"messages,required"`
+ Result DEXFleetStatusLiveResponse `json:"result,required"`
+ // Whether the API call was successful
+ Success DEXFleetStatusLiveResponseEnvelopeSuccess `json:"success,required"`
+ JSON dexFleetStatusLiveResponseEnvelopeJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseEnvelopeJSON contains the JSON metadata for the struct
+// [DEXFleetStatusLiveResponseEnvelope]
+type dexFleetStatusLiveResponseEnvelopeJSON struct {
+ Errors apijson.Field
+ Messages apijson.Field
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseEnvelopeErrors struct {
+ Code int64 `json:"code,required"`
+ Message string `json:"message,required"`
+ JSON dexFleetStatusLiveResponseEnvelopeErrorsJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseEnvelopeErrorsJSON contains the JSON metadata for the
+// struct [DEXFleetStatusLiveResponseEnvelopeErrors]
+type dexFleetStatusLiveResponseEnvelopeErrorsJSON struct {
+ Code apijson.Field
+ Message apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseEnvelopeErrorsJSON) RawJSON() string {
+ return r.raw
+}
+
+type DEXFleetStatusLiveResponseEnvelopeMessages struct {
+ Code int64 `json:"code,required"`
+ Message string `json:"message,required"`
+ JSON dexFleetStatusLiveResponseEnvelopeMessagesJSON `json:"-"`
+}
+
+// dexFleetStatusLiveResponseEnvelopeMessagesJSON contains the JSON metadata for
+// the struct [DEXFleetStatusLiveResponseEnvelopeMessages]
+type dexFleetStatusLiveResponseEnvelopeMessagesJSON struct {
+ Code apijson.Field
+ Message apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DEXFleetStatusLiveResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r dexFleetStatusLiveResponseEnvelopeMessagesJSON) RawJSON() string {
+ return r.raw
+}
+
+// Whether the API call was successful
+type DEXFleetStatusLiveResponseEnvelopeSuccess bool
+
+const (
+ DEXFleetStatusLiveResponseEnvelopeSuccessTrue DEXFleetStatusLiveResponseEnvelopeSuccess = true
+)
+
+type DEXFleetStatusOverTimeParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ // Timestamp in ISO format
+ TimeEnd param.Field[string] `query:"time_end,required"`
+ // Timestamp in ISO format
+ TimeStart param.Field[string] `query:"time_start,required"`
+ // Cloudflare colo
+ Colo param.Field[string] `query:"colo"`
+ // Device-specific ID, given as UUID v4
+ DeviceID param.Field[string] `query:"device_id"`
+}
+
+// URLQuery serializes [DEXFleetStatusOverTimeParams]'s query parameters as
+// `url.Values`.
+func (r DEXFleetStatusOverTimeParams) URLQuery() (v url.Values) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatComma,
+ NestedFormat: apiquery.NestedQueryFormatBrackets,
+ })
+}
diff --git a/zero_trust/dexfleetstatusovertime_test.go b/zero_trust/dexfleetstatus_test.go
similarity index 53%
rename from zero_trust/dexfleetstatusovertime_test.go
rename to zero_trust/dexfleetstatus_test.go
index 04445ed13ca..d455eb0a041 100644
--- a/zero_trust/dexfleetstatusovertime_test.go
+++ b/zero_trust/dexfleetstatus_test.go
@@ -14,7 +14,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/zero_trust"
)
-func TestDEXFleetStatusOverTimeListWithOptionalParams(t *testing.T) {
+func TestDEXFleetStatusLive(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 {
@@ -28,7 +28,34 @@ func TestDEXFleetStatusOverTimeListWithOptionalParams(t *testing.T) {
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
option.WithAPIEmail("user@example.com"),
)
- err := client.ZeroTrust.DEX.FleetStatus.OverTime.List(context.TODO(), zero_trust.DEXFleetStatusOverTimeListParams{
+ _, err := client.ZeroTrust.DEX.FleetStatus.Live(context.TODO(), zero_trust.DEXFleetStatusLiveParams{
+ AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
+ SinceMinutes: cloudflare.F(10.000000),
+ })
+ if err != nil {
+ var apierr *cloudflare.Error
+ if errors.As(err, &apierr) {
+ t.Log(string(apierr.DumpRequest(true)))
+ }
+ t.Fatalf("err should be nil: %s", err.Error())
+ }
+}
+
+func TestDEXFleetStatusOverTimeWithOptionalParams(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 {
+ baseURL = envURL
+ }
+ if !testutil.CheckTestServer(t, baseURL) {
+ return
+ }
+ client := cloudflare.NewClient(
+ option.WithBaseURL(baseURL),
+ option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
+ option.WithAPIEmail("user@example.com"),
+ )
+ err := client.ZeroTrust.DEX.FleetStatus.OverTime(context.TODO(), zero_trust.DEXFleetStatusOverTimeParams{
AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
TimeEnd: cloudflare.F("2023-10-11T00:00:00Z"),
TimeStart: cloudflare.F("2023-10-11T00:00:00Z"),
diff --git a/zero_trust/dexfleetstatuslive.go b/zero_trust/dexfleetstatuslive.go
deleted file mode 100644
index 34a5ddc7033..00000000000
--- a/zero_trust/dexfleetstatuslive.go
+++ /dev/null
@@ -1,316 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package zero_trust
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
-
- "github.com/cloudflare/cloudflare-go/v2/internal/apijson"
- "github.com/cloudflare/cloudflare-go/v2/internal/apiquery"
- "github.com/cloudflare/cloudflare-go/v2/internal/param"
- "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
- "github.com/cloudflare/cloudflare-go/v2/option"
-)
-
-// DEXFleetStatusLiveService contains methods and other services that help with
-// interacting with the cloudflare API. Note, unlike clients, this service does not
-// read variables from the environment automatically. You should not instantiate
-// this service directly, and instead use the [NewDEXFleetStatusLiveService] method
-// instead.
-type DEXFleetStatusLiveService struct {
- Options []option.RequestOption
-}
-
-// NewDEXFleetStatusLiveService generates a new service that applies the given
-// options to each request. These options are applied after the parent client's
-// options (if there is one), and before any request-specific options.
-func NewDEXFleetStatusLiveService(opts ...option.RequestOption) (r *DEXFleetStatusLiveService) {
- r = &DEXFleetStatusLiveService{}
- r.Options = opts
- return
-}
-
-// List details for live (up to 60 minutes) devices using WARP
-func (r *DEXFleetStatusLiveService) List(ctx context.Context, params DEXFleetStatusLiveListParams, opts ...option.RequestOption) (res *DEXFleetStatusLiveListResponse, err error) {
- opts = append(r.Options[:], opts...)
- var env DEXFleetStatusLiveListResponseEnvelope
- path := fmt.Sprintf("accounts/%s/dex/fleet-status/live", params.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...)
- if err != nil {
- return
- }
- res = &env.Result
- return
-}
-
-type DEXFleetStatusLiveListResponse struct {
- DeviceStats DEXFleetStatusLiveListResponseDeviceStats `json:"deviceStats"`
- JSON dexFleetStatusLiveListResponseJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseJSON contains the JSON metadata for the struct
-// [DEXFleetStatusLiveListResponse]
-type dexFleetStatusLiveListResponseJSON struct {
- DeviceStats apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseDeviceStats struct {
- ByColo []DEXFleetStatusLiveListResponseDeviceStatsByColo `json:"byColo,nullable"`
- ByMode []DEXFleetStatusLiveListResponseDeviceStatsByMode `json:"byMode,nullable"`
- ByPlatform []DEXFleetStatusLiveListResponseDeviceStatsByPlatform `json:"byPlatform,nullable"`
- ByStatus []DEXFleetStatusLiveListResponseDeviceStatsByStatus `json:"byStatus,nullable"`
- ByVersion []DEXFleetStatusLiveListResponseDeviceStatsByVersion `json:"byVersion,nullable"`
- // Number of unique devices
- UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
- JSON dexFleetStatusLiveListResponseDeviceStatsJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseDeviceStatsJSON contains the JSON metadata for the
-// struct [DEXFleetStatusLiveListResponseDeviceStats]
-type dexFleetStatusLiveListResponseDeviceStatsJSON struct {
- ByColo apijson.Field
- ByMode apijson.Field
- ByPlatform apijson.Field
- ByStatus apijson.Field
- ByVersion apijson.Field
- UniqueDevicesTotal apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseDeviceStats) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseDeviceStatsJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseDeviceStatsByColo struct {
- // Number of unique devices
- UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
- Value string `json:"value"`
- JSON dexFleetStatusLiveListResponseDeviceStatsByColoJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseDeviceStatsByColoJSON contains the JSON metadata
-// for the struct [DEXFleetStatusLiveListResponseDeviceStatsByColo]
-type dexFleetStatusLiveListResponseDeviceStatsByColoJSON struct {
- UniqueDevicesTotal apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseDeviceStatsByColo) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseDeviceStatsByColoJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseDeviceStatsByMode struct {
- // Number of unique devices
- UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
- Value string `json:"value"`
- JSON dexFleetStatusLiveListResponseDeviceStatsByModeJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseDeviceStatsByModeJSON contains the JSON metadata
-// for the struct [DEXFleetStatusLiveListResponseDeviceStatsByMode]
-type dexFleetStatusLiveListResponseDeviceStatsByModeJSON struct {
- UniqueDevicesTotal apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseDeviceStatsByMode) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseDeviceStatsByModeJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseDeviceStatsByPlatform struct {
- // Number of unique devices
- UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
- Value string `json:"value"`
- JSON dexFleetStatusLiveListResponseDeviceStatsByPlatformJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseDeviceStatsByPlatformJSON contains the JSON
-// metadata for the struct [DEXFleetStatusLiveListResponseDeviceStatsByPlatform]
-type dexFleetStatusLiveListResponseDeviceStatsByPlatformJSON struct {
- UniqueDevicesTotal apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseDeviceStatsByPlatform) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseDeviceStatsByPlatformJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseDeviceStatsByStatus struct {
- // Number of unique devices
- UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
- Value string `json:"value"`
- JSON dexFleetStatusLiveListResponseDeviceStatsByStatusJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseDeviceStatsByStatusJSON contains the JSON metadata
-// for the struct [DEXFleetStatusLiveListResponseDeviceStatsByStatus]
-type dexFleetStatusLiveListResponseDeviceStatsByStatusJSON struct {
- UniqueDevicesTotal apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseDeviceStatsByStatus) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseDeviceStatsByStatusJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseDeviceStatsByVersion struct {
- // Number of unique devices
- UniqueDevicesTotal float64 `json:"uniqueDevicesTotal"`
- Value string `json:"value"`
- JSON dexFleetStatusLiveListResponseDeviceStatsByVersionJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseDeviceStatsByVersionJSON contains the JSON
-// metadata for the struct [DEXFleetStatusLiveListResponseDeviceStatsByVersion]
-type dexFleetStatusLiveListResponseDeviceStatsByVersionJSON struct {
- UniqueDevicesTotal apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseDeviceStatsByVersion) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseDeviceStatsByVersionJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListParams struct {
- AccountID param.Field[string] `path:"account_id,required"`
- // Number of minutes before current time
- SinceMinutes param.Field[float64] `query:"since_minutes,required"`
-}
-
-// URLQuery serializes [DEXFleetStatusLiveListParams]'s query parameters as
-// `url.Values`.
-func (r DEXFleetStatusLiveListParams) URLQuery() (v url.Values) {
- return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
- ArrayFormat: apiquery.ArrayQueryFormatComma,
- NestedFormat: apiquery.NestedQueryFormatBrackets,
- })
-}
-
-type DEXFleetStatusLiveListResponseEnvelope struct {
- Errors []DEXFleetStatusLiveListResponseEnvelopeErrors `json:"errors,required"`
- Messages []DEXFleetStatusLiveListResponseEnvelopeMessages `json:"messages,required"`
- Result DEXFleetStatusLiveListResponse `json:"result,required"`
- // Whether the API call was successful
- Success DEXFleetStatusLiveListResponseEnvelopeSuccess `json:"success,required"`
- JSON dexFleetStatusLiveListResponseEnvelopeJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseEnvelopeJSON contains the JSON metadata for the
-// struct [DEXFleetStatusLiveListResponseEnvelope]
-type dexFleetStatusLiveListResponseEnvelopeJSON struct {
- Errors apijson.Field
- Messages apijson.Field
- Result apijson.Field
- Success apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseEnvelopeJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON dexFleetStatusLiveListResponseEnvelopeErrorsJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseEnvelopeErrorsJSON contains the JSON metadata for
-// the struct [DEXFleetStatusLiveListResponseEnvelopeErrors]
-type dexFleetStatusLiveListResponseEnvelopeErrorsJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseEnvelopeErrorsJSON) RawJSON() string {
- return r.raw
-}
-
-type DEXFleetStatusLiveListResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON dexFleetStatusLiveListResponseEnvelopeMessagesJSON `json:"-"`
-}
-
-// dexFleetStatusLiveListResponseEnvelopeMessagesJSON contains the JSON metadata
-// for the struct [DEXFleetStatusLiveListResponseEnvelopeMessages]
-type dexFleetStatusLiveListResponseEnvelopeMessagesJSON struct {
- Code apijson.Field
- Message apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DEXFleetStatusLiveListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dexFleetStatusLiveListResponseEnvelopeMessagesJSON) RawJSON() string {
- return r.raw
-}
-
-// Whether the API call was successful
-type DEXFleetStatusLiveListResponseEnvelopeSuccess bool
-
-const (
- DEXFleetStatusLiveListResponseEnvelopeSuccessTrue DEXFleetStatusLiveListResponseEnvelopeSuccess = true
-)
diff --git a/zero_trust/dexfleetstatuslive_test.go b/zero_trust/dexfleetstatuslive_test.go
deleted file mode 100644
index 9da4c7a29f2..00000000000
--- a/zero_trust/dexfleetstatuslive_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package zero_trust_test
-
-import (
- "context"
- "errors"
- "os"
- "testing"
-
- "github.com/cloudflare/cloudflare-go/v2"
- "github.com/cloudflare/cloudflare-go/v2/internal/testutil"
- "github.com/cloudflare/cloudflare-go/v2/option"
- "github.com/cloudflare/cloudflare-go/v2/zero_trust"
-)
-
-func TestDEXFleetStatusLiveList(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 {
- baseURL = envURL
- }
- if !testutil.CheckTestServer(t, baseURL) {
- return
- }
- client := cloudflare.NewClient(
- option.WithBaseURL(baseURL),
- option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
- option.WithAPIEmail("user@example.com"),
- )
- _, err := client.ZeroTrust.DEX.FleetStatus.Live.List(context.TODO(), zero_trust.DEXFleetStatusLiveListParams{
- AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
- SinceMinutes: cloudflare.F(10.000000),
- })
- if err != nil {
- var apierr *cloudflare.Error
- if errors.As(err, &apierr) {
- t.Log(string(apierr.DumpRequest(true)))
- }
- t.Fatalf("err should be nil: %s", err.Error())
- }
-}
diff --git a/zero_trust/dexfleetstatusovertime.go b/zero_trust/dexfleetstatusovertime.go
deleted file mode 100644
index e034acc4471..00000000000
--- a/zero_trust/dexfleetstatusovertime.go
+++ /dev/null
@@ -1,63 +0,0 @@
-// File generated from our OpenAPI spec by Stainless.
-
-package zero_trust
-
-import (
- "context"
- "fmt"
- "net/http"
- "net/url"
-
- "github.com/cloudflare/cloudflare-go/v2/internal/apiquery"
- "github.com/cloudflare/cloudflare-go/v2/internal/param"
- "github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
- "github.com/cloudflare/cloudflare-go/v2/option"
-)
-
-// DEXFleetStatusOverTimeService contains methods and other services that help with
-// interacting with the cloudflare API. Note, unlike clients, this service does not
-// read variables from the environment automatically. You should not instantiate
-// this service directly, and instead use the [NewDEXFleetStatusOverTimeService]
-// method instead.
-type DEXFleetStatusOverTimeService struct {
- Options []option.RequestOption
-}
-
-// NewDEXFleetStatusOverTimeService generates a new service that applies the given
-// options to each request. These options are applied after the parent client's
-// options (if there is one), and before any request-specific options.
-func NewDEXFleetStatusOverTimeService(opts ...option.RequestOption) (r *DEXFleetStatusOverTimeService) {
- r = &DEXFleetStatusOverTimeService{}
- r.Options = opts
- return
-}
-
-// List details for devices using WARP, up to 7 days
-func (r *DEXFleetStatusOverTimeService) List(ctx context.Context, params DEXFleetStatusOverTimeListParams, opts ...option.RequestOption) (err error) {
- opts = append(r.Options[:], opts...)
- opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
- path := fmt.Sprintf("accounts/%s/dex/fleet-status/over-time", params.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, nil, opts...)
- return
-}
-
-type DEXFleetStatusOverTimeListParams struct {
- AccountID param.Field[string] `path:"account_id,required"`
- // Timestamp in ISO format
- TimeEnd param.Field[string] `query:"time_end,required"`
- // Timestamp in ISO format
- TimeStart param.Field[string] `query:"time_start,required"`
- // Cloudflare colo
- Colo param.Field[string] `query:"colo"`
- // Device-specific ID, given as UUID v4
- DeviceID param.Field[string] `query:"device_id"`
-}
-
-// URLQuery serializes [DEXFleetStatusOverTimeListParams]'s query parameters as
-// `url.Values`.
-func (r DEXFleetStatusOverTimeListParams) URLQuery() (v url.Values) {
- return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
- ArrayFormat: apiquery.ArrayQueryFormatComma,
- NestedFormat: apiquery.NestedQueryFormatBrackets,
- })
-}
diff --git a/zero_trust/dexhttptestpercentile.go b/zero_trust/dexhttptestpercentile.go
index 7efcd24d216..5614638c6c6 100644
--- a/zero_trust/dexhttptestpercentile.go
+++ b/zero_trust/dexhttptestpercentile.go
@@ -35,9 +35,9 @@ func NewDEXHTTPTestPercentileService(opts ...option.RequestOption) (r *DEXHTTPTe
// Get percentiles for an http test for a given time period between 1 hour and 7
// days.
-func (r *DEXHTTPTestPercentileService) List(ctx context.Context, testID string, params DEXHTTPTestPercentileListParams, opts ...option.RequestOption) (res *DigitalExperienceMonitoringHTTPDetailsPercentiles, err error) {
+func (r *DEXHTTPTestPercentileService) Get(ctx context.Context, testID string, params DEXHTTPTestPercentileGetParams, opts ...option.RequestOption) (res *DigitalExperienceMonitoringHTTPDetailsPercentiles, err error) {
opts = append(r.Options[:], opts...)
- var env DexhttpTestPercentileListResponseEnvelope
+ var env DexhttpTestPercentileGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dex/http-tests/%s/percentiles", params.AccountID, testID)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...)
if err != nil {
@@ -168,7 +168,7 @@ func (r digitalExperienceMonitoringHTTPDetailsPercentilesServerResponseTimeMsJSO
return r.raw
}
-type DEXHTTPTestPercentileListParams struct {
+type DEXHTTPTestPercentileGetParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// End time for aggregate metrics in ISO format
TimeEnd param.Field[string] `query:"timeEnd,required"`
@@ -182,27 +182,27 @@ type DEXHTTPTestPercentileListParams struct {
DeviceID param.Field[[]string] `query:"deviceId"`
}
-// URLQuery serializes [DEXHTTPTestPercentileListParams]'s query parameters as
+// URLQuery serializes [DEXHTTPTestPercentileGetParams]'s query parameters as
// `url.Values`.
-func (r DEXHTTPTestPercentileListParams) URLQuery() (v url.Values) {
+func (r DEXHTTPTestPercentileGetParams) URLQuery() (v url.Values) {
return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
ArrayFormat: apiquery.ArrayQueryFormatComma,
NestedFormat: apiquery.NestedQueryFormatBrackets,
})
}
-type DexhttpTestPercentileListResponseEnvelope struct {
- Errors []DexhttpTestPercentileListResponseEnvelopeErrors `json:"errors,required"`
- Messages []DexhttpTestPercentileListResponseEnvelopeMessages `json:"messages,required"`
- Result DigitalExperienceMonitoringHTTPDetailsPercentiles `json:"result,required"`
+type DexhttpTestPercentileGetResponseEnvelope struct {
+ Errors []DexhttpTestPercentileGetResponseEnvelopeErrors `json:"errors,required"`
+ Messages []DexhttpTestPercentileGetResponseEnvelopeMessages `json:"messages,required"`
+ Result DigitalExperienceMonitoringHTTPDetailsPercentiles `json:"result,required"`
// Whether the API call was successful
- Success DexhttpTestPercentileListResponseEnvelopeSuccess `json:"success,required"`
- JSON dexhttpTestPercentileListResponseEnvelopeJSON `json:"-"`
+ Success DexhttpTestPercentileGetResponseEnvelopeSuccess `json:"success,required"`
+ JSON dexhttpTestPercentileGetResponseEnvelopeJSON `json:"-"`
}
-// dexhttpTestPercentileListResponseEnvelopeJSON contains the JSON metadata for the
-// struct [DexhttpTestPercentileListResponseEnvelope]
-type dexhttpTestPercentileListResponseEnvelopeJSON struct {
+// dexhttpTestPercentileGetResponseEnvelopeJSON contains the JSON metadata for the
+// struct [DexhttpTestPercentileGetResponseEnvelope]
+type dexhttpTestPercentileGetResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Result apijson.Field
@@ -211,63 +211,63 @@ type dexhttpTestPercentileListResponseEnvelopeJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *DexhttpTestPercentileListResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+func (r *DexhttpTestPercentileGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dexhttpTestPercentileListResponseEnvelopeJSON) RawJSON() string {
+func (r dexhttpTestPercentileGetResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-type DexhttpTestPercentileListResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON dexhttpTestPercentileListResponseEnvelopeErrorsJSON `json:"-"`
+type DexhttpTestPercentileGetResponseEnvelopeErrors struct {
+ Code int64 `json:"code,required"`
+ Message string `json:"message,required"`
+ JSON dexhttpTestPercentileGetResponseEnvelopeErrorsJSON `json:"-"`
}
-// dexhttpTestPercentileListResponseEnvelopeErrorsJSON contains the JSON metadata
-// for the struct [DexhttpTestPercentileListResponseEnvelopeErrors]
-type dexhttpTestPercentileListResponseEnvelopeErrorsJSON struct {
+// dexhttpTestPercentileGetResponseEnvelopeErrorsJSON contains the JSON metadata
+// for the struct [DexhttpTestPercentileGetResponseEnvelopeErrors]
+type dexhttpTestPercentileGetResponseEnvelopeErrorsJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DexhttpTestPercentileListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
+func (r *DexhttpTestPercentileGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dexhttpTestPercentileListResponseEnvelopeErrorsJSON) RawJSON() string {
+func (r dexhttpTestPercentileGetResponseEnvelopeErrorsJSON) RawJSON() string {
return r.raw
}
-type DexhttpTestPercentileListResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON dexhttpTestPercentileListResponseEnvelopeMessagesJSON `json:"-"`
+type DexhttpTestPercentileGetResponseEnvelopeMessages struct {
+ Code int64 `json:"code,required"`
+ Message string `json:"message,required"`
+ JSON dexhttpTestPercentileGetResponseEnvelopeMessagesJSON `json:"-"`
}
-// dexhttpTestPercentileListResponseEnvelopeMessagesJSON contains the JSON metadata
-// for the struct [DexhttpTestPercentileListResponseEnvelopeMessages]
-type dexhttpTestPercentileListResponseEnvelopeMessagesJSON struct {
+// dexhttpTestPercentileGetResponseEnvelopeMessagesJSON contains the JSON metadata
+// for the struct [DexhttpTestPercentileGetResponseEnvelopeMessages]
+type dexhttpTestPercentileGetResponseEnvelopeMessagesJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DexhttpTestPercentileListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
+func (r *DexhttpTestPercentileGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dexhttpTestPercentileListResponseEnvelopeMessagesJSON) RawJSON() string {
+func (r dexhttpTestPercentileGetResponseEnvelopeMessagesJSON) RawJSON() string {
return r.raw
}
// Whether the API call was successful
-type DexhttpTestPercentileListResponseEnvelopeSuccess bool
+type DexhttpTestPercentileGetResponseEnvelopeSuccess bool
const (
- DexhttpTestPercentileListResponseEnvelopeSuccessTrue DexhttpTestPercentileListResponseEnvelopeSuccess = true
+ DexhttpTestPercentileGetResponseEnvelopeSuccessTrue DexhttpTestPercentileGetResponseEnvelopeSuccess = true
)
diff --git a/zero_trust/dexhttptestpercentile_test.go b/zero_trust/dexhttptestpercentile_test.go
index 49db4d6ab9b..b8be0142eeb 100644
--- a/zero_trust/dexhttptestpercentile_test.go
+++ b/zero_trust/dexhttptestpercentile_test.go
@@ -14,7 +14,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/zero_trust"
)
-func TestDEXHTTPTestPercentileListWithOptionalParams(t *testing.T) {
+func TestDEXHTTPTestPercentileGetWithOptionalParams(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 {
@@ -28,10 +28,10 @@ func TestDEXHTTPTestPercentileListWithOptionalParams(t *testing.T) {
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
option.WithAPIEmail("user@example.com"),
)
- _, err := client.ZeroTrust.DEX.HTTPTests.Percentiles.List(
+ _, err := client.ZeroTrust.DEX.HTTPTests.Percentiles.Get(
context.TODO(),
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zero_trust.DEXHTTPTestPercentileListParams{
+ zero_trust.DEXHTTPTestPercentileGetParams{
AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
TimeEnd: cloudflare.F("2023-09-20T17:00:00Z"),
TimeStart: cloudflare.F("2023-09-20T17:00:00Z"),
diff --git a/zero_trust/dextraceroutetestresultnetworkpath.go b/zero_trust/dextraceroutetestresultnetworkpath.go
index a7e2f8adb01..f30b03eafc3 100644
--- a/zero_trust/dextraceroutetestresultnetworkpath.go
+++ b/zero_trust/dextraceroutetestresultnetworkpath.go
@@ -34,11 +34,11 @@ func NewDEXTracerouteTestResultNetworkPathService(opts ...option.RequestOption)
// Get a breakdown of hops and performance metrics for a specific traceroute test
// run
-func (r *DEXTracerouteTestResultNetworkPathService) List(ctx context.Context, testResultID string, query DEXTracerouteTestResultNetworkPathListParams, opts ...option.RequestOption) (res *DigitalExperienceMonitoringTracerouteTestResultNetworkPath, err error) {
+func (r *DEXTracerouteTestResultNetworkPathService) Get(ctx context.Context, testResultID string, query DEXTracerouteTestResultNetworkPathGetParams, opts ...option.RequestOption) (res *DigitalExperienceMonitoringTracerouteTestResultNetworkPath, err error) {
opts = append(r.Options[:], opts...)
- var env DEXTracerouteTestResultNetworkPathListResponseEnvelope
+ var env DEXTracerouteTestResultNetworkPathGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dex/traceroute-test-results/%s/network-path", query.AccountID, testResultID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -157,22 +157,22 @@ const (
DigitalExperienceMonitoringTracerouteTestResultNetworkPathHopsMileClientToIsp DigitalExperienceMonitoringTracerouteTestResultNetworkPathHopsMile = "client-to-isp"
)
-type DEXTracerouteTestResultNetworkPathListParams struct {
+type DEXTracerouteTestResultNetworkPathGetParams struct {
AccountID param.Field[string] `path:"account_id,required"`
}
-type DEXTracerouteTestResultNetworkPathListResponseEnvelope struct {
- Errors []DEXTracerouteTestResultNetworkPathListResponseEnvelopeErrors `json:"errors,required"`
- Messages []DEXTracerouteTestResultNetworkPathListResponseEnvelopeMessages `json:"messages,required"`
- Result DigitalExperienceMonitoringTracerouteTestResultNetworkPath `json:"result,required"`
+type DEXTracerouteTestResultNetworkPathGetResponseEnvelope struct {
+ Errors []DEXTracerouteTestResultNetworkPathGetResponseEnvelopeErrors `json:"errors,required"`
+ Messages []DEXTracerouteTestResultNetworkPathGetResponseEnvelopeMessages `json:"messages,required"`
+ Result DigitalExperienceMonitoringTracerouteTestResultNetworkPath `json:"result,required"`
// Whether the API call was successful
- Success DEXTracerouteTestResultNetworkPathListResponseEnvelopeSuccess `json:"success,required"`
- JSON dexTracerouteTestResultNetworkPathListResponseEnvelopeJSON `json:"-"`
+ Success DEXTracerouteTestResultNetworkPathGetResponseEnvelopeSuccess `json:"success,required"`
+ JSON dexTracerouteTestResultNetworkPathGetResponseEnvelopeJSON `json:"-"`
}
-// dexTracerouteTestResultNetworkPathListResponseEnvelopeJSON contains the JSON
-// metadata for the struct [DEXTracerouteTestResultNetworkPathListResponseEnvelope]
-type dexTracerouteTestResultNetworkPathListResponseEnvelopeJSON struct {
+// dexTracerouteTestResultNetworkPathGetResponseEnvelopeJSON contains the JSON
+// metadata for the struct [DEXTracerouteTestResultNetworkPathGetResponseEnvelope]
+type dexTracerouteTestResultNetworkPathGetResponseEnvelopeJSON struct {
Errors apijson.Field
Messages apijson.Field
Result apijson.Field
@@ -181,65 +181,65 @@ type dexTracerouteTestResultNetworkPathListResponseEnvelopeJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *DEXTracerouteTestResultNetworkPathListResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+func (r *DEXTracerouteTestResultNetworkPathGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dexTracerouteTestResultNetworkPathListResponseEnvelopeJSON) RawJSON() string {
+func (r dexTracerouteTestResultNetworkPathGetResponseEnvelopeJSON) RawJSON() string {
return r.raw
}
-type DEXTracerouteTestResultNetworkPathListResponseEnvelopeErrors struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON dexTracerouteTestResultNetworkPathListResponseEnvelopeErrorsJSON `json:"-"`
+type DEXTracerouteTestResultNetworkPathGetResponseEnvelopeErrors struct {
+ Code int64 `json:"code,required"`
+ Message string `json:"message,required"`
+ JSON dexTracerouteTestResultNetworkPathGetResponseEnvelopeErrorsJSON `json:"-"`
}
-// dexTracerouteTestResultNetworkPathListResponseEnvelopeErrorsJSON contains the
+// dexTracerouteTestResultNetworkPathGetResponseEnvelopeErrorsJSON contains the
// JSON metadata for the struct
-// [DEXTracerouteTestResultNetworkPathListResponseEnvelopeErrors]
-type dexTracerouteTestResultNetworkPathListResponseEnvelopeErrorsJSON struct {
+// [DEXTracerouteTestResultNetworkPathGetResponseEnvelopeErrors]
+type dexTracerouteTestResultNetworkPathGetResponseEnvelopeErrorsJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DEXTracerouteTestResultNetworkPathListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
+func (r *DEXTracerouteTestResultNetworkPathGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dexTracerouteTestResultNetworkPathListResponseEnvelopeErrorsJSON) RawJSON() string {
+func (r dexTracerouteTestResultNetworkPathGetResponseEnvelopeErrorsJSON) RawJSON() string {
return r.raw
}
-type DEXTracerouteTestResultNetworkPathListResponseEnvelopeMessages struct {
- Code int64 `json:"code,required"`
- Message string `json:"message,required"`
- JSON dexTracerouteTestResultNetworkPathListResponseEnvelopeMessagesJSON `json:"-"`
+type DEXTracerouteTestResultNetworkPathGetResponseEnvelopeMessages struct {
+ Code int64 `json:"code,required"`
+ Message string `json:"message,required"`
+ JSON dexTracerouteTestResultNetworkPathGetResponseEnvelopeMessagesJSON `json:"-"`
}
-// dexTracerouteTestResultNetworkPathListResponseEnvelopeMessagesJSON contains the
+// dexTracerouteTestResultNetworkPathGetResponseEnvelopeMessagesJSON contains the
// JSON metadata for the struct
-// [DEXTracerouteTestResultNetworkPathListResponseEnvelopeMessages]
-type dexTracerouteTestResultNetworkPathListResponseEnvelopeMessagesJSON struct {
+// [DEXTracerouteTestResultNetworkPathGetResponseEnvelopeMessages]
+type dexTracerouteTestResultNetworkPathGetResponseEnvelopeMessagesJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DEXTracerouteTestResultNetworkPathListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
+func (r *DEXTracerouteTestResultNetworkPathGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dexTracerouteTestResultNetworkPathListResponseEnvelopeMessagesJSON) RawJSON() string {
+func (r dexTracerouteTestResultNetworkPathGetResponseEnvelopeMessagesJSON) RawJSON() string {
return r.raw
}
// Whether the API call was successful
-type DEXTracerouteTestResultNetworkPathListResponseEnvelopeSuccess bool
+type DEXTracerouteTestResultNetworkPathGetResponseEnvelopeSuccess bool
const (
- DEXTracerouteTestResultNetworkPathListResponseEnvelopeSuccessTrue DEXTracerouteTestResultNetworkPathListResponseEnvelopeSuccess = true
+ DEXTracerouteTestResultNetworkPathGetResponseEnvelopeSuccessTrue DEXTracerouteTestResultNetworkPathGetResponseEnvelopeSuccess = true
)
diff --git a/zero_trust/dextraceroutetestresultnetworkpath_test.go b/zero_trust/dextraceroutetestresultnetworkpath_test.go
index e0f8ab1ee30..29f88132e82 100644
--- a/zero_trust/dextraceroutetestresultnetworkpath_test.go
+++ b/zero_trust/dextraceroutetestresultnetworkpath_test.go
@@ -14,7 +14,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/zero_trust"
)
-func TestDEXTracerouteTestResultNetworkPathList(t *testing.T) {
+func TestDEXTracerouteTestResultNetworkPathGet(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 {
@@ -28,10 +28,10 @@ func TestDEXTracerouteTestResultNetworkPathList(t *testing.T) {
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
option.WithAPIEmail("user@example.com"),
)
- _, err := client.ZeroTrust.DEX.TracerouteTestResults.NetworkPath.List(
+ _, err := client.ZeroTrust.DEX.TracerouteTestResults.NetworkPath.Get(
context.TODO(),
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
- zero_trust.DEXTracerouteTestResultNetworkPathListParams{
+ zero_trust.DEXTracerouteTestResultNetworkPathGetParams{
AccountID: cloudflare.F("01a7362d577a6c3019a474fd6f485823"),
},
)
diff --git a/zero_trust/dlpdataset.go b/zero_trust/dlpdataset.go
index e65b665cd57..6a3356a9874 100644
--- a/zero_trust/dlpdataset.go
+++ b/zero_trust/dlpdataset.go
@@ -64,7 +64,7 @@ func (r *DLPDatasetService) List(ctx context.Context, query DLPDatasetListParams
opts = append(r.Options[:], opts...)
var env DLPDatasetListResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/datasets", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *DLPDatasetService) Delete(ctx context.Context, datasetID string, body D
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("accounts/%s/dlp/datasets/%s", body.AccountID, datasetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -88,7 +88,7 @@ func (r *DLPDatasetService) Get(ctx context.Context, datasetID string, query DLP
opts = append(r.Options[:], opts...)
var env DLPDatasetGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/datasets/%s", query.AccountID, datasetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/dlpdatasetupload.go b/zero_trust/dlpdatasetupload.go
index 84f5ac6ce85..cd5e7c22492 100644
--- a/zero_trust/dlpdatasetupload.go
+++ b/zero_trust/dlpdatasetupload.go
@@ -36,7 +36,7 @@ func (r *DLPDatasetUploadService) New(ctx context.Context, datasetID string, bod
opts = append(r.Options[:], opts...)
var env DLPDatasetUploadNewResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/datasets/%s/upload", body.AccountID, datasetID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/dlppayloadlog.go b/zero_trust/dlppayloadlog.go
index 5e8335ba056..f69f853a5fe 100644
--- a/zero_trust/dlppayloadlog.go
+++ b/zero_trust/dlppayloadlog.go
@@ -49,7 +49,7 @@ func (r *DLPPayloadLogService) Get(ctx context.Context, query DLPPayloadLogGetPa
opts = append(r.Options[:], opts...)
var env DLPPayloadLogGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/payload_log", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/dlpprofile.go b/zero_trust/dlpprofile.go
index dc3c3a994cf..fef106aa5b5 100644
--- a/zero_trust/dlpprofile.go
+++ b/zero_trust/dlpprofile.go
@@ -42,7 +42,7 @@ func (r *DLPProfileService) List(ctx context.Context, query DLPProfileListParams
opts = append(r.Options[:], opts...)
var env DLPProfileListResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/profiles", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -55,7 +55,7 @@ func (r *DLPProfileService) Get(ctx context.Context, profileID string, query DLP
opts = append(r.Options[:], opts...)
var env DLPProfileGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/profiles/%s", query.AccountID, profileID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/dlpprofilecustom.go b/zero_trust/dlpprofilecustom.go
index 0b63686d398..34f5ee08fc3 100644
--- a/zero_trust/dlpprofilecustom.go
+++ b/zero_trust/dlpprofilecustom.go
@@ -61,7 +61,7 @@ func (r *DLPProfileCustomService) Delete(ctx context.Context, profileID string,
opts = append(r.Options[:], opts...)
var env DLPProfileCustomDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/profiles/custom/%s", body.AccountID, profileID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -74,7 +74,7 @@ func (r *DLPProfileCustomService) Get(ctx context.Context, profileID string, que
opts = append(r.Options[:], opts...)
var env DLPProfileCustomGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/profiles/custom/%s", query.AccountID, profileID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/dlpprofilepredefined.go b/zero_trust/dlpprofilepredefined.go
index 423e7b5723f..9fc52f94b21 100644
--- a/zero_trust/dlpprofilepredefined.go
+++ b/zero_trust/dlpprofilepredefined.go
@@ -44,7 +44,7 @@ func (r *DLPProfilePredefinedService) Get(ctx context.Context, profileID string,
opts = append(r.Options[:], opts...)
var env DLPProfilePredefinedGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/dlp/profiles/predefined/%s", query.AccountID, profileID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gateway.go b/zero_trust/gateway.go
index 5198712d98e..c7596ac4c13 100644
--- a/zero_trust/gateway.go
+++ b/zero_trust/gateway.go
@@ -53,7 +53,7 @@ func (r *GatewayService) New(ctx context.Context, body GatewayNewParams, opts ..
opts = append(r.Options[:], opts...)
var env GatewayNewResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway", body.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
}
@@ -66,7 +66,7 @@ func (r *GatewayService) List(ctx context.Context, query GatewayListParams, opts
opts = append(r.Options[:], opts...)
var env GatewayListResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewayapptype.go b/zero_trust/gatewayapptype.go
index 2ee6d6826c4..5dac0ac8a88 100644
--- a/zero_trust/gatewayapptype.go
+++ b/zero_trust/gatewayapptype.go
@@ -39,7 +39,7 @@ func (r *GatewayAppTypeService) List(ctx context.Context, query GatewayAppTypeLi
opts = append(r.Options[:], opts...)
var env GatewayAppTypeListResponseEnvelope
path := fmt.Sprintf("accounts/%s/gateway/app_types", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewayauditsshsetting.go b/zero_trust/gatewayauditsshsetting.go
index 23ca4a57830..cf8a766a2eb 100644
--- a/zero_trust/gatewayauditsshsetting.go
+++ b/zero_trust/gatewayauditsshsetting.go
@@ -50,7 +50,7 @@ func (r *GatewayAuditSSHSettingService) Get(ctx context.Context, query GatewayAu
opts = append(r.Options[:], opts...)
var env GatewayAuditSSHSettingGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/audit_ssh_settings", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewaycategory.go b/zero_trust/gatewaycategory.go
index 0eb932c2811..86f13b796bf 100644
--- a/zero_trust/gatewaycategory.go
+++ b/zero_trust/gatewaycategory.go
@@ -36,7 +36,7 @@ func (r *GatewayCategoryService) List(ctx context.Context, query GatewayCategory
opts = append(r.Options[:], opts...)
var env GatewayCategoryListResponseEnvelope
path := fmt.Sprintf("accounts/%s/gateway/categories", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewayconfiguration.go b/zero_trust/gatewayconfiguration.go
index cdc50ba0c3b..7448eac4edd 100644
--- a/zero_trust/gatewayconfiguration.go
+++ b/zero_trust/gatewayconfiguration.go
@@ -67,7 +67,7 @@ func (r *GatewayConfigurationService) Get(ctx context.Context, query GatewayConf
opts = append(r.Options[:], opts...)
var env GatewayConfigurationGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/configuration", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewaylist.go b/zero_trust/gatewaylist.go
index 4d4e3bd911a..cbd04af073a 100644
--- a/zero_trust/gatewaylist.go
+++ b/zero_trust/gatewaylist.go
@@ -68,7 +68,7 @@ func (r *GatewayListService) List(ctx context.Context, query GatewayListListPara
opts = append(r.Options[:], opts...)
var env GatewayListListResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/lists", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -81,7 +81,7 @@ func (r *GatewayListService) Delete(ctx context.Context, listID string, body Gat
opts = append(r.Options[:], opts...)
var env GatewayListDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/lists/%s", body.AccountID, listID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -107,7 +107,7 @@ func (r *GatewayListService) Get(ctx context.Context, listID string, query Gatew
opts = append(r.Options[:], opts...)
var env GatewayListGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/lists/%s", query.AccountID, listID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewaylistitem.go b/zero_trust/gatewaylistitem.go
index a60882df849..6d33bf653c8 100644
--- a/zero_trust/gatewaylistitem.go
+++ b/zero_trust/gatewaylistitem.go
@@ -37,7 +37,7 @@ func (r *GatewayListItemService) List(ctx context.Context, listID string, query
opts = append(r.Options[:], opts...)
var env GatewayListItemListResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/lists/%s/items", query.AccountID, listID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewaylocation.go b/zero_trust/gatewaylocation.go
index d3f883147f0..a6a63a5f244 100644
--- a/zero_trust/gatewaylocation.go
+++ b/zero_trust/gatewaylocation.go
@@ -66,7 +66,7 @@ func (r *GatewayLocationService) List(ctx context.Context, query GatewayLocation
opts = append(r.Options[:], opts...)
var env GatewayLocationListResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/locations", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *GatewayLocationService) Delete(ctx context.Context, locationID interfac
opts = append(r.Options[:], opts...)
var env GatewayLocationDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/locations/%v", body.AccountID, locationID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *GatewayLocationService) Get(ctx context.Context, locationID interface{}
opts = append(r.Options[:], opts...)
var env GatewayLocationGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/locations/%v", query.AccountID, locationID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewaylogging.go b/zero_trust/gatewaylogging.go
index d3f02716e1d..74916a17be9 100644
--- a/zero_trust/gatewaylogging.go
+++ b/zero_trust/gatewaylogging.go
@@ -49,7 +49,7 @@ func (r *GatewayLoggingService) Get(ctx context.Context, query GatewayLoggingGet
opts = append(r.Options[:], opts...)
var env GatewayLoggingGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/logging", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewayproxyendpoint.go b/zero_trust/gatewayproxyendpoint.go
index f021be7b806..5d55405f5ba 100644
--- a/zero_trust/gatewayproxyendpoint.go
+++ b/zero_trust/gatewayproxyendpoint.go
@@ -53,7 +53,7 @@ func (r *GatewayProxyEndpointService) List(ctx context.Context, query GatewayPro
opts = append(r.Options[:], opts...)
var env GatewayProxyEndpointListResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -66,7 +66,7 @@ func (r *GatewayProxyEndpointService) Delete(ctx context.Context, proxyEndpointI
opts = append(r.Options[:], opts...)
var env GatewayProxyEndpointDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints/%v", body.AccountID, proxyEndpointID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *GatewayProxyEndpointService) Get(ctx context.Context, proxyEndpointID i
opts = append(r.Options[:], opts...)
var env GatewayProxyEndpointGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/proxy_endpoints/%v", query.AccountID, proxyEndpointID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/gatewayrule.go b/zero_trust/gatewayrule.go
index 718b6adcc4a..4b962524187 100644
--- a/zero_trust/gatewayrule.go
+++ b/zero_trust/gatewayrule.go
@@ -66,7 +66,7 @@ func (r *GatewayRuleService) List(ctx context.Context, query GatewayRuleListPara
opts = append(r.Options[:], opts...)
var env GatewayRuleListResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/rules", query.AccountID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -79,7 +79,7 @@ func (r *GatewayRuleService) Delete(ctx context.Context, ruleID string, body Gat
opts = append(r.Options[:], opts...)
var env GatewayRuleDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/rules/%s", body.AccountID, ruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -92,7 +92,7 @@ func (r *GatewayRuleService) Get(ctx context.Context, ruleID string, query Gatew
opts = append(r.Options[:], opts...)
var env GatewayRuleGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/gateway/rules/%s", query.AccountID, ruleID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/identityprovider.go b/zero_trust/identityprovider.go
index 02003c535ae..1afbf4ef3d6 100644
--- a/zero_trust/identityprovider.go
+++ b/zero_trust/identityprovider.go
@@ -91,7 +91,7 @@ func (r *IdentityProviderService) List(ctx context.Context, query IdentityProvid
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/identity_providers", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -113,7 +113,7 @@ func (r *IdentityProviderService) Delete(ctx context.Context, uuid string, body
accountOrZoneID = body.ZoneID
}
path := fmt.Sprintf("%s/%s/access/identity_providers/%s", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -135,7 +135,7 @@ func (r *IdentityProviderService) Get(ctx context.Context, uuid string, query Id
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/identity_providers/%s", accountOrZone, accountOrZoneID, uuid)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
@@ -281,6 +281,15 @@ type AccessIdentityProvidersAccessAzureAdConfig struct {
DirectoryID string `json:"directory_id"`
// The claim name for email in the id_token response.
EmailClaimName string `json:"email_claim_name"`
+ // Indicates the type of user interaction that is required. prompt=login forces the
+ // user to enter their credentials on that request, negating single-sign on.
+ // prompt=none is the opposite. It ensures that the user isn't presented with any
+ // interactive prompt. If the request can't be completed silently by using
+ // single-sign on, the Microsoft identity platform returns an interaction_required
+ // error. prompt=select_account interrupts single sign-on providing account
+ // selection experience listing all the accounts either in session or any
+ // remembered account or an option to choose to use a different account altogether.
+ Prompt AccessIdentityProvidersAccessAzureAdConfigPrompt `json:"prompt"`
// Should Cloudflare try to load groups from your account
SupportGroups bool `json:"support_groups"`
JSON accessIdentityProvidersAccessAzureAdConfigJSON `json:"-"`
@@ -295,6 +304,7 @@ type accessIdentityProvidersAccessAzureAdConfigJSON struct {
ConditionalAccessEnabled apijson.Field
DirectoryID apijson.Field
EmailClaimName apijson.Field
+ Prompt apijson.Field
SupportGroups apijson.Field
raw string
ExtraFields map[string]apijson.Field
@@ -308,6 +318,22 @@ func (r accessIdentityProvidersAccessAzureAdConfigJSON) RawJSON() string {
return r.raw
}
+// Indicates the type of user interaction that is required. prompt=login forces the
+// user to enter their credentials on that request, negating single-sign on.
+// prompt=none is the opposite. It ensures that the user isn't presented with any
+// interactive prompt. If the request can't be completed silently by using
+// single-sign on, the Microsoft identity platform returns an interaction_required
+// error. prompt=select_account interrupts single sign-on providing account
+// selection experience listing all the accounts either in session or any
+// remembered account or an option to choose to use a different account altogether.
+type AccessIdentityProvidersAccessAzureAdConfigPrompt string
+
+const (
+ AccessIdentityProvidersAccessAzureAdConfigPromptLogin AccessIdentityProvidersAccessAzureAdConfigPrompt = "login"
+ AccessIdentityProvidersAccessAzureAdConfigPromptSelectAccount AccessIdentityProvidersAccessAzureAdConfigPrompt = "select_account"
+ AccessIdentityProvidersAccessAzureAdConfigPromptNone AccessIdentityProvidersAccessAzureAdConfigPrompt = "none"
+)
+
// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
@@ -2339,6 +2365,15 @@ type IdentityProviderListResponseAccessAzureAdConfig struct {
DirectoryID string `json:"directory_id"`
// The claim name for email in the id_token response.
EmailClaimName string `json:"email_claim_name"`
+ // Indicates the type of user interaction that is required. prompt=login forces the
+ // user to enter their credentials on that request, negating single-sign on.
+ // prompt=none is the opposite. It ensures that the user isn't presented with any
+ // interactive prompt. If the request can't be completed silently by using
+ // single-sign on, the Microsoft identity platform returns an interaction_required
+ // error. prompt=select_account interrupts single sign-on providing account
+ // selection experience listing all the accounts either in session or any
+ // remembered account or an option to choose to use a different account altogether.
+ Prompt IdentityProviderListResponseAccessAzureAdConfigPrompt `json:"prompt"`
// Should Cloudflare try to load groups from your account
SupportGroups bool `json:"support_groups"`
JSON identityProviderListResponseAccessAzureAdConfigJSON `json:"-"`
@@ -2353,6 +2388,7 @@ type identityProviderListResponseAccessAzureAdConfigJSON struct {
ConditionalAccessEnabled apijson.Field
DirectoryID apijson.Field
EmailClaimName apijson.Field
+ Prompt apijson.Field
SupportGroups apijson.Field
raw string
ExtraFields map[string]apijson.Field
@@ -2366,6 +2402,22 @@ func (r identityProviderListResponseAccessAzureAdConfigJSON) RawJSON() string {
return r.raw
}
+// Indicates the type of user interaction that is required. prompt=login forces the
+// user to enter their credentials on that request, negating single-sign on.
+// prompt=none is the opposite. It ensures that the user isn't presented with any
+// interactive prompt. If the request can't be completed silently by using
+// single-sign on, the Microsoft identity platform returns an interaction_required
+// error. prompt=select_account interrupts single sign-on providing account
+// selection experience listing all the accounts either in session or any
+// remembered account or an option to choose to use a different account altogether.
+type IdentityProviderListResponseAccessAzureAdConfigPrompt string
+
+const (
+ IdentityProviderListResponseAccessAzureAdConfigPromptLogin IdentityProviderListResponseAccessAzureAdConfigPrompt = "login"
+ IdentityProviderListResponseAccessAzureAdConfigPromptSelectAccount IdentityProviderListResponseAccessAzureAdConfigPrompt = "select_account"
+ IdentityProviderListResponseAccessAzureAdConfigPromptNone IdentityProviderListResponseAccessAzureAdConfigPrompt = "none"
+)
+
// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
@@ -4248,6 +4300,15 @@ type IdentityProviderNewParamsConfig struct {
OneloginAccount param.Field[string] `json:"onelogin_account"`
// Your PingOne environment identifier
PingEnvID param.Field[string] `json:"ping_env_id"`
+ // Indicates the type of user interaction that is required. prompt=login forces the
+ // user to enter their credentials on that request, negating single-sign on.
+ // prompt=none is the opposite. It ensures that the user isn't presented with any
+ // interactive prompt. If the request can't be completed silently by using
+ // single-sign on, the Microsoft identity platform returns an interaction_required
+ // error. prompt=select_account interrupts single sign-on providing account
+ // selection experience listing all the accounts either in session or any
+ // remembered account or an option to choose to use a different account altogether.
+ Prompt param.Field[IdentityProviderNewParamsConfigPrompt] `json:"prompt"`
// OAuth scopes
Scopes param.Field[[]string] `json:"scopes"`
// Sign the SAML authentication request with Access credentials. To verify the
@@ -4276,6 +4337,22 @@ func (r IdentityProviderNewParamsConfigHeaderAttribute) MarshalJSON() (data []by
return apijson.MarshalRoot(r)
}
+// Indicates the type of user interaction that is required. prompt=login forces the
+// user to enter their credentials on that request, negating single-sign on.
+// prompt=none is the opposite. It ensures that the user isn't presented with any
+// interactive prompt. If the request can't be completed silently by using
+// single-sign on, the Microsoft identity platform returns an interaction_required
+// error. prompt=select_account interrupts single sign-on providing account
+// selection experience listing all the accounts either in session or any
+// remembered account or an option to choose to use a different account altogether.
+type IdentityProviderNewParamsConfigPrompt string
+
+const (
+ IdentityProviderNewParamsConfigPromptLogin IdentityProviderNewParamsConfigPrompt = "login"
+ IdentityProviderNewParamsConfigPromptSelectAccount IdentityProviderNewParamsConfigPrompt = "select_account"
+ IdentityProviderNewParamsConfigPromptNone IdentityProviderNewParamsConfigPrompt = "none"
+)
+
// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
@@ -4465,6 +4542,15 @@ type IdentityProviderUpdateParamsConfig struct {
OneloginAccount param.Field[string] `json:"onelogin_account"`
// Your PingOne environment identifier
PingEnvID param.Field[string] `json:"ping_env_id"`
+ // Indicates the type of user interaction that is required. prompt=login forces the
+ // user to enter their credentials on that request, negating single-sign on.
+ // prompt=none is the opposite. It ensures that the user isn't presented with any
+ // interactive prompt. If the request can't be completed silently by using
+ // single-sign on, the Microsoft identity platform returns an interaction_required
+ // error. prompt=select_account interrupts single sign-on providing account
+ // selection experience listing all the accounts either in session or any
+ // remembered account or an option to choose to use a different account altogether.
+ Prompt param.Field[IdentityProviderUpdateParamsConfigPrompt] `json:"prompt"`
// OAuth scopes
Scopes param.Field[[]string] `json:"scopes"`
// Sign the SAML authentication request with Access credentials. To verify the
@@ -4493,6 +4579,22 @@ func (r IdentityProviderUpdateParamsConfigHeaderAttribute) MarshalJSON() (data [
return apijson.MarshalRoot(r)
}
+// Indicates the type of user interaction that is required. prompt=login forces the
+// user to enter their credentials on that request, negating single-sign on.
+// prompt=none is the opposite. It ensures that the user isn't presented with any
+// interactive prompt. If the request can't be completed silently by using
+// single-sign on, the Microsoft identity platform returns an interaction_required
+// error. prompt=select_account interrupts single sign-on providing account
+// selection experience listing all the accounts either in session or any
+// remembered account or an option to choose to use a different account altogether.
+type IdentityProviderUpdateParamsConfigPrompt string
+
+const (
+ IdentityProviderUpdateParamsConfigPromptLogin IdentityProviderUpdateParamsConfigPrompt = "login"
+ IdentityProviderUpdateParamsConfigPromptSelectAccount IdentityProviderUpdateParamsConfigPrompt = "select_account"
+ IdentityProviderUpdateParamsConfigPromptNone IdentityProviderUpdateParamsConfigPrompt = "none"
+)
+
// The type of identity provider. To determine the value for a specific provider,
// refer to our
// [developer documentation](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration/).
diff --git a/zero_trust/identityprovider_test.go b/zero_trust/identityprovider_test.go
index 07ad66c3d5e..439d88ebaeb 100644
--- a/zero_trust/identityprovider_test.go
+++ b/zero_trust/identityprovider_test.go
@@ -36,6 +36,7 @@ func TestIdentityProviderNewWithOptionalParams(t *testing.T) {
EmailClaimName: cloudflare.F("custom_claim_name"),
ConditionalAccessEnabled: cloudflare.F(true),
DirectoryID: cloudflare.F(""),
+ Prompt: cloudflare.F(zero_trust.IdentityProviderNewParamsConfigPromptLogin),
SupportGroups: cloudflare.F(true),
CentrifyAccount: cloudflare.F("https://abc123.my.centrify.com/"),
CentrifyAppID: cloudflare.F("exampleapp"),
@@ -111,6 +112,7 @@ func TestIdentityProviderUpdateWithOptionalParams(t *testing.T) {
EmailClaimName: cloudflare.F("custom_claim_name"),
ConditionalAccessEnabled: cloudflare.F(true),
DirectoryID: cloudflare.F(""),
+ Prompt: cloudflare.F(zero_trust.IdentityProviderUpdateParamsConfigPromptLogin),
SupportGroups: cloudflare.F(true),
CentrifyAccount: cloudflare.F("https://abc123.my.centrify.com/"),
CentrifyAppID: cloudflare.F("exampleapp"),
diff --git a/zero_trust/networkroute.go b/zero_trust/networkroute.go
index c126f4d4fec..8c165e592e2 100644
--- a/zero_trust/networkroute.go
+++ b/zero_trust/networkroute.go
@@ -80,7 +80,7 @@ func (r *NetworkRouteService) Delete(ctx context.Context, routeID string, body N
opts = append(r.Options[:], opts...)
var env NetworkRouteDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/teamnet/routes/%s", body.AccountID, routeID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/networkroutenetwork.go b/zero_trust/networkroutenetwork.go
index 281e8061c5b..8fb5e4a5e03 100644
--- a/zero_trust/networkroutenetwork.go
+++ b/zero_trust/networkroutenetwork.go
@@ -72,7 +72,7 @@ func (r *NetworkRouteNetworkService) Edit(ctx context.Context, ipNetworkEncoded
opts = append(r.Options[:], opts...)
var env NetworkRouteNetworkEditResponseEnvelope
path := fmt.Sprintf("accounts/%s/teamnet/routes/network/%s", body.AccountID, ipNetworkEncoded)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/networkvirtualnetwork.go b/zero_trust/networkvirtualnetwork.go
index d0a95d194a7..f85ca61952a 100644
--- a/zero_trust/networkvirtualnetwork.go
+++ b/zero_trust/networkvirtualnetwork.go
@@ -67,7 +67,7 @@ func (r *NetworkVirtualNetworkService) Delete(ctx context.Context, virtualNetwor
opts = append(r.Options[:], opts...)
var env NetworkVirtualNetworkDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/teamnet/virtual_networks/%s", body.AccountID, virtualNetworkID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/organization.go b/zero_trust/organization.go
index 1d1f6e92da3..66bb893740a 100644
--- a/zero_trust/organization.go
+++ b/zero_trust/organization.go
@@ -90,7 +90,7 @@ func (r *OrganizationService) List(ctx context.Context, query OrganizationListPa
accountOrZoneID = query.ZoneID
}
path := fmt.Sprintf("%s/%s/access/organizations", accountOrZone, accountOrZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/tunnel.go b/zero_trust/tunnel.go
index dda4a63b586..e4a2a2aa07e 100644
--- a/zero_trust/tunnel.go
+++ b/zero_trust/tunnel.go
@@ -113,7 +113,7 @@ func (r *TunnelService) Get(ctx context.Context, tunnelID string, query TunnelGe
opts = append(r.Options[:], opts...)
var env TunnelGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/tunnels/%s", query.AccountID, tunnelID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/tunnelconfiguration.go b/zero_trust/tunnelconfiguration.go
index b6314474971..996c37e62ac 100644
--- a/zero_trust/tunnelconfiguration.go
+++ b/zero_trust/tunnelconfiguration.go
@@ -52,7 +52,7 @@ func (r *TunnelConfigurationService) Get(ctx context.Context, tunnelID string, q
opts = append(r.Options[:], opts...)
var env TunnelConfigurationGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/cfd_tunnel/%s/configurations", query.AccountID, tunnelID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/tunnelconnection.go b/zero_trust/tunnelconnection.go
index 60e2441d0a9..adc2ed61509 100644
--- a/zero_trust/tunnelconnection.go
+++ b/zero_trust/tunnelconnection.go
@@ -54,7 +54,7 @@ func (r *TunnelConnectionService) Get(ctx context.Context, tunnelID string, quer
opts = append(r.Options[:], opts...)
var env TunnelConnectionGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/cfd_tunnel/%s/connections", query.AccountID, tunnelID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/tunnelconnector.go b/zero_trust/tunnelconnector.go
index 3f7b2d737fa..59bc947733d 100644
--- a/zero_trust/tunnelconnector.go
+++ b/zero_trust/tunnelconnector.go
@@ -36,7 +36,7 @@ func (r *TunnelConnectorService) Get(ctx context.Context, tunnelID string, conne
opts = append(r.Options[:], opts...)
var env TunnelConnectorGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/cfd_tunnel/%s/connectors/%s", query.AccountID, tunnelID, connectorID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zero_trust/tunneltoken.go b/zero_trust/tunneltoken.go
index 0bb2d0c1c86..f82710c4575 100644
--- a/zero_trust/tunneltoken.go
+++ b/zero_trust/tunneltoken.go
@@ -39,7 +39,7 @@ func (r *TunnelTokenService) Get(ctx context.Context, tunnelID string, query Tun
opts = append(r.Options[:], opts...)
var env TunnelTokenGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/cfd_tunnel/%s/token", query.AccountID, tunnelID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/activationcheck.go b/zones/activationcheck.go
index 9d2fce81719..35f479e2a02 100644
--- a/zones/activationcheck.go
+++ b/zones/activationcheck.go
@@ -37,7 +37,7 @@ func (r *ActivationCheckService) Trigger(ctx context.Context, body ActivationChe
opts = append(r.Options[:], opts...)
var env ActivationCheckTriggerResponseEnvelope
path := fmt.Sprintf("zones/%s/activation_check", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/customnameserver.go b/zones/customnameserver.go
index af60e1db1f4..3f6b0aa4ff1 100644
--- a/zones/customnameserver.go
+++ b/zones/customnameserver.go
@@ -56,7 +56,7 @@ func (r *CustomNameserverService) Get(ctx context.Context, query CustomNameserve
opts = append(r.Options[:], opts...)
var env CustomNameserverGetResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_ns", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/hold.go b/zones/hold.go
index cbe075efae2..a9a11f7b5a9 100644
--- a/zones/hold.go
+++ b/zones/hold.go
@@ -66,7 +66,7 @@ func (r *HoldService) Get(ctx context.Context, query HoldGetParams, opts ...opti
opts = append(r.Options[:], opts...)
var env HoldGetResponseEnvelope
path := fmt.Sprintf("zones/%s/hold", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/setting.go b/zones/setting.go
index e67ef6e25cb..a79542ead1b 100644
--- a/zones/setting.go
+++ b/zones/setting.go
@@ -153,7 +153,7 @@ func (r *SettingService) Get(ctx context.Context, query SettingGetParams, opts .
opts = append(r.Options[:], opts...)
var env SettingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingadvancedddos.go b/zones/settingadvancedddos.go
index 98abb10edf7..ac14f9b3119 100644
--- a/zones/settingadvancedddos.go
+++ b/zones/settingadvancedddos.go
@@ -39,7 +39,7 @@ func (r *SettingAdvancedDDOSService) Get(ctx context.Context, query SettingAdvan
opts = append(r.Options[:], opts...)
var env SettingAdvancedDDOSGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/advanced_ddos", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingalwaysonline.go b/zones/settingalwaysonline.go
index c626ca59390..f9ccf062ca1 100644
--- a/zones/settingalwaysonline.go
+++ b/zones/settingalwaysonline.go
@@ -58,7 +58,7 @@ func (r *SettingAlwaysOnlineService) Get(ctx context.Context, query SettingAlway
opts = append(r.Options[:], opts...)
var env SettingAlwaysOnlineGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/always_online", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingalwaysusehttps.go b/zones/settingalwaysusehttps.go
index d901de53b19..501677f85ca 100644
--- a/zones/settingalwaysusehttps.go
+++ b/zones/settingalwaysusehttps.go
@@ -54,7 +54,7 @@ func (r *SettingAlwaysUseHTTPSService) Get(ctx context.Context, query SettingAlw
opts = append(r.Options[:], opts...)
var env SettingAlwaysUseHTTPSGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/always_use_https", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingautomatichttpsrewrite.go b/zones/settingautomatichttpsrewrite.go
index 9168cc54d2c..fc9b6b31d78 100644
--- a/zones/settingautomatichttpsrewrite.go
+++ b/zones/settingautomatichttpsrewrite.go
@@ -50,7 +50,7 @@ func (r *SettingAutomaticHTTPSRewriteService) Get(ctx context.Context, query Set
opts = append(r.Options[:], opts...)
var env SettingAutomaticHTTPSRewriteGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/automatic_https_rewrites", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingautomaticplatformoptimization.go b/zones/settingautomaticplatformoptimization.go
index 725e380a104..87c40906c4e 100644
--- a/zones/settingautomaticplatformoptimization.go
+++ b/zones/settingautomaticplatformoptimization.go
@@ -54,7 +54,7 @@ func (r *SettingAutomaticPlatformOptimizationService) Get(ctx context.Context, q
opts = append(r.Options[:], opts...)
var env SettingAutomaticPlatformOptimizationGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/automatic_platform_optimization", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingbrotli.go b/zones/settingbrotli.go
index cd3512ef098..f01692b1f9b 100644
--- a/zones/settingbrotli.go
+++ b/zones/settingbrotli.go
@@ -52,7 +52,7 @@ func (r *SettingBrotliService) Get(ctx context.Context, query SettingBrotliGetPa
opts = append(r.Options[:], opts...)
var env SettingBrotliGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/brotli", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingbrowsercachettl.go b/zones/settingbrowsercachettl.go
index 54d5c5ad2cc..431823d3265 100644
--- a/zones/settingbrowsercachettl.go
+++ b/zones/settingbrowsercachettl.go
@@ -56,7 +56,7 @@ func (r *SettingBrowserCacheTTLService) Get(ctx context.Context, query SettingBr
opts = append(r.Options[:], opts...)
var env SettingBrowserCacheTTLGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/browser_cache_ttl", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingbrowsercheck.go b/zones/settingbrowsercheck.go
index bb82fbdf6c8..198d79f0336 100644
--- a/zones/settingbrowsercheck.go
+++ b/zones/settingbrowsercheck.go
@@ -58,7 +58,7 @@ func (r *SettingBrowserCheckService) Get(ctx context.Context, query SettingBrows
opts = append(r.Options[:], opts...)
var env SettingBrowserCheckGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/browser_check", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingcachelevel.go b/zones/settingcachelevel.go
index f87870ceb95..c396e75ff50 100644
--- a/zones/settingcachelevel.go
+++ b/zones/settingcachelevel.go
@@ -58,7 +58,7 @@ func (r *SettingCacheLevelService) Get(ctx context.Context, query SettingCacheLe
opts = append(r.Options[:], opts...)
var env SettingCacheLevelGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/cache_level", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingchallengettl.go b/zones/settingchallengettl.go
index 8cdfb5d0dcc..729ed9b0aff 100644
--- a/zones/settingchallengettl.go
+++ b/zones/settingchallengettl.go
@@ -58,7 +58,7 @@ func (r *SettingChallengeTTLService) Get(ctx context.Context, query SettingChall
opts = append(r.Options[:], opts...)
var env SettingChallengeTTLGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/challenge_ttl", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingcipher.go b/zones/settingcipher.go
index ada3f2fc599..a1f259b2d01 100644
--- a/zones/settingcipher.go
+++ b/zones/settingcipher.go
@@ -50,7 +50,7 @@ func (r *SettingCipherService) Get(ctx context.Context, query SettingCipherGetPa
opts = append(r.Options[:], opts...)
var env SettingCipherGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/ciphers", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingdevelopmentmode.go b/zones/settingdevelopmentmode.go
index 53b6c1bb74d..e85e7c12235 100644
--- a/zones/settingdevelopmentmode.go
+++ b/zones/settingdevelopmentmode.go
@@ -60,7 +60,7 @@ func (r *SettingDevelopmentModeService) Get(ctx context.Context, query SettingDe
opts = append(r.Options[:], opts...)
var env SettingDevelopmentModeGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/development_mode", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingearlyhint.go b/zones/settingearlyhint.go
index 5c6771495aa..54ca58da0e5 100644
--- a/zones/settingearlyhint.go
+++ b/zones/settingearlyhint.go
@@ -56,7 +56,7 @@ func (r *SettingEarlyHintService) Get(ctx context.Context, query SettingEarlyHin
opts = append(r.Options[:], opts...)
var env SettingEarlyHintGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/early_hints", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingemailobfuscation.go b/zones/settingemailobfuscation.go
index 926c82fb99a..b3e99aac57c 100644
--- a/zones/settingemailobfuscation.go
+++ b/zones/settingemailobfuscation.go
@@ -52,7 +52,7 @@ func (r *SettingEmailObfuscationService) Get(ctx context.Context, query SettingE
opts = append(r.Options[:], opts...)
var env SettingEmailObfuscationGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/email_obfuscation", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingfontsetting.go b/zones/settingfontsetting.go
index f8d0dcf36e4..618c556f528 100644
--- a/zones/settingfontsetting.go
+++ b/zones/settingfontsetting.go
@@ -54,7 +54,7 @@ func (r *SettingFontSettingService) Get(ctx context.Context, query SettingFontSe
opts = append(r.Options[:], opts...)
var env SettingFontSettingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/fonts", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingh2prioritization.go b/zones/settingh2prioritization.go
index 4aed3c345a1..b5068002add 100644
--- a/zones/settingh2prioritization.go
+++ b/zones/settingh2prioritization.go
@@ -50,7 +50,7 @@ func (r *SettingH2PrioritizationService) Get(ctx context.Context, query SettingH
opts = append(r.Options[:], opts...)
var env SettingH2PrioritizationGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/h2_prioritization", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settinghotlinkprotection.go b/zones/settinghotlinkprotection.go
index ba579cef940..df9b6bb6dbe 100644
--- a/zones/settinghotlinkprotection.go
+++ b/zones/settinghotlinkprotection.go
@@ -62,7 +62,7 @@ func (r *SettingHotlinkProtectionService) Get(ctx context.Context, query Setting
opts = append(r.Options[:], opts...)
var env SettingHotlinkProtectionGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/hotlink_protection", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settinghttp2.go b/zones/settinghttp2.go
index db8f8db74dd..e6d37145c11 100644
--- a/zones/settinghttp2.go
+++ b/zones/settinghttp2.go
@@ -50,7 +50,7 @@ func (r *SettingHTTP2Service) Get(ctx context.Context, query SettingHTTP2GetPara
opts = append(r.Options[:], opts...)
var env SettingHTTP2GetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/http2", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settinghttp3.go b/zones/settinghttp3.go
index adf71d6ef12..4b2e2e5b6c6 100644
--- a/zones/settinghttp3.go
+++ b/zones/settinghttp3.go
@@ -50,7 +50,7 @@ func (r *SettingHTTP3Service) Get(ctx context.Context, query SettingHTTP3GetPara
opts = append(r.Options[:], opts...)
var env SettingHTTP3GetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/http3", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingimageresizing.go b/zones/settingimageresizing.go
index ee7056dbda8..7bc4ad2db1e 100644
--- a/zones/settingimageresizing.go
+++ b/zones/settingimageresizing.go
@@ -56,7 +56,7 @@ func (r *SettingImageResizingService) Get(ctx context.Context, query SettingImag
opts = append(r.Options[:], opts...)
var env SettingImageResizingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/image_resizing", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingipgeolocation.go b/zones/settingipgeolocation.go
index 8776dd2555e..199ff0e56cf 100644
--- a/zones/settingipgeolocation.go
+++ b/zones/settingipgeolocation.go
@@ -54,7 +54,7 @@ func (r *SettingIPGeolocationService) Get(ctx context.Context, query SettingIPGe
opts = append(r.Options[:], opts...)
var env SettingIPGeolocationGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/ip_geolocation", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingipv6.go b/zones/settingipv6.go
index 9d1c4f16b49..664131a38b3 100644
--- a/zones/settingipv6.go
+++ b/zones/settingipv6.go
@@ -52,7 +52,7 @@ func (r *SettingIPV6Service) Get(ctx context.Context, query SettingIPV6GetParams
opts = append(r.Options[:], opts...)
var env SettingIPV6GetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/ipv6", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingminify.go b/zones/settingminify.go
index 937b3d865f7..7e4b8bea32f 100644
--- a/zones/settingminify.go
+++ b/zones/settingminify.go
@@ -54,7 +54,7 @@ func (r *SettingMinifyService) Get(ctx context.Context, query SettingMinifyGetPa
opts = append(r.Options[:], opts...)
var env SettingMinifyGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/minify", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingmintlsversion.go b/zones/settingmintlsversion.go
index 2d05f6bb1a0..861122f20d5 100644
--- a/zones/settingmintlsversion.go
+++ b/zones/settingmintlsversion.go
@@ -50,7 +50,7 @@ func (r *SettingMinTLSVersionService) Get(ctx context.Context, query SettingMinT
opts = append(r.Options[:], opts...)
var env SettingMinTLSVersionGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/min_tls_version", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingmirage.go b/zones/settingmirage.go
index ee08e554701..24f4066caf2 100644
--- a/zones/settingmirage.go
+++ b/zones/settingmirage.go
@@ -56,7 +56,7 @@ func (r *SettingMirageService) Get(ctx context.Context, query SettingMirageGetPa
opts = append(r.Options[:], opts...)
var env SettingMirageGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/mirage", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingmobileredirect.go b/zones/settingmobileredirect.go
index 4b7962584cf..30aa5c39f12 100644
--- a/zones/settingmobileredirect.go
+++ b/zones/settingmobileredirect.go
@@ -56,7 +56,7 @@ func (r *SettingMobileRedirectService) Get(ctx context.Context, query SettingMob
opts = append(r.Options[:], opts...)
var env SettingMobileRedirectGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/mobile_redirect", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingnel.go b/zones/settingnel.go
index 9eb3945e887..3e8b71f671a 100644
--- a/zones/settingnel.go
+++ b/zones/settingnel.go
@@ -51,7 +51,7 @@ func (r *SettingNELService) Get(ctx context.Context, query SettingNELGetParams,
opts = append(r.Options[:], opts...)
var env SettingNELGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/nel", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingopportunisticencryption.go b/zones/settingopportunisticencryption.go
index d028a0f603d..441c2174d5e 100644
--- a/zones/settingopportunisticencryption.go
+++ b/zones/settingopportunisticencryption.go
@@ -50,7 +50,7 @@ func (r *SettingOpportunisticEncryptionService) Get(ctx context.Context, query S
opts = append(r.Options[:], opts...)
var env SettingOpportunisticEncryptionGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/opportunistic_encryption", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingopportunisticonion.go b/zones/settingopportunisticonion.go
index c574e2d17a6..7c5b5f842b4 100644
--- a/zones/settingopportunisticonion.go
+++ b/zones/settingopportunisticonion.go
@@ -52,7 +52,7 @@ func (r *SettingOpportunisticOnionService) Get(ctx context.Context, query Settin
opts = append(r.Options[:], opts...)
var env SettingOpportunisticOnionGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/opportunistic_onion", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingorangetoorange.go b/zones/settingorangetoorange.go
index a18dbd877dd..e5f2bf27c91 100644
--- a/zones/settingorangetoorange.go
+++ b/zones/settingorangetoorange.go
@@ -52,7 +52,7 @@ func (r *SettingOrangeToOrangeService) Get(ctx context.Context, query SettingOra
opts = append(r.Options[:], opts...)
var env SettingOrangeToOrangeGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/orange_to_orange", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingoriginerrorpagepassthru.go b/zones/settingoriginerrorpagepassthru.go
index ca1c843b311..a9c6f60d9a5 100644
--- a/zones/settingoriginerrorpagepassthru.go
+++ b/zones/settingoriginerrorpagepassthru.go
@@ -54,7 +54,7 @@ func (r *SettingOriginErrorPagePassThruService) Get(ctx context.Context, query S
opts = append(r.Options[:], opts...)
var env SettingOriginErrorPagePassThruGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/origin_error_page_pass_thru", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingoriginmaxhttpversion.go b/zones/settingoriginmaxhttpversion.go
index 0dded9e0827..22dfd8f3084 100644
--- a/zones/settingoriginmaxhttpversion.go
+++ b/zones/settingoriginmaxhttpversion.go
@@ -60,7 +60,7 @@ func (r *SettingOriginMaxHTTPVersionService) Get(ctx context.Context, query Sett
opts = append(r.Options[:], opts...)
var env SettingOriginMaxHTTPVersionGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/origin_max_http_version", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingpolish.go b/zones/settingpolish.go
index 4fd420b1477..a3cf051d258 100644
--- a/zones/settingpolish.go
+++ b/zones/settingpolish.go
@@ -54,7 +54,7 @@ func (r *SettingPolishService) Get(ctx context.Context, query SettingPolishGetPa
opts = append(r.Options[:], opts...)
var env SettingPolishGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/polish", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingprefetchpreload.go b/zones/settingprefetchpreload.go
index a2dc5545dbb..f46eff3150a 100644
--- a/zones/settingprefetchpreload.go
+++ b/zones/settingprefetchpreload.go
@@ -52,7 +52,7 @@ func (r *SettingPrefetchPreloadService) Get(ctx context.Context, query SettingPr
opts = append(r.Options[:], opts...)
var env SettingPrefetchPreloadGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/prefetch_preload", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingproxyreadtimeout.go b/zones/settingproxyreadtimeout.go
index 9ca7bd3654d..17fd7ebe3fe 100644
--- a/zones/settingproxyreadtimeout.go
+++ b/zones/settingproxyreadtimeout.go
@@ -50,7 +50,7 @@ func (r *SettingProxyReadTimeoutService) Get(ctx context.Context, query SettingP
opts = append(r.Options[:], opts...)
var env SettingProxyReadTimeoutGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/proxy_read_timeout", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingpseudoipv4.go b/zones/settingpseudoipv4.go
index 50385ef0081..39bfa3ba91d 100644
--- a/zones/settingpseudoipv4.go
+++ b/zones/settingpseudoipv4.go
@@ -50,7 +50,7 @@ func (r *SettingPseudoIPV4Service) Get(ctx context.Context, query SettingPseudoI
opts = append(r.Options[:], opts...)
var env SettingPseudoIPV4GetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/pseudo_ipv4", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingresponsebuffering.go b/zones/settingresponsebuffering.go
index 6d86d4aacd1..7162b7728b8 100644
--- a/zones/settingresponsebuffering.go
+++ b/zones/settingresponsebuffering.go
@@ -56,7 +56,7 @@ func (r *SettingResponseBufferingService) Get(ctx context.Context, query Setting
opts = append(r.Options[:], opts...)
var env SettingResponseBufferingGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/response_buffering", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingrocketloader.go b/zones/settingrocketloader.go
index d6fa516c6e8..a210f53914e 100644
--- a/zones/settingrocketloader.go
+++ b/zones/settingrocketloader.go
@@ -68,7 +68,7 @@ func (r *SettingRocketLoaderService) Get(ctx context.Context, query SettingRocke
opts = append(r.Options[:], opts...)
var env SettingRocketLoaderGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/rocket_loader", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingsecurityheader.go b/zones/settingsecurityheader.go
index 228821254d9..8a21eb6e1e6 100644
--- a/zones/settingsecurityheader.go
+++ b/zones/settingsecurityheader.go
@@ -50,7 +50,7 @@ func (r *SettingSecurityHeaderService) Get(ctx context.Context, query SettingSec
opts = append(r.Options[:], opts...)
var env SettingSecurityHeaderGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/security_header", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingsecuritylevel.go b/zones/settingsecuritylevel.go
index fe0da5a3d1b..481a460c68d 100644
--- a/zones/settingsecuritylevel.go
+++ b/zones/settingsecuritylevel.go
@@ -56,7 +56,7 @@ func (r *SettingSecurityLevelService) Get(ctx context.Context, query SettingSecu
opts = append(r.Options[:], opts...)
var env SettingSecurityLevelGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/security_level", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingserversideexclude.go b/zones/settingserversideexclude.go
index 9ce056d1af1..928108e4a95 100644
--- a/zones/settingserversideexclude.go
+++ b/zones/settingserversideexclude.go
@@ -70,7 +70,7 @@ func (r *SettingServerSideExcludeService) Get(ctx context.Context, query Setting
opts = append(r.Options[:], opts...)
var env SettingServerSideExcludeGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/server_side_exclude", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingsortquerystringforcache.go b/zones/settingsortquerystringforcache.go
index b359b3f096f..f1313a8d4bb 100644
--- a/zones/settingsortquerystringforcache.go
+++ b/zones/settingsortquerystringforcache.go
@@ -54,7 +54,7 @@ func (r *SettingSortQueryStringForCacheService) Get(ctx context.Context, query S
opts = append(r.Options[:], opts...)
var env SettingSortQueryStringForCacheGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/sort_query_string_for_cache", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingssl.go b/zones/settingssl.go
index 266f36c85aa..adcc8931cd3 100644
--- a/zones/settingssl.go
+++ b/zones/settingssl.go
@@ -79,7 +79,7 @@ func (r *SettingSSLService) Get(ctx context.Context, query SettingSSLGetParams,
opts = append(r.Options[:], opts...)
var env SettingSSLGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/ssl", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingsslrecommender.go b/zones/settingsslrecommender.go
index 18659234b30..970571f7666 100644
--- a/zones/settingsslrecommender.go
+++ b/zones/settingsslrecommender.go
@@ -53,7 +53,7 @@ func (r *SettingSSLRecommenderService) Get(ctx context.Context, query SettingSSL
opts = append(r.Options[:], opts...)
var env SettingSSLRecommenderGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/ssl_recommender", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingtls13.go b/zones/settingtls13.go
index 752a0274ab7..88652b52d76 100644
--- a/zones/settingtls13.go
+++ b/zones/settingtls13.go
@@ -50,7 +50,7 @@ func (r *SettingTLS1_3Service) Get(ctx context.Context, query SettingTLS1_3GetPa
opts = append(r.Options[:], opts...)
var env SettingTls1_3GetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/tls_1_3", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingtlsclientauth.go b/zones/settingtlsclientauth.go
index 5861f0d5767..1211efbed15 100644
--- a/zones/settingtlsclientauth.go
+++ b/zones/settingtlsclientauth.go
@@ -52,7 +52,7 @@ func (r *SettingTLSClientAuthService) Get(ctx context.Context, query SettingTLSC
opts = append(r.Options[:], opts...)
var env SettingTLSClientAuthGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/tls_client_auth", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingtrueclientipheader.go b/zones/settingtrueclientipheader.go
index 703e22e0a9d..6a93325fc30 100644
--- a/zones/settingtrueclientipheader.go
+++ b/zones/settingtrueclientipheader.go
@@ -52,7 +52,7 @@ func (r *SettingTrueClientIPHeaderService) Get(ctx context.Context, query Settin
opts = append(r.Options[:], opts...)
var env SettingTrueClientIPHeaderGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/true_client_ip_header", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingwaf.go b/zones/settingwaf.go
index 7ed8bb06799..57e53e3eda1 100644
--- a/zones/settingwaf.go
+++ b/zones/settingwaf.go
@@ -67,7 +67,7 @@ func (r *SettingWAFService) Get(ctx context.Context, query SettingWAFGetParams,
opts = append(r.Options[:], opts...)
var env SettingWAFGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/waf", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingwebp.go b/zones/settingwebp.go
index 095d8e148d2..76f39d4324d 100644
--- a/zones/settingwebp.go
+++ b/zones/settingwebp.go
@@ -54,7 +54,7 @@ func (r *SettingWebpService) Get(ctx context.Context, query SettingWebpGetParams
opts = append(r.Options[:], opts...)
var env SettingWebpGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/webp", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingwebsocket.go b/zones/settingwebsocket.go
index 40ab17be34a..9f4d9512376 100644
--- a/zones/settingwebsocket.go
+++ b/zones/settingwebsocket.go
@@ -53,7 +53,7 @@ func (r *SettingWebsocketService) Get(ctx context.Context, query SettingWebsocke
opts = append(r.Options[:], opts...)
var env SettingWebsocketGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/websockets", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/settingzerortt.go b/zones/settingzerortt.go
index 3c42801ba6e..c2fd8211625 100644
--- a/zones/settingzerortt.go
+++ b/zones/settingzerortt.go
@@ -50,7 +50,7 @@ func (r *SettingZeroRTTService) Get(ctx context.Context, query SettingZeroRTTGet
opts = append(r.Options[:], opts...)
var env SettingZeroRTTGetResponseEnvelope
path := fmt.Sprintf("zones/%s/settings/0rtt", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}
diff --git a/zones/workerscript.go b/zones/workerscript.go
index a882556b591..e87d44cbbad 100644
--- a/zones/workerscript.go
+++ b/zones/workerscript.go
@@ -52,7 +52,7 @@ func (r *WorkerScriptService) Delete(ctx context.Context, body WorkerScriptDelet
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...)
path := fmt.Sprintf("zones/%s/workers/script", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, nil, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, nil, opts...)
return
}
@@ -62,7 +62,7 @@ func (r *WorkerScriptService) Get(ctx context.Context, query WorkerScriptGetPara
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithHeader("Accept", "undefined")}, opts...)
path := fmt.Sprintf("zones/%s/workers/script", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
diff --git a/zones/zone.go b/zones/zone.go
index 393cd991ab1..3d14754713e 100644
--- a/zones/zone.go
+++ b/zones/zone.go
@@ -87,7 +87,7 @@ func (r *ZoneService) Delete(ctx context.Context, body ZoneDeleteParams, opts ..
opts = append(r.Options[:], opts...)
var env ZoneDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s", body.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, body, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
if err != nil {
return
}
@@ -113,7 +113,7 @@ func (r *ZoneService) Get(ctx context.Context, query ZoneGetParams, opts ...opti
opts = append(r.Options[:], opts...)
var env ZoneGetResponseEnvelope
path := fmt.Sprintf("zones/%s", query.ZoneID)
- err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &env, opts...)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
if err != nil {
return
}