client

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseUrl                  = "https://sentry.io/api/0/"
	OrganizationsUrl         = BaseUrl + "organizations/"
	OrganizationMembersUrl   = OrganizationsUrl + "%s/members/"
	OrganizationOneMemberUrl = OrganizationsUrl + "%s/members/%s/"
	OrganizationTeamsUrl     = OrganizationsUrl + "%s/teams/"
	OrganizationProjectsUrl  = OrganizationsUrl + "%s/projects/"

	//https://docs.sentry.io/api/teams/list-a-teams-members/
	//	teams/{organization_id_or_slug}/{team_id_or_slug}/members/
	TeamMembersUrl = BaseUrl + "teams/%s/%s/members/"

	//- grant team member https://docs.sentry.io/api/teams/add-an-organization-member-to-a-team/
	//- revoke team member https://docs.sentry.io/api/teams/delete-an-organization-member-from-a-team/
	//
	//	organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/
	ProvisionTeamMemberUrl = OrganizationMembersUrl + "%s/teams/%s/"

	//	projects/{organization_id_or_slug}/{project_id_or_slug}/
	ProjectsUrl = BaseUrl + "projects/%s/%s/"

	//	projects/{organization_id_or_slug}/{project_id_or_slug}/
	ProjectMembersUrl = ProjectsUrl + "members/"

	// provision project members
	//	projects/{organization_id_or_slug}/{project_id_or_slug}/teams/{team_id_or_slug}/
	ProvisionProjectTeamUrl = ProjectsUrl + "teams/%s/"

	// teams/{organization_id_or_slug}/{team_id_or_slug}/projects/.
	TeamProjectsUrl = BaseUrl + "teams/%s/%s/projects/"
)

Variables

This section is empty.

Functions

func FindUserOrgID

func FindUserOrgID(ctx context.Context, client *Client, userID string) (string, error)

Types

type AddOrganizationMemberBody

type AddOrganizationMemberBody struct {
	Email string `json:"email"`
	// Optional.
	//  Possible values are:
	// "owner", "manager", "member", "billing"
	OrgRole string `json:"orgRole,omitempty"`
}

type Author

type Author struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

type Avatar

type Avatar struct {
	AvatarType string  `json:"avatarType"`
	AvatarUUID *string `json:"avatarUuid"`
}

type Client

type Client struct {
	*uhttp.BaseHttpClient
}

func New

func New(ctx context.Context, apiToken string) (*Client, error)

func (*Client) AddMemberToOrganization

func (c *Client) AddMemberToOrganization(ctx context.Context, orgID string, member AddOrganizationMemberBody) error

func (*Client) AddOrgMemberToTeam

func (c *Client) AddOrgMemberToTeam(ctx context.Context, orgID, memberID, teamID string) (*http.Response, error)

func (*Client) AddTeamToProject

func (c *Client) AddTeamToProject(ctx context.Context, orgID, projectID, teamID string) (*http.Response, error)

func (*Client) DeleteMemberFromOrganization

func (c *Client) DeleteMemberFromOrganization(ctx context.Context, orgID, userID string) error

func (*Client) DeleteOrgMemberFromTeam

func (c *Client) DeleteOrgMemberFromTeam(ctx context.Context, orgID, memberID, teamID string) (*http.Response, error)

func (*Client) DeleteTeamFromProject

func (c *Client) DeleteTeamFromProject(ctx context.Context, orgID, projectID, teamID string) (*http.Response, error)

func (*Client) GetOrganizationMember

func (c *Client) GetOrganizationMember(ctx context.Context, orgID, memberID string) (*DetailedMember, *http.Response, error)

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, orgID, projectID string) (*DetailedProject, *http.Response, error)

func (*Client) ListOrganizations

func (c *Client) ListOrganizations(ctx context.Context, cursor string) ([]Organization, *http.Response, *v2.RateLimitDescription, error)

func (*Client) ListProjectMembers

func (c *Client) ListProjectMembers(ctx context.Context, orgID, projectID, cursor string) ([]ProjectMember, *http.Response, *v2.RateLimitDescription, error)

https://docs.sentry.io/api/projects/list-a-projects-organization-members/ Returns a list of active organization members that belong to any team assigned to the project.

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context, orgID, cursor string) ([]Project, *http.Response, *v2.RateLimitDescription, error)

func (*Client) ListTeamMembers

func (c *Client) ListTeamMembers(ctx context.Context, orgID, teamID, cursor string) ([]TeamMember, *http.Response, *v2.RateLimitDescription, error)

