feat: add ReviewSubmitter interface to ServiceDeps
This commit is contained in:
parent
a174eb943d
commit
1ede7d50be
@ -48,6 +48,7 @@ type ServiceDeps struct {
|
|||||||
|
|
||||||
// Core RPC services — pre-built bindings for CMS-provided services
|
// Core RPC services — pre-built bindings for CMS-provided services
|
||||||
CoreServiceBindings CoreServiceBindings
|
CoreServiceBindings CoreServiceBindings
|
||||||
|
ReviewSubmitter ReviewSubmitter
|
||||||
|
|
||||||
// Extension points — typed as narrow interfaces where possible
|
// Extension points — typed as narrow interfaces where possible
|
||||||
JobRunner JobRunner
|
JobRunner JobRunner
|
||||||
|
|||||||
23
plugin/reviews.go
Normal file
23
plugin/reviews.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package plugin
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
|
"github.com/google/uuid"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ReviewSubmitter allows plugins to submit community reviews programmatically
|
||||||
|
// without importing CMS proto types.
|
||||||
|
type ReviewSubmitter interface {
|
||||||
|
SubmitReview(ctx context.Context, params SubmitReviewParams) (reviewID string, err error)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SubmitReviewParams contains the fields needed to submit a community review.
|
||||||
|
type SubmitReviewParams struct {
|
||||||
|
TableID uuid.UUID
|
||||||
|
RowID uuid.UUID
|
||||||
|
OverallRating int32
|
||||||
|
ReviewText string
|
||||||
|
Ratings map[string]any
|
||||||
|
Photos []string
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user