Help us shape the future of Go! Take the 2026 Go Developer Survey

authclient

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptInvitationRequest

type AcceptInvitationRequest struct {
	Token string `json:"token"`
}

AcceptInvitationRequest represents the AcceptInvitationRequest schema.

type AddMemberRequest

type AddMemberRequest struct {
	Role   string `json:"role,omitempty"`
	UserID string `json:"user_id"`
}

AddMemberRequest represents the AddMemberRequest schema.

type AddPermissionRequest

type AddPermissionRequest struct {
	Action   string `json:"action"`
	Resource string `json:"resource"`
}

AddPermissionRequest represents the AddPermissionRequest schema.

type AdminAppResponse

type AdminAppResponse struct {
	ID             string `json:"id"`
	IsPlatform     bool   `json:"is_platform"`
	Name           string `json:"name"`
	PublishableKey string `json:"publishable_key,omitempty"`
	Slug           string `json:"slug"`
}

AdminAppResponse represents the AdminAppResponse schema.

type AdminBanUserRequest

type AdminBanUserRequest struct {
	ExpiresAt string `json:"expires_at,omitempty"`
	Reason    string `json:"reason,omitempty"`
}

AdminBanUserRequest represents the AdminBanUserRequest schema.

type AdminBulkImportUsersRequest

type AdminBulkImportUsersRequest struct {
	AppID string           `json:"app_id,omitempty"`
	Users []map[string]any `json:"users"`
}

AdminBulkImportUsersRequest is the request body for AdminBulkImportUsers.

type AdminBulkRevokeSessionsParams

type AdminBulkRevokeSessionsParams struct {
	UserID string `json:"user_id,omitempty"`
}

AdminBulkRevokeSessionsParams holds optional query parameters for AdminBulkRevokeSessions.

type AdminCatalogProvider

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

AdminCatalogProvider represents the AdminCatalogProvider schema.

type AdminCatalogResponse

type AdminCatalogResponse struct {
	Providers []*AdminCatalogProvider `json:"providers"`
}

AdminCatalogResponse represents the AdminCatalogResponse schema.

type AdminCopyUserRequest

type AdminCopyUserRequest struct {
	EnvID        string `json:"env_id,omitempty"`
	SourceUserID string `json:"source_user_id"`
	TargetAppID  string `json:"target_app_id"`
}

AdminCopyUserRequest represents the AdminCopyUserRequest schema.

type AdminCreateAppRequest

type AdminCreateAppRequest struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

AdminCreateAppRequest represents the AdminCreateAppRequest schema.

type AdminCreateConnectionRequest

type AdminCreateConnectionRequest struct {
	AcsURL            string         `json:"acs_url,omitempty"`
	AllowedDomains    []string       `json:"allowed_domains,omitempty"`
	AppID             string         `json:"app_id,omitempty"`
	AttributeMappings map[string]any `json:"attribute_mappings,omitempty"`
	ClientID          string         `json:"client_id,omitempty"`
	ClientSecret      string         `json:"client_secret,omitempty"`
	Domain            string         `json:"domain"`
	EntityID          string         `json:"entity_id,omitempty"`
	IdpCertificate    string         `json:"idp_certificate,omitempty"`
	IdpMetadataXML    string         `json:"idp_metadata_xml,omitempty"`
	IdpSsoURL         string         `json:"idp_sso_url,omitempty"`
	Issuer            string         `json:"issuer,omitempty"`
	MetadataURL       string         `json:"metadata_url,omitempty"`
	OrgID             string         `json:"org_id,omitempty"`
	Protocol          string         `json:"protocol"`
	Provider          string         `json:"provider"`
	SignRequests      bool           `json:"sign_requests,omitempty"`
	TrustedFederation bool           `json:"trusted_federation,omitempty"`
}

AdminCreateConnectionRequest represents the AdminCreateConnectionRequest schema.

type AdminCreateConnectionResponse

type AdminCreateConnectionResponse struct {
	Active   bool   `json:"active"`
	AppID    string `json:"app_id"`
	Domain   string `json:"domain"`
	ID       string `json:"id"`
	Protocol string `json:"protocol"`
	Provider string `json:"provider"`
}

AdminCreateConnectionResponse represents the AdminCreateConnectionResponse schema.

type AdminCreateServiceAccountAPIKeyRequest

type AdminCreateServiceAccountAPIKeyRequest struct {
	ExpiresAt string   `json:"expires_at,omitempty"`
	Name      string   `json:"name"`
	Scopes    []string `json:"scopes,omitempty"`
}

AdminCreateServiceAccountAPIKeyRequest represents the AdminCreateServiceAccountAPIKeyRequest schema.

type AdminCreateServiceAccountRequest

type AdminCreateServiceAccountRequest struct {
	AppID       string   `json:"app_id,omitempty"`
	Description string   `json:"description,omitempty"`
	Name        string   `json:"name"`
	Scopes      []string `json:"scopes,omitempty"`
}

AdminCreateServiceAccountRequest represents the AdminCreateServiceAccountRequest schema.

type AdminCreateUserRequest

type AdminCreateUserRequest struct {
	AppID     string `json:"app_id,omitempty"`
	Email     string `json:"email"`
	FirstName string `json:"first_name,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	Password  string `json:"password"`
	Username  string `json:"username,omitempty"`
}

AdminCreateUserRequest represents the AdminCreateUserRequest schema.

type AdminDeleteConnectionResponse

type AdminDeleteConnectionResponse struct {
	Status string `json:"status"`
}

AdminDeleteConnectionResponse represents the AdminDeleteConnectionResponse schema.

type AdminDeleteProviderResponse

type AdminDeleteProviderResponse struct {
	Status string `json:"status"`
}

AdminDeleteProviderResponse represents the AdminDeleteProviderResponse schema.

type AdminGetStatsParams

type AdminGetStatsParams struct {
	AppID string `json:"app_id,omitempty"`
}

AdminGetStatsParams holds optional query parameters for AdminGetStats.

type AdminGrantPlatformOwnerRequest

type AdminGrantPlatformOwnerRequest struct {
	Email  string `json:"email,omitempty"`
	UserID string `json:"user_id,omitempty"`
}

AdminGrantPlatformOwnerRequest represents the AdminGrantPlatformOwnerRequest schema.

type AdminListConnectionsResponse

type AdminListConnectionsResponse struct {
	Connections []*Connection `json:"connections"`
}

AdminListConnectionsResponse represents the AdminListConnectionsResponse schema.

type AdminListOrgsParams

type AdminListOrgsParams struct {
	AppID string `json:"app_id,omitempty"`
}

AdminListOrgsParams holds optional query parameters for AdminListOrgs.

type AdminListProvidersResponse

type AdminListProvidersResponse struct {
	Providers []*AdminProvider `json:"providers"`
}

AdminListProvidersResponse represents the AdminListProvidersResponse schema.

type AdminListServiceAccountsParams

type AdminListServiceAccountsParams struct {
	AppID  string `json:"app_id,omitempty"`
	Limit  int64  `json:"limit,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

AdminListServiceAccountsParams holds optional query parameters for AdminListServiceAccounts.

type AdminListUsersParams

type AdminListUsersParams struct {
	AppID  string `json:"app_id,omitempty"`
	Email  string `json:"email,omitempty"`
	Cursor string `json:"cursor,omitempty"`
	Limit  int64  `json:"limit,omitempty"`
}

AdminListUsersParams holds optional query parameters for AdminListUsers.

type AdminPlatformOwnerResponse

type AdminPlatformOwnerResponse struct {
	RoleID string `json:"role_id"`
	Status string `json:"status"`
	UserID string `json:"user_id"`
}

AdminPlatformOwnerResponse represents the AdminPlatformOwnerResponse schema.

type AdminProvider

type AdminProvider struct {
	ClientID     string   `json:"client_id"`
	ClientSecret string   `json:"client_secret,omitempty"`
	Enabled      bool     `json:"enabled"`
	HasSecret    bool     `json:"has_secret"`
	Name         string   `json:"name"`
	RedirectURL  string   `json:"redirect_url,omitempty"`
	Scopes       []string `json:"scopes,omitempty"`
}

AdminProvider represents the AdminProvider schema.

type AdminProviderResponse

type AdminProviderResponse struct {
	Provider *AdminProvider `json:"provider"`
}

AdminProviderResponse represents the AdminProviderResponse schema.

type AdminServiceAccountAPIKeyResponse

type AdminServiceAccountAPIKeyResponse struct {
	CreatedAt       string   `json:"created_at"`
	ExpiresAt       string   `json:"expires_at,omitempty"`
	ID              string   `json:"id"`
	Key             string   `json:"key"`
	KeyPrefix       string   `json:"key_prefix"`
	Name            string   `json:"name"`
	PublicKey       string   `json:"public_key,omitempty"`
	PublicKeyPrefix string   `json:"public_key_prefix,omitempty"`
	Scopes          []string `json:"scopes,omitempty"`
}

AdminServiceAccountAPIKeyResponse represents the AdminServiceAccountAPIKeyResponse schema.

type AdminServiceAccountListResponse

type AdminServiceAccountListResponse struct {
	NextCursor      string                         `json:"next_cursor,omitempty"`
	ServiceAccounts []*AdminServiceAccountResponse `json:"service_accounts"`
	Total           int64                          `json:"total"`
}

AdminServiceAccountListResponse represents the AdminServiceAccountListResponse schema.

type AdminServiceAccountResponse

type AdminServiceAccountResponse struct {
	Active      bool     `json:"active"`
	AppID       string   `json:"app_id"`
	CreatedAt   string   `json:"created_at"`
	Description string   `json:"description,omitempty"`
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Scopes      []string `json:"scopes,omitempty"`
	UpdatedAt   string   `json:"updated_at"`
}

AdminServiceAccountResponse represents the AdminServiceAccountResponse schema.

type AdminStatsResponse

type AdminStatsResponse struct {
	TotalUsers int64 `json:"total_users"`
}

AdminStatsResponse represents the AdminStatsResponse schema.

type AdminUpdateConnectionRequest

type AdminUpdateConnectionRequest struct {
	AcsURL            string         `json:"acs_url,omitempty"`
	Active            bool           `json:"active,omitempty"`
	AllowedDomains    []string       `json:"allowed_domains,omitempty"`
	AttributeMappings map[string]any `json:"attribute_mappings,omitempty"`
	ClientID          string         `json:"client_id,omitempty"`
	ClientSecret      string         `json:"client_secret,omitempty"`
	Domain            string         `json:"domain,omitempty"`
	EntityID          string         `json:"entity_id,omitempty"`
	IdpCertificate    string         `json:"idp_certificate,omitempty"`
	IdpMetadataXML    string         `json:"idp_metadata_xml,omitempty"`
	IdpSsoURL         string         `json:"idp_sso_url,omitempty"`
	Issuer            string         `json:"issuer,omitempty"`
	MetadataURL       string         `json:"metadata_url,omitempty"`
	Provider          string         `json:"provider,omitempty"`
	SignRequests      bool           `json:"sign_requests,omitempty"`
	TrustedFederation bool           `json:"trusted_federation,omitempty"`
}

AdminUpdateConnectionRequest represents the AdminUpdateConnectionRequest schema.

type AdminUpdateUserRequest

type AdminUpdateUserRequest struct {
	EmailVerified bool   `json:"email_verified,omitempty"`
	FirstName     string `json:"first_name,omitempty"`
	LastName      string `json:"last_name,omitempty"`
	Username      string `json:"username,omitempty"`
}

AdminUpdateUserRequest represents the AdminUpdateUserRequest schema.

type AdminUpsertProviderRequest

type AdminUpsertProviderRequest struct {
	ClientID     string   `json:"client_id"`
	ClientSecret string   `json:"client_secret"`
	Enabled      bool     `json:"enabled,omitempty"`
	RedirectURL  string   `json:"redirect_url,omitempty"`
	Scopes       []string `json:"scopes,omitempty"`
}

AdminUpsertProviderRequest represents the AdminUpsertProviderRequest schema.

type AdminUserListResponse

type AdminUserListResponse struct {
	NextCursor string  `json:"next_cursor,omitempty"`
	Total      int64   `json:"total"`
	Users      []*User `json:"users"`
}

AdminUserListResponse represents the AdminUserListResponse schema.

type ApiStatusResponse

type ApiStatusResponse struct {
	Status string `json:"status"`
}

ApiStatusResponse represents the ApiStatusResponse schema.

type ApiTokenResponse

type ApiTokenResponse struct {
	ExpiresAt    string `json:"expires_at"`
	RefreshToken string `json:"refresh_token"`
	SessionToken string `json:"session_token"`
}

ApiTokenResponse represents the ApiTokenResponse schema.

type AppclientconfigConfig

type AppclientconfigConfig struct {
	AppID                    string   `json:"app_id"`
	AppName                  string   `json:"app_name,omitempty"`
	CreatedAt                string   `json:"created_at"`
	ID                       string   `json:"id"`
	LogoURL                  string   `json:"logo_url,omitempty"`
	MagicLinkEnabled         bool     `json:"magic_link_enabled,omitempty"`
	MFAEnabled               bool     `json:"mfa_enabled,omitempty"`
	MFAMethods               []string `json:"mfa_methods,omitempty"`
	MFARequired              bool     `json:"mfa_required,omitempty"`
	PasskeyEnabled           bool     `json:"passkey_enabled,omitempty"`
	PasswordEnabled          bool     `json:"password_enabled,omitempty"`
	RequireEmailVerification bool     `json:"require_email_verification,omitempty"`
	SignupEnabled            bool     `json:"signup_enabled,omitempty"`
	SocialEnabled            bool     `json:"social_enabled,omitempty"`
	SocialProviders          []string `json:"social_providers,omitempty"`
	SsoEnabled               bool     `json:"sso_enabled,omitempty"`
	UpdatedAt                string   `json:"updated_at"`
	WaitlistEnabled          bool     `json:"waitlist_enabled,omitempty"`
}

AppclientconfigConfig represents the AppclientconfigConfig schema.

type AppsessionconfigConfig

type AppsessionconfigConfig struct {
	AppID                   string `json:"app_id"`
	BindToDevice            bool   `json:"bind_to_device,omitempty"`
	BindToIP                bool   `json:"bind_to_ip,omitempty"`
	CreatedAt               string `json:"created_at"`
	ID                      string `json:"id"`
	MaxActiveSessions       int64  `json:"max_active_sessions,omitempty"`
	RefreshTokenTtlSeconds  int64  `json:"refresh_token_ttl_seconds,omitempty"`
	RotateRefreshToken      bool   `json:"rotate_refresh_token,omitempty"`
	TokenExchangeTtlSeconds int64  `json:"token_exchange_ttl_seconds,omitempty"`
	TokenFormat             string `json:"token_format,omitempty"`
	TokenTtlSeconds         int64  `json:"token_ttl_seconds,omitempty"`
	UpdatedAt               string `json:"updated_at"`
}

AppsessionconfigConfig represents the AppsessionconfigConfig schema.

type AssertionResponse

type AssertionResponse struct {
	AuthenticatorData string `json:"authenticator_data"`
	ClientDataJSON    string `json:"client_data_json"`
	Signature         string `json:"signature"`
	UserHandle        string `json:"user_handle,omitempty"`
}

AssertionResponse represents the AssertionResponse schema.

type AssignRoleRequest

type AssignRoleRequest struct {
	OrgID  string `json:"org_id,omitempty"`
	UserID string `json:"user_id"`
}

AssignRoleRequest represents the AssignRoleRequest schema.

type AttestationResponse

type AttestationResponse struct {
	AttestationObject string `json:"attestation_object"`
	ClientDataJSON    string `json:"client_data_json"`
}

AttestationResponse represents the AttestationResponse schema.

type AuthMethod

type AuthMethod struct {
	Label    string `json:"label"`
	LinkedAt string `json:"linked_at,omitempty"`
	Provider string `json:"provider"`
	Type     string `json:"type"`
}

AuthMethod represents the AuthMethod schema.

type AuthResponse

type AuthResponse struct {
	ExpiresAt    string `json:"expires_at"`
	RefreshToken string `json:"refresh_token"`
	SessionToken string `json:"session_token"`
	User         *User  `json:"user"`
}

AuthResponse represents the AuthResponse schema.

type AuthsomeAddPermissionRequest

type AuthsomeAddPermissionRequest struct {
	Action   string `json:"action"`
	Resource string `json:"resource"`
}

AuthsomeAddPermissionRequest is the request body for AuthsomeAddPermission.

type AuthsomeAssignRoleRequest

type AuthsomeAssignRoleRequest struct {
	OrgID  string `json:"org_id,omitempty"`
	UserID string `json:"user_id"`
}

AuthsomeAssignRoleRequest is the request body for AuthsomeAssignRole.

type AuthsomeCreateRoleRequest

type AuthsomeCreateRoleRequest struct {
	AppID       string `json:"app_id,omitempty"`
	Description string `json:"description,omitempty"`
	Name        string `json:"name"`
	ParentID    string `json:"parent_id,omitempty"`
	Slug        string `json:"slug"`
}

AuthsomeCreateRoleRequest is the request body for AuthsomeCreateRole.

type AuthsomeListRolesParams

type AuthsomeListRolesParams struct {
	AppID string `json:"app_id,omitempty"`
}

AuthsomeListRolesParams holds optional query parameters for AuthsomeListRoles.

type AuthsomeListUserRolesParams

type AuthsomeListUserRolesParams struct {
	AppID string `json:"app_id,omitempty"`
}

AuthsomeListUserRolesParams holds optional query parameters for AuthsomeListUserRoles.

type AuthsomeUnassignRoleRequest

type AuthsomeUnassignRoleRequest struct {
	UserID string `json:"user_id"`
}

AuthsomeUnassignRoleRequest is the request body for AuthsomeUnassignRole.

type AuthsomeUpdateRoleRequest

type AuthsomeUpdateRoleRequest struct {
	Description string `json:"description,omitempty"`
	Name        string `json:"name,omitempty"`
	ParentID    string `json:"parent_id,omitempty"`
}

AuthsomeUpdateRoleRequest is the request body for AuthsomeUpdateRole.

type BulkError

type BulkError struct {
	Email string `json:"email,omitempty"`
	Error string `json:"error"`
	Index int64  `json:"index"`
}

BulkError represents the BulkError schema.

type BulkImportResult

type BulkImportResult struct {
	Created int64        `json:"created"`
	Errors  []*BulkError `json:"errors,omitempty"`
	Skipped int64        `json:"skipped"`
}

BulkImportResult represents the BulkImportResult schema.

type BulkImportUsersRequest

type BulkImportUsersRequest struct {
	AppID string           `json:"app_id,omitempty"`
	Users []map[string]any `json:"users"`
}

BulkImportUsersRequest represents the BulkImportUsersRequest schema.

type BulkRevokeSessionsResponse

type BulkRevokeSessionsResponse struct {
	Revoked int64  `json:"revoked"`
	UserID  string `json:"user_id"`
}

BulkRevokeSessionsResponse represents the BulkRevokeSessionsResponse schema.

type CancelSubscriptionRequest

type CancelSubscriptionRequest struct {
	Immediately bool `json:"immediately"`
}

CancelSubscriptionRequest represents the CancelSubscriptionRequest schema.

type ChallengeMFARequest

type ChallengeMFARequest struct {
	Code      string `json:"code"`
	MFATicket string `json:"mfa_ticket"`
}

ChallengeMFARequest is the request body for ChallengeMFA.

type ChallengeRequest

type ChallengeRequest struct {
	Code      string `json:"code"`
	MFATicket string `json:"mfa_ticket"`
}

ChallengeRequest represents the ChallengeRequest schema.

type ChallengeResponse

type ChallengeResponse struct {
	ExpiresAt    string `json:"expires_at"`
	RefreshToken string `json:"refresh_token"`
	SessionToken string `json:"session_token"`
	User         any    `json:"user"`
}

ChallengeResponse represents the ChallengeResponse schema.

type ChangePasswordRequest

type ChangePasswordRequest struct {
	CurrentPassword string `json:"current_password"`
	NewPassword     string `json:"new_password"`
}

ChangePasswordRequest represents the ChangePasswordRequest schema.

type ChangePlanRequest

type ChangePlanRequest struct {
	NewPlanID string `json:"new_plan_id"`
}

ChangePlanRequest represents the ChangePlanRequest schema.

type ChangeSubscriptionPlanRequest

type ChangeSubscriptionPlanRequest struct {
	NewPlanID string `json:"new_plan_id"`
}

ChangeSubscriptionPlanRequest is the request body for ChangeSubscriptionPlan.

type CheckOrgSlugParams

type CheckOrgSlugParams struct {
	AppID string `json:"app_id,omitempty"`
	Slug  string `json:"slug,omitempty"`
}

CheckOrgSlugParams holds optional query parameters for CheckOrgSlug.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an HTTP client for the AuthSome API.

func NewClient

func NewClient(baseURL string, opts ...Option) *Client

NewClient creates a new AuthSome API client.

func (*Client) APIKey

func (c *Client) APIKey() string

APIKey returns the current API key.

func (*Client) AcceptInvitation

func (c *Client) AcceptInvitation(ctx context.Context, req *AcceptInvitationRequest) (*Member, error)

AcceptInvitation — Accept invitation

func (*Client) ActivateBillingPlan

func (c *Client) ActivateBillingPlan(ctx context.Context, planId string) error

ActivateBillingPlan — Activate a billing plan

func (*Client) AddMember

func (c *Client) AddMember(ctx context.Context, orgId string, req *AddMemberRequest) (*Member, error)

AddMember — Add member

func (*Client) AdminBanUser

func (c *Client) AdminBanUser(ctx context.Context, userId string, req *AdminBanUserRequest) (*ApiStatusResponse, error)

AdminBanUser — Ban user (admin)

func (*Client) AdminBulkImportUsers

func (c *Client) AdminBulkImportUsers(ctx context.Context, req *AdminBulkImportUsersRequest) (*BulkImportResult, error)

AdminBulkImportUsers — Bulk import users (admin)

func (*Client) AdminBulkRevokeSessions

func (c *Client) AdminBulkRevokeSessions(ctx context.Context, params *AdminBulkRevokeSessionsParams) (*BulkRevokeSessionsResponse, error)

AdminBulkRevokeSessions — Bulk revoke sessions (admin)

func (*Client) AdminCopyUser

func (c *Client) AdminCopyUser(ctx context.Context, req *AdminCopyUserRequest) (*User, error)

AdminCopyUser — Copy user to another app (admin)

func (*Client) AdminCreateApp

func (c *Client) AdminCreateApp(ctx context.Context, req *AdminCreateAppRequest) (*AdminAppResponse, error)

AdminCreateApp — Create application (admin)

func (*Client) AdminCreateAppWithHint

func (c *Client) AdminCreateAppWithHint(ctx context.Context, req *AdminCreateAppRequest) (*AdminAppResponse, error)

AdminCreateAppWithHint is a thin wrapper over the generated AdminCreateApp that augments a 403 response with a pointer at the most-likely cause: the user the API key is bound to lacks the `manage:user` permission. Operators routinely mint a key as a regular signed-up user, then spend hours debugging why AdminCreateApp returns "insufficient permissions" — this hint points them at the role assignment instead.

Common failure modes (see ClientError.StatusCode):

  • 401 with "X-App-ID was not sent": manifest discovery failed. Pass WithAppID(platformAppID) explicitly.
  • 401 otherwise: key invalid, revoked, or minted under a different App than the one we're sending in X-App-ID.
  • 403: authentication succeeded, but the bound user lacks `manage:user`. Wrapped with a hint pointing at platform_admin.

func (*Client) AdminCreateServiceAccount

func (c *Client) AdminCreateServiceAccount(ctx context.Context, req *AdminCreateServiceAccountRequest) (*AdminServiceAccountResponse, error)

AdminCreateServiceAccount — Create service account (admin)

func (*Client) AdminCreateServiceAccountAPIKey

func (c *Client) AdminCreateServiceAccountAPIKey(ctx context.Context, serviceAccountId string, req *AdminCreateServiceAccountAPIKeyRequest) (*AdminServiceAccountAPIKeyResponse, error)

AdminCreateServiceAccountAPIKey — Create service account API key (admin)

func (*Client) AdminCreateUser

func (c *Client) AdminCreateUser(ctx context.Context, req *AdminCreateUserRequest) (*User, error)

AdminCreateUser — Create user (admin)

func (*Client) AdminDeleteApp

func (c *Client) AdminDeleteApp(ctx context.Context, appId string) (*ApiStatusResponse, error)

AdminDeleteApp — Delete application (admin)

func (*Client) AdminDeleteServiceAccount

func (c *Client) AdminDeleteServiceAccount(ctx context.Context, serviceAccountId string) (*ApiStatusResponse, error)

AdminDeleteServiceAccount — Delete service account (admin)

func (*Client) AdminDeleteUser

func (c *Client) AdminDeleteUser(ctx context.Context, userId string) (*ApiStatusResponse, error)

AdminDeleteUser — Delete user (admin)

func (*Client) AdminGetServiceAccount

func (c *Client) AdminGetServiceAccount(ctx context.Context, serviceAccountId string) (*AdminServiceAccountResponse, error)

AdminGetServiceAccount — Get service account (admin)

func (*Client) AdminGetStats

func (c *Client) AdminGetStats(ctx context.Context, params *AdminGetStatsParams) (*AdminStatsResponse, error)

AdminGetStats — Get stats (admin)

func (*Client) AdminGetUser

func (c *Client) AdminGetUser(ctx context.Context, userId string) (*User, error)

AdminGetUser — Get user (admin)

func (*Client) AdminGrantPlatformOwner

func (c *Client) AdminGrantPlatformOwner(ctx context.Context, req *AdminGrantPlatformOwnerRequest) (*AdminPlatformOwnerResponse, error)

AdminGrantPlatformOwner — Grant platform-owner role (admin)

func (*Client) AdminImpersonate

func (c *Client) AdminImpersonate(ctx context.Context, userId string) (*AuthResponse, error)

AdminImpersonate — Impersonate user (admin)

func (*Client) AdminListOrgs

func (c *Client) AdminListOrgs(ctx context.Context, params *AdminListOrgsParams) (*OrgListResponse, error)

AdminListOrgs — List organizations (admin)

func (*Client) AdminListServiceAccounts

func (c *Client) AdminListServiceAccounts(ctx context.Context, params *AdminListServiceAccountsParams) (*AdminServiceAccountListResponse, error)

AdminListServiceAccounts — List service accounts (admin)

func (*Client) AdminListUsers

func (c *Client) AdminListUsers(ctx context.Context, params *AdminListUsersParams) (*AdminUserListResponse, error)

AdminListUsers — List users (admin)

func (*Client) AdminListUsersInApp

func (c *Client) AdminListUsersInApp(ctx context.Context, appID, email, cursor string, limit int) (*AdminUserListResponse, error)

AdminListUsersInApp lists users scoped to a specific App. Supplies the app_id, email, cursor, and limit query params understood by the /v1/admin/users handler. Empty fields are omitted from the URL.

func (*Client) AdminRevokePlatformOwner

func (c *Client) AdminRevokePlatformOwner(ctx context.Context, userID string) (*AdminPlatformOwnerResponse, error)

AdminRevokePlatformOwner — Revoke platform-owner role (admin)

func (*Client) AdminStopImpersonation

func (c *Client) AdminStopImpersonation(ctx context.Context) (*ApiStatusResponse, error)

AdminStopImpersonation — Stop impersonation (admin)

func (*Client) AdminUnbanUser

func (c *Client) AdminUnbanUser(ctx context.Context, userId string) (*ApiStatusResponse, error)

AdminUnbanUser — Unban user (admin)

func (*Client) AdminUnlockUser

func (c *Client) AdminUnlockUser(ctx context.Context, userId string) (*ApiStatusResponse, error)

AdminUnlockUser — Unlock user (admin)

func (*Client) AdminUpdateUser

func (c *Client) AdminUpdateUser(ctx context.Context, userId string, req *AdminUpdateUserRequest) (*User, error)

AdminUpdateUser — Update user (admin)

func (*Client) AppID

func (c *Client) AppID() string

AppID returns the current App ID.

func (*Client) ArchiveBillingPlan

func (c *Client) ArchiveBillingPlan(ctx context.Context, planId string) error

ArchiveBillingPlan — Archive a billing plan

func (*Client) AuthsomeAddPermission

func (c *Client) AuthsomeAddPermission(ctx context.Context, roleId string, req *AuthsomeAddPermissionRequest) (*Permission, error)

AuthsomeAddPermission — Add permission to role

func (*Client) AuthsomeAssignRole

func (c *Client) AuthsomeAssignRole(ctx context.Context, roleId string, req *AuthsomeAssignRoleRequest) (*ApiStatusResponse, error)

AuthsomeAssignRole — Assign role to user

func (*Client) AuthsomeCreateRole

func (c *Client) AuthsomeCreateRole(ctx context.Context, req *AuthsomeCreateRoleRequest) (*Role, error)

AuthsomeCreateRole — Create role

func (*Client) AuthsomeDeleteRole

func (c *Client) AuthsomeDeleteRole(ctx context.Context, roleId string) (*ApiStatusResponse, error)

AuthsomeDeleteRole — Delete role

func (*Client) AuthsomeGetRole

func (c *Client) AuthsomeGetRole(ctx context.Context, roleId string) (*Role, error)

AuthsomeGetRole — Get role

func (*Client) AuthsomeListRolePermissions

func (c *Client) AuthsomeListRolePermissions(ctx context.Context, roleId string) (*PermissionListResponse, error)

AuthsomeListRolePermissions — List role permissions

func (*Client) AuthsomeListRoles

func (c *Client) AuthsomeListRoles(ctx context.Context, params *AuthsomeListRolesParams) (*RoleListResponse, error)

AuthsomeListRoles — List roles

func (*Client) AuthsomeListRolesInApp

func (c *Client) AuthsomeListRolesInApp(ctx context.Context, appID string) (*RoleListResponse, error)

AuthsomeListRolesInApp — List roles scoped to an explicit app_id. The bare AuthsomeListRoles uses whatever app the engine derives from the call's auth context (which falls back to the configured default app); this variant lets cross-app admin clients (e.g. TwinOS studio, which runs one query per workspace) target a specific app without switching credentials.

func (*Client) AuthsomeListUserRoles

func (c *Client) AuthsomeListUserRoles(ctx context.Context, userId string, params *AuthsomeListUserRolesParams) (*UserRoleListResponse, error)

AuthsomeListUserRoles — List user roles

func (*Client) AuthsomeListUserRolesInApp

func (c *Client) AuthsomeListUserRolesInApp(ctx context.Context, userID, appID string) (*UserRoleListResponse, error)

AuthsomeListUserRolesInApp — List user roles scoped to an explicit app_id. The bare AuthsomeListUserRoles uses the engine's platform app, which is wrong for cross-app admin tooling: TwinOS studio's API key authenticates against the platform app but role assignments live in per-workspace apps. Pass the workspace's AppID here so the engine's ListUserRolesInApp queries the right tenant.

func (*Client) AuthsomeRemovePermission

func (c *Client) AuthsomeRemovePermission(ctx context.Context, roleId string, permissionId string) (*ApiStatusResponse, error)

AuthsomeRemovePermission — Remove permission from role

func (*Client) AuthsomeUnassignRole

func (c *Client) AuthsomeUnassignRole(ctx context.Context, roleId string, req *AuthsomeUnassignRoleRequest) (*ApiStatusResponse, error)

AuthsomeUnassignRole — Unassign role from user

func (*Client) AuthsomeUpdateRole

func (c *Client) AuthsomeUpdateRole(ctx context.Context, roleId string, req *AuthsomeUpdateRoleRequest) (*Role, error)

AuthsomeUpdateRole — Update role

func (*Client) BaseURL

func (c *Client) BaseURL() string

BaseURL returns the client's base URL. Useful for creating request-scoped clients that inherit the same server address.

func (*Client) CancelSubscription

func (c *Client) CancelSubscription(ctx context.Context, subId string, req *CancelSubscriptionRequest) error

CancelSubscription — Cancel subscription

func (*Client) ChallengeMFA

func (c *Client) ChallengeMFA(ctx context.Context, req *ChallengeMFARequest) (*ChallengeResponse, error)

ChallengeMFA — MFA challenge

func (*Client) ChangePassword

func (c *Client) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*ApiStatusResponse, error)

