Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#1817)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 18, 2024
1 parent 03cca00 commit 6f304fa
Show file tree
Hide file tree
Showing 86 changed files with 722 additions and 722 deletions.
16 changes: 8 additions & 8 deletions accounts/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
type ErrorData = shared.ErrorData

// This is an alias to an internal type.
type IamMember = shared.IamMember
type Member = shared.Member

// This is an alias to an internal type.
type IamMemberRole = shared.IamMemberRole
type MemberRole = shared.MemberRole

// This is an alias to an internal type.
type IamMemberRolesPermissions = shared.IamMemberRolesPermissions
type MemberRolesPermissions = shared.MemberRolesPermissions

// This is an alias to an internal type.
type IamMemberUser = shared.IamMemberUser
type MemberUser = shared.MemberUser

// This is an alias to an internal type.
type IamMemberParam = shared.IamMemberParam
type MemberParam = shared.MemberParam

// This is an alias to an internal type.
type IamMemberRoleParam = shared.IamMemberRoleParam
type MemberRoleParam = shared.MemberRoleParam

// This is an alias to an internal type.
type IamMemberRolesPermissionsParam = shared.IamMemberRolesPermissionsParam
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

// This is an alias to an internal type.
type IamMemberUserParam = shared.IamMemberUserParam
type MemberUserParam = shared.MemberUserParam

// This is an alias to an internal type.
type Permission = shared.Permission
Expand Down
12 changes: 6 additions & 6 deletions accounts/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (r *MemberService) New(ctx context.Context, params MemberNewParams, opts ..
}

