package usecase

import "context"

// ProvisioningUseCase upserts members from external identity sources.
type ProvisioningUseCase interface {
	EnsureFromOIDC(ctx context.Context, req *EnsureFromOIDCRequest) (*MemberDTO, error)
	EnsureFromLDAP(ctx context.Context, req *EnsureFromLDAPRequest) (*MemberDTO, error)
	EnsureFromSCIM(ctx context.Context, req *EnsureFromSCIMRequest) (*MemberDTO, error)
}

// EnsureFromOIDCRequest upserts from ZITADEL OIDC id_token claims.
type EnsureFromOIDCRequest struct {
	TenantID      string
	ZitadelSub    string
	Email         string
	EmailVerified bool
	DisplayName   string
	Locale        string
}

// EnsureFromLDAPRequest upserts from LDAP / Directory Sync.
type EnsureFromLDAPRequest struct {
	TenantID    string
	ExternalID  string
	LDAPDN      string
	Username    string
	Email       string
	DisplayName string
	ZitadelSub  string
}

// EnsureFromSCIMRequest upserts from SCIM provisioning.
type EnsureFromSCIMRequest struct {
	TenantID    string
	ExternalID  string
	UserName    string
	Email       string
	DisplayName string
	Active      bool
	ZitadelSub  string
}
