Skip to content

Commit

Permalink
feat: OpenAPI spec update
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 8, 2024
1 parent 13fc1c3 commit d7fdabd
Show file tree
Hide file tree
Showing 11 changed files with 2,053 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 337
configured_endpoints: 348
48 changes: 48 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,54 @@ Methods:
- <code title="post /accounts/{account_identifier}/members">client.AccountMembers.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#AccountMemberService.AccountMembersAddMember">AccountMembersAddMember</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountIdentifier interface{}, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#AccountMemberAccountMembersAddMemberParams">AccountMemberAccountMembersAddMemberParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#AccountMemberAccountMembersAddMemberResponse">AccountMemberAccountMembersAddMemberResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_identifier}/members">client.AccountMembers.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#AccountMemberService.AccountMembersListMembers">AccountMembersListMembers</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountIdentifier interface{}, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#AccountMemberAccountMembersListMembersParams">AccountMemberAccountMembersListMembersParams</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#AccountMemberAccountMembersListMembersResponse">AccountMemberAccountMembersListMembersResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# Rules

## Lists

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListGetResponse">RuleListGetResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListUpdateResponse">RuleListUpdateResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListDeleteResponse">RuleListDeleteResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListListsNewAListResponse">RuleListListsNewAListResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListListsGetListsResponse">RuleListListsGetListsResponse</a>

Methods:

- <code title="get /accounts/{account_id}/rules/lists/{list_id}">client.Rules.Lists.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListGetResponse">RuleListGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="put /accounts/{account_id}/rules/lists/{list_id}">client.Rules.Lists.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListUpdateParams">RuleListUpdateParams</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListUpdateResponse">RuleListUpdateResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /accounts/{account_id}/rules/lists/{list_id}">client.Rules.Lists.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListDeleteResponse">RuleListDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /accounts/{account_id}/rules/lists">client.Rules.Lists.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListService.ListsNewAList">ListsNewAList</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListListsNewAListParams">RuleListListsNewAListParams</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListListsNewAListResponse">RuleListListsNewAListResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_id}/rules/lists">client.Rules.Lists.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListService.ListsGetLists">ListsGetLists</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListListsGetListsResponse">RuleListListsGetListsResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

### BulkOperations

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListBulkOperationGetResponse">RuleListBulkOperationGetResponse</a>

Methods:

- <code title="get /accounts/{account_identifier}/rules/lists/bulk_operations/{operation_id}">client.Rules.Lists.BulkOperations.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListBulkOperationService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountIdentifier <a href="https://pkg.go.dev/builtin#string">string</a>, operationID <a href="https://pkg.go.dev/builtin#string">string</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListBulkOperationGetResponse">RuleListBulkOperationGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

### Items

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemGetResponse">RuleListItemGetResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemDeleteResponse">RuleListItemDeleteResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsNewListItemsResponse">RuleListItemListsNewListItemsResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsGetListItemsResponse">RuleListItemListsGetListItemsResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsUpdateAllListItemsResponse">RuleListItemListsUpdateAllListItemsResponse</a>

Methods:

- <code title="get /accounts/{account_identifier}/rules/lists/{list_id}/items/{item_id}">client.Rules.Lists.Items.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountIdentifier <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>, itemID <a href="https://pkg.go.dev/builtin#string">string</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemGetResponse">RuleListItemGetResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /accounts/{account_id}/rules/lists/{list_id}/items">client.Rules.Lists.Items.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemDeleteParams">RuleListItemDeleteParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemDeleteResponse">RuleListItemDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /accounts/{account_id}/rules/lists/{list_id}/items">client.Rules.Lists.Items.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemService.ListsNewListItems">ListsNewListItems</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsNewListItemsParams">RuleListItemListsNewListItemsParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsNewListItemsResponse">RuleListItemListsNewListItemsResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_id}/rules/lists/{list_id}/items">client.Rules.Lists.Items.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemService.ListsGetListItems">ListsGetListItems</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsGetListItemsParams">RuleListItemListsGetListItemsParams</a>) ([]<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsGetListItemsResponse">RuleListItemListsGetListItemsResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="put /accounts/{account_id}/rules/lists/{list_id}/items">client.Rules.Lists.Items.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemService.ListsUpdateAllListItems">ListsUpdateAllListItems</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, accountID <a href="https://pkg.go.dev/builtin#string">string</a>, listID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsUpdateAllListItemsParams">RuleListItemListsUpdateAllListItemsParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go">cloudflare</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-sdk-go#RuleListItemListsUpdateAllListItemsResponse">RuleListItemListsUpdateAllListItemsResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

# Tunnels

Response Types:
Expand Down
2 changes: 2 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Client struct {
DNSRecords *DNSRecordService
Emails *EmailService
AccountMembers *AccountMemberService
Rules *RuleService
Tunnels *TunnelService
D1 *D1Service
Dex *DexService
Expand Down Expand Up @@ -88,6 +89,7 @@ func NewClient(opts ...option.RequestOption) (r *Client) {
r.DNSRecords = NewDNSRecordService(opts...)
r.Emails = NewEmailService(opts...)
r.AccountMembers = NewAccountMemberService(opts...)
r.Rules = NewRuleService(opts...)
r.Tunnels = NewTunnelService(opts...)
r.D1 = NewD1Service(opts...)
r.Dex = NewDexService(opts...)
Expand Down
5 changes: 5 additions & 0 deletions internal/shared/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func (UnionString) ImplementsAccessKeyAccessKeyConfigurationGetTheAccessKeyConfi
func (UnionString) ImplementsAccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse() {
}
func (UnionString) ImplementsAccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse() {}
func (UnionString) ImplementsRuleListItemGetResponse() {}
func (UnionString) ImplementsTunnelConnectionDeleteResponse() {}
func (UnionString) ImplementsD1DatabaseDeleteResponse() {}
func (UnionString) ImplementsStreamAudioTrackDeleteResponse() {}
Expand Down Expand Up @@ -117,6 +118,10 @@ func (UnionBool) ImplementsZarazHistoryConfigGetResponseConfigToolsZarazCustomMa
func (UnionBool) ImplementsZarazHistoryConfigGetResponseConfigToolsZarazCustomManagedComponentSetting() {
}

type UnionInt int64

func (UnionInt) ImplementsRuleListItemGetResponse() {}

type UnionFloat float64

func (UnionFloat) ImplementsDNSRecordGetResponseDNSRecordsARecordTTL() {}
Expand Down
26 changes: 26 additions & 0 deletions rule.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// File generated from our OpenAPI spec by Stainless.

package cloudflare

import (
"github.com/cloudflare/cloudflare-sdk-go/option"
)

// RuleService 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 [NewRuleService] method instead.
type RuleService struct {
Options []option.RequestOption
Lists *RuleListService
}

// NewRuleService 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 NewRuleService(opts ...option.RequestOption) (r *RuleService) {
r = &RuleService{}
r.Options = opts
r.Lists = NewRuleListService(opts...)
return
}
Loading

0 comments on commit d7fdabd

Please sign in to comment.