package organization

import (
	"github.com/tidbcloud/AgentTeam/internal/store/model"
	"github.com/tidbcloud/AgentTeam/internal/store/storeerr"
)

var (
	ErrUnauthorized             = storeerr.ErrUnauthorized
	ErrForbidden                = storeerr.ErrForbidden
	ErrNotFound                 = storeerr.ErrNotFound
	ErrConflict                 = storeerr.ErrConflict
	ErrBadRequest               = storeerr.ErrBadRequest
	ErrGone                     = storeerr.ErrGone
	ErrSystemNotInitialized     = storeerr.ErrSystemNotInitialized
	ErrSystemAlreadyInitialized = storeerr.ErrSystemAlreadyInitialized
)

// WorkspaceSummary is the workspace projection organization needs from core store.
type WorkspaceSummary struct {
	OrganizationID string
	WorkspaceID    string
	Slug           string
	Name           string
	MemberID       string
	WorkspaceRole  string
}

// User is the organization-domain user projection shared with API/test ports.
type User = model.User

// EnsureOrganizationDirectoryUserParams describes one provider-owned human identity
// that must be materialized into the core user table before org projection.
type EnsureOrganizationDirectoryUserParams struct {
	Email            string
	DisplayName      string
	Provider         string
	ProviderTenantID string
	ExternalID       string
	EmailVerified    bool
}