ChangePassword — Change password

func (*Client) ChangeSubscriptionPlan

func (c *Client) ChangeSubscriptionPlan(ctx context.Context, subId string, req *ChangeSubscriptionPlanRequest) error

ChangeSubscriptionPlan — Change subscription plan

func (*Client) CheckEntitlement

func (c *Client) CheckEntitlement(ctx context.Context, featureKey string) (*EntitlementResponse, error)

CheckEntitlement — Check feature entitlement

func (*Client) CheckOrgSlug

func (c *Client) CheckOrgSlug(ctx context.Context, params *CheckOrgSlugParams) (*SlugAvailableResponse, error)

CheckOrgSlug — Check slug availability

func (*Client) CloneEnvironment

func (c *Client) CloneEnvironment(ctx context.Context, envId string, req *CloneEnvironmentRequest) (*CloneEnvironmentResponse, error)

CloneEnvironment — Clone environment

func (*Client) CreateAPIKey

func (c *Client) CreateAPIKey(ctx context.Context, req *CreateAPIKeyRequest) (*CreateKeyResponse, error)

CreateAPIKey — Create API key

func (*Client) CreateBillingPlan

func (c *Client) CreateBillingPlan(ctx context.Context, req *CreateBillingPlanRequest) (*PlanResponse, error)

CreateBillingPlan — Create billing plan

func (*Client) CreateCoupon

func (c *Client) CreateCoupon(ctx context.Context, req *CreateCouponRequest) (*CouponResponse, error)

CreateCoupon — Create coupon

func (*Client) CreateEnvironment

func (c *Client) CreateEnvironment(ctx context.Context, req *CreateEnvironmentRequest) (*Environment, error)

CreateEnvironment — Create environment

func (*Client) CreateInvitation

func (c *Client) CreateInvitation(ctx context.Context, orgId string, req *CreateInvitationRequest) (*Invitation, error)

CreateInvitation — Create invitation

func (*Client) CreateOAuth2Client

func (c *Client) CreateOAuth2Client(ctx context.Context, req *CreateOAuth2ClientRequest) (*CreateClientResponse, error)

CreateOAuth2Client — Create OAuth2 client

func (*Client) CreateOrganization

func (c *Client) CreateOrganization(ctx context.Context, req *CreateOrganizationRequest) (*Organization, error)

CreateOrganization — Create organization

func (*Client) CreateSubscription

func (c *Client) CreateSubscription(ctx context.Context, req *CreateSubscriptionRequest) (*Response, error)

CreateSubscription — Create subscription

func (*Client) CreateTeam

func (c *Client) CreateTeam(ctx context.Context, orgId string, req *CreateTeamRequest) (*Team, error)

CreateTeam — Create team

func (*Client) CreateWebhook

func (c *Client) CreateWebhook(ctx context.Context, req *CreateWebhookRequest) (*CreateWebhookResponse, error)

CreateWebhook — Create webhook

func (*Client) DeclineInvitation

func (c *Client) DeclineInvitation(ctx context.Context, req *DeclineInvitationRequest) (*OrganizationStatusResponse, error)

DeclineInvitation — Decline invitation

func (*Client) DeleteAccount

func (c *Client) DeleteAccount(ctx context.Context) (*ApiStatusResponse, error)

DeleteAccount — Delete account

func (*Client) DeleteAppClientConfig

func (c *Client) DeleteAppClientConfig(ctx context.Context, appId string) (*ApiStatusResponse, error)

DeleteAppClientConfig — Delete per-app client config overrides

func (*Client) DeleteAppSessionConfig

func (c *Client) DeleteAppSessionConfig(ctx context.Context, appId string) (*ApiStatusResponse, error)

DeleteAppSessionConfig — Delete per-app session config

func (*Client) DeleteCoupon

func (c *Client) DeleteCoupon(ctx context.Context, couponId string) error

DeleteCoupon — Delete coupon

func (*Client) DeleteDevice

func (c *Client) DeleteDevice(ctx context.Context, deviceId string) (*ApiStatusResponse, error)

DeleteDevice — Delete device

func (*Client) DeleteEnvironment

func (c *Client) DeleteEnvironment(ctx context.Context, envId string) (*ApiStatusResponse, error)

DeleteEnvironment — Delete environment

func (*Client) DeleteOAuth2Client

func (c *Client) DeleteOAuth2Client(ctx context.Context, clientId string) error

DeleteOAuth2Client — Delete OAuth2 client

func (*Client) DeleteOrganization

func (c *Client) DeleteOrganization(ctx context.Context, orgId string) (*OrganizationStatusResponse, error)

DeleteOrganization — Delete organization

func (*Client) DeletePasskey

func (c *Client) DeletePasskey(ctx context.Context, credentialId string) (*DeleteResponse, error)

DeletePasskey — Delete passkey

func (*Client) DeleteSetting

func (c *Client) DeleteSetting(ctx context.Context, key string, params *DeleteSettingParams) (*ApiStatusResponse, error)

DeleteSetting — Delete a setting override at a scope

func (*Client) DeleteTeam

func (c *Client) DeleteTeam(ctx context.Context, orgId string, teamId string) (*OrganizationStatusResponse, error)

DeleteTeam — Delete team

func (*Client) DeleteWebhook

func (c *Client) DeleteWebhook(ctx context.Context, webhookId string) (*ApiStatusResponse, error)

DeleteWebhook — Delete webhook

func (*Client) DisableMFA

func (c *Client) DisableMFA(ctx context.Context, req *DisableMFARequest) (*DisableResponse, error)

DisableMFA — Disable MFA

func (*Client) EnforceSetting

func (c *Client) EnforceSetting(ctx context.Context, key string, req *EnforceSettingRequest) (*SettingValueResponse, error)

EnforceSetting — Enforce a setting value at a scope

func (*Client) EnrollMFA

func (c *Client) EnrollMFA(ctx context.Context, req *EnrollMFARequest) (*EnrollResponse, error)

EnrollMFA — Enroll in MFA

func (*Client) ExchangeToken

func (c *Client) ExchangeToken(ctx context.Context, req *ExchangeTokenRequest) (*TokenExchangeResponse, error)

ExchangeToken — Exchange a credential for a delegated session

func (*Client) ExportUserData

func (c *Client) ExportUserData(ctx context.Context) (*map[string]any, error)

ExportUserData — Export user data

func (*Client) ForgotPassword

func (c *Client) ForgotPassword(ctx context.Context, req *ForgotPasswordRequest) (*ForgotPasswordResponse, error)

ForgotPassword — Forgot password

func (*Client) GetActiveSubscription

func (c *Client) GetActiveSubscription(ctx context.Context, params *GetActiveSubscriptionParams) (*Response, error)

GetActiveSubscription — Get active subscription

func (*Client) GetAppClientConfig

func (c *Client) GetAppClientConfig(ctx context.Context, appId string) (*AppclientconfigConfig, error)

GetAppClientConfig — Get per-app client config overrides

func (*Client) GetAppSessionConfig

func (c *Client) GetAppSessionConfig(ctx context.Context, appId string) (*AppsessionconfigConfig, error)

GetAppSessionConfig — Get per-app session config

func (*Client) GetBillingPlan

func (c *Client) GetBillingPlan(ctx context.Context, planId string) (*PlanResponse, error)

GetBillingPlan — Get billing plan

func (*Client) GetClientConfig

func (c *Client) GetClientConfig(ctx context.Context, params *GetClientConfigParams) (*ClientConfigResponse, error)

GetClientConfig — Get client configuration

func (*Client) GetDevice

func (c *Client) GetDevice(ctx context.Context, deviceId string) (*Device, error)

GetDevice — Get device

func (*Client) GetEnvironment

func (c *Client) GetEnvironment(ctx context.Context, envId string) (*Environment, error)