func (*Client) ListTeamProjects

func (c *Client) ListTeamProjects(ctx context.Context, orgID, teamID, cursor string) ([]Project, *http.Response, *v2.RateLimitDescription, error)

func (*Client) ListTeams

func (c *Client) ListTeams(ctx context.Context, orgID, cursor string) ([]Team, *http.Response, *v2.RateLimitDescription, error)

func (*Client) UpdateOrganizationMemberRole added in v0.1.0

func (c *Client) UpdateOrganizationMemberRole(ctx context.Context, orgID, memberID, role string) (*DetailedMember, error)

UpdateOrganizationMemberRole updates a member's organization-level role. https://docs.sentry.io/api/organizations/update-an-organization-members-roles/ NOTE: Changing organization roles is restricted to user auth tokens.

type DetailedMember

type DetailedMember struct {
	ID           string              `json:"id"`
	Email        string              `json:"email"`
	Name         string              `json:"name"`
	User         *DetailedMemberUser `json:"user,omitempty"`
	Role         string              `json:"role"`
	OrgRole      string              `json:"orgRole"`
	RoleName     string              `json:"roleName"`
	Pending      bool                `json:"pending"`
	Expired      bool                `json:"expired"`
	Flags        DetailedMemberFlags `json:"flags"`
	DateCreated  time.Time           `json:"dateCreated"`
	InviteStatus string              `json:"inviteStatus"`
	InviterName  string              `json:"inviterName"`
	Teams        []string            `json:"teams"`
	TeamRoles    []MemberTeamRole    `json:"teamRoles"`
	InviteLink   *string             `json:"invite_link"`
	IsOnlyOwner  bool                `json:"isOnlyOwner"`
	OrgRoleList  []OrganizationRole  `json:"orgRoleList"`
	TeamRoleList []TeamRole          `json:"teamRoleList"`
}

DetailedMember represents a comprehensive member with full role information.

type DetailedMemberAvatar

type DetailedMemberAvatar struct {
	AvatarType string  `json:"avatarType"`
	AvatarUUID *string `json:"avatarUuid"`
}

type DetailedMemberEmail

type DetailedMemberEmail struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	IsVerified bool   `json:"is_verified"`
}

type DetailedMemberFlags

type DetailedMemberFlags struct {
	IDPProvisioned        bool `json:"idp:provisioned"`
	IDPRoleRestricted     bool `json:"idp:role-restricted"`
	SSOLinked             bool `json:"sso:linked"`
	SSOInvalid            bool `json:"sso:invalid"`
	MemberLimitRestricted bool `json:"member-limit:restricted"`
	PartnershipRestricted bool `json:"partnership:restricted"`
}

type DetailedMemberUser

type DetailedMemberUser struct {
	ID              string                `json:"id"`
	Name            string                `json:"name"`
	Username        string                `json:"username"`
	Email           string                `json:"email"`
	AvatarURL       string                `json:"avatarUrl"`
	IsActive        bool                  `json:"isActive"`
	HasPasswordAuth bool                  `json:"hasPasswordAuth"`
	IsManaged       bool                  `json:"isManaged"`
	DateJoined      time.Time             `json:"dateJoined"`
	LastLogin       *time.Time            `json:"lastLogin"`
	Has2FA          bool                  `json:"has2fa"`
	LastActive      *time.Time            `json:"lastActive"`
	IsSuperuser     bool                  `json:"isSuperuser"`
	IsStaff         bool                  `json:"isStaff"`
	Experiments     map[string]any        `json:"experiments"`
	Emails          []DetailedMemberEmail `json:"emails"`
	Avatar          DetailedMemberAvatar  `json:"avatar"`
	Authenticators  []any                 `json:"authenticators"`
	CanReset2FA     bool                  `json:"canReset2fa"`
}

type DetailedProject

