diff --git a/js/docs/src/content/docs/lex-reference/live/place-stream-live-recommendations.md b/js/docs/src/content/docs/lex-reference/live/place-stream-live-recommendations.md index bb70004c..d7ffbab2 100644 --- a/js/docs/src/content/docs/lex-reference/live/place-stream-live-recommendations.md +++ b/js/docs/src/content/docs/lex-reference/live/place-stream-live-recommendations.md @@ -15,7 +15,7 @@ description: Reference for the place.stream.live.recommendations lexicon A list of recommended streamers, in order of preference -**Record Key:** `self` +**Record Key:** `literal:self` **Record Properties:** @@ -36,7 +36,7 @@ A list of recommended streamers, in order of preference "main": { "type": "record", "description": "A list of recommended streamers, in order of preference", - "key": "self", + "key": "literal:self", "record": { "type": "object", "required": ["streamers", "createdAt"], diff --git a/pkg/spxrpc/stubs.go b/pkg/spxrpc/stubs.go index 70ab7b47..65cdc308 100644 --- a/pkg/spxrpc/stubs.go +++ b/pkg/spxrpc/stubs.go @@ -349,9 +349,9 @@ func (s *Server) HandlePlaceStreamLiveGetRecommendations(c echo.Context) error { ctx, span := otel.Tracer("server").Start(c.Request().Context(), "HandlePlaceStreamLiveGetRecommendations") defer span.End() userDID := c.QueryParam("userDID") - var out *placestreamtypes.LiveGetRecommendations_Output + var out *placestream.LiveGetRecommendations_Output var handleErr error - // func (s *Server) handlePlaceStreamLiveGetRecommendations(ctx context.Context,userDID string) (*placestreamtypes.LiveGetRecommendations_Output, error) + // func (s *Server) handlePlaceStreamLiveGetRecommendations(ctx context.Context,userDID string) (*placestream.LiveGetRecommendations_Output, error) out, handleErr = s.handlePlaceStreamLiveGetRecommendations(ctx, userDID) if handleErr != nil { return handleErr @@ -400,9 +400,9 @@ func (s *Server) HandlePlaceStreamLiveSearchActorsTypeahead(c echo.Context) erro limit = 10 } q := c.QueryParam("q") - var out *placestreamtypes.LiveSearchActorsTypeahead_Output + var out *placestream.LiveSearchActorsTypeahead_Output var handleErr error - // func (s *Server) handlePlaceStreamLiveSearchActorsTypeahead(ctx context.Context,limit int,q string) (*placestreamtypes.LiveSearchActorsTypeahead_Output, error) + // func (s *Server) handlePlaceStreamLiveSearchActorsTypeahead(ctx context.Context,limit int,q string) (*placestream.LiveSearchActorsTypeahead_Output, error) out, handleErr = s.handlePlaceStreamLiveSearchActorsTypeahead(ctx, limit, q) if handleErr != nil { return handleErr diff --git a/pkg/streamplace/livegetRecommendations.go b/pkg/streamplace/livegetRecommendations.go index 773c32ba..12929dab 100644 --- a/pkg/streamplace/livegetRecommendations.go +++ b/pkg/streamplace/livegetRecommendations.go @@ -1,22 +1,20 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package streamplace +// Lexicon schema: place.stream.live.getRecommendations -// schema: place.stream.live.getRecommendations +package streamplace import ( "context" "encoding/json" "fmt" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // LiveGetRecommendations_LivestreamRecommendation is a "livestreamRecommendation" in the place.stream.live.getRecommendations schema. -// -// RECORDTYPE: LiveGetRecommendations_LivestreamRecommendation type LiveGetRecommendations_LivestreamRecommendation struct { - LexiconTypeID string `json:"$type,const=place.stream.live.getRecommendations#livestreamRecommendation" cborgen:"$type,const=place.stream.live.getRecommendations#livestreamRecommendation"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=place.stream.live.getRecommendations#livestreamRecommendation"` // did: The DID of the recommended streamer Did string `json:"did" cborgen:"did"` // source: Source of the recommendation @@ -40,10 +38,11 @@ func (t *LiveGetRecommendations_Output_Recommendations_Elem) MarshalJSON() ([]by t.LiveGetRecommendations_LivestreamRecommendation.LexiconTypeID = "place.stream.live.getRecommendations#livestreamRecommendation" return json.Marshal(t.LiveGetRecommendations_LivestreamRecommendation) } - return nil, fmt.Errorf("cannot marshal empty enum") + return nil, fmt.Errorf("can not marshal empty union as JSON") } + func (t *LiveGetRecommendations_Output_Recommendations_Elem) UnmarshalJSON(b []byte) error { - typ, err := util.TypeExtract(b) + typ, err := lexutil.TypeExtract(b) if err != nil { return err } @@ -52,7 +51,6 @@ func (t *LiveGetRecommendations_Output_Recommendations_Elem) UnmarshalJSON(b []b case "place.stream.live.getRecommendations#livestreamRecommendation": t.LiveGetRecommendations_LivestreamRecommendation = new(LiveGetRecommendations_LivestreamRecommendation) return json.Unmarshal(b, t.LiveGetRecommendations_LivestreamRecommendation) - default: return nil } @@ -61,12 +59,12 @@ func (t *LiveGetRecommendations_Output_Recommendations_Elem) UnmarshalJSON(b []b // LiveGetRecommendations calls the XRPC method "place.stream.live.getRecommendations". // // userDID: The DID of the user whose recommendations to fetch -func LiveGetRecommendations(ctx context.Context, c util.LexClient, userDID string) (*LiveGetRecommendations_Output, error) { +func LiveGetRecommendations(ctx context.Context, c lexutil.LexClient, userDID string) (*LiveGetRecommendations_Output, error) { var out LiveGetRecommendations_Output params := map[string]interface{}{} params["userDID"] = userDID - if err := c.LexDo(ctx, util.Query, "", "place.stream.live.getRecommendations", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "place.stream.live.getRecommendations", params, nil, &out); err != nil { return nil, err } diff --git a/pkg/streamplace/liverecommendations.go b/pkg/streamplace/liverecommendations.go index 7a59cdb8..1873539c 100644 --- a/pkg/streamplace/liverecommendations.go +++ b/pkg/streamplace/liverecommendations.go @@ -1,19 +1,19 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package streamplace +// Lexicon schema: place.stream.live.recommendations -// schema: place.stream.live.recommendations +package streamplace import ( - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) func init() { - util.RegisterType("place.stream.live.recommendations", &LiveRecommendations{}) -} // -// RECORDTYPE: LiveRecommendations + lexutil.RegisterType("place.stream.live.recommendations", &LiveRecommendations{}) +} + type LiveRecommendations struct { - LexiconTypeID string `json:"$type,const=place.stream.live.recommendations" cborgen:"$type,const=place.stream.live.recommendations"` + LexiconTypeID string `json:"$type" cborgen:"$type,const=place.stream.live.recommendations"` // createdAt: Client-declared timestamp when this list was created. CreatedAt string `json:"createdAt" cborgen:"createdAt"` // streamers: Ordered list of recommended streamer DIDs diff --git a/pkg/streamplace/livesearchActorsTypeahead.go b/pkg/streamplace/livesearchActorsTypeahead.go index 864fbedc..f53e84e1 100644 --- a/pkg/streamplace/livesearchActorsTypeahead.go +++ b/pkg/streamplace/livesearchActorsTypeahead.go @@ -1,13 +1,13 @@ // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. -package streamplace +// Lexicon schema: place.stream.live.searchActorsTypeahead -// schema: place.stream.live.searchActorsTypeahead +package streamplace import ( "context" - "github.com/bluesky-social/indigo/lex/util" + lexutil "github.com/bluesky-social/indigo/lex/util" ) // LiveSearchActorsTypeahead_Actor is a "actor" in the place.stream.live.searchActorsTypeahead schema. @@ -26,7 +26,7 @@ type LiveSearchActorsTypeahead_Output struct { // LiveSearchActorsTypeahead calls the XRPC method "place.stream.live.searchActorsTypeahead". // // q: Search query prefix; not a full query string. -func LiveSearchActorsTypeahead(ctx context.Context, c util.LexClient, limit int64, q string) (*LiveSearchActorsTypeahead_Output, error) { +func LiveSearchActorsTypeahead(ctx context.Context, c lexutil.LexClient, limit int64, q string) (*LiveSearchActorsTypeahead_Output, error) { var out LiveSearchActorsTypeahead_Output params := map[string]interface{}{} @@ -36,7 +36,7 @@ func LiveSearchActorsTypeahead(ctx context.Context, c util.LexClient, limit int6 if q != "" { params["q"] = q } - if err := c.LexDo(ctx, util.Query, "", "place.stream.live.searchActorsTypeahead", params, nil, &out); err != nil { + if err := c.LexDo(ctx, lexutil.Query, "", "place.stream.live.searchActorsTypeahead", params, nil, &out); err != nil { return nil, err }