GetEnvironment — Get environment

func (*Client) GetEnvironmentSettings

func (c *Client) GetEnvironmentSettings(ctx context.Context, envId string) (*EnvironmentSettingsResponse, error)

GetEnvironmentSettings — Get environment settings

func (*Client) GetHealth

func (c *Client) GetHealth(ctx context.Context) (*HealthResponse, error)

GetHealth — Health check

func (*Client) GetInvoice

func (c *Client) GetInvoice(ctx context.Context, invoiceId string) (*InvoiceResponse, error)

GetInvoice — Get invoice

func (*Client) GetManifest

func (c *Client) GetManifest(ctx context.Context) (*map[string]any, error)

GetManifest — Get AuthSome manifest

func (*Client) GetMe

func (c *Client) GetMe(ctx context.Context) (*MeResponse, error)

GetMe — Get current user

func (*Client) GetOpenAPI

func (c *Client) GetOpenAPI(ctx context.Context) (*map[string]any, error)

GetOpenAPI — Get OpenAPI specification

func (*Client) GetOrganization

func (c *Client) GetOrganization(ctx context.Context, orgId string) (*Organization, error)

GetOrganization — Get organization

func (*Client) GetTeam

func (c *Client) GetTeam(ctx context.Context, orgId string, teamId string) (*Team, error)

GetTeam — Get team

func (*Client) GetUsageSummary

func (c *Client) GetUsageSummary(ctx context.Context, params *GetUsageSummaryParams) (*UsageSummaryResponse, error)

GetUsageSummary — Get usage summary

func (*Client) GetWebhook

func (c *Client) GetWebhook(ctx context.Context, webhookId string) (*Webhook, error)

GetWebhook — Get webhook

func (*Client) GrantConsent

func (c *Client) GrantConsent(ctx context.Context, req *GrantConsentRequest) (*Consent, error)

GrantConsent — Grant consent

func (*Client) Introspect

func (c *Client) Introspect(ctx context.Context, token string) (*IntrospectResponse, error)

Introspect validates a token via the authsome introspection endpoint. Returns the token's identity claims if active, or {Active: false} if the token is invalid or expired. This follows RFC 7662 semantics.

func (*Client) IntrospectToken

func (c *Client) IntrospectToken(ctx context.Context, req *IntrospectTokenRequest) (*IntrospectResponse, error)

IntrospectToken — Introspect token

func (*Client) ListAPIKeys

func (c *Client) ListAPIKeys(ctx context.Context, params *ListAPIKeysParams) (*ListKeysResponse, error)

ListAPIKeys — List API keys

func (*Client) ListAuthMethods

func (c *Client) ListAuthMethods(ctx context.Context) (*ListAuthMethodsResponse, error)

ListAuthMethods — List linked auth methods

func (*Client) ListBillingPlans

func (c *Client) ListBillingPlans(ctx context.Context, params *ListBillingPlansParams) (*ListPlansResponse, error)

ListBillingPlans — List billing plans

func (*Client) ListConsents

func (c *Client) ListConsents(ctx context.Context, params *ListConsentsParams) (*ConsentListResponse, error)

ListConsents — List consents

func (*Client) ListCoupons

func (c *Client) ListCoupons(ctx context.Context, params *ListCouponsParams) (*ListCouponsResponse, error)

ListCoupons — List coupons

func (*Client) ListDevices

func (c *Client) ListDevices(ctx context.Context) (*DeviceListResponse, error)

ListDevices — List devices

func (*Client) ListEnvironments

func (c *Client) ListEnvironments(ctx context.Context, params *ListEnvironmentsParams) (*EnvironmentListResponse, error)

ListEnvironments — List environments

func (*Client) ListInvitations

func (c *Client) ListInvitations(ctx context.Context, orgId string, params *ListInvitationsParams) (*InvitationListResponse, error)

ListInvitations — List invitations

func (*Client) ListInvoices

func (c *Client) ListInvoices(ctx context.Context, params *ListInvoicesParams) (*ListInvoicesResponse, error)

ListInvoices — List invoices

func (*Client) ListMembers

func (c *Client) ListMembers(ctx context.Context, orgId string, params *ListMembersParams) (*MemberListResponse, error)

ListMembers — List members

func (*Client) ListMyDelegations

func (c *Client) ListMyDelegations(ctx context.Context) (*DelegationListResponse, error)

ListMyDelegations — List what may act on your behalf

func (*Client) ListNamespaceSettingsDefinitions

func (c *Client) ListNamespaceSettingsDefinitions(ctx context.Context, namespace string) (*ListDefinitionsResponse, error)

ListNamespaceSettingsDefinitions — List definitions for a namespace

func (*Client) ListOAuth2Clients

func (c *Client) ListOAuth2Clients(ctx context.Context, params *ListOAuth2ClientsParams) (*ListClientsResponse, error)

ListOAuth2Clients — List OAuth2 clients

func (*Client) ListOrganizations

func (c *Client) ListOrganizations(ctx context.Context, params *ListOrganizationsParams) (*OrgListResponse, error)

ListOrganizations — List organizations

func (*Client) ListPasskeys

func (c *Client) ListPasskeys(ctx context.Context) (*PasskeyListResponse, error)

ListPasskeys — List passkeys

func (*Client) ListSessions

func (c *Client) ListSessions(ctx context.Context, params *ListSessionsParams) (*SessionListResponse, error)

ListSessions — List sessions

func (*Client) ListSettingsDefinitions

func (c *Client) ListSettingsDefinitions(ctx context.Context, params *ListSettingsDefinitionsParams) (*ListDefinitionsResponse, error)

ListSettingsDefinitions — List all setting definitions

func (*Client) ListSubscriptions

func (c *Client) ListSubscriptions(ctx context.Context, params *ListSubscriptionsParams) (*ListSubscriptionsResponse, error)

ListSubscriptions — List subscriptions

func (*Client) ListTeams

func (c *Client) ListTeams(ctx context.Context, orgId string, params *ListTeamsParams) (*TeamListResponse, error)

ListTeams — List teams

func (*Client) ListWebhooks

func (c *Client) ListWebhooks(ctx context.Context, params *ListWebhooksParams) (*WebhookListResponse, error)

ListWebhooks — List webhooks

func (*Client) MarkInvoicePaid

func (c *Client) MarkInvoicePaid(ctx context.Context, invoiceId string, req *MarkInvoicePaidRequest) error

MarkInvoicePaid — Mark invoice as paid

func (*Client) MintChildPrincipal

func (c *Client) MintChildPrincipal(ctx context.Context, id string, req *MintChildPrincipalRequest) (*MintChildResponse, error)

MintChildPrincipal — Mint an ephemeral child principal

func (*Client) Oauth2Authorize

func (c *Client) Oauth2Authorize(ctx context.Context, params *Oauth2AuthorizeParams) error

Oauth2Authorize — OAuth2 Authorization

func (*Client) Oauth2ConsentDecision

func (c *Client) Oauth2ConsentDecision(ctx context.Context) error

Oauth2ConsentDecision — OAuth2 consent decision

func (*Client) Oauth2ConsentPage

func (c *Client) Oauth2ConsentPage(ctx context.Context) error

Oauth2ConsentPage — OAuth2 consent

func (*Client) Oauth2DeleteRegistration

func (c *Client) Oauth2DeleteRegistration(ctx context.Context, clientId string) error

Oauth2DeleteRegistration — Delete OAuth2 client registration

func (*Client) Oauth2DeviceAuthorize

func (c *Client) Oauth2DeviceAuthorize(ctx context.Context, req *Oauth2DeviceAuthorizeRequest) (*DeviceAuthResponse, error)

Oauth2DeviceAuthorize — Device Authorization

func (*Client) Oauth2DeviceComplete

func (c *Client) Oauth2DeviceComplete(ctx context.Context, req *Oauth2DeviceCompleteRequest) (*DeviceCompleteResponse, error)

Oauth2DeviceComplete — Complete device authorization

func (*Client) Oauth2ListMyGrants

func (c *Client) Oauth2ListMyGrants(ctx context.Context) (*ListGrantsResponse, error)

Oauth2ListMyGrants — List my OAuth2 grants

func (*Client) Oauth2ReadRegistration

func (c *Client) Oauth2ReadRegistration(ctx context.Context, clientId string) (*RegisterClientResponse, error)

Oauth2ReadRegistration — Read OAuth2 client registration

func (*Client) Oauth2RegisterClient

func (c *Client) Oauth2RegisterClient(ctx context.Context, req *Oauth2RegisterClientRequest) (*RegisterClientResponse, error)

Oauth2RegisterClient — Register OAuth2 client

func (*Client) Oauth2Revoke

func (c *Client) Oauth2Revoke(ctx context.Context, req *Oauth2RevokeRequest) error

Oauth2Revoke — Revoke token

func (*Client) Oauth2RevokeMyGrant

func (c *Client) Oauth2RevokeMyGrant(ctx context.Context, clientId string) error

Oauth2RevokeMyGrant — Revoke an OAuth2 grant

func (*Client) Oauth2Token

Oauth2Token — OAuth2 Token

func (*Client) Oauth2UpdateRegistration

func (c *Client) Oauth2UpdateRegistration(ctx context.Context, clientId string, req *Oauth2UpdateRegistrationRequest) (*RegisterClientResponse, error)

Oauth2UpdateRegistration — Update OAuth2 client registration

func (*Client) Oauth2UserInfo

func (c *Client) Oauth2UserInfo(ctx context.Context) (*UserInfo, error)

Oauth2UserInfo — OIDC UserInfo

func (*Client) OauthCallback

func (c *Client) OauthCallback(ctx context.Context, provider string, params *OauthCallbackParams) (*SocialCallbackResponse, error)

OauthCallback — OAuth callback

func (*Client) OidcDiscoveryPrefixed

func (c *Client) OidcDiscoveryPrefixed(ctx context.Context) (*DiscoveryResponse, error)

OidcDiscoveryPrefixed — OpenID Connect Discovery

func (*Client) PasskeyLoginBegin

func (c *Client) PasskeyLoginBegin(ctx context.Context) (*LoginBeginResponse, error)

PasskeyLoginBegin — Begin passkey login

func (*Client) PasskeyLoginFinish

func (c *Client) PasskeyLoginFinish(ctx context.Context, req *PasskeyLoginFinishRequest) (*LoginFinishResponse, error)

PasskeyLoginFinish — Complete passkey login

func (*Client) PasskeyRegisterBegin

func (c *Client) PasskeyRegisterBegin(ctx context.Context, req *PasskeyRegisterBeginRequest) (*RegisterBeginResponse, error)

PasskeyRegisterBegin — Begin passkey registration

func (*Client) PasskeyRegisterFinish

func (c *Client) PasskeyRegisterFinish(ctx context.Context, req *PasskeyRegisterFinishRequest) (*RegisterFinishResponse, error)

PasskeyRegisterFinish — Complete passkey registration

func (*Client) PauseSubscription

func (c *Client) PauseSubscription(ctx context.Context, subId string) error

PauseSubscription — Pause subscription

func (*Client) PhoneAuthStart

func (c *Client) PhoneAuthStart(ctx context.Context, req *PhoneAuthStartRequest) (*PhoneStartResponse, error)

PhoneAuthStart — Start phone authentication

func (*Client) PhoneAuthVerify

func (c *Client) PhoneAuthVerify(ctx context.Context, req *PhoneAuthVerifyRequest) (*PhoneVerifyResponse, error)

PhoneAuthVerify — Verify phone OTP

func (*Client) PublishableKey

func (c *Client) PublishableKey() string

PublishableKey returns the current publishable key.

func (*Client) RefreshTokens

func (c *Client) RefreshTokens(ctx context.Context, req *RefreshTokensRequest) (*ApiTokenResponse, error)

RefreshTokens — Refresh tokens

func (*Client) RefreshTokensWithCookies

func (c *Client) RefreshTokensWithCookies(ctx context.Context, cookieHeader string) (*RefreshedSession, error)

RefreshTokensWithCookies rotates the session carried by cookieHeader and returns the new tokens together with the identity server's Set-Cookie headers.

POST /v1/refresh is cookie-first: when the request carries a valid session cookie, the server rotates using that session's *current* server-side refresh token rather than one supplied in the body (api/auth_handlers.go, handleRefresh). That is what makes this call possible from a client-mode service, which sees the user's access token but never their refresh token — forwarding the browser's own Cookie header is enough, and no request body is needed.

Two deliberate differences from the generated RefreshTokens:

  • The call carries NO service credentials. /v1/refresh is registered with auth "none", and sending this service's API key alongside a user cookie would only muddy which principal the server is acting for. The cookie is the whole credential.
  • Response headers are returned rather than discarded, for the reason on RefreshedSession.SetCookies above.

cookieHeader is the raw Cookie header from the inbound browser request. An empty cookieHeader is refused before any HTTP call: without it the server would fall through to its body-token branch and answer 400, which is a round-trip spent to learn something already known here.

func (*Client) RegenerateMFARecoveryCodes

func (c *Client) RegenerateMFARecoveryCodes(ctx context.Context) (*RecoveryRegenerateResponse, error)

RegenerateMFARecoveryCodes — Regenerate MFA recovery codes

func (*Client) RemoveMember

func (c *Client) RemoveMember(ctx context.Context, orgId string, memberId string) (*OrganizationStatusResponse, error)

RemoveMember — Remove member

func (*Client) ResendEmailVerification

func (c *Client) ResendEmailVerification(ctx context.Context, req *ResendEmailVerificationRequest) (*ApiStatusResponse, error)

ResendEmailVerification — Resend email verification

func (*Client) ResetPassword

func (c *Client) ResetPassword(ctx context.Context, req *ResetPasswordRequest) (*ApiStatusResponse, error)

ResetPassword — Reset password

func (*Client) ResolveSetting

func (c *Client) ResolveSetting(ctx context.Context, key string, params *ResolveSettingParams) (*ResolvedSettingResponse, error)

ResolveSetting — Resolve one setting with cascade details

func (*Client) ResolveSettings

func (c *Client) ResolveSettings(ctx context.Context, params *ResolveSettingsParams) (*ResolvedSettingsResponse, error)

ResolveSettings — Resolve all settings at a scope

func (*Client) ResumeSubscription

func (c *Client) ResumeSubscription(ctx context.Context, subId string) error

ResumeSubscription — Resume subscription

func (*Client) RevokeAPIKey

func (c *Client) RevokeAPIKey(ctx context.Context, keyId string) error

RevokeAPIKey — Revoke API key

func (*Client) RevokeConsent

func (c *Client) RevokeConsent(ctx context.Context, req *RevokeConsentRequest) (*ConsentStatusResponse, error)

RevokeConsent — Revoke consent

func (*Client) RevokeOtherSessions

func (c *Client) RevokeOtherSessions(ctx context.Context) (*ApiStatusResponse, error)

RevokeOtherSessions — Revoke other sessions

func (*Client) RevokeSession

func (c *Client) RevokeSession(ctx context.Context, sessionId string) (*ApiStatusResponse, error)

RevokeSession — Revoke session

func (*Client) RotateOAuth2ClientSecret

func (c *Client) RotateOAuth2ClientSecret(ctx context.Context, clientId string) (*RotateClientSecretResponse, error)

RotateOAuth2ClientSecret — Rotate OAuth2 client secret

func (*Client) RotateWebhookSecret

func (c *Client) RotateWebhookSecret(ctx context.Context, webhookId string) (*RotateWebhookSecretResponse, error)

RotateWebhookSecret — Rotate webhook secret

func (*Client) ScimCreateGroup

func (c *Client) ScimCreateGroup(ctx context.Context) (*GroupResource, error)

ScimCreateGroup — Create SCIM Group

func (*Client) ScimCreateUser

func (c *Client) ScimCreateUser(ctx context.Context) (*UserResource, error)

ScimCreateUser — Create SCIM User

func (*Client) ScimDeleteGroup

func (c *Client) ScimDeleteGroup(ctx context.Context, groupId string) (*Empty, error)

ScimDeleteGroup — Delete SCIM Group

func (*Client) ScimDeleteUser

func (c *Client) ScimDeleteUser(ctx context.Context, userId string) (*Empty, error)

ScimDeleteUser — Delete SCIM User

func (*Client) ScimGetGroup

func (c *Client) ScimGetGroup(ctx context.Context, groupId string) (*GroupResource, error)

ScimGetGroup — Get SCIM Group

func (*Client) ScimGetUser

func (c *Client) ScimGetUser(ctx context.Context, userId string) (*UserResource, error)

ScimGetUser — Get SCIM User

func (*Client) ScimListGroups

func (c *Client) ScimListGroups(ctx context.Context) (*ScimListResponse, error)

ScimListGroups — List SCIM Groups

func (*Client) ScimListUsers

func (c *Client) ScimListUsers(ctx context.Context) (*ScimListResponse, error)

ScimListUsers — List SCIM Users

func (*Client) ScimPatchGroup

func (c *Client) ScimPatchGroup(ctx context.Context, groupId string) (*GroupResource, error)

ScimPatchGroup — Patch SCIM Group

func (*Client) ScimPatchUser

func (c *Client) ScimPatchUser(ctx context.Context, userId string) (*UserResource, error)

ScimPatchUser — Patch SCIM User

func (*Client) ScimReplaceGroup

func (c *Client) ScimReplaceGroup(ctx context.Context, groupId string) (*GroupResource, error)

ScimReplaceGroup — Replace SCIM Group

func (*Client) ScimReplaceUser

func (c *Client) ScimReplaceUser(ctx context.Context, userId string) (*UserResource, error)

ScimReplaceUser — Replace SCIM User

func (*Client) ScimResourceTypes

func (c *Client) ScimResourceTypes(ctx context.Context) (*ResourceTypeList, error)

ScimResourceTypes — SCIM Resource Types

func (*Client) ScimSchemas

func (c *Client) ScimSchemas(ctx context.Context) (*SchemaList, error)

ScimSchemas — SCIM Schemas

func (*Client) ScimServiceProviderConfig

func (c *Client) ScimServiceProviderConfig(ctx context.Context) (*ServiceProviderConfig, error)

ScimServiceProviderConfig — SCIM Service Provider Configuration

func (c *Client) SendMagicLink(ctx context.Context, req *SendMagicLinkRequest) (*SendResponse, error)

SendMagicLink — Send magic link

func (*Client) SendSMSCode

func (c *Client) SendSMSCode(ctx context.Context, req *SendSMSCodeRequest) (*SMSSendResponse, error)

SendSMSCode — Send SMS verification code

func (*Client) SetAPIKey

func (c *Client) SetAPIKey(key string)

SetAPIKey updates the API key. Same validation as WithAPIKey: publishable keys (pk_*) are rejected.

func (*Client) SetAppClientConfig

func (c *Client) SetAppClientConfig(ctx context.Context, appId string, req *SetAppClientConfigRequest) (*AppclientconfigConfig, error)

SetAppClientConfig — Set per-app client config overrides

func (*Client) SetAppID

func (c *Client) SetAppID(appID string)

SetAppID updates the App ID stamped onto every request as X-App-ID.

func (*Client) SetAppSessionConfig

func (c *Client) SetAppSessionConfig(ctx context.Context, appId string, req *SetAppSessionConfigRequest) (*AppsessionconfigConfig, error)

SetAppSessionConfig — Set per-app session config

func (*Client) SetDefaultEnvironment

func (c *Client) SetDefaultEnvironment(ctx context.Context, envId string) (*ApiStatusResponse, error)

SetDefaultEnvironment — Set default environment

func (*Client) SetPublishableKey

func (c *Client) SetPublishableKey(key string)

SetPublishableKey updates the publishable key sent as X-Publishable-Key. Same validation as WithPublishableKey: secret keys (sk_*, ask_*) are silently dropped instead of being put on the wire.

func (*Client) SetSetting

func (c *Client) SetSetting(ctx context.Context, key string, req *SetSettingRequest) (*SettingValueResponse, error)

SetSetting — Set a setting value at a scope

func (*Client) SetToken

func (c *Client) SetToken(token string)

SetToken updates the session token.

func (*Client) SignIn