type DetailedProject struct {
	ID                               string                 `json:"id"`
	Slug                             string                 `json:"slug"`
	Name                             string                 `json:"name"`
	Platform                         string                 `json:"platform"`
	DateCreated                      string                 `json:"dateCreated"`
	IsBookmarked                     bool                   `json:"isBookmarked"`
	IsMember                         bool                   `json:"isMember"`
	Features                         []string               `json:"features"`
	FirstEvent                       string                 `json:"firstEvent"`
	FirstTransactionEvent            bool                   `json:"firstTransactionEvent"`
	Access                           []string               `json:"access"`
	HasAccess                        bool                   `json:"hasAccess"`
	HasMinifiedStackTrace            bool                   `json:"hasMinifiedStackTrace"`
	HasFeedbacks                     bool                   `json:"hasFeedbacks"`
	HasMonitors                      bool                   `json:"hasMonitors"`
	HasNewFeedbacks                  bool                   `json:"hasNewFeedbacks"`
	HasProfiles                      bool                   `json:"hasProfiles"`
	HasReplays                       bool                   `json:"hasReplays"`
	HasFlags                         bool                   `json:"hasFlags"`
	HasSessions                      bool                   `json:"hasSessions"`
	HasInsightsHttp                  bool                   `json:"hasInsightsHttp"`
	HasInsightsDb                    bool                   `json:"hasInsightsDb"`
	HasInsightsAssets                bool                   `json:"hasInsightsAssets"`
	HasInsightsAppStart              bool                   `json:"hasInsightsAppStart"`
	HasInsightsScreenLoad            bool                   `json:"hasInsightsScreenLoad"`
	HasInsightsVitals                bool                   `json:"hasInsightsVitals"`
	HasInsightsCaches                bool                   `json:"hasInsightsCaches"`
	HasInsightsQueues                bool                   `json:"hasInsightsQueues"`
	HasInsightsLlmMonitoring         bool                   `json:"hasInsightsLlmMonitoring"`
	HasInsightsAgentMonitoring       bool                   `json:"hasInsightsAgentMonitoring"`
	IsInternal                       bool                   `json:"isInternal"`
	IsPublic                         bool                   `json:"isPublic"`
	Avatar                           Avatar                 `json:"avatar"`
	Color                            string                 `json:"color"`
	Status                           string                 `json:"status"`
	Team                             Team                   `json:"team"`
	Teams                            []ProjectTeam          `json:"teams"`
	LatestRelease                    Release                `json:"latestRelease"`
	Options                          map[string]interface{} `json:"options"`
	DigestsMinDelay                  int                    `json:"digestsMinDelay"`
	DigestsMaxDelay                  int                    `json:"digestsMaxDelay"`
	SubjectPrefix                    string                 `json:"subjectPrefix"`
	AllowedDomains                   []string               `json:"allowedDomains"`
	ResolveAge                       int                    `json:"resolveAge"`
	DataScrubber                     bool                   `json:"dataScrubber"`
	DataScrubberDefaults             bool                   `json:"dataScrubberDefaults"`
	SafeFields                       []string               `json:"safeFields"`
	StoreCrashReports                int                    `json:"storeCrashReports"`
	SensitiveFields                  []string               `json:"sensitiveFields"`
	SubjectTemplate                  string                 `json:"subjectTemplate"`
	SecurityToken                    string                 `json:"securityToken"`
	SecurityTokenHeader              *string                `json:"securityTokenHeader"`
	VerifySSL                        bool                   `json:"verifySSL"`
	ScrubIPAddresses                 bool                   `json:"scrubIPAddresses"`
	ScrapeJavaScript                 bool                   `json:"scrapeJavaScript"`
	GroupingConfig                   string                 `json:"groupingConfig"`
	GroupingEnhancements             string                 `json:"groupingEnhancements"`
	GroupingEnhancementsBase         *string                `json:"groupingEnhancementsBase"`
	DerivedGroupingEnhancements      string                 `json:"derivedGroupingEnhancements"`
	SecondaryGroupingExpiry          int                    `json:"secondaryGroupingExpiry"`
	SecondaryGroupingConfig          string                 `json:"secondaryGroupingConfig"`
	FingerprintingRules              string                 `json:"fingerprintingRules"`
	Organization                     Organization           `json:"organization"`
	Plugins                          []Plugin               `json:"plugins"`
	Platforms                        []string               `json:"platforms"`
	ProcessingIssues                 int                    `json:"processingIssues"`
	DefaultEnvironment               string                 `json:"defaultEnvironment"`
	RelayPiiConfig                   *string                `json:"relayPiiConfig"`
	BuiltinSymbolSources             []string               `json:"builtinSymbolSources"`
	DynamicSamplingBiases            []DynamicSamplingBias  `json:"dynamicSamplingBiases"`
	DynamicSamplingMinimumSampleRate bool                   `json:"dynamicSamplingMinimumSampleRate"`
	EventProcessing                  EventProcessing        `json:"eventProcessing"`
	SymbolSources                    string                 `json:"symbolSources"`
	TempestFetchScreenshots          bool                   `json:"tempestFetchScreenshots"`
	TempestFetchDumps                bool                   `json:"tempestFetchDumps"`
	IsDynamicallySampled             bool                   `json:"isDynamicallySampled"`
	AutofixAutomationTuning          string                 `json:"autofixAutomationTuning"`
	SeerScannerAutomation            bool                   `json:"seerScannerAutomation"`
	HighlightTags                    []string               `json:"highlightTags"`
	HighlightContext                 map[string]interface{} `json:"highlightContext"`
	HighlightPreset                  HighlightPreset        `json:"highlightPreset"`
}

