Skip to content

Commit

Permalink
Add role_slug to user management send invitation flow (#322)
Browse files Browse the repository at this point in the history
* Add role_slug to send invitation

---------

Co-authored-by: Matt Dzwonczyk <[email protected]>
  • Loading branch information
ameesha and mattgd authored Apr 5, 2024
1 parent 41befc1 commit ce3b394
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/workos/workos.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package workos

const (
// Version represents the SDK version number.
Version = "v4.4.1"
Version = "v4.5.0"
)
1 change: 1 addition & 0 deletions pkg/usermanagement/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ type SendInvitationOpts struct {
OrganizationID string `json:"organization_id,omitempty"`
ExpiresInDays int `json:"expires_in_days,omitempty"`
InviterUserID string `json:"inviter_user_id,omitempty"`
RoleSlug string `json:"role_slug,omitempty"`
}

type RevokeInvitationOpts struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/usermanagement/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2285,6 +2285,7 @@ func TestSendInvitation(t *testing.T) {
OrganizationID: "org_123",
ExpiresInDays: 7,
InviterUserID: "user_123",
RoleSlug: "admin",
},
expected: Invitation{
ID: "invitation_123",
Expand Down
1 change: 1 addition & 0 deletions pkg/usermanagement/usermanagement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ func TestUsersSendInvitation(t *testing.T) {
OrganizationID: "org_123",
ExpiresInDays: 7,
InviterUserID: "user_123",
RoleSlug: "admin",
})

require.NoError(t, err)
Expand Down

0 comments on commit ce3b394

Please sign in to comment.