func (c *Client) SignIn(ctx context.Context, req *SignInRequest) (*AuthResponse, error)

SignIn — Sign in

func (*Client) SignOut

func (c *Client) SignOut(ctx context.Context) (*ApiStatusResponse, error)

SignOut — Sign out

func (*Client) SignUp

func (c *Client) SignUp(ctx context.Context, req *SignUpRequest) (*AuthResponse, error)

SignUp — Sign up

func (*Client) SocialAdminCatalog

func (c *Client) SocialAdminCatalog(ctx context.Context) (*AdminCatalogResponse, error)

SocialAdminCatalog — List supported social providers

func (*Client) SocialAdminDeleteProvider

func (c *Client) SocialAdminDeleteProvider(ctx context.Context, provider string, params *SocialAdminDeleteProviderParams) (*AdminDeleteProviderResponse, error)

SocialAdminDeleteProvider — Delete a social provider (admin)

func (*Client) SocialAdminListProviders

func (c *Client) SocialAdminListProviders(ctx context.Context, params *SocialAdminListProvidersParams) (*AdminListProvidersResponse, error)

SocialAdminListProviders — List social providers (admin)

func (*Client) SocialAdminUpsertProvider

func (c *Client) SocialAdminUpsertProvider(ctx context.Context, provider string, req *SocialAdminUpsertProviderRequest, params *SocialAdminUpsertProviderParams) (*AdminProviderResponse, error)

SocialAdminUpsertProvider — Configure a social provider (admin)

func (*Client) SsoACS

func (c *Client) SsoACS(ctx context.Context, provider string) error

SsoACS — SSO SAML ACS endpoint

func (*Client) SsoAdminCreateConnection

func (c *Client) SsoAdminCreateConnection(ctx context.Context, req *SsoAdminCreateConnectionRequest) (*AdminCreateConnectionResponse, error)

SsoAdminCreateConnection — Create SSO connection (admin)

func (*Client) SsoAdminDeleteConnection

func (c *Client) SsoAdminDeleteConnection(ctx context.Context, connectionId string) (*AdminDeleteConnectionResponse, error)

SsoAdminDeleteConnection — Delete SSO connection (admin)

func (*Client) SsoAdminGetConnection

func (c *Client) SsoAdminGetConnection(ctx context.Context, connectionId string) (*Connection, error)

SsoAdminGetConnection — Get SSO connection (admin)

func (*Client) SsoAdminListConnections

func (c *Client) SsoAdminListConnections(ctx context.Context, params *SsoAdminListConnectionsParams) (*AdminListConnectionsResponse, error)

SsoAdminListConnections — List SSO connections for an app (admin)

func (*Client) SsoAdminUpdateConnection

func (c *Client) SsoAdminUpdateConnection(ctx context.Context, connectionId string, req *SsoAdminUpdateConnectionRequest) (*Connection, error)

SsoAdminUpdateConnection — Update SSO connection (admin)

func (*Client) SsoCallback

func (c *Client) SsoCallback(ctx context.Context, provider string, params *SsoCallbackParams) (*SsoCallbackResponse, error)

SsoCallback — SSO callback (OIDC)

func (*Client) SsoExchange

func (c *Client) SsoExchange(ctx context.Context, req *SsoExchangeRequest) (*SsoCallbackResponse, error)

SsoExchange — Exchange SSO one-time code for a session

func (*Client) SsoOIDCRedirect

func (c *Client) SsoOIDCRedirect(ctx context.Context, provider string) error

SsoOIDCRedirect — SSO OIDC redirect landing

func (*Client) SsoSPMetadata

func (c *Client) SsoSPMetadata(ctx context.Context, provider string) error

SsoSPMetadata — SAML SP metadata

func (*Client) StartOAuth

func (c *Client) StartOAuth(ctx context.Context, provider string, params *StartOAuthParams) (*SocialStartResponse, error)

StartOAuth — Start OAuth flow

func (*Client) StartSSOLogin

func (c *Client) StartSSOLogin(ctx context.Context, provider string, params *StartSSOLoginParams) (*LoginResponse, error)

StartSSOLogin — Start SSO login flow

func (*Client) StartSSOLoginByDomain

func (c *Client) StartSSOLoginByDomain(ctx context.Context, req *StartSSOLoginByDomainRequest) (*LoginResponse, error)

StartSSOLoginByDomain — Start SSO login by email domain

func (*Client) SwitchOrg

func (c *Client) SwitchOrg(ctx context.Context, req *SwitchOrgRequest) (*SwitchOrgResponse, error)

SwitchOrg — Switch active organization

func (*Client) Token

func (c *Client) Token() string

Token returns the current session token.

func (*Client) TrustDevice

func (c *Client) TrustDevice(ctx context.Context, deviceId string) (*Device, error)

TrustDevice — Trust device

func (*Client) UnenforceSetting

func (c *Client) UnenforceSetting(ctx context.Context, key string, params *UnenforceSettingParams) (*ApiStatusResponse, error)

UnenforceSetting — Remove enforcement from a setting

func (*Client) UnlinkAuthMethod

func (c *Client) UnlinkAuthMethod(ctx context.Context, provider string) (*UnlinkAuthMethodResponse, error)

UnlinkAuthMethod — Unlink an auth method

func (*Client) UpdateEnvironment

func (c *Client) UpdateEnvironment(ctx context.Context, envId string, req *UpdateEnvironmentRequest) (*Environment, error)

UpdateEnvironment — Update environment

func (*Client) UpdateEnvironmentSettings

func (c *Client) UpdateEnvironmentSettings(ctx context.Context, envId string, req *UpdateEnvironmentSettingsRequest) (*Environment, error)

UpdateEnvironmentSettings — Update environment settings

func (*Client) UpdateMe

func (c *Client) UpdateMe(ctx context.Context, req *UpdateMeRequest) (*User, error)

UpdateMe — Update current user

func (*Client) UpdateMember

func (c *Client) UpdateMember(ctx context.Context, orgId string, memberId string, req *UpdateMemberRequest) (*Member, error)

UpdateMember — Update member role

func (*Client) UpdateOAuth2Client

func (c *Client) UpdateOAuth2Client(ctx context.Context, clientId string, req *UpdateOAuth2ClientRequest) (*UpdateClientResponse, error)

UpdateOAuth2Client — Update OAuth2 client

func (*Client) UpdateOrganization

func (c *Client) UpdateOrganization(ctx context.Context, orgId string, req *UpdateOrganizationRequest) (*Organization, error)

UpdateOrganization — Update organization

func (*Client) UpdateTeam

func (c *Client) UpdateTeam(ctx context.Context, orgId string, teamId string, req *UpdateTeamRequest) (*Team, error)

UpdateTeam — Update team

func (*Client) UpdateWebhook

func (c *Client) UpdateWebhook(ctx context.Context, webhookId string, req *UpdateWebhookRequest) (*Webhook, error)

UpdateWebhook — Update webhook

func (*Client) VerifyEmail

func (c *Client) VerifyEmail(ctx context.Context, req *VerifyEmailRequest) (*ApiStatusResponse, error)

VerifyEmail — Verify email

func (*Client) VerifyMFA

func (c *Client) VerifyMFA(ctx context.Context, req *VerifyMFARequest) (*VerifyMFAResponse, error)

VerifyMFA — Verify MFA code

func (*Client) VerifyMFARecovery

func (c *Client) VerifyMFARecovery(ctx context.Context, req *VerifyMFARecoveryRequest) (*RecoveryVerifyResponse, error)

VerifyMFARecovery — Verify MFA recovery code

func (c *Client) VerifyMagicLink(ctx context.Context, req *VerifyMagicLinkRequest) (*MagiclinkVerifyResponse, error)

VerifyMagicLink — Verify magic link

func (*Client) VerifySMSCode

func (c *Client) VerifySMSCode(ctx context.Context, req *VerifySMSCodeRequest) (*SMSVerifyResponse, error)

VerifySMSCode — Verify SMS code

func (*Client) VoidInvoice

func (c *Client) VoidInvoice(ctx context.Context, invoiceId string, req *VoidInvoiceRequest) error

VoidInvoice — Void an invoice

type ClientConfigBranding

type ClientConfigBranding struct {
	AppName string `json:"app_name,omitempty"`
	LogoURL string `json:"logo_url,omitempty"`
}

ClientConfigBranding represents the ClientConfigBranding schema.

type ClientConfigCaptcha

type ClientConfigCaptcha struct {
	Provider string `json:"provider,omitempty"`
	Required bool   `json:"required"`
	SiteKey  string `json:"site_key,omitempty"`
}

ClientConfigCaptcha represents the ClientConfigCaptcha schema.

type ClientConfigEmailVerification

type ClientConfigEmailVerification struct {
	Enabled  bool `json:"enabled"`
	Required bool `json:"required"`
}

ClientConfigEmailVerification represents the ClientConfigEmailVerification schema.

type ClientConfigFieldValidation

type ClientConfigFieldValidation struct {
	Max      int64  `json:"max,omitempty"`
	MaxLen   int64  `json:"max_len,omitempty"`
	Min      int64  `json:"min,omitempty"`
	MinLen   int64  `json:"min_len,omitempty"`
	Pattern  string `json:"pattern,omitempty"`
	Required bool   `json:"required,omitempty"`
}

ClientConfigFieldValidation represents the ClientConfigFieldValidation schema.

type ClientConfigMFA

type ClientConfigMFA struct {
	Enabled  bool     `json:"enabled"`
	Methods  []string `json:"methods"`
	Required bool     `json:"required"`
}

ClientConfigMFA represents the ClientConfigMFA schema.

type ClientConfigResponse

type ClientConfigResponse struct {
	AppID               string                         `json:"app_id"`
	Branding            *ClientConfigBranding          `json:"branding,omitempty"`
	Captcha             *ClientConfigCaptcha           `json:"captcha,omitempty"`
	DeviceAuthorization *ClientConfigToggle            `json:"device_authorization,omitempty"`
	EmailVerification   *ClientConfigEmailVerification `json:"email_verification,omitempty"`
	Magiclink           *ClientConfigToggle            `json:"magiclink,omitempty"`
	MFA                 *ClientConfigMFA               `json:"mfa,omitempty"`
	Passkey             *ClientConfigToggle            `json:"passkey,omitempty"`
	Password            *ClientConfigToggle            `json:"password,omitempty"`
	SignupEnabled       bool                           `json:"signup_enabled"`
	SignupFields        []*ClientConfigSignupField     `json:"signup_fields,omitempty"`
	Social              *ClientConfigSocial            `json:"social,omitempty"`
	Sso                 *ClientConfigSSO               `json:"sso,omitempty"`
	SupportedPlugins    []string                       `json:"supported_plugins"`
	Version             string                         `json:"version"`
	Waitlist            *ClientConfigToggle            `json:"waitlist,omitempty"`
}

ClientConfigResponse represents the ClientConfigResponse schema.

type ClientConfigSSO

type ClientConfigSSO struct {
	Connections []*ClientConfigSSOConnection `json:"connections"`
	Enabled     bool                         `json:"enabled"`
}

ClientConfigSSO represents the ClientConfigSSO schema.

type ClientConfigSSOConnection

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

ClientConfigSSOConnection represents the ClientConfigSSOConnection schema.

type ClientConfigSelectOption

type ClientConfigSelectOption struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

ClientConfigSelectOption represents the ClientConfigSelectOption schema.

type ClientConfigSignupField

type ClientConfigSignupField struct {
	Default     string                       `json:"default,omitempty"`
	Description string                       `json:"description,omitempty"`
	Key         string                       `json:"key"`
	Label       string                       `json:"label"`
	Options     []*ClientConfigSelectOption  `json:"options,omitempty"`
	Order       int64                        `json:"order"`
	Placeholder string                       `json:"placeholder,omitempty"`
	Type        string                       `json:"type"`
	Validation  *ClientConfigFieldValidation `json:"validation,omitempty"`
}

ClientConfigSignupField represents the ClientConfigSignupField schema.

type ClientConfigSocial

type ClientConfigSocial struct {
	Enabled   bool                          `json:"enabled"`
	Providers []*ClientConfigSocialProvider `json:"providers"`
}

ClientConfigSocial represents the ClientConfigSocial schema.

type ClientConfigSocialProvider

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

ClientConfigSocialProvider represents the ClientConfigSocialProvider schema.

type ClientConfigToggle

type ClientConfigToggle struct {
	Enabled bool `json:"enabled"`
}

ClientConfigToggle represents the ClientConfigToggle schema.

type ClientError

type ClientError struct {
	StatusCode int
	Message    string
	RawBody    []byte
	Headers    map[string]string
}

ClientError represents an error response from the API.

RawBody and Headers preserve the upstream response so callers can surface useful diagnostics when the standard error envelope is empty or unfamiliar (e.g. forge.HTTPError uses {code, error, details} — Message resolves from the first non-empty of error / message / details, and RawBody preserves the rest verbatim).

func (*ClientError) Error

func (e *ClientError) Error() string

type CloneEnvironmentRequest

type CloneEnvironmentRequest struct {
	Description        string         `json:"description,omitempty"`
	Name               string         `json:"name"`
	Settings           map[string]any `json:"settings,omitempty"`
	Slug               string         `json:"slug"`
	Type               string         `json:"type"`
	WebhookURLOverride string         `json:"webhook_url_override,omitempty"`
}

CloneEnvironmentRequest represents the CloneEnvironmentRequest schema.

type CloneEnvironmentResponse

type CloneEnvironmentResponse struct {
	Environment       any            `json:"environment"`
	PermissionsCloned int64          `json:"permissions_cloned"`
	RoleIDMap         map[string]any `json:"role_id_map"`
	RolesCloned       int64          `json:"roles_cloned"`
	WebhooksCloned    int64          `json:"webhooks_cloned"`
}

CloneEnvironmentResponse represents the CloneEnvironmentResponse schema.

type Connection

type Connection struct {
	AcsURL            string         `json:"acs_url,omitempty"`
	Active            bool           `json:"active"`
	AllowedDomains    []string       `json:"allowed_domains,omitempty"`
	AppID             string         `json:"app_id"`
	AttributeMappings map[string]any `json:"attribute_mappings,omitempty"`
	ClientID          string         `json:"client_id,omitempty"`
	CreatedAt         string         `json:"created_at"`
	DisplayName       string         `json:"display_name,omitempty"`
	Domain            string         `json:"domain"`
	Enforced          bool           `json:"enforced"`
	EntityID          string         `json:"entity_id,omitempty"`
	EnvID             string         `json:"env_id,omitempty"`
	ID                string         `json:"id"`
	IdpCertificate    string         `json:"idp_certificate,omitempty"`
	IdpMetadataXML    string         `json:"idp_metadata_xml,omitempty"`
	IdpSsoURL         string         `json:"idp_sso_url,omitempty"`
	Issuer            string         `json:"issuer,omitempty"`
	MetadataURL       string         `json:"metadata_url,omitempty"`
	OrgID             string         `json:"org_id,omitempty"`
	Protocol          string         `json:"protocol"`
	Provider          string         `json:"provider"`
	SignRequests      bool           `json:"sign_requests,omitempty"`
	SpCertificate     string         `json:"sp_certificate,omitempty"`
	TrustedFederation bool           `json:"trusted_federation,omitempty"`
	UpdatedAt         string         `json:"updated_at"`
}

Connection represents the Connection schema.

type Consent struct {
	AppID     string `json:"app_id"`
	CreatedAt string `json:"created_at"`
	Granted   bool   `json:"granted"`
	GrantedAt string `json:"granted_at"`
	ID        string `json:"id"`
	IPAddress string `json:"ip_address"`
	Purpose   string `json:"purpose"`
	RevokedAt string `json:"revoked_at,omitempty"`
	UpdatedAt string `json:"updated_at"`
	UserID    string `json:"user_id"`
	Version   string `json:"version"`
}

Consent represents the Consent schema.

type ConsentListResponse

type ConsentListResponse struct {
	Consents   []*Consent `json:"consents"`
	NextCursor string     `json:"next_cursor,omitempty"`
}

ConsentListResponse represents the ConsentListResponse schema.

type ConsentStatusResponse

type ConsentStatusResponse struct {
	Status string `json:"status"`
}

ConsentStatusResponse represents the ConsentStatusResponse schema.

type CouponResponse

type CouponResponse struct {
	Amount         string `json:"amount,omitempty"`
	AppID          string `json:"app_id"`
	Code           string `json:"code"`
	Currency       string `json:"currency"`
	ID             string `json:"id"`
	MaxRedemptions int64  `json:"max_redemptions"`
	Name           string `json:"name"`
	Percentage     int64  `json:"percentage,omitempty"`
	TimesRedeemed  int64  `json:"times_redeemed"`
	Type           string `json:"type"`
	ValidFrom      string `json:"valid_from,omitempty"`
	ValidUntil     string `json:"valid_until,omitempty"`
}

CouponResponse represents the CouponResponse schema.

type CreateAPIKeyRequest

type CreateAPIKeyRequest struct {
	AppID  string   `json:"app_id"`
	Name   string   `json:"name"`
	Scopes []string `json:"scopes,omitempty"`
	UserID string   `json:"user_id,omitempty"`
}

CreateAPIKeyRequest is the request body for CreateAPIKey.

type CreateBillingPlanRequest

type CreateBillingPlanRequest struct {
	AppID       string          `json:"app_id"`
	BaseAmount  int64           `json:"base_amount"`
	Currency    string          `json:"currency"`
	Description string          `json:"description"`
	Features    []*FeatureInput `json:"features,omitempty"`
	IsAddon     bool            `json:"is_addon"`
	Metadata    map[string]any  `json:"metadata,omitempty"`
	Name        string          `json:"name"`
	Period      string          `json:"period"`
	Slug        string          `json:"slug"`
	TrialDays   int64           `json:"trial_days"`
}

CreateBillingPlanRequest is the request body for CreateBillingPlan.

type CreateClientRequest

type CreateClientRequest struct {
	AppID        string   `json:"app_id"`
	DpopMode     string   `json:"dpop_mode,omitempty"`
	FirstParty   bool     `json:"first_party,omitempty"`
	GrantTypes   []string `json:"grant_types,omitempty"`
	Name         string   `json:"name"`
	Public       bool     `json:"public,omitempty"`
	RedirectUris []string `json:"redirect_uris"`
	Resources    []string `json:"resources,omitempty"`
	Scopes       []string `json:"scopes,omitempty"`
}

CreateClientRequest represents the CreateClientRequest schema.

type CreateClientResponse

type CreateClientResponse struct {
	ClientID     string   `json:"client_id"`
	ClientSecret string   `json:"client_secret,omitempty"`
	GrantTypes   []string `json:"grant_types"`
	ID           string   `json:"id"`
	Name         string   `json:"name"`
	Public       bool     `json:"public"`
	RedirectUris []string `json:"redirect_uris"`
	Resources    []string `json:"resources"`
	Scopes       []string `json:"scopes"`
}

CreateClientResponse represents the CreateClientResponse schema.

type CreateCouponRequest

type CreateCouponRequest struct {
	Amount         int64  `json:"amount"`
	AppID          string `json:"app_id"`
	Code           string `json:"code"`
	Currency       string `json:"currency"`
	MaxRedemptions int64  `json:"max_redemptions"`
	Name           string `json:"name"`
	Percentage     int64  `json:"percentage"`
	Type           string `json:"type"`
	ValidFrom      string `json:"valid_from,omitempty"`
	ValidUntil     string `json:"valid_until,omitempty"`
}

CreateCouponRequest represents the CreateCouponRequest schema.

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	AppID       string         `json:"app_id,omitempty"`
	Color       string         `json:"color,omitempty"`
	Description string         `json:"description,omitempty"`
	Name        string         `json:"name"`
	Settings    map[string]any `json:"settings,omitempty"`
	Slug        string         `json:"slug"`
	Type        string         `json:"type"`
}

CreateEnvironmentRequest represents the CreateEnvironmentRequest schema.

type CreateInvitationRequest

type CreateInvitationRequest struct {
	Email string `json:"email"`
	Role  string `json:"role,omitempty"`
}