type DynamicSamplingBias

type DynamicSamplingBias struct {
	ID     string `json:"id"`
	Active bool   `json:"active"`
}

type EventProcessing

type EventProcessing struct {
	SymbolicationDegraded bool `json:"symbolicationDegraded"`
}

type FeatureDescription

type FeatureDescription struct {
	Description string `json:"description"`
	FeatureGate string `json:"featureGate"`
}

type HighlightPreset

type HighlightPreset struct {
	Tags    []string               `json:"tags"`
	Context map[string]interface{} `json:"context"`
}
type Links struct {
	OrganizationUrl string `json:"organizationUrl"`
	RegionUrl       string `json:"regionUrl"`
}

type MemberFlags

type MemberFlags struct {
	IDPProvisioned        bool `json:"idp:provisioned"`
	IDPRoleRestricted     bool `json:"idp:role-restricted"`
	SSOLinked             bool `json:"sso:linked"`
	SSOInvalid            bool `json:"sso:invalid"`
	MemberLimitRestricted bool `json:"member-limit:restricted"`
	PartnershipRestricted bool `json:"partnership:restricted"`
}

type MemberTeamRole

type MemberTeamRole struct {
	TeamSlug string `json:"teamSlug"`
	Role     string `json:"role"`
}

type Organization

type Organization struct {
	Avatar                     Avatar             `json:"avatar"`
	DateCreated                time.Time          `json:"dateCreated"`
	Features                   []string           `json:"features"`
	HasAuthProvider            bool               `json:"hasAuthProvider"`
	ID                         string             `json:"id"`
	IsEarlyAdopter             bool               `json:"isEarlyAdopter"`
	AllowMemberInvite          bool               `json:"allowMemberInvite"`
	AllowMemberProjectCreation bool               `json:"allowMemberProjectCreation"`
	AllowSuperuserAccess       bool               `json:"allowSuperuserAccess"`
	Links                      OrganizationLinks  `json:"links"`
	Name                       string             `json:"name"`
	Require2FA                 bool               `json:"require2FA"`
	Slug                       string             `json:"slug"`
	Status                     OrganizationStatus `json:"status"`
}
type OrganizationLinks struct {
	OrganizationURL string `json:"organizationUrl"`
	RegionURL       string `json:"regionUrl"`
}

type OrganizationMember

type OrganizationMember struct {
	ID           string      `json:"id"`
	Email        string      `json:"email"`
	Name         string      `json:"name"`
	User         *User       `json:"user,omitempty"` // Optional - only present for active members
	OrgRole      string      `json:"orgRole"`
	Pending      bool        `json:"pending"`
	Expired      bool        `json:"expired"`
	Flags        MemberFlags `json:"flags"`
	DateCreated  time.Time   `json:"dateCreated"`
	InviteStatus string      `json:"inviteStatus"`
	InviterName  string      `json:"inviterName"`
}

type OrganizationRole

type OrganizationRole struct {
	ID                 string   `json:"id"`
	Name               string   `json:"name"`
	Desc               string   `json:"desc"`
	Scopes             []string `json:"scopes"`
	Allowed            bool     `json:"allowed"`
	IsAllowed          bool     `json:"isAllowed"`
	IsRetired          bool     `json:"isRetired"`
	IsGlobal           bool     `json:"is_global"`
	IsGlobalAlt        bool     `json:"isGlobal"`
	IsTeamRolesAllowed bool     `json:"isTeamRolesAllowed"`
	MinimumTeamRole    string   `json:"minimumTeamRole"`
}

type OrganizationStatus

type OrganizationStatus struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Plugin

