package subscriptions

import (
	"context"

	"github.com/tech/sendico/edge/callbacks/internal/model"
	"github.com/tech/sendico/edge/callbacks/internal/storage"
	"github.com/tech/sendico/pkg/mlogger"
	"go.mongodb.org/mongo-driver/v2/bson"
)

// Resolver resolves active webhook endpoints for an event.
type Resolver interface {
	Resolve(ctx context.Context, eventType string, organizationRef bson.ObjectID) ([]model.Endpoint, error)
}

// Dependencies defines subscriptions resolver dependencies.
type Dependencies struct {
	EndpointRepo storage.EndpointRepo
	Logger       mlogger.Logger
}