CreateInvitationRequest represents the CreateInvitationRequest schema.

type CreateKeyRequest

type CreateKeyRequest struct {
	AppID  string   `json:"app_id"`
	Name   string   `json:"name"`
	Scopes []string `json:"scopes,omitempty"`
	UserID string   `json:"user_id,omitempty"`
}

CreateKeyRequest represents the CreateKeyRequest schema.

type CreateKeyResponse

type CreateKeyResponse struct {
	CreatedAt       string   `json:"created_at"`
	ExpiresAt       string   `json:"expires_at,omitempty"`
	ID              string   `json:"id"`
	Key             string   `json:"key"`
	KeyPrefix       string   `json:"key_prefix"`
	Name            string   `json:"name"`
	PublicKey       string   `json:"public_key"`
	PublicKeyPrefix string   `json:"public_key_prefix"`
	Scopes          []string `json:"scopes,omitempty"`
}

CreateKeyResponse represents the CreateKeyResponse schema.

type CreateOAuth2ClientRequest

type CreateOAuth2ClientRequest struct {
	AppID        string   `json:"app_id"`
	DpopMode     string   `json:"dpop_mode,omitempty"`
	FirstParty   bool     `json:"first_party,omitempty"`
	GrantTypes   []string `json:"grant_types,omitempty"`
	Name         string   `json:"name"`
	Public       bool     `json:"public,omitempty"`
	RedirectUris []string `json:"redirect_uris"`
	Resources    []string `json:"resources,omitempty"`
	Scopes       []string `json:"scopes,omitempty"`
}

CreateOAuth2ClientRequest is the request body for CreateOAuth2Client.

type CreateOrgRequest

type CreateOrgRequest struct {
	AppID string `json:"app_id,omitempty"`
	Name  string `json:"name"`
	Slug  string `json:"slug"`
}

CreateOrgRequest represents the CreateOrgRequest schema.

type CreateOrganizationRequest

type CreateOrganizationRequest struct {
	AppID string `json:"app_id,omitempty"`
	Name  string `json:"name"`
	Slug  string `json:"slug"`
}

CreateOrganizationRequest is the request body for CreateOrganization.

type CreatePlanRequest

type CreatePlanRequest struct {
	AppID       string          `json:"app_id"`
	BaseAmount  int64           `json:"base_amount"`
	Currency    string          `json:"currency"`
	Description string          `json:"description"`
	Features    []*FeatureInput `json:"features,omitempty"`
	IsAddon     bool            `json:"is_addon"`
	Metadata    map[string]any  `json:"metadata,omitempty"`
	Name        string          `json:"name"`
	Period      string          `json:"period"`
	Slug        string          `json:"slug"`
	TrialDays   int64           `json:"trial_days"`
}

CreatePlanRequest represents the CreatePlanRequest schema.

type CreateRoleRequest

type CreateRoleRequest struct {
	AppID       string `json:"app_id,omitempty"`
	Description string `json:"description,omitempty"`
	Name        string `json:"name"`
	ParentID    string `json:"parent_id,omitempty"`
	Slug        string `json:"slug"`
}

CreateRoleRequest represents the CreateRoleRequest schema.

type CreateSubscriptionRequest

type CreateSubscriptionRequest struct {
	AppID    string `json:"app_id"`
	PlanID   string `json:"plan_id"`
	TenantID string `json:"tenant_id"`
}

CreateSubscriptionRequest represents the CreateSubscriptionRequest schema.

type CreateTeamRequest

type CreateTeamRequest struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

CreateTeamRequest represents the CreateTeamRequest schema.

type CreateWebhookRequest

type CreateWebhookRequest struct {
	AppID  string   `json:"app_id,omitempty"`
	Events []string `json:"events"`
	URL    string   `json:"url"`
}

CreateWebhookRequest represents the CreateWebhookRequest schema.

type CreateWebhookResponse

type CreateWebhookResponse struct {
	Secret  string `json:"secret"`
	Webhook any    `json:"webhook"`
}

CreateWebhookResponse represents the CreateWebhookResponse schema.

type CredentialInfo

type CredentialInfo struct {
	CreatedAt   string   `json:"created_at"`
	DisplayName string   `json:"display_name"`
	ID          string   `json:"id"`
	Transport   []string `json:"transport"`
}

CredentialInfo represents the CredentialInfo schema.

type DeclineInvitationRequest

type DeclineInvitationRequest struct {
	Token string `json:"token"`
}

DeclineInvitationRequest represents the DeclineInvitationRequest schema.

type Definition

type Definition struct {
	Category    string      `json:"category"`
	Default     string      `json:"default"`
	Description string      `json:"description"`
	DisplayName string      `json:"display_name"`
	Enforceable bool        `json:"enforceable"`
	Key         string      `json:"key"`
	Namespace   string      `json:"namespace"`
	Scopes      []string    `json:"scopes"`
	Sensitive   bool        `json:"sensitive"`
	Type        string      `json:"type"`
	Ui          *UIMetadata `json:"ui,omitempty"`
}

Definition represents the Definition schema.

type DefinitionGroup

type DefinitionGroup struct {
	Category    string        `json:"category"`
	Definitions []*Definition `json:"definitions"`
	Namespace   string        `json:"namespace"`
}

DefinitionGroup represents the DefinitionGroup schema.

type DelegationListResponse

type DelegationListResponse struct {
	Delegations []*DelegationResponse `json:"delegations"`
}

DelegationListResponse represents the DelegationListResponse schema.

type DelegationResponse

type DelegationResponse struct {
	Actor     string   `json:"actor"`
	CreatedAt string   `json:"created_at"`
	ExpiresAt string   `json:"expires_at,omitempty"`
	GrantKind string   `json:"grant_kind"`
	GrantedBy string   `json:"granted_by"`
	ID        string   `json:"id"`
	Scopes    []string `json:"scopes,omitempty"`
	Subject   string   `json:"subject"`
}

DelegationResponse represents the DelegationResponse schema.

type DeleteResponse

type DeleteResponse struct {
	Status string `json:"status"`
}

DeleteResponse represents the DeleteResponse schema.

type DeleteSettingParams

type DeleteSettingParams struct {
	Scope   string `json:"scope,omitempty"`
	ScopeID string `json:"scope_id,omitempty"`
}

DeleteSettingParams holds optional query parameters for DeleteSetting.

type Device

type Device struct {
	AppID        string `json:"app_id"`
	Browser      string `json:"browser,omitempty"`
	CreatedAt    string `json:"created_at"`
	EnvID        string `json:"env_id"`
	Fingerprint  string `json:"fingerprint,omitempty"`
	ID           string `json:"id"`
	IPAddress    string `json:"ip_address,omitempty"`
	LastSeenAt   string `json:"last_seen_at"`
	Name         string `json:"name,omitempty"`
	Os           string `json:"os,omitempty"`
	Trusted      bool   `json:"trusted"`
	TrustedUntil string `json:"trusted_until,omitempty"`
	Type         string `json:"type,omitempty"`
	UpdatedAt    string `json:"updated_at"`
	UserID       string `json:"user_id"`
}

Device represents the Device schema.

type DeviceAuthResponse

type DeviceAuthResponse struct {
	DeviceCode              string `json:"device_code"`
	ExpiresIn               int64  `json:"expires_in"`
	Interval                int64  `json:"interval"`
	UserCode                string `json:"user_code"`
	VerificationURI         string `json:"verification_uri"`
	VerificationURIComplete string `json:"verification_uri_complete,omitempty"`
}

DeviceAuthResponse represents the DeviceAuthResponse schema.

type DeviceCompleteResponse

type DeviceCompleteResponse struct {
	Status string `json:"status"`
}

DeviceCompleteResponse represents the DeviceCompleteResponse schema.

type DeviceListResponse

type DeviceListResponse struct {
	Devices []*Device `json:"devices"`
}

DeviceListResponse represents the DeviceListResponse schema.

type DisableMFARequest

type DisableMFARequest struct {
	Code string `json:"code,omitempty"`
}

DisableMFARequest is the request body for DisableMFA.

type DisableRequest

type DisableRequest struct {
	Code string `json:"code,omitempty"`
}

DisableRequest represents the DisableRequest schema.

type DisableResponse

type DisableResponse struct {
	Status string `json:"status"`
}

DisableResponse represents the DisableResponse schema.

type DiscoveryResponse

type DiscoveryResponse struct {
	AuthorizationEndpoint             string   `json:"authorization_endpoint"`
	CodeChallengeMethodsSupported     []string `json:"code_challenge_methods_supported"`
	DeviceAuthorizationEndpoint       string   `json:"device_authorization_endpoint"`
	DpopSigningAlgValuesSupported     []string `json:"dpop_signing_alg_values_supported,omitempty"`
	GrantTypesSupported               []string `json:"grant_types_supported"`
	IDTokenSigningAlgValuesSupported  []string `json:"id_token_signing_alg_values_supported"`
	Issuer                            string   `json:"issuer"`
	JwksURI                           string   `json:"jwks_uri"`
	RegistrationEndpoint              string   `json:"registration_endpoint,omitempty"`
	ResourceIndicatorsSupported       bool     `json:"resource_indicators_supported"`
	ResponseTypesSupported            []string `json:"response_types_supported"`
	RevocationEndpoint                string   `json:"revocation_endpoint"`
	ScopesSupported                   []string `json:"scopes_supported"`
	SubjectTypesSupported             []string `json:"subject_types_supported"`
	TokenEndpoint                     string   `json:"token_endpoint"`
	TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
	UserinfoEndpoint                  string   `json:"userinfo_endpoint"`
}

DiscoveryResponse represents the DiscoveryResponse schema.

type Email

type Email struct {
	Primary bool   `json:"primary"`
	Type    string `json:"type,omitempty"`
	Value   string `json:"value"`
}

Email represents the Email schema.

type Empty

type Empty struct {
}

Empty represents the Empty schema.

type EnforceSettingRequest

type EnforceSettingRequest struct {
	AppID   string `json:"app_id,omitempty"`
	OrgID   string `json:"org_id,omitempty"`
	Scope   string `json:"scope"`
	ScopeID string `json:"scope_id,omitempty"`
	Value   string `json:"value"`
}

EnforceSettingRequest represents the EnforceSettingRequest schema.

type EnrollMFARequest

type EnrollMFARequest struct {
	Code   string `json:"code,omitempty"`
	Method string `json:"method,omitempty"`
	Phone  string `json:"phone,omitempty"`
}

EnrollMFARequest is the request body for EnrollMFA.

type EnrollRequest

type EnrollRequest struct {
	Code   string `json:"code,omitempty"`
	Method string `json:"method,omitempty"`
	Phone  string `json:"phone,omitempty"`
}

EnrollRequest represents the EnrollRequest schema.

type EnrollResponse

type EnrollResponse struct {
	ID         string `json:"id"`
	Method     string `json:"method"`
	OtpauthURL string `json:"otpauth_url"`
	Secret     string `json:"secret"`
}

EnrollResponse represents the EnrollResponse schema.

type EntitlementResponse

type EntitlementResponse struct {
	Allowed   bool   `json:"allowed"`
	Feature   string `json:"feature"`
	Limit     int64  `json:"limit"`
	Reason    string `json:"reason,omitempty"`
	Remaining int64  `json:"remaining"`
	Used      int64  `json:"used"`
}

EntitlementResponse represents the EntitlementResponse schema.

type Environment

type Environment struct {
	AppID       string         `json:"app_id"`
	ClonedFrom  string         `json:"cloned_from,omitempty"`
	Color       string         `json:"color,omitempty"`
	CreatedAt   string         `json:"created_at"`
	Description string         `json:"description,omitempty"`
	ID          string         `json:"id"`
	IsDefault   bool           `json:"is_default"`
	Metadata    map[string]any `json:"metadata,omitempty"`
	Name        string         `json:"name"`
	Settings    *Settings      `json:"settings,omitempty"`
	Slug        string         `json:"slug"`
	Type        string         `json:"type"`
	UpdatedAt   string         `json:"updated_at"`
}

Environment represents the Environment schema.

type EnvironmentListResponse

type EnvironmentListResponse struct {
	Environments any   `json:"environments"`
	Total        int64 `json:"total"`
}

EnvironmentListResponse represents the EnvironmentListResponse schema.

type EnvironmentSettingsResponse

type EnvironmentSettingsResponse struct {
	Overrides    *Settings `json:"overrides,omitempty"`
	Settings     *Settings `json:"settings,omitempty"`
	TypeDefaults *Settings `json:"type_defaults,omitempty"`
}

EnvironmentSettingsResponse represents the EnvironmentSettingsResponse schema.

type ExchangeRequest

type ExchangeRequest struct {
	Code string `json:"code"`
}

ExchangeRequest represents the ExchangeRequest schema.

type ExchangeTokenRequest

type ExchangeTokenRequest struct {
	Scopes  []string `json:"scopes,omitempty"`
	Subject string   `json:"subject"`
}

ExchangeTokenRequest is the request body for ExchangeToken.

type FeatureInput

type FeatureInput struct {
	Key       string `json:"key"`
	Limit     int64  `json:"limit"`
	Name      string `json:"name"`
	Period    string `json:"period"`
	SoftLimit bool   `json:"soft_limit"`
	Type      string `json:"type"`
}

FeatureInput represents the FeatureInput schema.

type ForgotPasswordRequest

type ForgotPasswordRequest struct {
	AppID string `json:"app_id,omitempty"`
	Email string `json:"email"`
}

ForgotPasswordRequest represents the ForgotPasswordRequest schema.

type ForgotPasswordResponse

type ForgotPasswordResponse struct {
	Status string `json:"status"`
}

ForgotPasswordResponse represents the ForgotPasswordResponse schema.

type GetActiveSubscriptionParams

type GetActiveSubscriptionParams struct {
	AppID    string `json:"app_id,omitempty"`
	TenantID string `json:"tenant_id,omitempty"`
}

GetActiveSubscriptionParams holds optional query parameters for GetActiveSubscription.

type GetClientConfigParams

type GetClientConfigParams struct {
	Key string `json:"key,omitempty"`
}

GetClientConfigParams holds optional query parameters for GetClientConfig.

type GetUsageSummaryParams

type GetUsageSummaryParams struct {
	AppID    string `json:"app_id,omitempty"`
	TenantID string `json:"tenant_id,omitempty"`
}

GetUsageSummaryParams holds optional query parameters for GetUsageSummary.

type GrantConsentRequest

type GrantConsentRequest struct {
	AppID   string `json:"app_id,omitempty"`
	Purpose string `json:"purpose"`
	Version string `json:"version,omitempty"`
}

GrantConsentRequest represents the GrantConsentRequest schema.

type GrantView

type GrantView struct {
	ClientID   string   `json:"client_id"`
	ClientName string   `json:"client_name"`
	CreatedAt  string   `json:"created_at"`
	Scopes     []string `json:"scopes"`
	UpdatedAt  string   `json:"updated_at"`
}

GrantView represents the GrantView schema.

type GroupRef

type GroupRef struct {
	Ref     string `json:"$ref,omitempty"`
	Display string `json:"display,omitempty"`
	Value   string `json:"value"`
}

GroupRef represents the GroupRef schema.

type GroupResource

type GroupResource struct {
	DisplayName string       `json:"display_name"`
	ExternalId  string       `json:"external_id,omitempty"`
	ID          string       `json:"id,omitempty"`
	Members     []*MemberRef `json:"members,omitempty"`
	Meta        *Meta        `json:"meta,omitempty"`
	Schemas     []string     `json:"schemas"`
}

GroupResource represents the GroupResource schema.

type HealthResponse

type HealthResponse struct {
	Error  string `json:"error,omitempty"`
	Status string `json:"status"`
}

HealthResponse represents the HealthResponse schema.

type IntrospectConfirmation

type IntrospectConfirmation struct {
	Jkt string `json:"jkt"`
}

IntrospectConfirmation represents the IntrospectConfirmation schema.

type IntrospectRequest

type IntrospectRequest struct {
	Token string `json:"token"`
}

IntrospectRequest represents the IntrospectRequest schema.

type IntrospectResponse

type IntrospectResponse struct {
	Active    bool                    `json:"active"`
	AppID     string                  `json:"app_id,omitempty"`
	Aud       []string                `json:"aud,omitempty"`
	Cnf       *IntrospectConfirmation `json:"cnf,omitempty"`
	EnvID     string                  `json:"env_id,omitempty"`
	ExpiresAt string                  `json:"expires_at,omitempty"`
	OrgID     string                  `json:"org_id,omitempty"`
	Scope     string                  `json:"scope,omitempty"`
	SessionID string                  `json:"session_id,omitempty"`
	User      *IntrospectUser         `json:"user,omitempty"`
	UserID    string                  `json:"user_id,omitempty"`
}

IntrospectResponse represents the IntrospectResponse schema.

type IntrospectTokenRequest

type IntrospectTokenRequest struct {
	Token string `json:"token"`
}

IntrospectTokenRequest is the request body for IntrospectToken.

type IntrospectUser

type IntrospectUser struct {
	Email     string `json:"email"`
	FirstName string `json:"first_name,omitempty"`
	ID        string `json:"id"`
	LastName  string `json:"last_name,omitempty"`
	Username  string `json:"username,omitempty"`
}

IntrospectUser represents the IntrospectUser schema.

type Invitation

type Invitation struct {
	CreatedAt string `json:"created_at"`
	Email     string `json:"email"`
	ExpiresAt string `json:"expires_at"`
	ID        string `json:"id"`
	InviterID string `json:"inviter_id"`
	OrgID     string `json:"org_id"`
	Role      string `json:"role"`
	Status    string `json:"status"`
}

Invitation represents the Invitation schema.

type InvitationListResponse

type InvitationListResponse struct {
	Invitations []*Invitation `json:"invitations"`
	NextCursor  string        `json:"next_cursor,omitempty"`
}

InvitationListResponse represents the InvitationListResponse schema.

type InvoiceResponse

type InvoiceResponse struct {
	Currency       string `json:"currency"`
	ID             string `json:"id"`
	PeriodEnd      string `json:"period_end"`
	PeriodStart    string `json:"period_start"`
	Status         string `json:"status"`
	SubscriptionID string `json:"subscription_id"`
	TenantID       string `json:"tenant_id"`
	Total          string `json:"total"`
}

InvoiceResponse represents the InvoiceResponse schema.

type KeyListItem

type KeyListItem struct {
	CreatedAt       string   `json:"created_at"`
	ExpiresAt       string   `json:"expires_at,omitempty"`
	ID              string   `json:"id"`
	KeyPrefix       string   `json:"key_prefix"`
	LastUsedAt      string   `json:"last_used_at,omitempty"`
	Name            string   `json:"name"`
	PublicKeyPrefix string   `json:"public_key_prefix,omitempty"`
	Revoked         bool     `json:"revoked"`
	Scopes          []string `json:"scopes,omitempty"`
}

KeyListItem represents the KeyListItem schema.

type ListAPIKeysParams

type ListAPIKeysParams struct {
	AppID  string `json:"app_id,omitempty"`
	UserID string `json:"user_id,omitempty"`
}

ListAPIKeysParams holds optional query parameters for ListAPIKeys.

type ListAuthMethodsResponse

type ListAuthMethodsResponse struct {
	Methods []*AuthMethod `json:"methods"`
}

ListAuthMethodsResponse represents the ListAuthMethodsResponse schema.

type ListBillingPlansParams

type ListBillingPlansParams struct {
	AppID string `json:"app_id,omitempty"`
}

ListBillingPlansParams holds optional query parameters for ListBillingPlans.

type ListClientsResponse

type ListClientsResponse struct {
	Clients []*OAuth2Client `json:"clients"`
}

ListClientsResponse represents the ListClientsResponse schema.

type ListConsentsParams

type ListConsentsParams struct {
	Purpose string `json:"purpose,omitempty"`
	Cursor  string `json:"cursor,omitempty"`
	Limit   int64  `json:"limit,omitempty"`
}

ListConsentsParams holds optional query parameters for ListConsents.

type ListCouponsParams

type ListCouponsParams struct {
	AppID string `json:"app_id,omitempty"`
}