type Plugin struct {
	ID                    string                 `json:"id"`
	Name                  string                 `json:"name"`
	Slug                  string                 `json:"slug"`
	ShortName             string                 `json:"shortName"`
	Type                  string                 `json:"type"`
	CanDisable            bool                   `json:"canDisable"`
	IsTestable            bool                   `json:"isTestable"`
	HasConfiguration      bool                   `json:"hasConfiguration"`
	Metadata              map[string]interface{} `json:"metadata"`
	Contexts              []string               `json:"contexts"`
	Status                string                 `json:"status"`
	Assets                []string               `json:"assets"`
	Doc                   string                 `json:"doc"`
	FirstPartyAlternative *string                `json:"firstPartyAlternative"`
	DeprecationDate       *string                `json:"deprecationDate"`
	AltIsSentryApp        *string                `json:"altIsSentryApp"`
	Enabled               bool                   `json:"enabled"`
	Version               string                 `json:"version"`
	Author                Author                 `json:"author"`
	IsDeprecated          bool                   `json:"isDeprecated"`
	IsHidden              bool                   `json:"isHidden"`
	Description           string                 `json:"description"`
	Features              []string               `json:"features"`
	FeatureDescriptions   []FeatureDescription   `json:"featureDescriptions"`
	ResourceLinks         []ResourceLink         `json:"resourceLinks"`
}

type Project

type Project struct {
	ID                         string     `json:"id"`
	Slug                       string     `json:"slug"`
	Name                       string     `json:"name"`
	Platform                   *string    `json:"platform"`
	DateCreated                time.Time  `json:"dateCreated"`
	IsBookmarked               bool       `json:"isBookmarked"`
	IsMember                   bool       `json:"isMember"`
	Features                   []string   `json:"features"`
	FirstEvent                 *time.Time `json:"firstEvent"`
	FirstTransactionEvent      bool       `json:"firstTransactionEvent"`
	Access                     []string   `json:"access"`
	HasAccess                  bool       `json:"hasAccess"`
	HasMinifiedStackTrace      bool       `json:"hasMinifiedStackTrace"`
	HasMonitors                bool       `json:"hasMonitors"`
	HasProfiles                bool       `json:"hasProfiles"`
	HasReplays                 bool       `json:"hasReplays"`
	HasFlags                   bool       `json:"hasFlags"`
	HasFeedbacks               bool       `json:"hasFeedbacks"`
	HasNewFeedbacks            bool       `json:"hasNewFeedbacks"`
	HasSessions                bool       `json:"hasSessions"`
	HasInsightsHttp            bool       `json:"hasInsightsHttp"`
	HasInsightsDb              bool       `json:"hasInsightsDb"`
	HasInsightsAssets          bool       `json:"hasInsightsAssets"`
	HasInsightsAppStart        bool       `json:"hasInsightsAppStart"`
	HasInsightsScreenLoad      bool       `json:"hasInsightsScreenLoad"`
	HasInsightsVitals          bool       `json:"hasInsightsVitals"`
	HasInsightsCaches          bool       `json:"hasInsightsCaches"`
	HasInsightsQueues          bool       `json:"hasInsightsQueues"`
	HasInsightsLlmMonitoring   bool       `json:"hasInsightsLlmMonitoring"`
	HasInsightsAgentMonitoring bool       `json:"hasInsightsAgentMonitoring"`
	IsInternal                 bool       `json:"isInternal"`
	IsPublic                   bool       `json:"isPublic"`
	Avatar                     Avatar     `json:"avatar"`
	Color                      string     `json:"color"`
	Status                     string     `json:"status"`
}

type ProjectMember

type ProjectMember OrganizationMember

type ProjectTeam

type ProjectTeam struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type Release

type Release struct {
	Version string `json:"version"`
}
type ResourceLink struct {
	Title string `json:"title"`
	Url   string `json:"url"`
}

type Status

type Status struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type Team

type Team struct {
	ID          string    `json:"id"`
	Slug        string    `json:"slug"`
	Name        string    `json:"name"`
	DateCreated time.Time `json:"dateCreated"`
	IsMember    bool      `json:"isMember"`
	TeamRole    *string   `json:"teamRole"`
	Flags       TeamFlags `json:"flags"`
	Access      []string  `json:"access"`
	HasAccess   bool      `json:"hasAccess"`
	IsPending   bool      `json:"isPending"`
	MemberCount int       `json:"memberCount"`
	Avatar      Avatar    `json:"avatar"`
	Projects    []Project `json:"projects,omitempty"` // Optional - some teams may not have projects
}

type TeamFlags

type TeamFlags struct {
	IDPProvisioned bool `json:"idp:provisioned"`
}