// Modify an account member.
func (r *MemberService) Update(ctx context.Context, memberID string, params MemberUpdateParams, opts ...option.RequestOption) (res *shared.IamMember, err error) {
func (r *MemberService) Update(ctx context.Context, memberID string, params MemberUpdateParams, opts ...option.RequestOption) (res *shared.Member, err error) {
opts = append(r.Options[:], opts...)
var env MemberUpdateResponseEnvelope
path := fmt.Sprintf("accounts/%v/members/%s", params.AccountID, memberID)
Expand Down Expand Up @@ -97,7 +97,7 @@ func (r *MemberService) Delete(ctx context.Context, memberID string, params Memb
}

// Get information about a specific member of an account.
func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGetParams, opts ...option.RequestOption) (res *shared.IamMember, err error) {
func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGetParams, opts ...option.RequestOption) (res *shared.Member, err error) {
opts = append(r.Options[:], opts...)
var env MemberGetResponseEnvelope
path := fmt.Sprintf("accounts/%v/members/%s", query.AccountID, memberID)
Expand Down Expand Up @@ -394,17 +394,17 @@ func (r MemberNewResponseEnvelopeSuccess) IsKnown() bool {

type MemberUpdateParams struct {
AccountID param.Field[interface{}] `path:"account_id,required"`
IamMember shared.IamMemberParam `json:"iam_member,required"`
Member shared.MemberParam `json:"member,required"`
}

func (r MemberUpdateParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r.IamMember)
return apijson.MarshalRoot(r.Member)
}

type MemberUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result shared.IamMember `json:"result,required"`
Result shared.Member `json:"result,required"`
// Whether the API call was successful
Success MemberUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON memberUpdateResponseEnvelopeJSON `json:"-"`
Expand Down Expand Up @@ -576,7 +576,7 @@ type MemberGetParams struct {
type MemberGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors,required"`
Messages []shared.ResponseInfo `json:"messages,required"`
Result shared.IamMember `json:"result,required"`
Result shared.Member `json:"result,required"`
// Whether the API call was successful
Success MemberGetResponseEnvelopeSuccess `json:"success,required"`
JSON memberGetResponseEnvelopeJSON `json:"-"`
Expand Down
4 changes: 2 additions & 2 deletions accounts/member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func TestMemberUpdate(t *testing.T) {
"4536bcfad5faccb111b47003c79917fa",
accounts.MemberUpdateParams{
AccountID: cloudflare.F[any](map[string]interface{}{}),
IamMember: shared.IamMemberParam{
Roles: cloudflare.F([]shared.IamMemberRoleParam{{
Member: shared.MemberParam{
Roles: cloudflare.F([]shared.MemberRoleParam{{
ID: cloudflare.F("3536bcfad5faccb999b47003c79917fb"),
}, {
ID: cloudflare.F("3536bcfad5faccb999b47003c79917fb"),
Expand Down
16 changes: 8 additions & 8 deletions acm/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
type ErrorData = shared.ErrorData

// This is an alias to an internal type.
type IamMember = shared.IamMember
type Member = shared.Member

// This is an alias to an internal type.
type IamMemberRole = shared.IamMemberRole
type MemberRole = shared.MemberRole

// This is an alias to an internal type.
type IamMemberRolesPermissions = shared.IamMemberRolesPermissions
type MemberRolesPermissions = shared.MemberRolesPermissions

// This is an alias to an internal type.
type IamMemberUser = shared.IamMemberUser
type MemberUser = shared.MemberUser

// This is an alias to an internal type.
type IamMemberParam = shared.IamMemberParam
type MemberParam = shared.MemberParam

// This is an alias to an internal type.
type IamMemberRoleParam = shared.IamMemberRoleParam
type MemberRoleParam = shared.MemberRoleParam

// This is an alias to an internal type.
type IamMemberRolesPermissionsParam = shared.IamMemberRolesPermissionsParam
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

// This is an alias to an internal type.
type IamMemberUserParam = shared.IamMemberUserParam
type MemberUserParam = shared.MemberUserParam

// This is an alias to an internal type.
type Permission = shared.Permission
Expand Down
16 changes: 8 additions & 8 deletions addressing/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
type ErrorData = shared.ErrorData

// This is an alias to an internal type.
type IamMember = shared.IamMember
type Member = shared.Member

// This is an alias to an internal type.
type IamMemberRole = shared.IamMemberRole
type MemberRole = shared.MemberRole

// This is an alias to an internal type.
type IamMemberRolesPermissions = shared.IamMemberRolesPermissions
type MemberRolesPermissions = shared.MemberRolesPermissions

// This is an alias to an internal type.
type IamMemberUser = shared.IamMemberUser
type MemberUser = shared.MemberUser

// This is an alias to an internal type.
type IamMemberParam = shared.IamMemberParam
type MemberParam = shared.MemberParam

// This is an alias to an internal type.
type IamMemberRoleParam = shared.IamMemberRoleParam
type MemberRoleParam = shared.MemberRoleParam

// This is an alias to an internal type.
type IamMemberRolesPermissionsParam = shared.IamMemberRolesPermissionsParam
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

// This is an alias to an internal type.
type IamMemberUserParam = shared.IamMemberUserParam
type MemberUserParam = shared.MemberUserParam

// This is an alias to an internal type.
type Permission = shared.Permission
Expand Down
16 changes: 8 additions & 8 deletions alerting/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
type ErrorData = shared.ErrorData

// This is an alias to an internal type.
type IamMember = shared.IamMember
type Member = shared.Member

// This is an alias to an internal type.
type IamMemberRole = shared.IamMemberRole
type MemberRole = shared.MemberRole

// This is an alias to an internal type.
type IamMemberRolesPermissions = shared.IamMemberRolesPermissions
type MemberRolesPermissions = shared.MemberRolesPermissions

// This is an alias to an internal type.
type IamMemberUser = shared.IamMemberUser
type MemberUser = shared.MemberUser

// This is an alias to an internal type.
type IamMemberParam = shared.IamMemberParam
type MemberParam = shared.MemberParam

// This is an alias to an internal type.
type IamMemberRoleParam = shared.IamMemberRoleParam
type MemberRoleParam = shared.MemberRoleParam

// This is an alias to an internal type.
type IamMemberRolesPermissionsParam = shared.IamMemberRolesPermissionsParam
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

// This is an alias to an internal type.
type IamMemberUserParam = shared.IamMemberUserParam
type MemberUserParam = shared.MemberUserParam

// This is an alias to an internal type.
type Permission = shared.Permission
Expand Down
16 changes: 8 additions & 8 deletions aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
type ErrorData = shared.ErrorData

// This is an alias to an internal type.
type IamMember = shared.IamMember
type Member = shared.Member

// This is an alias to an internal type.
type IamMemberRole = shared.IamMemberRole
type MemberRole = shared.MemberRole

// This is an alias to an internal type.
type IamMemberRolesPermissions = shared.IamMemberRolesPermissions
type MemberRolesPermissions = shared.MemberRolesPermissions

// This is an alias to an internal type.
type IamMemberUser = shared.IamMemberUser
type MemberUser = shared.MemberUser

// This is an alias to an internal type.
type IamMemberParam = shared.IamMemberParam
type MemberParam = shared.MemberParam

// This is an alias to an internal type.
type IamMemberRoleParam = shared.IamMemberRoleParam
type MemberRoleParam = shared.MemberRoleParam

// This is an alias to an internal type.
type IamMemberRolesPermissionsParam = shared.IamMemberRolesPermissionsParam
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

// This is an alias to an internal type.
type IamMemberUserParam = shared.IamMemberUserParam
type MemberUserParam = shared.MemberUserParam

// This is an alias to an internal type.
type Permission = shared.Permission
Expand Down
8 changes: 4 additions & 4 deletions api.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Shared Params Types

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#IamMemberParam">IamMemberParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#MemberParam">MemberParam</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#PermissionGrantParam">PermissionGrantParam</a>

# Shared Response Types

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#AuditLog">AuditLog</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#CloudflareTunnel">CloudflareTunnel</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#ErrorData">ErrorData</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#IamMember">IamMember</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#Member">Member</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#Permission">Permission</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#PermissionGrant">PermissionGrant</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#ResponseInfo">ResponseInfo</a>
Expand Down Expand Up @@ -44,10 +44,10 @@ Response Types:
Methods:

- <code title="post /accounts/{account_id}/members">client.Accounts.Members.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberNewParams">MemberNewParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#UserWithInviteCode">UserWithInviteCode</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="put /accounts/{account_id}/members/{member_id}">client.Accounts.Members.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, memberID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberUpdateParams">MemberUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#IamMember">IamMember</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="put /accounts/{account_id}/members/{member_id}">client.Accounts.Members.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, memberID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberUpdateParams">MemberUpdateParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#Member">Member</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_id}/members">client.Accounts.Members.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberListParams">MemberListParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/pagination#V4PagePaginationArray">V4PagePaginationArray</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberListResponse">MemberListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /accounts/{account_id}/members/{member_id}">client.Accounts.Members.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, memberID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberDeleteParams">MemberDeleteParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberDeleteResponse">MemberDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_id}/members/{member_id}">client.Accounts.Members.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, memberID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberGetParams">MemberGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#IamMember">IamMember</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_id}/members/{member_id}">client.Accounts.Members.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, memberID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts">accounts</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/accounts#MemberGetParams">MemberGetParams</a>) (<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared">shared</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v2/internal/shared#Member">Member</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

## Roles

Expand Down
16 changes: 8 additions & 8 deletions argo/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
type ErrorData = shared.ErrorData

// This is an alias to an internal type.
type IamMember = shared.IamMember
type Member = shared.Member

// This is an alias to an internal type.
type IamMemberRole = shared.IamMemberRole
type MemberRole = shared.MemberRole

// This is an alias to an internal type.
type IamMemberRolesPermissions = shared.IamMemberRolesPermissions
type MemberRolesPermissions = shared.MemberRolesPermissions

// This is an alias to an internal type.
type IamMemberUser = shared.IamMemberUser
type MemberUser = shared.MemberUser

// This is an alias to an internal type.
type IamMemberParam = shared.IamMemberParam
type MemberParam = shared.MemberParam

// This is an alias to an internal type.
type IamMemberRoleParam = shared.IamMemberRoleParam
type MemberRoleParam = shared.MemberRoleParam

// This is an alias to an internal type.
type IamMemberRolesPermissionsParam = shared.IamMemberRolesPermissionsParam
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

// This is an alias to an internal type.
type IamMemberUserParam = shared.IamMemberUserParam
type MemberUserParam = shared.MemberUserParam

// This is an alias to an internal type.
type Permission = shared.Permission
Expand Down
Loading

0 comments on commit 6f304fa

Please sign in to comment.