ListCouponsParams holds optional query parameters for ListCoupons.

type ListCouponsResponse

type ListCouponsResponse struct {
	Coupons []*CouponResponse `json:"coupons"`
	Total   int64             `json:"total"`
}

ListCouponsResponse represents the ListCouponsResponse schema.

type ListDefinitionsResponse

type ListDefinitionsResponse struct {
	Groups []*DefinitionGroup `json:"groups"`
	Total  int64              `json:"total"`
}

ListDefinitionsResponse represents the ListDefinitionsResponse schema.

type ListEnvironmentsParams

type ListEnvironmentsParams struct {
	AppID string `json:"app_id,omitempty"`
}

ListEnvironmentsParams holds optional query parameters for ListEnvironments.

type ListGrantsResponse

type ListGrantsResponse struct {
	Grants []*GrantView `json:"grants"`
}

ListGrantsResponse represents the ListGrantsResponse schema.

type ListInvitationsParams

type ListInvitationsParams struct {
	Limit  int64  `json:"limit,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

ListInvitationsParams holds optional query parameters for ListInvitations.

type ListInvoicesParams

type ListInvoicesParams struct {
	AppID    string `json:"app_id,omitempty"`
	TenantID string `json:"tenant_id,omitempty"`
}

ListInvoicesParams holds optional query parameters for ListInvoices.

type ListInvoicesResponse

type ListInvoicesResponse struct {
	Invoices []*InvoiceResponse `json:"invoices"`
	Total    int64              `json:"total"`
}

ListInvoicesResponse represents the ListInvoicesResponse schema.

type ListKeysResponse

type ListKeysResponse struct {
	Keys  []*KeyListItem `json:"keys"`
	Total int64          `json:"total"`
}

ListKeysResponse represents the ListKeysResponse schema.

type ListMembersParams

type ListMembersParams struct {
	Limit  int64  `json:"limit,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

ListMembersParams holds optional query parameters for ListMembers.

type ListOAuth2ClientsParams

type ListOAuth2ClientsParams struct {
	AppID string `json:"app_id,omitempty"`
}

ListOAuth2ClientsParams holds optional query parameters for ListOAuth2Clients.

type ListOrganizationsParams

type ListOrganizationsParams struct {
	Limit  int64  `json:"limit,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

ListOrganizationsParams holds optional query parameters for ListOrganizations.

type ListPlansResponse

type ListPlansResponse struct {
	Plans []*PlanResponse `json:"plans"`
	Total int64           `json:"total"`
}

ListPlansResponse represents the ListPlansResponse schema.

type ListSessionsParams

type ListSessionsParams struct {
	Limit  int64  `json:"limit,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

ListSessionsParams holds optional query parameters for ListSessions.

type ListSettingsDefinitionsParams

type ListSettingsDefinitionsParams struct {
	Namespace string `json:"namespace,omitempty"`
	Category  string `json:"category,omitempty"`
}

ListSettingsDefinitionsParams holds optional query parameters for ListSettingsDefinitions.

type ListSubscriptionsParams

type ListSubscriptionsParams struct {
	AppID    string `json:"app_id,omitempty"`
	TenantID string `json:"tenant_id,omitempty"`
	Status   string `json:"status,omitempty"`
}

ListSubscriptionsParams holds optional query parameters for ListSubscriptions.

type ListSubscriptionsResponse

type ListSubscriptionsResponse struct {
	Subscriptions []*Response `json:"subscriptions"`
	Total         int64       `json:"total"`
}

ListSubscriptionsResponse represents the ListSubscriptionsResponse schema.

type ListTeamsParams

type ListTeamsParams struct {
	Limit  int64  `json:"limit,omitempty"`
	Cursor string `json:"cursor,omitempty"`
}

ListTeamsParams holds optional query parameters for ListTeams.

type ListWebhooksParams

type ListWebhooksParams struct {
	AppID string `json:"app_id,omitempty"`
}

ListWebhooksParams holds optional query parameters for ListWebhooks.

type LoginBeginResponse

type LoginBeginResponse struct {
	Options map[string]any `json:"options"`
}

LoginBeginResponse represents the LoginBeginResponse schema.

type LoginByDomainRequest

type LoginByDomainRequest struct {
	ConnectionID string `json:"connection_id,omitempty"`
	Email        string `json:"email"`
	ReturnURL    string `json:"return_url,omitempty"`
}

LoginByDomainRequest represents the LoginByDomainRequest schema.

type LoginFinishResponse

type LoginFinishResponse struct {
	RefreshToken string `json:"refresh_token,omitempty"`
	SessionToken string `json:"session_token,omitempty"`
	Status       string `json:"status"`
	UserID       string `json:"user_id"`
}

LoginFinishResponse represents the LoginFinishResponse schema.

type LoginResponse

type LoginResponse struct {
	LoginURL string `json:"login_url"`
	State    string `json:"state"`
}

LoginResponse represents the LoginResponse schema.

type MagiclinkVerifyRequest

type MagiclinkVerifyRequest struct {
	AppID string `json:"app_id,omitempty"`
	Token string `json:"token"`
}

MagiclinkVerifyRequest represents the MagiclinkVerifyRequest schema.

type MagiclinkVerifyResponse

type MagiclinkVerifyResponse struct {
	ExpiresAt    string `json:"expires_at"`
	RefreshToken string `json:"refresh_token"`
	SessionToken string `json:"session_token"`
	User         *User  `json:"user"`
}

MagiclinkVerifyResponse represents the MagiclinkVerifyResponse schema.

type MarkInvoicePaidRequest

type MarkInvoicePaidRequest struct {
	PaymentRef string `json:"payment_ref"`
}

MarkInvoicePaidRequest represents the MarkInvoicePaidRequest schema.

type MeResponse

type MeResponse struct {
	AppID             string         `json:"app_id"`
	BanExpires        string         `json:"ban_expires,omitempty"`
	BanReason         string         `json:"ban_reason,omitempty"`
	Banned            bool           `json:"banned"`
	CreatedAt         string         `json:"created_at"`
	DeletedAt         string         `json:"deleted_at,omitempty"`
	DisplayUsername   string         `json:"display_username,omitempty"`
	Email             string         `json:"email"`
	EmailVerified     bool           `json:"email_verified"`
	EnvID             string         `json:"env_id"`
	FirstName         string         `json:"first_name"`
	ID                string         `json:"id"`
	Image             string         `json:"image,omitempty"`
	LastName          string         `json:"last_name"`
	Metadata          map[string]any `json:"metadata,omitempty"`
	PasswordChangedAt string         `json:"password_changed_at,omitempty"`
	Phone             string         `json:"phone,omitempty"`
	PhoneVerified     bool           `json:"phone_verified"`
	Roles             []string       `json:"roles"`
	UpdatedAt         string         `json:"updated_at"`
	Username          string         `json:"username,omitempty"`
}

MeResponse represents the MeResponse schema.

type Member

type Member struct {
	CreatedAt string `json:"created_at"`
	ID        string `json:"id"`
	OrgID     string `json:"org_id"`
	Role      string `json:"role"`
	UpdatedAt string `json:"updated_at"`
	UserID    string `json:"user_id"`
}

Member represents the Member schema.

type MemberListResponse

type MemberListResponse struct {
	Members    []*Member `json:"members"`
	NextCursor string    `json:"next_cursor,omitempty"`
}

MemberListResponse represents the MemberListResponse schema.

type MemberRef

type MemberRef struct {
	Ref     string `json:"$ref,omitempty"`
	Display string `json:"display,omitempty"`
	Value   string `json:"value"`
}

MemberRef represents the MemberRef schema.

type Meta

type Meta struct {
	Created      string `json:"created,omitempty"`
	LastModified string `json:"last_modified,omitempty"`
	Location     string `json:"location,omitempty"`
	ResourceType string `json:"resource_type"`
}

Meta represents the Meta schema.

type MintChildPrincipalRequest

type MintChildPrincipalRequest struct {
	Name       string   `json:"name"`
	Scopes     []string `json:"scopes,omitempty"`
	TtlSeconds int64    `json:"ttl_seconds"`
}

MintChildPrincipalRequest is the request body for MintChildPrincipal.

type MintChildRequest

type MintChildRequest struct {
	Name       string   `json:"name"`
	Scopes     []string `json:"scopes,omitempty"`
	TtlSeconds int64    `json:"ttl_seconds"`
}

MintChildRequest represents the MintChildRequest schema.

type MintChildResponse

type MintChildResponse struct {
	CreatedAt string   `json:"created_at"`
	ExpiresAt string   `json:"expires_at,omitempty"`
	ID        string   `json:"id"`
	Key       string   `json:"key"`
	KeyPrefix string   `json:"key_prefix"`
	Name      string   `json:"name"`
	ParentID  string   `json:"parent_id"`
	Scopes    []string `json:"scopes,omitempty"`
}

MintChildResponse represents the MintChildResponse schema.

type Name

type Name struct {
	FamilyName string `json:"family_name"`
	Formatted  string `json:"formatted,omitempty"`
	GivenName  string `json:"given_name"`
}

Name represents the Name schema.

type OAuth2Client

type OAuth2Client struct {
	AppID                   string         `json:"app_id"`
	ClientID                string         `json:"client_id"`
	ClientSecretExpiresAt   string         `json:"client_secret_expires_at,omitempty"`
	CreatedAt               string         `json:"created_at"`
	DpopMode                string         `json:"dpop_mode,omitempty"`
	DynamicallyRegistered   bool           `json:"dynamically_registered"`
	FirstParty              bool           `json:"first_party"`
	GrantTypes              []string       `json:"grant_types"`
	ID                      string         `json:"id"`
	Metadata                map[string]any `json:"metadata,omitempty"`
	Name                    string         `json:"name"`
	PrincipalID             string         `json:"principal_id,omitempty"`
	Public                  bool           `json:"public"`
	RedirectUris            []string       `json:"redirect_uris"`
	Resources               []string       `json:"resources"`
	Scopes                  []string       `json:"scopes"`
	TokenEndpointAuthMethod string         `json:"token_endpoint_auth_method,omitempty"`
	UpdatedAt               string         `json:"updated_at"`
}

OAuth2Client represents the OAuth2Client schema.

type Oauth2AuthorizeParams

type Oauth2AuthorizeParams struct {
	ResponseType        string   `json:"response_type,omitempty"`
	ClientID            string   `json:"client_id,omitempty"`
	RedirectURI         string   `json:"redirect_uri,omitempty"`
	Scope               string   `json:"scope,omitempty"`
	State               string   `json:"state,omitempty"`
	CodeChallenge       string   `json:"code_challenge,omitempty"`
	CodeChallengeMethod string   `json:"code_challenge_method,omitempty"`
	Resource            []string `json:"resource,omitempty"`
	Prompt              string   `json:"prompt,omitempty"`
}

Oauth2AuthorizeParams holds optional query parameters for Oauth2Authorize.

type Oauth2DeviceAuthorizeRequest

type Oauth2DeviceAuthorizeRequest struct {
	ClientID string   `json:"client_id"`
	Resource []string `json:"resource,omitempty"`
	Scope    string   `json:"scope,omitempty"`
}

Oauth2DeviceAuthorizeRequest is the request body for Oauth2DeviceAuthorize.

type Oauth2DeviceCompleteRequest

type Oauth2DeviceCompleteRequest struct {
	Action   string `json:"action"`
	UserCode string `json:"user_code"`
}

Oauth2DeviceCompleteRequest is the request body for Oauth2DeviceComplete.

type Oauth2RegisterClientRequest

type Oauth2RegisterClientRequest struct {
	ClientName              string   `json:"client_name,omitempty"`
	ClientURI               string   `json:"client_uri,omitempty"`
	Contacts                []string `json:"contacts,omitempty"`
	GrantTypes              []string `json:"grant_types,omitempty"`
	LogoURI                 string   `json:"logo_uri,omitempty"`
	PolicyURI               string   `json:"policy_uri,omitempty"`
	RedirectUris            []string `json:"redirect_uris"`
	ResponseTypes           []string `json:"response_types,omitempty"`
	Scope                   string   `json:"scope,omitempty"`
	SoftwareID              string   `json:"software_id,omitempty"`
	SoftwareVersion         string   `json:"software_version,omitempty"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method,omitempty"`
	TosURI                  string   `json:"tos_uri,omitempty"`
}

Oauth2RegisterClientRequest is the request body for Oauth2RegisterClient.

type Oauth2RevokeRequest

type Oauth2RevokeRequest struct {
	ClientID      string `json:"client_id,omitempty"`
	ClientSecret  string `json:"client_secret,omitempty"`
	Token         string `json:"token"`
	TokenTypeHint string `json:"token_type_hint,omitempty"`
}

Oauth2RevokeRequest is the request body for Oauth2Revoke.

type Oauth2TokenRequest

type Oauth2TokenRequest struct {
	ActorToken         string   `json:"actor_token,omitempty"`
	ActorTokenType     string   `json:"actor_token_type,omitempty"`
	Audience           string   `json:"audience,omitempty"`
	ClientID           string   `json:"client_id,omitempty"`
	ClientSecret       string   `json:"client_secret,omitempty"`
	Code               string   `json:"code,omitempty"`
	CodeVerifier       string   `json:"code_verifier,omitempty"`
	DeviceCode         string   `json:"device_code,omitempty"`
	GrantType          string   `json:"grant_type"`
	RedirectURI        string   `json:"redirect_uri,omitempty"`
	RefreshToken       string   `json:"refresh_token,omitempty"`
	RequestedTokenType string   `json:"requested_token_type,omitempty"`
	Resource           []string `json:"resource,omitempty"`
	Scope              string   `json:"scope,omitempty"`
	SubjectToken       string   `json:"subject_token,omitempty"`
	SubjectTokenType   string   `json:"subject_token_type,omitempty"`
}

Oauth2TokenRequest is the request body for Oauth2Token.

type Oauth2UpdateRegistrationRequest

type Oauth2UpdateRegistrationRequest struct {
	ClientID                string   `json:"client_id,omitempty"`
	ClientName              string   `json:"client_name,omitempty"`
	ClientSecret            string   `json:"client_secret,omitempty"`
	ClientURI               string   `json:"client_uri,omitempty"`
	Contacts                []string `json:"contacts,omitempty"`
	GrantTypes              []string `json:"grant_types,omitempty"`
	LogoURI                 string   `json:"logo_uri,omitempty"`
	PolicyURI               string   `json:"policy_uri,omitempty"`
	RedirectUris            []string `json:"redirect_uris"`
	Scope                   string   `json:"scope,omitempty"`
	SoftwareID              string   `json:"software_id,omitempty"`
	SoftwareVersion         string   `json:"software_version,omitempty"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method,omitempty"`
	TosURI                  string   `json:"tos_uri,omitempty"`
}

Oauth2UpdateRegistrationRequest is the request body for Oauth2UpdateRegistration.

type Oauth2providerTokenResponse

type Oauth2providerTokenResponse struct {
	AccessToken     string `json:"access_token"`
	ExpiresIn       int64  `json:"expires_in"`
	IssuedTokenType string `json:"issued_token_type,omitempty"`
	RefreshToken    string `json:"refresh_token,omitempty"`
	Scope           string `json:"scope,omitempty"`
	TokenType       string `json:"token_type"`
}

Oauth2providerTokenResponse represents the Oauth2providerTokenResponse schema.

type OauthCallbackParams

type OauthCallbackParams struct {
	State string `json:"state,omitempty"`
	Code  string `json:"code,omitempty"`
	Error string `json:"error,omitempty"`
}

OauthCallbackParams holds optional query parameters for OauthCallback.

type ObjectFieldDef

type ObjectFieldDef struct {
	DisplayName string          `json:"display_name"`
	HelpText    string          `json:"help_text,omitempty"`
	InputType   string          `json:"input_type"`
	Key         string          `json:"key"`
	Options     []*SelectOption `json:"options,omitempty"`
	Placeholder string          `json:"placeholder,omitempty"`
	Required    bool            `json:"required,omitempty"`
	Sensitive   bool            `json:"sensitive,omitempty"`
}

ObjectFieldDef represents the ObjectFieldDef schema.

type Option

type Option func(*Client)

Option configures the AuthSome client.

func WithAPIKey

func WithAPIKey(key string) Option

WithAPIKey sets an API key for service-account authentication. The SDK sends the key as `X-API-Key`. Only secret keys are accepted (`ask_`, `sk_test_`, `sk_stg_`, `sk_live_`); publishable keys (`pk_*`) are rejected at configure time. The key MUST be paired with the App ID it was minted under (see WithAppID).

func WithAppID

func WithAppID(appID string) Option

WithAppID sets the App ID stamped onto every request as X-App-ID. Required by the API key auth strategy and App-scoped admin endpoints.

func WithCookieJar

func WithCookieJar(jar http.CookieJar) Option

WithCookieJar sets a cookie jar on the client so it can receive and resend session cookies (e.g. authsome_session) automatically.

func WithDiscoveryErrorHandler

func WithDiscoveryErrorHandler(fn func(error)) Option

WithDiscoveryErrorHandler installs a callback invoked whenever the SDK's lazy app-id discovery attempt fails. Useful for service-account clients running under orchestrators where manifest fetches can race upstream startup. Best-effort; the callback must not block.

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

WithHTTPClient sets a custom HTTP client.

func WithPublishableKey

func WithPublishableKey(key string) Option

WithPublishableKey sets the publishable key (`pk_live_*` / `pk_test_*` / `pk_stg_*`) stamped onto every request as X-Publishable-Key. The server resolves this header to an App on the public-auth path (signup, signin, forgot-password, resend-verification), so unauthenticated frontends do not need to know — or send — the App's UUID.

Only publishable keys are accepted; secret keys (sk_*, ask_*) supplied here are rejected because they would be silently exposed in any caller that thinks it's wiring a frontend client. Use WithAPIKey for secrets.

func WithSessionCookies

func WithSessionCookies() Option

WithSessionCookies creates a default cookie jar so the client automatically persists session cookies across requests.

func WithToken

func WithToken(token string) Option

WithToken sets the session token for authenticated requests.

Precedence with WithAPIKey: if both are set, the SDK sends ONLY the session token in `Authorization: Bearer` and does NOT send `X-API-Key`. Pick one — mixing the two confuses the server's API-key strategy.

type OrgListResponse

type OrgListResponse struct {
	NextCursor    string          `json:"next_cursor,omitempty"`
	Organizations []*Organization `json:"organizations"`
}

OrgListResponse represents the OrgListResponse schema.

type Organization

type Organization struct {
	AppID     string         `json:"app_id"`
	CreatedAt string         `json:"created_at"`
	CreatedBy string         `json:"created_by"`
	EnvID     string         `json:"env_id"`
	ID        string         `json:"id"`
	Metadata  map[string]any `json:"metadata,omitempty"`
	Name      string         `json:"name"`
	Slug      string         `json:"slug"`
	UpdatedAt string         `json:"updated_at"`
}

Organization represents the Organization schema.

type OrganizationStatusResponse

type OrganizationStatusResponse struct {
	Status string `json:"status"`
}

OrganizationStatusResponse represents the OrganizationStatusResponse schema.

type PasskeyListResponse

type PasskeyListResponse struct {
	Credentials []*CredentialInfo `json:"credentials"`
}

PasskeyListResponse represents the PasskeyListResponse schema.

type PasskeyLoginFinishRequest

type PasskeyLoginFinishRequest struct {
	ID       string             `json:"id"`
	RawId    string             `json:"raw_id"`
	Response *AssertionResponse `json:"response"`
	Type     string             `json:"type"`
}

PasskeyLoginFinishRequest is the request body for PasskeyLoginFinish.

type PasskeyRegisterBeginRequest

type PasskeyRegisterBeginRequest struct {
	DisplayName string `json:"display_name,omitempty"`
}

PasskeyRegisterBeginRequest is the request body for PasskeyRegisterBegin.

type PasskeyRegisterFinishRequest

type PasskeyRegisterFinishRequest struct {
	ID       string               `json:"id"`
	RawId    string               `json:"raw_id"`
	Response *AttestationResponse `json:"response"`
	Type     string               `json:"type"`
}

PasskeyRegisterFinishRequest is the request body for PasskeyRegisterFinish.

type Permission

type Permission struct {
	Action   string `json:"action"`
	ID       string `json:"id"`
	Resource string `json:"resource"`
	RoleID   string `json:"role_id"`
}

Permission represents the Permission schema.

type PermissionListResponse

type PermissionListResponse struct {
	Permissions []*Permission `json:"permissions"`
}

PermissionListResponse represents the PermissionListResponse schema.

type PhoneAuthStartRequest

type PhoneAuthStartRequest struct {
	AppID string `json:"app_id,omitempty"`
	Phone string `json:"phone"`
}

PhoneAuthStartRequest is the request body for PhoneAuthStart.

type PhoneAuthVerifyRequest

type PhoneAuthVerifyRequest struct {
	AppID string `json:"app_id,omitempty"`
	Code  string `json:"code"`
	Phone string `json:"phone"`
}

PhoneAuthVerifyRequest is the request body for PhoneAuthVerify.

type PhoneStartResponse

type PhoneStartResponse struct {
	ExpiresIn int64  `json:"expires_in"`
	Status    string `json:"status"`
}

PhoneStartResponse represents the PhoneStartResponse schema.

type PhoneVerifyRequest

type PhoneVerifyRequest struct {
	AppID string `json:"app_id,omitempty"`
	Code  string `json:"code"`
	Phone string `json:"phone"`
}

PhoneVerifyRequest represents the PhoneVerifyRequest schema.

type PhoneVerifyResponse

type PhoneVerifyResponse struct {
	ExpiresAt    string `json:"expires_at"`
	NewUser      bool   `json:"new_user"`
	RefreshToken string `json:"refresh_token"`
	SessionToken string `json:"session_token"`
	User         *User  `json:"user,omitempty"`
}

PhoneVerifyResponse represents the PhoneVerifyResponse schema.

type PlanResponse

type PlanResponse struct {
	AppID         string         `json:"app_id"`
	BaseAmount    string         `json:"base_amount,omitempty"`
	BillingPeriod string         `json:"billing_period,omitempty"`
	Currency      string         `json:"currency"`
	Description   string         `json:"description"`
	FeaturesCount int64          `json:"features_count"`
	ID            string         `json:"id"`
	IsAddon       bool           `json:"is_addon"`
	Metadata      map[string]any `json:"metadata,omitempty"`
	Name          string         `json:"name"`
	Slug          string         `json:"slug"`
	Status        string         `json:"status"`
	TrialDays     int64          `json:"trial_days"`
}

PlanResponse represents the PlanResponse schema.

type RecoveryRegenerateResponse

type RecoveryRegenerateResponse struct {
	Codes []string `json:"codes"`
}

RecoveryRegenerateResponse represents the RecoveryRegenerateResponse schema.

type RecoveryVerifyRequest

type RecoveryVerifyRequest struct {
	Code string `json:"code"`
}

RecoveryVerifyRequest represents the RecoveryVerifyRequest schema.

type RecoveryVerifyResponse

type RecoveryVerifyResponse struct {
	ChallengePassed bool  `json:"challenge_passed"`
	CodesRemaining  int64 `json:"codes_remaining"`
}

RecoveryVerifyResponse represents the RecoveryVerifyResponse schema.

type RefreshRequest

type RefreshRequest struct {
	RefreshToken string `json:"refresh_token,omitempty"`
}

RefreshRequest represents the RefreshRequest schema.

type RefreshTokensRequest

type RefreshTokensRequest struct {
	RefreshToken string `json:"refresh_token,omitempty"`
}

RefreshTokensRequest is the request body for RefreshTokens.

type RefreshedSession

type RefreshedSession struct {
	SessionToken string
	RefreshToken string
	ExpiresAt    time.Time

	// SetCookies holds the response's Set-Cookie header values, in order.
	SetCookies []string
}

RefreshedSession is the result of a cookie-forwarded refresh: the rotated tokens plus the raw Set-Cookie headers the identity server issued alongside them.

SetCookies matters as much as the tokens. The identity server resolves the session cookie's name, domain, path, Secure, HttpOnly, SameSite and the __Host- prefix opt-in from its own dynamic settings cascade, and a client-mode service has no access to that cascade — it holds no settings manager and no engine. Replaying these headers verbatim to the browser keeps the identity server the single source of truth for cookie attributes instead of making every downstream service guess at them.

type RegisterBeginRequest

type RegisterBeginRequest struct {
	DisplayName string `json:"display_name,omitempty"`
}

RegisterBeginRequest represents the RegisterBeginRequest schema.

type RegisterBeginResponse

type RegisterBeginResponse struct {
	Options map[string]any `json:"options"`
}

RegisterBeginResponse represents the RegisterBeginResponse schema.

type RegisterClientRequest

type RegisterClientRequest struct {
	ClientName              string   `json:"client_name,omitempty"`
	ClientURI               string   `json:"client_uri,omitempty"`
	Contacts                []string `json:"contacts,omitempty"`
	GrantTypes              []string `json:"grant_types,omitempty"`
	LogoURI                 string   `json:"logo_uri,omitempty"`
	PolicyURI               string   `json:"policy_uri,omitempty"`
	RedirectUris            []string `json:"redirect_uris"`
	ResponseTypes           []string `json:"response_types,omitempty"`
	Scope                   string   `json:"scope,omitempty"`
	SoftwareID              string   `json:"software_id,omitempty"`
	SoftwareVersion         string   `json:"software_version,omitempty"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method,omitempty"`
	TosURI                  string   `json:"tos_uri,omitempty"`
}

RegisterClientRequest represents the RegisterClientRequest schema.

type RegisterClientResponse

type RegisterClientResponse struct {
	ClientID                string   `json:"client_id"`
	ClientIDIssuedAt        int64    `json:"client_id_issued_at"`
	ClientName              string   `json:"client_name,omitempty"`
	ClientSecret            string   `json:"client_secret,omitempty"`
	ClientSecretExpiresAt   int64    `json:"client_secret_expires_at"`
	ClientURI               string   `json:"client_uri,omitempty"`
	Contacts                []string `json:"contacts,omitempty"`
	GrantTypes              []string `json:"grant_types"`
	LogoURI                 string   `json:"logo_uri,omitempty"`
	PolicyURI               string   `json:"policy_uri,omitempty"`
	RedirectUris            []string `json:"redirect_uris"`
	RegistrationAccessToken string   `json:"registration_access_token,omitempty"`
	RegistrationClientURI   string   `json:"registration_client_uri,omitempty"`
	ResponseTypes           []string `json:"response_types"`
	Scope                   string   `json:"scope"`
	SoftwareID              string   `json:"software_id,omitempty"`
	SoftwareVersion         string   `json:"software_version,omitempty"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method"`
	TosURI                  string   `json:"tos_uri,omitempty"`
}

RegisterClientResponse represents the RegisterClientResponse schema.

type RegisterFinishResponse

type RegisterFinishResponse struct {
	DisplayName string `json:"display_name"`
	ID          string `json:"id"`
	Status      string `json:"status"`
}

RegisterFinishResponse represents the RegisterFinishResponse schema.

type ResendEmailVerificationRequest

type ResendEmailVerificationRequest struct {
	AppID string `json:"app_id,omitempty"`
	Email string `json:"email"`
}

ResendEmailVerificationRequest is the request body for ResendEmailVerification.

type ResendVerificationRequest

type ResendVerificationRequest struct {
	AppID string `json:"app_id,omitempty"`
	Email string `json:"email"`
}

ResendVerificationRequest represents the ResendVerificationRequest schema.

type ResetPasswordRequest

type ResetPasswordRequest struct {
	NewPassword string `json:"new_password"`
	Token       string `json:"token"`
}

ResetPasswordRequest represents the ResetPasswordRequest schema.

type ResolveSettingParams

type ResolveSettingParams struct {
	AppID  string `json:"app_id,omitempty"`
	OrgID  string `json:"org_id,omitempty"`
	UserID string `json:"user_id,omitempty"`
}

ResolveSettingParams holds optional query parameters for ResolveSetting.

type ResolveSettingsParams

type ResolveSettingsParams struct {
	Namespace string `json:"namespace,omitempty"`
	AppID     string `json:"app_id,omitempty"`
	OrgID     string `json:"org_id,omitempty"`
	UserID    string `json:"user_id,omitempty"`
}

ResolveSettingsParams holds optional query parameters for ResolveSettings.

type ResolvedSetting

type ResolvedSetting struct {
	CanOverride    bool          `json:"can_override"`
	Definition     *Definition   `json:"definition,omitempty"`
	EffectiveValue string        `json:"effective_value"`
	EnforcedAt     string        `json:"enforced_at,omitempty"`
	ScopeValues    []*ScopeValue `json:"scope_values"`
}

ResolvedSetting represents the ResolvedSetting schema.

type ResolvedSettingResponse

type ResolvedSettingResponse struct {
	Setting *ResolvedSetting `json:"setting,omitempty"`
}

ResolvedSettingResponse represents the ResolvedSettingResponse schema.

type ResolvedSettingsResponse

type ResolvedSettingsResponse struct {
	Settings []*ResolvedSetting `json:"settings"`
}

ResolvedSettingsResponse represents the ResolvedSettingsResponse schema.

type ResourceTypeList

type ResourceTypeList struct {
}

ResourceTypeList represents the ResourceTypeList schema.

type Response

type Response struct {
	AppID              string `json:"app_id"`
	CanceledAt         string `json:"canceled_at,omitempty"`
	CurrentPeriodEnd   string `json:"current_period_end"`
	CurrentPeriodStart string `json:"current_period_start"`
	ID                 string `json:"id"`
	PlanID             string `json:"plan_id"`
	Status             string `json:"status"`
	TenantID           string `json:"tenant_id"`
	TrialEnd           string `json:"trial_end,omitempty"`
	TrialStart         string `json:"trial_start,omitempty"`
}

Response represents the Response schema.

type RevokeConsentRequest

type RevokeConsentRequest struct {
	AppID   string `json:"app_id,omitempty"`
	Purpose string `json:"purpose"`
}

RevokeConsentRequest represents the RevokeConsentRequest schema.

type Role

type Role struct {
	AppID       string `json:"app_id"`
	CreatedAt   string `json:"created_at"`
	Description string `json:"description,omitempty"`
	EnvID       string `json:"env_id"`
	ID          string `json:"id"`
	Name        string `json:"name"`
	ParentID    string `json:"parent_id,omitempty"`
	Slug        string `json:"slug"`
	UpdatedAt   string `json:"updated_at"`
}

Role represents the Role schema.

type RoleListResponse

type RoleListResponse struct {
	Roles []*Role `json:"roles"`
}

RoleListResponse represents the RoleListResponse schema.

type RotateClientSecretResponse

type RotateClientSecretResponse struct {
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	ID           string `json:"id"`
}

RotateClientSecretResponse represents the RotateClientSecretResponse schema.

type RotateWebhookSecretResponse

type RotateWebhookSecretResponse struct {
	Secret string `json:"secret"`
}

RotateWebhookSecretResponse represents the RotateWebhookSecretResponse schema.

type SMSSendRequest

type SMSSendRequest struct {
	Phone string `json:"phone,omitempty"`
}

SMSSendRequest represents the SMSSendRequest schema.

type SMSSendResponse

type SMSSendResponse struct {
	ExpiresInSeconds int64  `json:"expires_in_seconds"`
	PhoneMasked      string `json:"phone_masked"`
	Sent             bool   `json:"sent"`
}

SMSSendResponse represents the SMSSendResponse schema.

type SMSVerifyRequest

type SMSVerifyRequest struct {
	Code string `json:"code"`
}

SMSVerifyRequest represents the SMSVerifyRequest schema.

type SMSVerifyResponse

type SMSVerifyResponse struct {
	Method   string `json:"method"`
	Verified bool   `json:"verified"`
}

SMSVerifyResponse represents the SMSVerifyResponse schema.

type SchemaList

type SchemaList struct {
}

SchemaList represents the SchemaList schema.

type ScimListResponse

type ScimListResponse struct {
	Resources    []any    `json:"resources"`
	ItemsPerPage int64    `json:"items_per_page"`
	Schemas      []string `json:"schemas"`
	StartIndex   int64    `json:"start_index"`
	TotalResults int64    `json:"total_results"`
}

ScimListResponse represents the ScimListResponse schema.

type ScopeValue

type ScopeValue struct {
	Enforced  bool   `json:"enforced"`
	Scope     string `json:"scope"`
	ScopeID   string `json:"scope_id,omitempty"`
	UpdatedAt string `json:"updated_at,omitempty"`
	UpdatedBy string `json:"updated_by,omitempty"`
	Value     string `json:"value"`
	Version   int64  `json:"version,omitempty"`
}

ScopeValue represents the ScopeValue schema.

type SelectOption

type SelectOption struct {
	Label string `json:"label"`
	Value string `json:"value"`
}

SelectOption represents the SelectOption schema.

type SendMagicLinkRequest

type SendMagicLinkRequest struct {
	AppID string `json:"app_id,omitempty"`
	Email string `json:"email"`
}

SendMagicLinkRequest is the request body for SendMagicLink.

type SendRequest

type SendRequest struct {
	AppID string `json:"app_id,omitempty"`
	Email string `json:"email"`
}

SendRequest represents the SendRequest schema.

type SendResponse

type SendResponse struct {
	Status string `json:"status"`
}

SendResponse represents the SendResponse schema.

type SendSMSCodeRequest

type SendSMSCodeRequest struct {
	Phone string `json:"phone,omitempty"`
}

SendSMSCodeRequest is the request body for SendSMSCode.

type ServiceProviderConfig

type ServiceProviderConfig struct {
}

ServiceProviderConfig represents the ServiceProviderConfig schema.

type SessionListResponse

type SessionListResponse struct {
	NextCursor string           `json:"next_cursor,omitempty"`
	Sessions   []map[string]any `json:"sessions"`
}

SessionListResponse represents the SessionListResponse schema.

type SetAppClientConfigRequest

type SetAppClientConfigRequest struct {
	AppName                  string   `json:"app_name,omitempty"`
	LogoURL                  string   `json:"logo_url,omitempty"`
	MagicLinkEnabled         bool     `json:"magic_link_enabled,omitempty"`
	MFAEnabled               bool     `json:"mfa_enabled,omitempty"`
	MFAMethods               []string `json:"mfa_methods,omitempty"`
	MFARequired              bool     `json:"mfa_required,omitempty"`
	PasskeyEnabled           bool     `json:"passkey_enabled,omitempty"`
	PasswordEnabled          bool     `json:"password_enabled,omitempty"`
	RequireEmailVerification bool     `json:"require_email_verification,omitempty"`
	SignupEnabled            bool     `json:"signup_enabled,omitempty"`
	SocialEnabled            bool     `json:"social_enabled,omitempty"`
	SocialProviders          []string `json:"social_providers,omitempty"`
	SsoEnabled               bool     `json:"sso_enabled,omitempty"`
	WaitlistEnabled          bool     `json:"waitlist_enabled,omitempty"`
}

SetAppClientConfigRequest represents the SetAppClientConfigRequest schema.

type SetAppSessionConfigRequest

type SetAppSessionConfigRequest struct {
	BindToDevice            bool   `json:"bind_to_device,omitempty"`
	BindToIP                bool   `json:"bind_to_ip,omitempty"`
	MaxActiveSessions       int64  `json:"max_active_sessions,omitempty"`
	RefreshTokenTtlSeconds  int64  `json:"refresh_token_ttl_seconds,omitempty"`
	RotateRefreshToken      bool   `json:"rotate_refresh_token,omitempty"`
	TokenExchangeTtlSeconds int64  `json:"token_exchange_ttl_seconds,omitempty"`
	TokenFormat             string `json:"token_format,omitempty"`
	TokenTtlSeconds         int64  `json:"token_ttl_seconds,omitempty"`
}

SetAppSessionConfigRequest represents the SetAppSessionConfigRequest schema.

type SetSettingRequest

type SetSettingRequest struct {
	AppID   string `json:"app_id,omitempty"`
	OrgID   string `json:"org_id,omitempty"`
	Scope   string `json:"scope"`
	ScopeID string `json:"scope_id,omitempty"`
	Value   string `json:"value"`
}

SetSettingRequest represents the SetSettingRequest schema.

type SettingValueResponse

type SettingValueResponse struct {
	Key     string `json:"key"`
	Scope   string `json:"scope"`
	ScopeID string `json:"scope_id,omitempty"`
	Status  string `json:"status"`
	Value   string `json:"value"`
}

SettingValueResponse represents the SettingValueResponse schema.

type Settings

type Settings struct {
	AllowTestCredentials    bool           `json:"allow_test_credentials,omitempty"`
	CheckBreached           bool           `json:"check_breached,omitempty"`
	LockoutEnabled          bool           `json:"lockout_enabled,omitempty"`
	LockoutMaxAttempts      int64          `json:"lockout_max_attempts,omitempty"`
	OauthOverrides          map[string]any `json:"oauth_overrides,omitempty"`
	PasswordMinLength       int64          `json:"password_min_length,omitempty"`
	RateLimitEnabled        bool           `json:"rate_limit_enabled,omitempty"`
	RateLimitWindowSeconds  int64          `json:"rate_limit_window_seconds,omitempty"`
	RefreshTokenTtlSeconds  int64          `json:"refresh_token_ttl_seconds,omitempty"`
	SigninRateLimit         int64          `json:"signin_rate_limit,omitempty"`
	SignupRateLimit         int64          `json:"signup_rate_limit,omitempty"`
	SkipEmailVerification   bool           `json:"skip_email_verification,omitempty"`
	TokenExchangeTtlSeconds int64          `json:"token_exchange_ttl_seconds,omitempty"`
	TokenTtlSeconds         int64          `json:"token_ttl_seconds,omitempty"`
	WebhookURLOverride      string         `json:"webhook_url_override,omitempty"`
}

Settings represents the Settings schema.

type SignInRequest

type SignInRequest struct {
	AppID        string `json:"app_id,omitempty"`
	CaptchaToken string `json:"captcha_token,omitempty"`
	Email        string `json:"email,omitempty"`
	Password     string `json:"password"`
	Username     string `json:"username,omitempty"`
}

SignInRequest represents the SignInRequest schema.

type SignUpRequest

type SignUpRequest struct {
	AppID        string         `json:"app_id,omitempty"`
	CaptchaToken string         `json:"captcha_token,omitempty"`
	Email        string         `json:"email"`
	FirstName    string         `json:"first_name,omitempty"`
	LastName     string         `json:"last_name,omitempty"`
	Metadata     map[string]any `json:"metadata,omitempty"`
	Password     string         `json:"password"`
	Username     string         `json:"username,omitempty"`
}

SignUpRequest represents the SignUpRequest schema.

type SlugAvailableResponse

type SlugAvailableResponse struct {
	Available bool `json:"available"`
}

SlugAvailableResponse represents the SlugAvailableResponse schema.

type SocialAdminDeleteProviderParams

type SocialAdminDeleteProviderParams struct {
	AppID string `json:"app_id,omitempty"`
}

SocialAdminDeleteProviderParams holds optional query parameters for SocialAdminDeleteProvider.

type SocialAdminListProvidersParams

type SocialAdminListProvidersParams struct {
	AppID string `json:"app_id,omitempty"`
}

SocialAdminListProvidersParams holds optional query parameters for SocialAdminListProviders.

type SocialAdminUpsertProviderParams

type SocialAdminUpsertProviderParams struct {
	AppID string `json:"app_id,omitempty"`
}

SocialAdminUpsertProviderParams holds optional query parameters for SocialAdminUpsertProvider.

type SocialAdminUpsertProviderRequest

type SocialAdminUpsertProviderRequest struct {
	ClientID     string   `json:"client_id"`
	ClientSecret string   `json:"client_secret"`
	Enabled      bool     `json:"enabled,omitempty"`
	RedirectURL  string   `json:"redirect_url,omitempty"`
	Scopes       []string `json:"scopes,omitempty"`
}

SocialAdminUpsertProviderRequest is the request body for SocialAdminUpsertProvider.

type SocialCallbackResponse

type SocialCallbackResponse struct {
	ExpiresAt    string `json:"expires_at"`
	FrontendURL  string `json:"frontend_url,omitempty"`
	IsNewUser    bool   `json:"is_new_user"`
	Provider     string `json:"provider"`
	RedirectURL  string `json:"redirect_url,omitempty"`
	RefreshToken string `json:"refresh_token"`
	SessionToken string `json:"session_token"`
	User         *User  `json:"user"`
}

SocialCallbackResponse represents the SocialCallbackResponse schema.

type SocialStartResponse

type SocialStartResponse struct {
	AuthURL string `json:"auth_url"`
}

SocialStartResponse represents the SocialStartResponse schema.

type SsoAdminCreateConnectionRequest

type SsoAdminCreateConnectionRequest struct {
	AcsURL            string         `json:"acs_url,omitempty"`
	AllowedDomains    []string       `json:"allowed_domains,omitempty"`
	AppID             string         `json:"app_id,omitempty"`
	AttributeMappings map[string]any `json:"attribute_mappings,omitempty"`
	ClientID          string         `json:"client_id,omitempty"`
	ClientSecret      string         `json:"client_secret,omitempty"`
	Domain            string         `json:"domain"`
	EntityID          string         `json:"entity_id,omitempty"`
	IdpCertificate    string         `json:"idp_certificate,omitempty"`
	IdpMetadataXML    string         `json:"idp_metadata_xml,omitempty"`
	IdpSsoURL         string         `json:"idp_sso_url,omitempty"`
	Issuer            string         `json:"issuer,omitempty"`
	MetadataURL       string         `json:"metadata_url,omitempty"`
	OrgID             string         `json:"org_id,omitempty"`
	Protocol          string         `json:"protocol"`
	Provider          string         `json:"provider"`
	SignRequests      bool           `json:"sign_requests,omitempty"`
	TrustedFederation bool           `json:"trusted_federation,omitempty"`
}

SsoAdminCreateConnectionRequest is the request body for SsoAdminCreateConnection.

type SsoAdminListConnectionsParams

type SsoAdminListConnectionsParams struct {
	AppID string `json:"app_id,omitempty"`
}

SsoAdminListConnectionsParams holds optional query parameters for SsoAdminListConnections.

type SsoAdminUpdateConnectionRequest

type SsoAdminUpdateConnectionRequest struct {
	AcsURL            string         `json:"acs_url,omitempty"`
	Active            bool           `json:"active,omitempty"`
	AllowedDomains    []string       `json:"allowed_domains,omitempty"`
	AttributeMappings map[string]any `json:"attribute_mappings,omitempty"`
	ClientID          string         `json:"client_id,omitempty"`
	ClientSecret      string         `json:"client_secret,omitempty"`
	Domain            string         `json:"domain,omitempty"`
	EntityID          string         `json:"entity_id,omitempty"`
	IdpCertificate    string         `json:"idp_certificate,omitempty"`
	IdpMetadataXML    string         `json:"idp_metadata_xml,omitempty"`
	IdpSsoURL         string         `json:"idp_sso_url,omitempty"`
	Issuer            string         `json:"issuer,omitempty"`
	MetadataURL       string         `json:"metadata_url,omitempty"`
	Provider          string         `json:"provider,omitempty"`
	SignRequests      bool           `json:"sign_requests,omitempty"`
	TrustedFederation bool           `json:"trusted_federation,omitempty"`
}

SsoAdminUpdateConnectionRequest is the request body for SsoAdminUpdateConnection.

type SsoCallbackParams

type SsoCallbackParams struct {
	State string `json:"state,omitempty"`
	Code  string `json:"code,omitempty"`
	Error string `json:"error,omitempty"`
}

SsoCallbackParams holds optional query parameters for SsoCallback.

type SsoCallbackResponse

type SsoCallbackResponse struct {
	ExpiresAt    string `json:"expires_at"`
	IsNewUser    bool   `json:"is_new_user"`
	Provider     string `json:"provider"`
	RefreshToken string `json:"refresh_token"`
	SessionToken string `json:"session_token"`
	User         *User  `json:"user"`
}

SsoCallbackResponse represents the SsoCallbackResponse schema.

type SsoExchangeRequest

type SsoExchangeRequest struct {
	Code string `json:"code"`
}

SsoExchangeRequest is the request body for SsoExchange.

type StartOAuthParams

type StartOAuthParams struct {
	FrontendURL string `json:"frontend_url,omitempty"`
	RedirectURL string `json:"redirect_url,omitempty"`
}

StartOAuthParams holds optional query parameters for StartOAuth.

type StartRequest

type StartRequest struct {
	AppID string `json:"app_id,omitempty"`
	Phone string `json:"phone"`
}

StartRequest represents the StartRequest schema.

type StartSSOLoginByDomainRequest

type StartSSOLoginByDomainRequest struct {
	ConnectionID string `json:"connection_id,omitempty"`
	Email        string `json:"email"`
	ReturnURL    string `json:"return_url,omitempty"`
}

StartSSOLoginByDomainRequest is the request body for StartSSOLoginByDomain.

type StartSSOLoginParams

type StartSSOLoginParams struct {
	ReturnURL string `json:"return_url,omitempty"`
}

StartSSOLoginParams holds optional query parameters for StartSSOLogin.

type SwitchOrgRequest

type SwitchOrgRequest struct {
	OrgID string `json:"org_id"`
}

SwitchOrgRequest represents the SwitchOrgRequest schema.

type SwitchOrgResponse

type SwitchOrgResponse struct {
	OrgID     string `json:"org_id,omitempty"`
	SessionID string `json:"session_id"`
}

SwitchOrgResponse represents the SwitchOrgResponse schema.

type Team

type Team struct {
	CreatedAt string `json:"created_at"`
	ID        string `json:"id"`
	Name      string `json:"name"`
	OrgID     string `json:"org_id"`
	Slug      string `json:"slug"`
	UpdatedAt string `json:"updated_at"`
}

Team represents the Team schema.

type TeamListResponse

type TeamListResponse struct {
	NextCursor string  `json:"next_cursor,omitempty"`
	Teams      []*Team `json:"teams"`
}

TeamListResponse represents the TeamListResponse schema.

type TokenExchangeRequest

type TokenExchangeRequest struct {
	Scopes  []string `json:"scopes,omitempty"`
	Subject string   `json:"subject"`
}

TokenExchangeRequest represents the TokenExchangeRequest schema.

type TokenExchangeResponse

type TokenExchangeResponse struct {
	AccessToken     string   `json:"access_token"`
	Actor           string   `json:"actor"`
	ExpiresIn       int64    `json:"expires_in"`
	IssuedTokenType string   `json:"issued_token_type"`
	Scopes          []string `json:"scopes,omitempty"`
	Subject         string   `json:"subject"`
	TokenType       string   `json:"token_type"`
}

TokenExchangeResponse represents the TokenExchangeResponse schema.

type UIMetadata

type UIMetadata struct {
	Condition    *VisibilityCondition `json:"condition,omitempty"`
	HelpText     string               `json:"help_text,omitempty"`
	InputType    string               `json:"input_type"`
	ObjectFields []*ObjectFieldDef    `json:"object_fields,omitempty"`
	Options      []*SelectOption      `json:"options,omitempty"`
	Order        int64                `json:"order"`
	Placeholder  string               `json:"placeholder,omitempty"`
	ReadOnly     bool                 `json:"read_only,omitempty"`
	Section      string               `json:"section,omitempty"`
	Validation   *Validation          `json:"validation,omitempty"`
}

UIMetadata represents the UIMetadata schema.

type UnassignRoleRequest

type UnassignRoleRequest struct {
	UserID string `json:"user_id"`
}

UnassignRoleRequest represents the UnassignRoleRequest schema.

type UnenforceSettingParams

type UnenforceSettingParams struct {
	Scope   string `json:"scope,omitempty"`
	ScopeID string `json:"scope_id,omitempty"`
}

UnenforceSettingParams holds optional query parameters for UnenforceSetting.

type UnlinkAuthMethodResponse

type UnlinkAuthMethodResponse struct {
	Status string `json:"status"`
}

UnlinkAuthMethodResponse represents the UnlinkAuthMethodResponse schema.

type UpdateClientRequest

type UpdateClientRequest struct {
	AppID                   string   `json:"app_id,omitempty"`
	ClientID                string   `json:"client_id,omitempty"`
	FirstParty              bool     `json:"first_party,omitempty"`
	GrantTypes              []string `json:"grant_types,omitempty"`
	Name                    string   `json:"name,omitempty"`
	Public                  bool     `json:"public,omitempty"`
	RedirectUris            []string `json:"redirect_uris,omitempty"`
	Resources               []string `json:"resources,omitempty"`
	Scopes                  []string `json:"scopes,omitempty"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method,omitempty"`
}

UpdateClientRequest represents the UpdateClientRequest schema.

type UpdateClientResponse

type UpdateClientResponse struct {
	ClientID     string   `json:"client_id"`
	GrantTypes   []string `json:"grant_types"`
	ID           string   `json:"id"`
	Name         string   `json:"name"`
	Public       bool     `json:"public"`
	RedirectUris []string `json:"redirect_uris"`
	Resources    []string `json:"resources"`
	Scopes       []string `json:"scopes"`
}

UpdateClientResponse represents the UpdateClientResponse schema.

type UpdateEnvironmentRequest

type UpdateEnvironmentRequest struct {
	Color       string `json:"color,omitempty"`
	Description string `json:"description,omitempty"`
	Name        string `json:"name,omitempty"`
}

UpdateEnvironmentRequest represents the UpdateEnvironmentRequest schema.

type UpdateEnvironmentSettingsRequest

type UpdateEnvironmentSettingsRequest struct {
	AllowTestCredentials    bool           `json:"allow_test_credentials,omitempty"`
	CheckBreached           bool           `json:"check_breached,omitempty"`
	LockoutEnabled          bool           `json:"lockout_enabled,omitempty"`
	LockoutMaxAttempts      int64          `json:"lockout_max_attempts,omitempty"`
	OauthOverrides          map[string]any `json:"oauth_overrides,omitempty"`
	PasswordMinLength       int64          `json:"password_min_length,omitempty"`
	RateLimitEnabled        bool           `json:"rate_limit_enabled,omitempty"`
	RateLimitWindowSeconds  int64          `json:"rate_limit_window_seconds,omitempty"`
	RefreshTokenTtlSeconds  int64          `json:"refresh_token_ttl_seconds,omitempty"`
	SigninRateLimit         int64          `json:"signin_rate_limit,omitempty"`
	SignupRateLimit         int64          `json:"signup_rate_limit,omitempty"`
	SkipEmailVerification   bool           `json:"skip_email_verification,omitempty"`
	TokenExchangeTtlSeconds int64          `json:"token_exchange_ttl_seconds,omitempty"`
	TokenTtlSeconds         int64          `json:"token_ttl_seconds,omitempty"`
	WebhookURLOverride      string         `json:"webhook_url_override,omitempty"`
}

UpdateEnvironmentSettingsRequest represents the UpdateEnvironmentSettingsRequest schema.

type UpdateMeRequest

type UpdateMeRequest struct {
	FirstName string `json:"first_name,omitempty"`
	Image     string `json:"image,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	Username  string `json:"username,omitempty"`
}

UpdateMeRequest represents the UpdateMeRequest schema.

type UpdateMemberRequest

type UpdateMemberRequest struct {
	Role string `json:"role"`
}

UpdateMemberRequest represents the UpdateMemberRequest schema.

type UpdateOAuth2ClientRequest

type UpdateOAuth2ClientRequest struct {
	AppID                   string   `json:"app_id,omitempty"`
	ClientID                string   `json:"client_id,omitempty"`
	FirstParty              bool     `json:"first_party,omitempty"`
	GrantTypes              []string `json:"grant_types,omitempty"`
	Name                    string   `json:"name,omitempty"`
	Public                  bool     `json:"public,omitempty"`
	RedirectUris            []string `json:"redirect_uris,omitempty"`
	Resources               []string `json:"resources,omitempty"`
	Scopes                  []string `json:"scopes,omitempty"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method,omitempty"`
}

UpdateOAuth2ClientRequest is the request body for UpdateOAuth2Client.

type UpdateOrgRequest

type UpdateOrgRequest struct {
	Name string `json:"name,omitempty"`
}

UpdateOrgRequest represents the UpdateOrgRequest schema.

type UpdateOrganizationRequest

type UpdateOrganizationRequest struct {
	Name string `json:"name,omitempty"`
}

UpdateOrganizationRequest is the request body for UpdateOrganization.

type UpdateRegistrationRequest

type UpdateRegistrationRequest struct {
	ClientID                string   `json:"client_id,omitempty"`
	ClientName              string   `json:"client_name,omitempty"`
	ClientSecret            string   `json:"client_secret,omitempty"`
	ClientURI               string   `json:"client_uri,omitempty"`
	Contacts                []string `json:"contacts,omitempty"`
	GrantTypes              []string `json:"grant_types,omitempty"`
	LogoURI                 string   `json:"logo_uri,omitempty"`
	PolicyURI               string   `json:"policy_uri,omitempty"`
	RedirectUris            []string `json:"redirect_uris"`
	Scope                   string   `json:"scope,omitempty"`
	SoftwareID              string   `json:"software_id,omitempty"`
	SoftwareVersion         string   `json:"software_version,omitempty"`
	TokenEndpointAuthMethod string   `json:"token_endpoint_auth_method,omitempty"`
	TosURI                  string   `json:"tos_uri,omitempty"`
}

UpdateRegistrationRequest represents the UpdateRegistrationRequest schema.

type UpdateRoleRequest

type UpdateRoleRequest struct {
	Description string `json:"description,omitempty"`
	Name        string `json:"name,omitempty"`
	ParentID    string `json:"parent_id,omitempty"`
}

UpdateRoleRequest represents the UpdateRoleRequest schema.

type UpdateTeamRequest

type UpdateTeamRequest struct {
	Name string `json:"name,omitempty"`
	Slug string `json:"slug,omitempty"`
}

UpdateTeamRequest represents the UpdateTeamRequest schema.

type UpdateWebhookRequest

type UpdateWebhookRequest struct {
	Active bool     `json:"active,omitempty"`
	Events []string `json:"events,omitempty"`
	URL    string   `json:"url,omitempty"`
}

UpdateWebhookRequest represents the UpdateWebhookRequest schema.

type UsageItemResponse

type UsageItemResponse struct {
	FeatureKey  string `json:"feature_key"`
	FeatureName string `json:"feature_name"`
	FeatureType string `json:"feature_type"`
	Limit       int64  `json:"limit"`
	Period      string `json:"period"`
	Remaining   int64  `json:"remaining"`
	Used        int64  `json:"used"`
}

UsageItemResponse represents the UsageItemResponse schema.

type UsageSummaryResponse

type UsageSummaryResponse struct {
	Usage []*UsageItemResponse `json:"usage"`
}

UsageSummaryResponse represents the UsageSummaryResponse schema.

type User

type User struct {
	AppID             string         `json:"app_id"`
	BanExpires        string         `json:"ban_expires,omitempty"`
	BanReason         string         `json:"ban_reason,omitempty"`
	Banned            bool           `json:"banned"`
	CreatedAt         string         `json:"created_at"`
	DeletedAt         string         `json:"deleted_at,omitempty"`
	DisplayUsername   string         `json:"display_username,omitempty"`
	Email             string         `json:"email"`
	EmailVerified     bool           `json:"email_verified"`
	EnvID             string         `json:"env_id"`
	FirstName         string         `json:"first_name"`
	ID                string         `json:"id"`
	Image             string         `json:"image,omitempty"`
	LastName          string         `json:"last_name"`
	Metadata          map[string]any `json:"metadata,omitempty"`
	PasswordChangedAt string         `json:"password_changed_at,omitempty"`
	Phone             string         `json:"phone,omitempty"`
	PhoneVerified     bool           `json:"phone_verified"`
	UpdatedAt         string         `json:"updated_at"`
	Username          string         `json:"username,omitempty"`
}

User represents the User schema.

type UserInfo

type UserInfo struct {
	Email         string `json:"email,omitempty"`
	EmailVerified bool   `json:"email_verified,omitempty"`
	Name          string `json:"name,omitempty"`
	PhoneNumber   string `json:"phone_number,omitempty"`
	Sub           string `json:"sub"`
}

UserInfo represents the UserInfo schema.

type UserResource

type UserResource struct {
	Active     bool        `json:"active"`
	Emails     []*Email    `json:"emails,omitempty"`
	ExternalId string      `json:"external_id,omitempty"`
	Groups     []*GroupRef `json:"groups,omitempty"`
	ID         string      `json:"id,omitempty"`
	Meta       *Meta       `json:"meta,omitempty"`
	Name       *Name       `json:"name"`
	Schemas    []string    `json:"schemas"`
	UserName   string      `json:"user_name"`
}

UserResource represents the UserResource schema.

type UserRoleListResponse

type UserRoleListResponse struct {
	Roles []*Role `json:"roles"`
}

UserRoleListResponse represents the UserRoleListResponse schema.

type Validation

type Validation struct {
	Max      int64  `json:"max,omitempty"`
	MaxLen   int64  `json:"max_len,omitempty"`
	Min      int64  `json:"min,omitempty"`
	MinLen   int64  `json:"min_len,omitempty"`
	Pattern  string `json:"pattern,omitempty"`
	Required bool   `json:"required,omitempty"`
}

Validation represents the Validation schema.

type VerifyEmailRequest

type VerifyEmailRequest struct {
	AppID string `json:"app_id,omitempty"`
	Code  string `json:"code,omitempty"`
	Email string `json:"email,omitempty"`
	Token string `json:"token,omitempty"`
}

VerifyEmailRequest represents the VerifyEmailRequest schema.

type VerifyMFARecoveryRequest

type VerifyMFARecoveryRequest struct {
	Code string `json:"code"`
}

VerifyMFARecoveryRequest is the request body for VerifyMFARecovery.

type VerifyMFARequest

type VerifyMFARequest struct {
	Code string `json:"code"`
}

VerifyMFARequest represents the VerifyMFARequest schema.

type VerifyMFAResponse

type VerifyMFAResponse struct {
	Method        string   `json:"method"`
	RecoveryCodes []string `json:"recovery_codes,omitempty"`
	Verified      bool     `json:"verified"`
}

VerifyMFAResponse represents the VerifyMFAResponse schema.

type VerifyMagicLinkRequest

type VerifyMagicLinkRequest struct {
	AppID string `json:"app_id,omitempty"`
	Token string `json:"token"`
}

VerifyMagicLinkRequest is the request body for VerifyMagicLink.

type VerifySMSCodeRequest

type VerifySMSCodeRequest struct {
	Code string `json:"code"`
}

VerifySMSCodeRequest is the request body for VerifySMSCode.

type VisibilityCondition

type VisibilityCondition struct {
	Key      string `json:"key"`
	Operator string `json:"operator,omitempty"`
	Value    string `json:"value"`
}

VisibilityCondition represents the VisibilityCondition schema.

type VoidInvoiceRequest

type VoidInvoiceRequest struct {
	Reason string `json:"reason"`
}

VoidInvoiceRequest represents the VoidInvoiceRequest schema.

type Webhook

type Webhook struct {
	Active          bool     `json:"active"`
	AppID           string   `json:"app_id"`
	CreatedAt       string   `json:"created_at"`
	EnvID           string   `json:"env_id"`
	Events          []string `json:"events"`
	ID              string   `json:"id"`
	RelayEndpointID string   `json:"relay_endpoint_id,omitempty"`
	UpdatedAt       string   `json:"updated_at"`
	URL             string   `json:"url"`
}

Webhook represents the Webhook schema.

type WebhookListResponse

type WebhookListResponse struct {
	Webhooks []*Webhook `json:"webhooks"`
}

WebhookListResponse represents the WebhookListResponse schema.

Jump to

Keyboard shortcuts

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