type TeamMember

type TeamMember struct {
	ID           string          `json:"id"`
	Email        string          `json:"email"`
	Name         string          `json:"name"`
	User         *TeamMemberUser `json:"user,omitempty"` // Optional - only present for active members
	OrgRole      string          `json:"orgRole"`
	Pending      bool            `json:"pending"`
	Expired      bool            `json:"expired"`
	Flags        TeamMemberFlags `json:"flags"`
	DateCreated  time.Time       `json:"dateCreated"`
	InviteStatus string          `json:"inviteStatus"`
	InviterName  string          `json:"inviterName"`
	TeamRole     string          `json:"teamRole"`
	TeamSlug     string          `json:"teamSlug"`
}

type TeamMemberEmail

type TeamMemberEmail struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	IsVerified bool   `json:"is_verified"`
}

type TeamMemberFlags

type TeamMemberFlags struct {
	IDPProvisioned        bool `json:"idp:provisioned"`
	IDPRoleRestricted     bool `json:"idp:role-restricted"`
	SSOLinked             bool `json:"sso:linked"`
	SSOInvalid            bool `json:"sso:invalid"`
	MemberLimitRestricted bool `json:"member-limit:restricted"`
	PartnershipRestricted bool `json:"partnership:restricted"`
}

type TeamMemberUser

type TeamMemberUser struct {
	ID              string                 `json:"id"`
	Name            string                 `json:"name"`
	Username        string                 `json:"username"`
	Email           string                 `json:"email"`
	AvatarURL       string                 `json:"avatarUrl"`
	IsActive        bool                   `json:"isActive"`
	HasPasswordAuth bool                   `json:"hasPasswordAuth"`
	IsManaged       bool                   `json:"isManaged"`
	DateJoined      time.Time              `json:"dateJoined"`
	LastLogin       *time.Time             `json:"lastLogin"`
	Has2FA          bool                   `json:"has2fa"`
	LastActive      *time.Time             `json:"lastActive"`
	IsSuperuser     bool                   `json:"isSuperuser"`
	IsStaff         bool                   `json:"isStaff"`
	Experiments     map[string]interface{} `json:"experiments"`
	Emails          []TeamMemberEmail      `json:"emails"`
	Avatar          Avatar                 `json:"avatar"`
	CanReset2FA     bool                   `json:"canReset2fa"`
}

type TeamRole

type TeamRole struct {
	ID                 string   `json:"id"`
	Name               string   `json:"name"`
	Desc               string   `json:"desc"`
	Scopes             []string `json:"scopes"`
	Allowed            bool     `json:"allowed"`
	IsAllowed          bool     `json:"isAllowed"`
	IsRetired          bool     `json:"isRetired"`
	IsTeamRolesAllowed bool     `json:"isTeamRolesAllowed"`
	IsMinimumRoleFor   *string  `json:"isMinimumRoleFor"`
}

type UpdateOrganizationMemberBody added in v0.1.0

type UpdateOrganizationMemberBody struct {
	// The organization role to assign.
	// Possible values: "billing", "member", "admin", "manager", "owner"
	OrgRole string `json:"orgRole"`
}

UpdateOrganizationMemberBody is the request body for updating a member's organization role. https://docs.sentry.io/api/organizations/update-an-organization-members-roles/

type User

type User struct {
	ID              string         `json:"id"`
	Name            string         `json:"name"`
	Username        string         `json:"username"`
	Email           string         `json:"email"`
	AvatarURL       string         `json:"avatarUrl"`
	IsActive        bool           `json:"isActive"`
	HasPasswordAuth bool           `json:"hasPasswordAuth"`
	IsManaged       bool           `json:"isManaged"`
	DateJoined      time.Time      `json:"dateJoined"`
	LastLogin       *time.Time     `json:"lastLogin"`
	Has2FA          bool           `json:"has2fa"`
	LastActive      *time.Time     `json:"lastActive"`
	IsSuperuser     bool           `json:"isSuperuser"`
	IsStaff         bool           `json:"isStaff"`
	Experiments     map[string]any `json:"experiments"`
	Emails          []UserEmail    `json:"emails"`
	Avatar          Avatar         `json:"avatar"`
	CanReset2FA     bool           `json:"canReset2fa"`
}

type UserEmail

type UserEmail struct {
	ID         string `json:"id"`
	Email      string `json:"email"`
	IsVerified bool   `json:"is_verified"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL