this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Generate lexicons (#1151)

authored by

rafael and committed by
GitHub
a8865584 214d5c43

+408 -1
+105
api/atproto/tempcheckHandleAvailability.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.checkHandleAvailability 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + ) 14 + 15 + // TempCheckHandleAvailability_Output is the output of a com.atproto.temp.checkHandleAvailability call. 16 + type TempCheckHandleAvailability_Output struct { 17 + // handle: Echo of the input handle. 18 + Handle string `json:"handle" cborgen:"handle"` 19 + Result *TempCheckHandleAvailability_Output_Result `json:"result" cborgen:"result"` 20 + } 21 + 22 + type TempCheckHandleAvailability_Output_Result struct { 23 + TempCheckHandleAvailability_ResultAvailable *TempCheckHandleAvailability_ResultAvailable 24 + TempCheckHandleAvailability_ResultUnavailable *TempCheckHandleAvailability_ResultUnavailable 25 + } 26 + 27 + func (t *TempCheckHandleAvailability_Output_Result) MarshalJSON() ([]byte, error) { 28 + if t.TempCheckHandleAvailability_ResultAvailable != nil { 29 + t.TempCheckHandleAvailability_ResultAvailable.LexiconTypeID = "com.atproto.temp.checkHandleAvailability#resultAvailable" 30 + return json.Marshal(t.TempCheckHandleAvailability_ResultAvailable) 31 + } 32 + if t.TempCheckHandleAvailability_ResultUnavailable != nil { 33 + t.TempCheckHandleAvailability_ResultUnavailable.LexiconTypeID = "com.atproto.temp.checkHandleAvailability#resultUnavailable" 34 + return json.Marshal(t.TempCheckHandleAvailability_ResultUnavailable) 35 + } 36 + return nil, fmt.Errorf("cannot marshal empty enum") 37 + } 38 + func (t *TempCheckHandleAvailability_Output_Result) UnmarshalJSON(b []byte) error { 39 + typ, err := util.TypeExtract(b) 40 + if err != nil { 41 + return err 42 + } 43 + 44 + switch typ { 45 + case "com.atproto.temp.checkHandleAvailability#resultAvailable": 46 + t.TempCheckHandleAvailability_ResultAvailable = new(TempCheckHandleAvailability_ResultAvailable) 47 + return json.Unmarshal(b, t.TempCheckHandleAvailability_ResultAvailable) 48 + case "com.atproto.temp.checkHandleAvailability#resultUnavailable": 49 + t.TempCheckHandleAvailability_ResultUnavailable = new(TempCheckHandleAvailability_ResultUnavailable) 50 + return json.Unmarshal(b, t.TempCheckHandleAvailability_ResultUnavailable) 51 + 52 + default: 53 + return nil 54 + } 55 + } 56 + 57 + // TempCheckHandleAvailability_ResultAvailable is a "resultAvailable" in the com.atproto.temp.checkHandleAvailability schema. 58 + // 59 + // Indicates the provided handle is available. 60 + // 61 + // RECORDTYPE: TempCheckHandleAvailability_ResultAvailable 62 + type TempCheckHandleAvailability_ResultAvailable struct { 63 + LexiconTypeID string `json:"$type,const=com.atproto.temp.checkHandleAvailability#resultAvailable" cborgen:"$type,const=com.atproto.temp.checkHandleAvailability#resultAvailable"` 64 + } 65 + 66 + // TempCheckHandleAvailability_ResultUnavailable is a "resultUnavailable" in the com.atproto.temp.checkHandleAvailability schema. 67 + // 68 + // Indicates the provided handle is unavailable and gives suggestions of available handles. 69 + // 70 + // RECORDTYPE: TempCheckHandleAvailability_ResultUnavailable 71 + type TempCheckHandleAvailability_ResultUnavailable struct { 72 + LexiconTypeID string `json:"$type,const=com.atproto.temp.checkHandleAvailability#resultUnavailable" cborgen:"$type,const=com.atproto.temp.checkHandleAvailability#resultUnavailable"` 73 + // suggestions: List of suggested handles based on the provided inputs. 74 + Suggestions []*TempCheckHandleAvailability_Suggestion `json:"suggestions" cborgen:"suggestions"` 75 + } 76 + 77 + // TempCheckHandleAvailability_Suggestion is a "suggestion" in the com.atproto.temp.checkHandleAvailability schema. 78 + type TempCheckHandleAvailability_Suggestion struct { 79 + Handle string `json:"handle" cborgen:"handle"` 80 + // method: Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics. 81 + Method string `json:"method" cborgen:"method"` 82 + } 83 + 84 + // TempCheckHandleAvailability calls the XRPC method "com.atproto.temp.checkHandleAvailability". 85 + // 86 + // birthDate: User-provided birth date. Might be used to build handle suggestions. 87 + // email: User-provided email. Might be used to build handle suggestions. 88 + // handle: Tentative handle. Will be checked for availability or used to build handle suggestions. 89 + func TempCheckHandleAvailability(ctx context.Context, c util.LexClient, birthDate string, email string, handle string) (*TempCheckHandleAvailability_Output, error) { 90 + var out TempCheckHandleAvailability_Output 91 + 92 + params := map[string]interface{}{} 93 + if birthDate != "" { 94 + params["birthDate"] = birthDate 95 + } 96 + if email != "" { 97 + params["email"] = email 98 + } 99 + params["handle"] = handle 100 + if err := c.LexDo(ctx, util.Query, "", "com.atproto.temp.checkHandleAvailability", params, nil, &out); err != nil { 101 + return nil, err 102 + } 103 + 104 + return &out, nil 105 + }
+26
api/bsky/bookmarkcreateBookmark.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.bookmark.createBookmark 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // BookmarkCreateBookmark_Input is the input argument to a app.bsky.bookmark.createBookmark call. 14 + type BookmarkCreateBookmark_Input struct { 15 + Cid string `json:"cid" cborgen:"cid"` 16 + Uri string `json:"uri" cborgen:"uri"` 17 + } 18 + 19 + // BookmarkCreateBookmark calls the XRPC method "app.bsky.bookmark.createBookmark". 20 + func BookmarkCreateBookmark(ctx context.Context, c util.LexClient, input *BookmarkCreateBookmark_Input) error { 21 + if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.bookmark.createBookmark", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+72
api/bsky/bookmarkdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.bookmark.defs 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 12 + "github.com/bluesky-social/indigo/lex/util" 13 + ) 14 + 15 + // BookmarkDefs_Bookmark is a "bookmark" in the app.bsky.bookmark.defs schema. 16 + // 17 + // Object used to store bookmark data in stash. 18 + type BookmarkDefs_Bookmark struct { 19 + // subject: A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported. 20 + Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` 21 + } 22 + 23 + // BookmarkDefs_BookmarkView is a "bookmarkView" in the app.bsky.bookmark.defs schema. 24 + type BookmarkDefs_BookmarkView struct { 25 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 26 + Item *BookmarkDefs_BookmarkView_Item `json:"item" cborgen:"item"` 27 + // subject: A strong ref to the bookmarked record. 28 + Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` 29 + } 30 + 31 + type BookmarkDefs_BookmarkView_Item struct { 32 + FeedDefs_BlockedPost *FeedDefs_BlockedPost 33 + FeedDefs_NotFoundPost *FeedDefs_NotFoundPost 34 + FeedDefs_PostView *FeedDefs_PostView 35 + } 36 + 37 + func (t *BookmarkDefs_BookmarkView_Item) MarshalJSON() ([]byte, error) { 38 + if t.FeedDefs_BlockedPost != nil { 39 + t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" 40 + return json.Marshal(t.FeedDefs_BlockedPost) 41 + } 42 + if t.FeedDefs_NotFoundPost != nil { 43 + t.FeedDefs_NotFoundPost.LexiconTypeID = "app.bsky.feed.defs#notFoundPost" 44 + return json.Marshal(t.FeedDefs_NotFoundPost) 45 + } 46 + if t.FeedDefs_PostView != nil { 47 + t.FeedDefs_PostView.LexiconTypeID = "app.bsky.feed.defs#postView" 48 + return json.Marshal(t.FeedDefs_PostView) 49 + } 50 + return nil, fmt.Errorf("cannot marshal empty enum") 51 + } 52 + func (t *BookmarkDefs_BookmarkView_Item) UnmarshalJSON(b []byte) error { 53 + typ, err := util.TypeExtract(b) 54 + if err != nil { 55 + return err 56 + } 57 + 58 + switch typ { 59 + case "app.bsky.feed.defs#blockedPost": 60 + t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) 61 + return json.Unmarshal(b, t.FeedDefs_BlockedPost) 62 + case "app.bsky.feed.defs#notFoundPost": 63 + t.FeedDefs_NotFoundPost = new(FeedDefs_NotFoundPost) 64 + return json.Unmarshal(b, t.FeedDefs_NotFoundPost) 65 + case "app.bsky.feed.defs#postView": 66 + t.FeedDefs_PostView = new(FeedDefs_PostView) 67 + return json.Unmarshal(b, t.FeedDefs_PostView) 68 + 69 + default: 70 + return nil 71 + } 72 + }
+25
api/bsky/bookmarkdeleteBookmark.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.bookmark.deleteBookmark 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // BookmarkDeleteBookmark_Input is the input argument to a app.bsky.bookmark.deleteBookmark call. 14 + type BookmarkDeleteBookmark_Input struct { 15 + Uri string `json:"uri" cborgen:"uri"` 16 + } 17 + 18 + // BookmarkDeleteBookmark calls the XRPC method "app.bsky.bookmark.deleteBookmark". 19 + func BookmarkDeleteBookmark(ctx context.Context, c util.LexClient, input *BookmarkDeleteBookmark_Input) error { 20 + if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.bookmark.deleteBookmark", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+35
api/bsky/bookmarkgetBookmarks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.bookmark.getBookmarks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // BookmarkGetBookmarks_Output is the output of a app.bsky.bookmark.getBookmarks call. 14 + type BookmarkGetBookmarks_Output struct { 15 + Bookmarks []*BookmarkDefs_BookmarkView `json:"bookmarks" cborgen:"bookmarks"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // BookmarkGetBookmarks calls the XRPC method "app.bsky.bookmark.getBookmarks". 20 + func BookmarkGetBookmarks(ctx context.Context, c util.LexClient, cursor string, limit int64) (*BookmarkGetBookmarks_Output, error) { 21 + var out BookmarkGetBookmarks_Output 22 + 23 + params := map[string]interface{}{} 24 + if cursor != "" { 25 + params["cursor"] = cursor 26 + } 27 + if limit != 0 { 28 + params["limit"] = limit 29 + } 30 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.bookmark.getBookmarks", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+2
api/bsky/feeddefs.go
··· 125 125 type FeedDefs_PostView struct { 126 126 LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#postView" cborgen:"$type,const=app.bsky.feed.defs#postView"` 127 127 Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` 128 + BookmarkCount *int64 `json:"bookmarkCount,omitempty" cborgen:"bookmarkCount,omitempty"` 128 129 Cid string `json:"cid" cborgen:"cid"` 129 130 Embed *FeedDefs_PostView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 130 131 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` ··· 484 485 // 485 486 // Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. 486 487 type FeedDefs_ViewerState struct { 488 + Bookmarked *bool `json:"bookmarked,omitempty" cborgen:"bookmarked,omitempty"` 487 489 EmbeddingDisabled *bool `json:"embeddingDisabled,omitempty" cborgen:"embeddingDisabled,omitempty"` 488 490 Like *string `json:"like,omitempty" cborgen:"like,omitempty"` 489 491 Pinned *bool `json:"pinned,omitempty" cborgen:"pinned,omitempty"`
+5 -1
api/bsky/graphgetLists.go
··· 19 19 // GraphGetLists calls the XRPC method "app.bsky.graph.getLists". 20 20 // 21 21 // actor: The account (actor) to enumerate lists from. 22 - func GraphGetLists(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetLists_Output, error) { 22 + // purposes: Optional filter by list purpose. If not specified, all supported types are returned. 23 + func GraphGetLists(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64, purposes []string) (*GraphGetLists_Output, error) { 23 24 var out GraphGetLists_Output 24 25 25 26 params := map[string]interface{}{} ··· 29 30 } 30 31 if limit != 0 { 31 32 params["limit"] = limit 33 + } 34 + if len(purposes) != 0 { 35 + params["purposes"] = purposes 32 36 } 33 37 if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getLists", params, nil, &out); err != nil { 34 38 return nil, err
+50
api/bsky/graphgetListsWithMembership.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getListsWithMembership 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // GraphGetListsWithMembership_ListWithMembership is a "listWithMembership" in the app.bsky.graph.getListsWithMembership schema. 14 + // 15 + // A list and an optional list item indicating membership of a target user to that list. 16 + type GraphGetListsWithMembership_ListWithMembership struct { 17 + List *GraphDefs_ListView `json:"list" cborgen:"list"` 18 + ListItem *GraphDefs_ListItemView `json:"listItem,omitempty" cborgen:"listItem,omitempty"` 19 + } 20 + 21 + // GraphGetListsWithMembership_Output is the output of a app.bsky.graph.getListsWithMembership call. 22 + type GraphGetListsWithMembership_Output struct { 23 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 24 + ListsWithMembership []*GraphGetListsWithMembership_ListWithMembership `json:"listsWithMembership" cborgen:"listsWithMembership"` 25 + } 26 + 27 + // GraphGetListsWithMembership calls the XRPC method "app.bsky.graph.getListsWithMembership". 28 + // 29 + // actor: The account (actor) to check for membership. 30 + // purposes: Optional filter by list purpose. If not specified, all supported types are returned. 31 + func GraphGetListsWithMembership(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64, purposes []string) (*GraphGetListsWithMembership_Output, error) { 32 + var out GraphGetListsWithMembership_Output 33 + 34 + params := map[string]interface{}{} 35 + params["actor"] = actor 36 + if cursor != "" { 37 + params["cursor"] = cursor 38 + } 39 + if limit != 0 { 40 + params["limit"] = limit 41 + } 42 + if len(purposes) != 0 { 43 + params["purposes"] = purposes 44 + } 45 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getListsWithMembership", params, nil, &out); err != nil { 46 + return nil, err 47 + } 48 + 49 + return &out, nil 50 + }
+46
api/bsky/graphgetStarterPacksWithMembership.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getStarterPacksWithMembership 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // GraphGetStarterPacksWithMembership_Output is the output of a app.bsky.graph.getStarterPacksWithMembership call. 14 + type GraphGetStarterPacksWithMembership_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + StarterPacksWithMembership []*GraphGetStarterPacksWithMembership_StarterPackWithMembership `json:"starterPacksWithMembership" cborgen:"starterPacksWithMembership"` 17 + } 18 + 19 + // GraphGetStarterPacksWithMembership_StarterPackWithMembership is a "starterPackWithMembership" in the app.bsky.graph.getStarterPacksWithMembership schema. 20 + // 21 + // A starter pack and an optional list item indicating membership of a target user to that starter pack. 22 + type GraphGetStarterPacksWithMembership_StarterPackWithMembership struct { 23 + ListItem *GraphDefs_ListItemView `json:"listItem,omitempty" cborgen:"listItem,omitempty"` 24 + StarterPack *GraphDefs_StarterPackView `json:"starterPack" cborgen:"starterPack"` 25 + } 26 + 27 + // GraphGetStarterPacksWithMembership calls the XRPC method "app.bsky.graph.getStarterPacksWithMembership". 28 + // 29 + // actor: The account (actor) to check for membership. 30 + func GraphGetStarterPacksWithMembership(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetStarterPacksWithMembership_Output, error) { 31 + var out GraphGetStarterPacksWithMembership_Output 32 + 33 + params := map[string]interface{}{} 34 + params["actor"] = actor 35 + if cursor != "" { 36 + params["cursor"] = cursor 37 + } 38 + if limit != 0 { 39 + params["limit"] = limit 40 + } 41 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getStarterPacksWithMembership", params, nil, &out); err != nil { 42 + return nil, err 43 + } 44 + 45 + return &out, nil 46 + }
+42
api/ozone/moderationgetAccountTimeline.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getAccountTimeline 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ModerationGetAccountTimeline_Output is the output of a tools.ozone.moderation.getAccountTimeline call. 14 + type ModerationGetAccountTimeline_Output struct { 15 + Timeline []*ModerationGetAccountTimeline_TimelineItem `json:"timeline" cborgen:"timeline"` 16 + } 17 + 18 + // ModerationGetAccountTimeline_TimelineItem is a "timelineItem" in the tools.ozone.moderation.getAccountTimeline schema. 19 + type ModerationGetAccountTimeline_TimelineItem struct { 20 + Day string `json:"day" cborgen:"day"` 21 + Summary []*ModerationGetAccountTimeline_TimelineItemSummary `json:"summary" cborgen:"summary"` 22 + } 23 + 24 + // ModerationGetAccountTimeline_TimelineItemSummary is a "timelineItemSummary" in the tools.ozone.moderation.getAccountTimeline schema. 25 + type ModerationGetAccountTimeline_TimelineItemSummary struct { 26 + Count int64 `json:"count" cborgen:"count"` 27 + EventSubjectType string `json:"eventSubjectType" cborgen:"eventSubjectType"` 28 + EventType string `json:"eventType" cborgen:"eventType"` 29 + } 30 + 31 + // ModerationGetAccountTimeline calls the XRPC method "tools.ozone.moderation.getAccountTimeline". 32 + func ModerationGetAccountTimeline(ctx context.Context, c util.LexClient, did string) (*ModerationGetAccountTimeline_Output, error) { 33 + var out ModerationGetAccountTimeline_Output 34 + 35 + params := map[string]interface{}{} 36 + params["did"] = did 37 + if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.getAccountTimeline", params, nil, &out); err != nil { 38 + return nil, err 39 + } 40 + 41 + return &out, nil 42 + }