this repo has no description
0
fork

Configure Feed

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

lexgen again (updated lex refactor branch), including deletions

+515 -971
-76
api/atproto/adminblob.go
··· 1 - package atproto 2 - 3 - import ( 4 - "encoding/json" 5 - "fmt" 6 - 7 - "github.com/bluesky-social/indigo/lex/util" 8 - ) 9 - 10 - // schema: com.atproto.admin.blob 11 - 12 - func init() { 13 - } 14 - 15 - type AdminBlob_ImageDetails struct { 16 - LexiconTypeID string `json:"$type,omitempty"` 17 - Height int64 `json:"height" cborgen:"height"` 18 - Width int64 `json:"width" cborgen:"width"` 19 - } 20 - 21 - type AdminBlob_Moderation struct { 22 - LexiconTypeID string `json:"$type,omitempty"` 23 - CurrentAction *AdminModerationAction_ViewCurrent `json:"currentAction,omitempty" cborgen:"currentAction"` 24 - } 25 - 26 - type AdminBlob_VideoDetails struct { 27 - LexiconTypeID string `json:"$type,omitempty"` 28 - Height int64 `json:"height" cborgen:"height"` 29 - Length int64 `json:"length" cborgen:"length"` 30 - Width int64 `json:"width" cborgen:"width"` 31 - } 32 - 33 - type AdminBlob_View struct { 34 - LexiconTypeID string `json:"$type,omitempty"` 35 - Cid string `json:"cid" cborgen:"cid"` 36 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 37 - Details *AdminBlob_View_Details `json:"details,omitempty" cborgen:"details"` 38 - MimeType string `json:"mimeType" cborgen:"mimeType"` 39 - Moderation *AdminBlob_Moderation `json:"moderation,omitempty" cborgen:"moderation"` 40 - Size int64 `json:"size" cborgen:"size"` 41 - } 42 - 43 - type AdminBlob_View_Details struct { 44 - AdminBlob_ImageDetails *AdminBlob_ImageDetails 45 - AdminBlob_VideoDetails *AdminBlob_VideoDetails 46 - } 47 - 48 - func (t *AdminBlob_View_Details) MarshalJSON() ([]byte, error) { 49 - if t.AdminBlob_ImageDetails != nil { 50 - t.AdminBlob_ImageDetails.LexiconTypeID = "com.atproto.admin.blob#imageDetails" 51 - return json.Marshal(t.AdminBlob_ImageDetails) 52 - } 53 - if t.AdminBlob_VideoDetails != nil { 54 - t.AdminBlob_VideoDetails.LexiconTypeID = "com.atproto.admin.blob#videoDetails" 55 - return json.Marshal(t.AdminBlob_VideoDetails) 56 - } 57 - return nil, fmt.Errorf("cannot marshal empty enum") 58 - } 59 - func (t *AdminBlob_View_Details) UnmarshalJSON(b []byte) error { 60 - typ, err := util.TypeExtract(b) 61 - if err != nil { 62 - return err 63 - } 64 - 65 - switch typ { 66 - case "com.atproto.admin.blob#imageDetails": 67 - t.AdminBlob_ImageDetails = new(AdminBlob_ImageDetails) 68 - return json.Unmarshal(b, t.AdminBlob_ImageDetails) 69 - case "com.atproto.admin.blob#videoDetails": 70 - t.AdminBlob_VideoDetails = new(AdminBlob_VideoDetails) 71 - return json.Unmarshal(b, t.AdminBlob_VideoDetails) 72 - 73 - default: 74 - return nil 75 - } 76 - }
-122
api/atproto/adminmoderationAction.go
··· 1 - package atproto 2 - 3 - import ( 4 - "encoding/json" 5 - "fmt" 6 - 7 - "github.com/bluesky-social/indigo/lex/util" 8 - ) 9 - 10 - // schema: com.atproto.admin.moderationAction 11 - 12 - func init() { 13 - } 14 - 15 - type AdminModerationAction_Reversal struct { 16 - LexiconTypeID string `json:"$type,omitempty"` 17 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 - CreatedBy string `json:"createdBy" cborgen:"createdBy"` 19 - Reason string `json:"reason" cborgen:"reason"` 20 - } 21 - 22 - type AdminModerationAction_View struct { 23 - LexiconTypeID string `json:"$type,omitempty"` 24 - Action *string `json:"action" cborgen:"action"` 25 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 26 - CreatedBy string `json:"createdBy" cborgen:"createdBy"` 27 - Id int64 `json:"id" cborgen:"id"` 28 - Reason string `json:"reason" cborgen:"reason"` 29 - ResolvedReportIds []int64 `json:"resolvedReportIds" cborgen:"resolvedReportIds"` 30 - Reversal *AdminModerationAction_Reversal `json:"reversal,omitempty" cborgen:"reversal"` 31 - Subject *AdminModerationAction_View_Subject `json:"subject" cborgen:"subject"` 32 - SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"` 33 - } 34 - 35 - type AdminModerationAction_ViewCurrent struct { 36 - LexiconTypeID string `json:"$type,omitempty"` 37 - Action *string `json:"action" cborgen:"action"` 38 - Id int64 `json:"id" cborgen:"id"` 39 - } 40 - 41 - type AdminModerationAction_ViewDetail struct { 42 - LexiconTypeID string `json:"$type,omitempty"` 43 - Action *string `json:"action" cborgen:"action"` 44 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 45 - CreatedBy string `json:"createdBy" cborgen:"createdBy"` 46 - Id int64 `json:"id" cborgen:"id"` 47 - Reason string `json:"reason" cborgen:"reason"` 48 - ResolvedReports []*AdminModerationReport_View `json:"resolvedReports" cborgen:"resolvedReports"` 49 - Reversal *AdminModerationAction_Reversal `json:"reversal,omitempty" cborgen:"reversal"` 50 - Subject *AdminModerationAction_ViewDetail_Subject `json:"subject" cborgen:"subject"` 51 - SubjectBlobs []*AdminBlob_View `json:"subjectBlobs" cborgen:"subjectBlobs"` 52 - } 53 - 54 - type AdminModerationAction_ViewDetail_Subject struct { 55 - AdminRepo_View *AdminRepo_View 56 - AdminRecord_View *AdminRecord_View 57 - } 58 - 59 - func (t *AdminModerationAction_ViewDetail_Subject) MarshalJSON() ([]byte, error) { 60 - if t.AdminRepo_View != nil { 61 - t.AdminRepo_View.LexiconTypeID = "com.atproto.admin.repo#view" 62 - return json.Marshal(t.AdminRepo_View) 63 - } 64 - if t.AdminRecord_View != nil { 65 - t.AdminRecord_View.LexiconTypeID = "com.atproto.admin.record#view" 66 - return json.Marshal(t.AdminRecord_View) 67 - } 68 - return nil, fmt.Errorf("cannot marshal empty enum") 69 - } 70 - func (t *AdminModerationAction_ViewDetail_Subject) UnmarshalJSON(b []byte) error { 71 - typ, err := util.TypeExtract(b) 72 - if err != nil { 73 - return err 74 - } 75 - 76 - switch typ { 77 - case "com.atproto.admin.repo#view": 78 - t.AdminRepo_View = new(AdminRepo_View) 79 - return json.Unmarshal(b, t.AdminRepo_View) 80 - case "com.atproto.admin.record#view": 81 - t.AdminRecord_View = new(AdminRecord_View) 82 - return json.Unmarshal(b, t.AdminRecord_View) 83 - 84 - default: 85 - return nil 86 - } 87 - } 88 - 89 - type AdminModerationAction_View_Subject struct { 90 - RepoRepoRef *RepoRepoRef 91 - RepoStrongRef *RepoStrongRef 92 - } 93 - 94 - func (t *AdminModerationAction_View_Subject) MarshalJSON() ([]byte, error) { 95 - if t.RepoRepoRef != nil { 96 - t.RepoRepoRef.LexiconTypeID = "com.atproto.repo.repoRef" 97 - return json.Marshal(t.RepoRepoRef) 98 - } 99 - if t.RepoStrongRef != nil { 100 - t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 101 - return json.Marshal(t.RepoStrongRef) 102 - } 103 - return nil, fmt.Errorf("cannot marshal empty enum") 104 - } 105 - func (t *AdminModerationAction_View_Subject) UnmarshalJSON(b []byte) error { 106 - typ, err := util.TypeExtract(b) 107 - if err != nil { 108 - return err 109 - } 110 - 111 - switch typ { 112 - case "com.atproto.repo.repoRef": 113 - t.RepoRepoRef = new(RepoRepoRef) 114 - return json.Unmarshal(b, t.RepoRepoRef) 115 - case "com.atproto.repo.strongRef": 116 - t.RepoStrongRef = new(RepoStrongRef) 117 - return json.Unmarshal(b, t.RepoStrongRef) 118 - 119 - default: 120 - return nil 121 - } 122 - }
-105
api/atproto/adminmoderationReport.go
··· 1 - package atproto 2 - 3 - import ( 4 - "encoding/json" 5 - "fmt" 6 - 7 - "github.com/bluesky-social/indigo/lex/util" 8 - ) 9 - 10 - // schema: com.atproto.admin.moderationReport 11 - 12 - func init() { 13 - } 14 - 15 - type AdminModerationReport_View struct { 16 - LexiconTypeID string `json:"$type,omitempty"` 17 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 - Id int64 `json:"id" cborgen:"id"` 19 - Reason *string `json:"reason,omitempty" cborgen:"reason"` 20 - ReasonType *string `json:"reasonType" cborgen:"reasonType"` 21 - ReportedByDid string `json:"reportedByDid" cborgen:"reportedByDid"` 22 - ResolvedByActionIds []int64 `json:"resolvedByActionIds" cborgen:"resolvedByActionIds"` 23 - Subject *AdminModerationReport_View_Subject `json:"subject" cborgen:"subject"` 24 - } 25 - 26 - type AdminModerationReport_ViewDetail struct { 27 - LexiconTypeID string `json:"$type,omitempty"` 28 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 29 - Id int64 `json:"id" cborgen:"id"` 30 - Reason *string `json:"reason,omitempty" cborgen:"reason"` 31 - ReasonType *string `json:"reasonType" cborgen:"reasonType"` 32 - ReportedByDid string `json:"reportedByDid" cborgen:"reportedByDid"` 33 - ResolvedByActions []*AdminModerationAction_View `json:"resolvedByActions" cborgen:"resolvedByActions"` 34 - Subject *AdminModerationReport_ViewDetail_Subject `json:"subject" cborgen:"subject"` 35 - } 36 - 37 - type AdminModerationReport_ViewDetail_Subject struct { 38 - AdminRepo_View *AdminRepo_View 39 - AdminRecord_View *AdminRecord_View 40 - } 41 - 42 - func (t *AdminModerationReport_ViewDetail_Subject) MarshalJSON() ([]byte, error) { 43 - if t.AdminRepo_View != nil { 44 - t.AdminRepo_View.LexiconTypeID = "com.atproto.admin.repo#view" 45 - return json.Marshal(t.AdminRepo_View) 46 - } 47 - if t.AdminRecord_View != nil { 48 - t.AdminRecord_View.LexiconTypeID = "com.atproto.admin.record#view" 49 - return json.Marshal(t.AdminRecord_View) 50 - } 51 - return nil, fmt.Errorf("cannot marshal empty enum") 52 - } 53 - func (t *AdminModerationReport_ViewDetail_Subject) UnmarshalJSON(b []byte) error { 54 - typ, err := util.TypeExtract(b) 55 - if err != nil { 56 - return err 57 - } 58 - 59 - switch typ { 60 - case "com.atproto.admin.repo#view": 61 - t.AdminRepo_View = new(AdminRepo_View) 62 - return json.Unmarshal(b, t.AdminRepo_View) 63 - case "com.atproto.admin.record#view": 64 - t.AdminRecord_View = new(AdminRecord_View) 65 - return json.Unmarshal(b, t.AdminRecord_View) 66 - 67 - default: 68 - return nil 69 - } 70 - } 71 - 72 - type AdminModerationReport_View_Subject struct { 73 - RepoRepoRef *RepoRepoRef 74 - RepoStrongRef *RepoStrongRef 75 - } 76 - 77 - func (t *AdminModerationReport_View_Subject) MarshalJSON() ([]byte, error) { 78 - if t.RepoRepoRef != nil { 79 - t.RepoRepoRef.LexiconTypeID = "com.atproto.repo.repoRef" 80 - return json.Marshal(t.RepoRepoRef) 81 - } 82 - if t.RepoStrongRef != nil { 83 - t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 84 - return json.Marshal(t.RepoStrongRef) 85 - } 86 - return nil, fmt.Errorf("cannot marshal empty enum") 87 - } 88 - func (t *AdminModerationReport_View_Subject) UnmarshalJSON(b []byte) error { 89 - typ, err := util.TypeExtract(b) 90 - if err != nil { 91 - return err 92 - } 93 - 94 - switch typ { 95 - case "com.atproto.repo.repoRef": 96 - t.RepoRepoRef = new(RepoRepoRef) 97 - return json.Unmarshal(b, t.RepoRepoRef) 98 - case "com.atproto.repo.strongRef": 99 - t.RepoStrongRef = new(RepoStrongRef) 100 - return json.Unmarshal(b, t.RepoStrongRef) 101 - 102 - default: 103 - return nil 104 - } 105 - }
-44
api/atproto/adminrecord.go
··· 1 - package atproto 2 - 3 - import ( 4 - "github.com/bluesky-social/indigo/lex/util" 5 - ) 6 - 7 - // schema: com.atproto.admin.record 8 - 9 - func init() { 10 - } 11 - 12 - type AdminRecord_Moderation struct { 13 - LexiconTypeID string `json:"$type,omitempty"` 14 - CurrentAction *AdminModerationAction_ViewCurrent `json:"currentAction,omitempty" cborgen:"currentAction"` 15 - } 16 - 17 - type AdminRecord_ModerationDetail struct { 18 - LexiconTypeID string `json:"$type,omitempty"` 19 - Actions []*AdminModerationAction_View `json:"actions" cborgen:"actions"` 20 - CurrentAction *AdminModerationAction_ViewCurrent `json:"currentAction,omitempty" cborgen:"currentAction"` 21 - Reports []*AdminModerationReport_View `json:"reports" cborgen:"reports"` 22 - } 23 - 24 - type AdminRecord_View struct { 25 - LexiconTypeID string `json:"$type,omitempty"` 26 - BlobCids []string `json:"blobCids" cborgen:"blobCids"` 27 - Cid string `json:"cid" cborgen:"cid"` 28 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 29 - Moderation *AdminRecord_Moderation `json:"moderation" cborgen:"moderation"` 30 - Repo *AdminRepo_View `json:"repo" cborgen:"repo"` 31 - Uri string `json:"uri" cborgen:"uri"` 32 - Value util.LexiconTypeDecoder `json:"value" cborgen:"value"` 33 - } 34 - 35 - type AdminRecord_ViewDetail struct { 36 - LexiconTypeID string `json:"$type,omitempty"` 37 - Blobs []*AdminBlob_View `json:"blobs" cborgen:"blobs"` 38 - Cid string `json:"cid" cborgen:"cid"` 39 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 40 - Moderation *AdminRecord_ModerationDetail `json:"moderation" cborgen:"moderation"` 41 - Repo *AdminRepo_View `json:"repo" cborgen:"repo"` 42 - Uri string `json:"uri" cborgen:"uri"` 43 - Value util.LexiconTypeDecoder `json:"value" cborgen:"value"` 44 - }
-47
api/atproto/adminrepo.go
··· 1 - package atproto 2 - 3 - import ( 4 - "github.com/bluesky-social/indigo/lex/util" 5 - ) 6 - 7 - // schema: com.atproto.admin.repo 8 - 9 - func init() { 10 - } 11 - 12 - type AdminRepo_Account struct { 13 - LexiconTypeID string `json:"$type,omitempty"` 14 - Email string `json:"email" cborgen:"email"` 15 - } 16 - 17 - type AdminRepo_Moderation struct { 18 - LexiconTypeID string `json:"$type,omitempty"` 19 - CurrentAction *AdminModerationAction_ViewCurrent `json:"currentAction,omitempty" cborgen:"currentAction"` 20 - } 21 - 22 - type AdminRepo_ModerationDetail struct { 23 - LexiconTypeID string `json:"$type,omitempty"` 24 - Actions []*AdminModerationAction_View `json:"actions" cborgen:"actions"` 25 - CurrentAction *AdminModerationAction_ViewCurrent `json:"currentAction,omitempty" cborgen:"currentAction"` 26 - Reports []*AdminModerationReport_View `json:"reports" cborgen:"reports"` 27 - } 28 - 29 - type AdminRepo_View struct { 30 - LexiconTypeID string `json:"$type,omitempty"` 31 - Account *AdminRepo_Account `json:"account,omitempty" cborgen:"account"` 32 - Did string `json:"did" cborgen:"did"` 33 - Handle string `json:"handle" cborgen:"handle"` 34 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 35 - Moderation *AdminRepo_Moderation `json:"moderation" cborgen:"moderation"` 36 - RelatedRecords []util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 37 - } 38 - 39 - type AdminRepo_ViewDetail struct { 40 - LexiconTypeID string `json:"$type,omitempty"` 41 - Account *AdminRepo_Account `json:"account,omitempty" cborgen:"account"` 42 - Did string `json:"did" cborgen:"did"` 43 - Handle string `json:"handle" cborgen:"handle"` 44 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 45 - Moderation *AdminRepo_ModerationDetail `json:"moderation" cborgen:"moderation"` 46 - RelatedRecords []util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 47 - }
-25
api/atproto/handleupdate.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.handle.update 10 - 11 - func init() { 12 - } 13 - 14 - type HandleUpdate_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Handle string `json:"handle" cborgen:"handle"` 17 - } 18 - 19 - func HandleUpdate(ctx context.Context, c *xrpc.Client, input *HandleUpdate_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.handle.update", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }
-25
api/atproto/peeringfollow.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.follow 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringFollow_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Users []string `json:"users" cborgen:"users"` 17 - } 18 - 19 - func PeeringFollow(ctx context.Context, c *xrpc.Client, input *PeeringFollow_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.peering.follow", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }
-25
api/atproto/peeringinit.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.init 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringInit_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Pds string `json:"pds" cborgen:"pds"` 17 - } 18 - 19 - func PeeringInit(ctx context.Context, c *xrpc.Client, input *PeeringInit_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.peering.init", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }
-32
api/atproto/peeringlist.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.list 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringList_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Peerings []*PeeringList_Peering `json:"peerings" cborgen:"peerings"` 17 - } 18 - 19 - type PeeringList_Peering struct { 20 - LexiconTypeID string `json:"$type,omitempty"` 21 - Host *string `json:"host,omitempty" cborgen:"host"` 22 - Status *string `json:"status,omitempty" cborgen:"status"` 23 - } 24 - 25 - func PeeringList(ctx context.Context, c *xrpc.Client) (*PeeringList_Output, error) { 26 - var out PeeringList_Output 27 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.peering.list", nil, nil, &out); err != nil { 28 - return nil, err 29 - } 30 - 31 - return &out, nil 32 - }
-37
api/atproto/peeringpropose.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.peering.propose 10 - 11 - func init() { 12 - } 13 - 14 - type PeeringPropose_Input struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Proposal *PeeringPropose_Proposal `json:"proposal" cborgen:"proposal"` 17 - Signature string `json:"signature" cborgen:"signature"` 18 - } 19 - 20 - type PeeringPropose_Output struct { 21 - LexiconTypeID string `json:"$type,omitempty"` 22 - Rejected bool `json:"rejected" cborgen:"rejected"` 23 - } 24 - 25 - type PeeringPropose_Proposal struct { 26 - LexiconTypeID string `json:"$type,omitempty"` 27 - Proposer *string `json:"proposer,omitempty" cborgen:"proposer"` 28 - } 29 - 30 - func PeeringPropose(ctx context.Context, c *xrpc.Client, input *PeeringPropose_Input) (*PeeringPropose_Output, error) { 31 - var out PeeringPropose_Output 32 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.peering.propose", nil, input, &out); err != nil { 33 - return nil, err 34 - } 35 - 36 - return &out, nil 37 - }
+1 -1
api/atproto/repoapplyWrites.go
··· 29 29 30 30 type RepoApplyWrites_Input struct { 31 31 LexiconTypeID string `json:"$type,omitempty"` 32 - Did string `json:"did" cborgen:"did"` 32 + Repo string `json:"repo" cborgen:"repo"` 33 33 SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit"` 34 34 Validate *bool `json:"validate,omitempty" cborgen:"validate"` 35 35 Writes []*RepoApplyWrites_Input_Writes_Elem `json:"writes" cborgen:"writes"`
-96
api/atproto/repobatchWrite.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - "encoding/json" 6 - "fmt" 7 - 8 - "github.com/bluesky-social/indigo/lex/util" 9 - "github.com/bluesky-social/indigo/xrpc" 10 - ) 11 - 12 - // schema: com.atproto.repo.batchWrite 13 - 14 - func init() { 15 - } 16 - 17 - type RepoBatchWrite_Create struct { 18 - LexiconTypeID string `json:"$type,omitempty"` 19 - Action string `json:"action" cborgen:"action"` 20 - Collection string `json:"collection" cborgen:"collection"` 21 - Rkey *string `json:"rkey,omitempty" cborgen:"rkey"` 22 - Value util.LexiconTypeDecoder `json:"value" cborgen:"value"` 23 - } 24 - 25 - type RepoBatchWrite_Delete struct { 26 - LexiconTypeID string `json:"$type,omitempty"` 27 - Action string `json:"action" cborgen:"action"` 28 - Collection string `json:"collection" cborgen:"collection"` 29 - Rkey string `json:"rkey" cborgen:"rkey"` 30 - } 31 - 32 - type RepoBatchWrite_Input struct { 33 - LexiconTypeID string `json:"$type,omitempty"` 34 - Did string `json:"did" cborgen:"did"` 35 - Validate *bool `json:"validate,omitempty" cborgen:"validate"` 36 - Writes []*RepoBatchWrite_Input_Writes_Elem `json:"writes" cborgen:"writes"` 37 - } 38 - 39 - type RepoBatchWrite_Input_Writes_Elem struct { 40 - RepoBatchWrite_Create *RepoBatchWrite_Create 41 - RepoBatchWrite_Update *RepoBatchWrite_Update 42 - RepoBatchWrite_Delete *RepoBatchWrite_Delete 43 - } 44 - 45 - func (t *RepoBatchWrite_Input_Writes_Elem) MarshalJSON() ([]byte, error) { 46 - if t.RepoBatchWrite_Create != nil { 47 - t.RepoBatchWrite_Create.LexiconTypeID = "com.atproto.repo.batchWrite#create" 48 - return json.Marshal(t.RepoBatchWrite_Create) 49 - } 50 - if t.RepoBatchWrite_Update != nil { 51 - t.RepoBatchWrite_Update.LexiconTypeID = "com.atproto.repo.batchWrite#update" 52 - return json.Marshal(t.RepoBatchWrite_Update) 53 - } 54 - if t.RepoBatchWrite_Delete != nil { 55 - t.RepoBatchWrite_Delete.LexiconTypeID = "com.atproto.repo.batchWrite#delete" 56 - return json.Marshal(t.RepoBatchWrite_Delete) 57 - } 58 - return nil, fmt.Errorf("cannot marshal empty enum") 59 - } 60 - func (t *RepoBatchWrite_Input_Writes_Elem) UnmarshalJSON(b []byte) error { 61 - typ, err := util.TypeExtract(b) 62 - if err != nil { 63 - return err 64 - } 65 - 66 - switch typ { 67 - case "com.atproto.repo.batchWrite#create": 68 - t.RepoBatchWrite_Create = new(RepoBatchWrite_Create) 69 - return json.Unmarshal(b, t.RepoBatchWrite_Create) 70 - case "com.atproto.repo.batchWrite#update": 71 - t.RepoBatchWrite_Update = new(RepoBatchWrite_Update) 72 - return json.Unmarshal(b, t.RepoBatchWrite_Update) 73 - case "com.atproto.repo.batchWrite#delete": 74 - t.RepoBatchWrite_Delete = new(RepoBatchWrite_Delete) 75 - return json.Unmarshal(b, t.RepoBatchWrite_Delete) 76 - 77 - default: 78 - return fmt.Errorf("closed enums must have a matching value") 79 - } 80 - } 81 - 82 - type RepoBatchWrite_Update struct { 83 - LexiconTypeID string `json:"$type,omitempty"` 84 - Action string `json:"action" cborgen:"action"` 85 - Collection string `json:"collection" cborgen:"collection"` 86 - Rkey string `json:"rkey" cborgen:"rkey"` 87 - Value util.LexiconTypeDecoder `json:"value" cborgen:"value"` 88 - } 89 - 90 - func RepoBatchWrite(ctx context.Context, c *xrpc.Client, input *RepoBatchWrite_Input) error { 91 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.batchWrite", nil, input, nil); err != nil { 92 - return err 93 - } 94 - 95 - return nil 96 - }
+1 -1
api/atproto/repocreateRecord.go
··· 15 15 type RepoCreateRecord_Input struct { 16 16 LexiconTypeID string `json:"$type,omitempty"` 17 17 Collection string `json:"collection" cborgen:"collection"` 18 - Repo string `json:"repo" cborgen:"repo"` 19 18 Record util.LexiconTypeDecoder `json:"record" cborgen:"record"` 19 + Repo string `json:"repo" cborgen:"repo"` 20 20 Rkey *string `json:"rkey,omitempty" cborgen:"rkey"` 21 21 SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit"` 22 22 Validate *bool `json:"validate,omitempty" cborgen:"validate"`
+1 -1
api/atproto/repodeleteRecord.go
··· 14 14 type RepoDeleteRecord_Input struct { 15 15 LexiconTypeID string `json:"$type,omitempty"` 16 16 Collection string `json:"collection" cborgen:"collection"` 17 - Did string `json:"did" cborgen:"did"` 17 + Repo string `json:"repo" cborgen:"repo"` 18 18 Rkey string `json:"rkey" cborgen:"rkey"` 19 19 SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit"` 20 20 SwapRecord *string `json:"swapRecord,omitempty" cborgen:"swapRecord"`
-35
api/atproto/repodescribe.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/lex/util" 7 - "github.com/bluesky-social/indigo/xrpc" 8 - ) 9 - 10 - // schema: com.atproto.repo.describe 11 - 12 - func init() { 13 - } 14 - 15 - type RepoDescribe_Output struct { 16 - LexiconTypeID string `json:"$type,omitempty"` 17 - Collections []string `json:"collections" cborgen:"collections"` 18 - Did string `json:"did" cborgen:"did"` 19 - DidDoc util.LexiconTypeDecoder `json:"didDoc" cborgen:"didDoc"` 20 - Handle string `json:"handle" cborgen:"handle"` 21 - HandleIsCorrect bool `json:"handleIsCorrect" cborgen:"handleIsCorrect"` 22 - } 23 - 24 - func RepoDescribe(ctx context.Context, c *xrpc.Client, user string) (*RepoDescribe_Output, error) { 25 - var out RepoDescribe_Output 26 - 27 - params := map[string]interface{}{ 28 - "user": user, 29 - } 30 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.describe", params, nil, &out); err != nil { 31 - return nil, err 32 - } 33 - 34 - return &out, nil 35 - }
+1 -1
api/atproto/repoputRecord.go
··· 15 15 type RepoPutRecord_Input struct { 16 16 LexiconTypeID string `json:"$type,omitempty"` 17 17 Collection string `json:"collection" cborgen:"collection"` 18 - Repo string `json:"repo" cborgen:"repo"` 19 18 Record util.LexiconTypeDecoder `json:"record" cborgen:"record"` 19 + Repo string `json:"repo" cborgen:"repo"` 20 20 Rkey string `json:"rkey" cborgen:"rkey"` 21 21 SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit"` 22 22 SwapRecord *string `json:"swapRecord,omitempty" cborgen:"swapRecord"`
-12
api/atproto/reporecordRef.go
··· 1 - package atproto 2 - 3 - // schema: com.atproto.repo.recordRef 4 - 5 - func init() { 6 - } 7 - 8 - type RepoRecordRef struct { 9 - LexiconTypeID string `json:"$type,omitempty"` 10 - Cid *string `json:"cid,omitempty" cborgen:"cid"` 11 - Uri string `json:"uri" cborgen:"uri"` 12 - }
-11
api/atproto/reporepoRef.go
··· 1 - package atproto 2 - 3 - // schema: com.atproto.repo.repoRef 4 - 5 - func init() { 6 - } 7 - 8 - type RepoRepoRef struct { 9 - LexiconTypeID string `json:"$type,omitempty"` 10 - Did string `json:"did" cborgen:"did"` 11 - }
-111
api/atproto/reportcreate.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - "encoding/json" 6 - "fmt" 7 - 8 - "github.com/bluesky-social/indigo/lex/util" 9 - "github.com/bluesky-social/indigo/xrpc" 10 - ) 11 - 12 - // schema: com.atproto.report.create 13 - 14 - func init() { 15 - } 16 - 17 - type ReportCreate_Input struct { 18 - LexiconTypeID string `json:"$type,omitempty"` 19 - Reason *string `json:"reason,omitempty" cborgen:"reason"` 20 - ReasonType *string `json:"reasonType" cborgen:"reasonType"` 21 - Subject *ReportCreate_Input_Subject `json:"subject" cborgen:"subject"` 22 - } 23 - 24 - type ReportCreate_Input_Subject struct { 25 - RepoRepoRef *RepoRepoRef 26 - RepoRecordRef *RepoRecordRef 27 - } 28 - 29 - func (t *ReportCreate_Input_Subject) MarshalJSON() ([]byte, error) { 30 - if t.RepoRepoRef != nil { 31 - t.RepoRepoRef.LexiconTypeID = "com.atproto.repo.repoRef" 32 - return json.Marshal(t.RepoRepoRef) 33 - } 34 - if t.RepoRecordRef != nil { 35 - t.RepoRecordRef.LexiconTypeID = "com.atproto.repo.recordRef" 36 - return json.Marshal(t.RepoRecordRef) 37 - } 38 - return nil, fmt.Errorf("cannot marshal empty enum") 39 - } 40 - func (t *ReportCreate_Input_Subject) UnmarshalJSON(b []byte) error { 41 - typ, err := util.TypeExtract(b) 42 - if err != nil { 43 - return err 44 - } 45 - 46 - switch typ { 47 - case "com.atproto.repo.repoRef": 48 - t.RepoRepoRef = new(RepoRepoRef) 49 - return json.Unmarshal(b, t.RepoRepoRef) 50 - case "com.atproto.repo.recordRef": 51 - t.RepoRecordRef = new(RepoRecordRef) 52 - return json.Unmarshal(b, t.RepoRecordRef) 53 - 54 - default: 55 - return nil 56 - } 57 - } 58 - 59 - type ReportCreate_Output struct { 60 - LexiconTypeID string `json:"$type,omitempty"` 61 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 62 - Id int64 `json:"id" cborgen:"id"` 63 - Reason *string `json:"reason,omitempty" cborgen:"reason"` 64 - ReasonType *string `json:"reasonType" cborgen:"reasonType"` 65 - ReportedByDid string `json:"reportedByDid" cborgen:"reportedByDid"` 66 - Subject *ReportCreate_Output_Subject `json:"subject" cborgen:"subject"` 67 - } 68 - 69 - type ReportCreate_Output_Subject struct { 70 - RepoRepoRef *RepoRepoRef 71 - RepoStrongRef *RepoStrongRef 72 - } 73 - 74 - func (t *ReportCreate_Output_Subject) MarshalJSON() ([]byte, error) { 75 - if t.RepoRepoRef != nil { 76 - t.RepoRepoRef.LexiconTypeID = "com.atproto.repo.repoRef" 77 - return json.Marshal(t.RepoRepoRef) 78 - } 79 - if t.RepoStrongRef != nil { 80 - t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 81 - return json.Marshal(t.RepoStrongRef) 82 - } 83 - return nil, fmt.Errorf("cannot marshal empty enum") 84 - } 85 - func (t *ReportCreate_Output_Subject) UnmarshalJSON(b []byte) error { 86 - typ, err := util.TypeExtract(b) 87 - if err != nil { 88 - return err 89 - } 90 - 91 - switch typ { 92 - case "com.atproto.repo.repoRef": 93 - t.RepoRepoRef = new(RepoRepoRef) 94 - return json.Unmarshal(b, t.RepoRepoRef) 95 - case "com.atproto.repo.strongRef": 96 - t.RepoStrongRef = new(RepoStrongRef) 97 - return json.Unmarshal(b, t.RepoStrongRef) 98 - 99 - default: 100 - return nil 101 - } 102 - } 103 - 104 - func ReportCreate(ctx context.Context, c *xrpc.Client, input *ReportCreate_Input) (*ReportCreate_Output, error) { 105 - var out ReportCreate_Output 106 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.report.create", nil, input, &out); err != nil { 107 - return nil, err 108 - } 109 - 110 - return &out, nil 111 - }
-6
api/atproto/reportreasonType.go
··· 1 - package atproto 2 - 3 - // schema: com.atproto.report.reasonType 4 - 5 - func init() { 6 - }
-25
api/atproto/reportsubject.go
··· 1 - package atproto 2 - 3 - // schema: com.atproto.report.subject 4 - 5 - func init() { 6 - } 7 - 8 - type ReportSubject_Record struct { 9 - LexiconTypeID string `json:"$type,omitempty"` 10 - Cid *string `json:"cid,omitempty" cborgen:"cid"` 11 - Collection string `json:"collection" cborgen:"collection"` 12 - Did string `json:"did" cborgen:"did"` 13 - Rkey string `json:"rkey" cborgen:"rkey"` 14 - } 15 - 16 - type ReportSubject_RecordRef struct { 17 - LexiconTypeID string `json:"$type,omitempty"` 18 - Cid string `json:"cid" cborgen:"cid"` 19 - Uri string `json:"uri" cborgen:"uri"` 20 - } 21 - 22 - type ReportSubject_Repo struct { 23 - LexiconTypeID string `json:"$type,omitempty"` 24 - Did string `json:"did" cborgen:"did"` 25 - }
-34
api/atproto/servergetAccountsConfig.go
··· 1 - package atproto 2 - 3 - import ( 4 - "context" 5 - 6 - "github.com/bluesky-social/indigo/xrpc" 7 - ) 8 - 9 - // schema: com.atproto.server.getAccountsConfig 10 - 11 - func init() { 12 - } 13 - 14 - type ServerGetAccountsConfig_Links struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - PrivacyPolicy *string `json:"privacyPolicy,omitempty" cborgen:"privacyPolicy"` 17 - TermsOfService *string `json:"termsOfService,omitempty" cborgen:"termsOfService"` 18 - } 19 - 20 - type ServerGetAccountsConfig_Output struct { 21 - LexiconTypeID string `json:"$type,omitempty"` 22 - AvailableUserDomains []string `json:"availableUserDomains" cborgen:"availableUserDomains"` 23 - InviteCodeRequired *bool `json:"inviteCodeRequired,omitempty" cborgen:"inviteCodeRequired"` 24 - Links *ServerGetAccountsConfig_Links `json:"links,omitempty" cborgen:"links"` 25 - } 26 - 27 - func ServerGetAccountsConfig(ctx context.Context, c *xrpc.Client) (*ServerGetAccountsConfig_Output, error) { 28 - var out ServerGetAccountsConfig_Output 29 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getAccountsConfig", nil, nil, &out); err != nil { 30 - return nil, err 31 - } 32 - 33 - return &out, nil 34 - }
-13
api/atproto/syncsubscribeAllRepos.go
··· 1 - package atproto 2 - 3 - // schema: com.atproto.sync.subscribeAllRepos 4 - 5 - func init() { 6 - } 7 - 8 - type SyncSubscribeAllRepos_RepoOp struct { 9 - LexiconTypeID string `json:"$type,omitempty"` 10 - Action string `json:"action" cborgen:"action"` 11 - Cid string `json:"cid" cborgen:"cid"` 12 - Path string `json:"path" cborgen:"path"` 13 - }
+20 -20
api/bsky/actordefs.go
··· 6 6 } 7 7 8 8 type ActorDefs_ProfileView struct { 9 + LexiconTypeID string `json:"$type,omitempty"` 10 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 11 + Description *string `json:"description,omitempty" cborgen:"description"` 12 + Did string `json:"did" cborgen:"did"` 13 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 14 + Handle string `json:"handle" cborgen:"handle"` 15 + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt"` 16 + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer"` 17 + } 18 + 19 + type ActorDefs_ProfileViewBasic struct { 20 + LexiconTypeID string `json:"$type,omitempty"` 21 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 22 + Did string `json:"did" cborgen:"did"` 23 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 24 + Handle string `json:"handle" cborgen:"handle"` 25 + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer"` 26 + } 27 + 28 + type ActorDefs_ProfileViewDetailed struct { 9 29 LexiconTypeID string `json:"$type,omitempty"` 10 30 Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 11 31 Banner *string `json:"banner,omitempty" cborgen:"banner"` ··· 20 40 Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer"` 21 41 } 22 42 23 - type ActorDefs_ProfileViewBasic struct { 24 - LexiconTypeID string `json:"$type,omitempty"` 25 - Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 26 - Description *string `json:"description,omitempty" cborgen:"description"` 27 - Did string `json:"did" cborgen:"did"` 28 - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 29 - Handle string `json:"handle" cborgen:"handle"` 30 - IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt"` 31 - Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer"` 32 - } 33 - 34 43 type ActorDefs_ViewerState struct { 35 44 LexiconTypeID string `json:"$type,omitempty"` 36 45 FollowedBy *string `json:"followedBy,omitempty" cborgen:"followedBy"` 37 46 Following *string `json:"following,omitempty" cborgen:"following"` 38 47 Muted *bool `json:"muted,omitempty" cborgen:"muted"` 39 48 } 40 - 41 - type ActorDefs_WithInfo struct { 42 - LexiconTypeID string `json:"$type,omitempty"` 43 - Avatar *string `json:"avatar,omitempty" cborgen:"avatar"` 44 - Did string `json:"did" cborgen:"did"` 45 - DisplayName *string `json:"displayName,omitempty" cborgen:"displayName"` 46 - Handle string `json:"handle" cborgen:"handle"` 47 - Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer"` 48 - }
+2 -2
api/bsky/actorgetProfile.go
··· 10 10 11 11 func init() { 12 12 } 13 - func ActorGetProfile(ctx context.Context, c *xrpc.Client, actor string) (*ActorDefs_ProfileView, error) { 14 - var out ActorDefs_ProfileView 13 + func ActorGetProfile(ctx context.Context, c *xrpc.Client, actor string) (*ActorDefs_ProfileViewDetailed, error) { 14 + var out ActorDefs_ProfileViewDetailed 15 15 16 16 params := map[string]interface{}{ 17 17 "actor": actor,
+2 -2
api/bsky/actorgetProfiles.go
··· 12 12 } 13 13 14 14 type ActorGetProfiles_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Profiles []*ActorDefs_ProfileView `json:"profiles" cborgen:"profiles"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Profiles []*ActorDefs_ProfileViewDetailed `json:"profiles" cborgen:"profiles"` 17 17 } 18 18 19 19 func ActorGetProfiles(ctx context.Context, c *xrpc.Client, actors []string) (*ActorGetProfiles_Output, error) {
+3 -3
api/bsky/actorgetSuggestions.go
··· 12 12 } 13 13 14 14 type ActorGetSuggestions_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"` 17 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Actors []*ActorDefs_ProfileView `json:"actors" cborgen:"actors"` 17 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 18 18 } 19 19 20 20 func ActorGetSuggestions(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*ActorGetSuggestions_Output, error) {
+3 -3
api/bsky/actorsearchActors.go
··· 12 12 } 13 13 14 14 type ActorSearchActors_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"` 17 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Actors []*ActorDefs_ProfileView `json:"actors" cborgen:"actors"` 17 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 18 18 } 19 19 20 20 func ActorSearchActors(ctx context.Context, c *xrpc.Client, cursor string, limit int64, term string) (*ActorSearchActors_Output, error) {
+2 -2
api/bsky/actorsearchActorsTypeahead.go
··· 12 12 } 13 13 14 14 type ActorSearchActorsTypeahead_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Actors []*ActorDefs_WithInfo `json:"actors" cborgen:"actors"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"` 17 17 } 18 18 19 19 func ActorSearchActorsTypeahead(ctx context.Context, c *xrpc.Client, limit int64, term string) (*ActorSearchActorsTypeahead_Output, error) {
+300
api/bsky/cbor_gen.go
··· 3221 3221 3222 3222 return nil 3223 3223 } 3224 + func (t *EmbedRecordWithMedia) MarshalCBOR(w io.Writer) error { 3225 + if t == nil { 3226 + _, err := w.Write(cbg.CborNull) 3227 + return err 3228 + } 3229 + 3230 + cw := cbg.NewCborWriter(w) 3231 + 3232 + if _, err := cw.Write([]byte{163}); err != nil { 3233 + return err 3234 + } 3235 + 3236 + // t.Media (bsky.EmbedRecordWithMedia_Media) (struct) 3237 + if len("media") > cbg.MaxLength { 3238 + return xerrors.Errorf("Value in field \"media\" was too long") 3239 + } 3240 + 3241 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("media"))); err != nil { 3242 + return err 3243 + } 3244 + if _, err := io.WriteString(w, string("media")); err != nil { 3245 + return err 3246 + } 3247 + 3248 + if err := t.Media.MarshalCBOR(cw); err != nil { 3249 + return err 3250 + } 3251 + 3252 + // t.Record (bsky.EmbedRecord) (struct) 3253 + if len("record") > cbg.MaxLength { 3254 + return xerrors.Errorf("Value in field \"record\" was too long") 3255 + } 3256 + 3257 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("record"))); err != nil { 3258 + return err 3259 + } 3260 + if _, err := io.WriteString(w, string("record")); err != nil { 3261 + return err 3262 + } 3263 + 3264 + if err := t.Record.MarshalCBOR(cw); err != nil { 3265 + return err 3266 + } 3267 + 3268 + // t.LexiconTypeID (string) (string) 3269 + if len("LexiconTypeID") > cbg.MaxLength { 3270 + return xerrors.Errorf("Value in field \"LexiconTypeID\" was too long") 3271 + } 3272 + 3273 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("LexiconTypeID"))); err != nil { 3274 + return err 3275 + } 3276 + if _, err := io.WriteString(w, string("LexiconTypeID")); err != nil { 3277 + return err 3278 + } 3279 + 3280 + if len(t.LexiconTypeID) > cbg.MaxLength { 3281 + return xerrors.Errorf("Value in field t.LexiconTypeID was too long") 3282 + } 3283 + 3284 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.LexiconTypeID))); err != nil { 3285 + return err 3286 + } 3287 + if _, err := io.WriteString(w, string(t.LexiconTypeID)); err != nil { 3288 + return err 3289 + } 3290 + return nil 3291 + } 3292 + 3293 + func (t *EmbedRecordWithMedia) UnmarshalCBOR(r io.Reader) (err error) { 3294 + *t = EmbedRecordWithMedia{} 3295 + 3296 + cr := cbg.NewCborReader(r) 3297 + 3298 + maj, extra, err := cr.ReadHeader() 3299 + if err != nil { 3300 + return err 3301 + } 3302 + defer func() { 3303 + if err == io.EOF { 3304 + err = io.ErrUnexpectedEOF 3305 + } 3306 + }() 3307 + 3308 + if maj != cbg.MajMap { 3309 + return fmt.Errorf("cbor input should be of type map") 3310 + } 3311 + 3312 + if extra > cbg.MaxLength { 3313 + return fmt.Errorf("EmbedRecordWithMedia: map struct too large (%d)", extra) 3314 + } 3315 + 3316 + var name string 3317 + n := extra 3318 + 3319 + for i := uint64(0); i < n; i++ { 3320 + 3321 + { 3322 + sval, err := cbg.ReadString(cr) 3323 + if err != nil { 3324 + return err 3325 + } 3326 + 3327 + name = string(sval) 3328 + } 3329 + 3330 + switch name { 3331 + // t.Media (bsky.EmbedRecordWithMedia_Media) (struct) 3332 + case "media": 3333 + 3334 + { 3335 + 3336 + b, err := cr.ReadByte() 3337 + if err != nil { 3338 + return err 3339 + } 3340 + if b != cbg.CborNull[0] { 3341 + if err := cr.UnreadByte(); err != nil { 3342 + return err 3343 + } 3344 + t.Media = new(EmbedRecordWithMedia_Media) 3345 + if err := t.Media.UnmarshalCBOR(cr); err != nil { 3346 + return xerrors.Errorf("unmarshaling t.Media pointer: %w", err) 3347 + } 3348 + } 3349 + 3350 + } 3351 + // t.Record (bsky.EmbedRecord) (struct) 3352 + case "record": 3353 + 3354 + { 3355 + 3356 + b, err := cr.ReadByte() 3357 + if err != nil { 3358 + return err 3359 + } 3360 + if b != cbg.CborNull[0] { 3361 + if err := cr.UnreadByte(); err != nil { 3362 + return err 3363 + } 3364 + t.Record = new(EmbedRecord) 3365 + if err := t.Record.UnmarshalCBOR(cr); err != nil { 3366 + return xerrors.Errorf("unmarshaling t.Record pointer: %w", err) 3367 + } 3368 + } 3369 + 3370 + } 3371 + // t.LexiconTypeID (string) (string) 3372 + case "LexiconTypeID": 3373 + 3374 + { 3375 + sval, err := cbg.ReadString(cr) 3376 + if err != nil { 3377 + return err 3378 + } 3379 + 3380 + t.LexiconTypeID = string(sval) 3381 + } 3382 + 3383 + default: 3384 + // Field doesn't exist on this type, so ignore it 3385 + cbg.ScanForLinks(r, func(cid.Cid) {}) 3386 + } 3387 + } 3388 + 3389 + return nil 3390 + } 3391 + func (t *EmbedRecordWithMedia_Media) MarshalCBOR(w io.Writer) error { 3392 + if t == nil { 3393 + _, err := w.Write(cbg.CborNull) 3394 + return err 3395 + } 3396 + 3397 + cw := cbg.NewCborWriter(w) 3398 + 3399 + if _, err := cw.Write([]byte{162}); err != nil { 3400 + return err 3401 + } 3402 + 3403 + // t.EmbedImages (bsky.EmbedImages) (struct) 3404 + if len("EmbedImages") > cbg.MaxLength { 3405 + return xerrors.Errorf("Value in field \"EmbedImages\" was too long") 3406 + } 3407 + 3408 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("EmbedImages"))); err != nil { 3409 + return err 3410 + } 3411 + if _, err := io.WriteString(w, string("EmbedImages")); err != nil { 3412 + return err 3413 + } 3414 + 3415 + if err := t.EmbedImages.MarshalCBOR(cw); err != nil { 3416 + return err 3417 + } 3418 + 3419 + // t.EmbedExternal (bsky.EmbedExternal) (struct) 3420 + if len("EmbedExternal") > cbg.MaxLength { 3421 + return xerrors.Errorf("Value in field \"EmbedExternal\" was too long") 3422 + } 3423 + 3424 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("EmbedExternal"))); err != nil { 3425 + return err 3426 + } 3427 + if _, err := io.WriteString(w, string("EmbedExternal")); err != nil { 3428 + return err 3429 + } 3430 + 3431 + if err := t.EmbedExternal.MarshalCBOR(cw); err != nil { 3432 + return err 3433 + } 3434 + return nil 3435 + } 3436 + 3437 + func (t *EmbedRecordWithMedia_Media) UnmarshalCBOR(r io.Reader) (err error) { 3438 + *t = EmbedRecordWithMedia_Media{} 3439 + 3440 + cr := cbg.NewCborReader(r) 3441 + 3442 + maj, extra, err := cr.ReadHeader() 3443 + if err != nil { 3444 + return err 3445 + } 3446 + defer func() { 3447 + if err == io.EOF { 3448 + err = io.ErrUnexpectedEOF 3449 + } 3450 + }() 3451 + 3452 + if maj != cbg.MajMap { 3453 + return fmt.Errorf("cbor input should be of type map") 3454 + } 3455 + 3456 + if extra > cbg.MaxLength { 3457 + return fmt.Errorf("EmbedRecordWithMedia_Media: map struct too large (%d)", extra) 3458 + } 3459 + 3460 + var name string 3461 + n := extra 3462 + 3463 + for i := uint64(0); i < n; i++ { 3464 + 3465 + { 3466 + sval, err := cbg.ReadString(cr) 3467 + if err != nil { 3468 + return err 3469 + } 3470 + 3471 + name = string(sval) 3472 + } 3473 + 3474 + switch name { 3475 + // t.EmbedImages (bsky.EmbedImages) (struct) 3476 + case "EmbedImages": 3477 + 3478 + { 3479 + 3480 + b, err := cr.ReadByte() 3481 + if err != nil { 3482 + return err 3483 + } 3484 + if b != cbg.CborNull[0] { 3485 + if err := cr.UnreadByte(); err != nil { 3486 + return err 3487 + } 3488 + t.EmbedImages = new(EmbedImages) 3489 + if err := t.EmbedImages.UnmarshalCBOR(cr); err != nil { 3490 + return xerrors.Errorf("unmarshaling t.EmbedImages pointer: %w", err) 3491 + } 3492 + } 3493 + 3494 + } 3495 + // t.EmbedExternal (bsky.EmbedExternal) (struct) 3496 + case "EmbedExternal": 3497 + 3498 + { 3499 + 3500 + b, err := cr.ReadByte() 3501 + if err != nil { 3502 + return err 3503 + } 3504 + if b != cbg.CborNull[0] { 3505 + if err := cr.UnreadByte(); err != nil { 3506 + return err 3507 + } 3508 + t.EmbedExternal = new(EmbedExternal) 3509 + if err := t.EmbedExternal.UnmarshalCBOR(cr); err != nil { 3510 + return xerrors.Errorf("unmarshaling t.EmbedExternal pointer: %w", err) 3511 + } 3512 + } 3513 + 3514 + } 3515 + 3516 + default: 3517 + // Field doesn't exist on this type, so ignore it 3518 + cbg.ScanForLinks(r, func(cid.Cid) {}) 3519 + } 3520 + } 3521 + 3522 + return nil 3523 + }
+1 -1
api/bsky/embedexternal.go
··· 24 24 25 25 type EmbedExternal_View struct { 26 26 LexiconTypeID string `json:"$type,omitempty"` 27 - Value *EmbedExternal_ViewExternal `json:"value,omitempty" cborgen:"value"` 27 + External *EmbedExternal_ViewExternal `json:"external" cborgen:"external"` 28 28 } 29 29 30 30 type EmbedExternal_ViewExternal struct {
+1 -1
api/bsky/embedimages.go
··· 22 22 23 23 type EmbedImages_View struct { 24 24 LexiconTypeID string `json:"$type,omitempty"` 25 - Value []*EmbedImages_ViewImage `json:"value" cborgen:"value"` 25 + Images []*EmbedImages_ViewImage `json:"images" cborgen:"images"` 26 26 } 27 27 28 28 type EmbedImages_ViewImage struct {
+18 -10
api/bsky/embedrecord.go
··· 19 19 } 20 20 21 21 type EmbedRecord_View struct { 22 - LexiconTypeID string `json:"$type,omitempty"` 23 - Value *EmbedRecord_View_Value `json:"value,omitempty" cborgen:"value"` 22 + LexiconTypeID string `json:"$type,omitempty"` 23 + Record *EmbedRecord_View_Record `json:"record" cborgen:"record"` 24 24 } 25 25 26 26 type EmbedRecord_ViewNotFound struct { ··· 30 30 31 31 type EmbedRecord_ViewRecord struct { 32 32 LexiconTypeID string `json:"$type,omitempty"` 33 - Author *ActorDefs_WithInfo `json:"author" cborgen:"author"` 33 + Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` 34 34 Cid string `json:"cid" cborgen:"cid"` 35 35 Embeds []*EmbedRecord_ViewRecord_Embeds_Elem `json:"embeds,omitempty" cborgen:"embeds"` 36 36 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 37 - Record util.LexiconTypeDecoder `json:"record" cborgen:"record"` 38 37 Uri string `json:"uri" cborgen:"uri"` 38 + Value util.LexiconTypeDecoder `json:"value" cborgen:"value"` 39 39 } 40 40 41 41 type EmbedRecord_ViewRecord_Embeds_Elem struct { 42 - EmbedImages_View *EmbedImages_View 43 - EmbedExternal_View *EmbedExternal_View 44 - EmbedRecord_View *EmbedRecord_View 42 + EmbedImages_View *EmbedImages_View 43 + EmbedExternal_View *EmbedExternal_View 44 + EmbedRecord_View *EmbedRecord_View 45 + EmbedRecordWithMedia_View *EmbedRecordWithMedia_View 45 46 } 46 47 47 48 func (t *EmbedRecord_ViewRecord_Embeds_Elem) MarshalJSON() ([]byte, error) { ··· 57 58 t.EmbedRecord_View.LexiconTypeID = "app.bsky.embed.record#view" 58 59 return json.Marshal(t.EmbedRecord_View) 59 60 } 61 + if t.EmbedRecordWithMedia_View != nil { 62 + t.EmbedRecordWithMedia_View.LexiconTypeID = "app.bsky.embed.recordWithMedia#view" 63 + return json.Marshal(t.EmbedRecordWithMedia_View) 64 + } 60 65 return nil, fmt.Errorf("cannot marshal empty enum") 61 66 } 62 67 func (t *EmbedRecord_ViewRecord_Embeds_Elem) UnmarshalJSON(b []byte) error { ··· 75 80 case "app.bsky.embed.record#view": 76 81 t.EmbedRecord_View = new(EmbedRecord_View) 77 82 return json.Unmarshal(b, t.EmbedRecord_View) 83 + case "app.bsky.embed.recordWithMedia#view": 84 + t.EmbedRecordWithMedia_View = new(EmbedRecordWithMedia_View) 85 + return json.Unmarshal(b, t.EmbedRecordWithMedia_View) 78 86 79 87 default: 80 88 return nil 81 89 } 82 90 } 83 91 84 - type EmbedRecord_View_Value struct { 92 + type EmbedRecord_View_Record struct { 85 93 EmbedRecord_ViewRecord *EmbedRecord_ViewRecord 86 94 EmbedRecord_ViewNotFound *EmbedRecord_ViewNotFound 87 95 } 88 96 89 - func (t *EmbedRecord_View_Value) MarshalJSON() ([]byte, error) { 97 + func (t *EmbedRecord_View_Record) MarshalJSON() ([]byte, error) { 90 98 if t.EmbedRecord_ViewRecord != nil { 91 99 t.EmbedRecord_ViewRecord.LexiconTypeID = "app.bsky.embed.record#viewRecord" 92 100 return json.Marshal(t.EmbedRecord_ViewRecord) ··· 97 105 } 98 106 return nil, fmt.Errorf("cannot marshal empty enum") 99 107 } 100 - func (t *EmbedRecord_View_Value) UnmarshalJSON(b []byte) error { 108 + func (t *EmbedRecord_View_Record) UnmarshalJSON(b []byte) error { 101 109 typ, err := util.TypeExtract(b) 102 110 if err != nil { 103 111 return err
+95
api/bsky/embedrecordWithMedia.go
··· 1 + package bsky 2 + 3 + import ( 4 + "encoding/json" 5 + "fmt" 6 + 7 + "github.com/bluesky-social/indigo/lex/util" 8 + ) 9 + 10 + // schema: app.bsky.embed.recordWithMedia 11 + 12 + func init() { 13 + } 14 + 15 + type EmbedRecordWithMedia struct { 16 + LexiconTypeID string `json:"$type,omitempty"` 17 + Media *EmbedRecordWithMedia_Media `json:"media" cborgen:"media"` 18 + Record *EmbedRecord `json:"record" cborgen:"record"` 19 + } 20 + 21 + type EmbedRecordWithMedia_Media struct { 22 + EmbedImages *EmbedImages 23 + EmbedExternal *EmbedExternal 24 + } 25 + 26 + func (t *EmbedRecordWithMedia_Media) MarshalJSON() ([]byte, error) { 27 + if t.EmbedImages != nil { 28 + t.EmbedImages.LexiconTypeID = "app.bsky.embed.images" 29 + return json.Marshal(t.EmbedImages) 30 + } 31 + if t.EmbedExternal != nil { 32 + t.EmbedExternal.LexiconTypeID = "app.bsky.embed.external" 33 + return json.Marshal(t.EmbedExternal) 34 + } 35 + return nil, fmt.Errorf("cannot marshal empty enum") 36 + } 37 + func (t *EmbedRecordWithMedia_Media) UnmarshalJSON(b []byte) error { 38 + typ, err := util.TypeExtract(b) 39 + if err != nil { 40 + return err 41 + } 42 + 43 + switch typ { 44 + case "app.bsky.embed.images": 45 + t.EmbedImages = new(EmbedImages) 46 + return json.Unmarshal(b, t.EmbedImages) 47 + case "app.bsky.embed.external": 48 + t.EmbedExternal = new(EmbedExternal) 49 + return json.Unmarshal(b, t.EmbedExternal) 50 + 51 + default: 52 + return nil 53 + } 54 + } 55 + 56 + type EmbedRecordWithMedia_View struct { 57 + LexiconTypeID string `json:"$type,omitempty"` 58 + Media *EmbedRecordWithMedia_View_Media `json:"media" cborgen:"media"` 59 + Record *EmbedRecord_View `json:"record" cborgen:"record"` 60 + } 61 + 62 + type EmbedRecordWithMedia_View_Media struct { 63 + EmbedImages_View *EmbedImages_View 64 + EmbedExternal_View *EmbedExternal_View 65 + } 66 + 67 + func (t *EmbedRecordWithMedia_View_Media) MarshalJSON() ([]byte, error) { 68 + if t.EmbedImages_View != nil { 69 + t.EmbedImages_View.LexiconTypeID = "app.bsky.embed.images#view" 70 + return json.Marshal(t.EmbedImages_View) 71 + } 72 + if t.EmbedExternal_View != nil { 73 + t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" 74 + return json.Marshal(t.EmbedExternal_View) 75 + } 76 + return nil, fmt.Errorf("cannot marshal empty enum") 77 + } 78 + func (t *EmbedRecordWithMedia_View_Media) UnmarshalJSON(b []byte) error { 79 + typ, err := util.TypeExtract(b) 80 + if err != nil { 81 + return err 82 + } 83 + 84 + switch typ { 85 + case "app.bsky.embed.images#view": 86 + t.EmbedImages_View = new(EmbedImages_View) 87 + return json.Unmarshal(b, t.EmbedImages_View) 88 + case "app.bsky.embed.external#view": 89 + t.EmbedExternal_View = new(EmbedExternal_View) 90 + return json.Unmarshal(b, t.EmbedExternal_View) 91 + 92 + default: 93 + return nil 94 + } 95 + }
+25 -17
api/bsky/feeddefs.go
··· 53 53 } 54 54 55 55 type FeedDefs_PostView struct { 56 - LexiconTypeID string `json:"$type,omitempty"` 57 - Author *ActorDefs_WithInfo `json:"author" cborgen:"author"` 58 - Cid string `json:"cid" cborgen:"cid"` 59 - Embed *FeedDefs_PostView_Embed `json:"embed,omitempty" cborgen:"embed"` 60 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 61 - LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount"` 62 - Record util.LexiconTypeDecoder `json:"record" cborgen:"record"` 63 - ReplyCount *int64 `json:"replyCount,omitempty" cborgen:"replyCount"` 64 - RepostCount *int64 `json:"repostCount,omitempty" cborgen:"repostCount"` 65 - Uri string `json:"uri" cborgen:"uri"` 66 - Viewer *FeedDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer"` 56 + LexiconTypeID string `json:"$type,omitempty"` 57 + Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` 58 + Cid string `json:"cid" cborgen:"cid"` 59 + Embed *FeedDefs_PostView_Embed `json:"embed,omitempty" cborgen:"embed"` 60 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 61 + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount"` 62 + Record util.LexiconTypeDecoder `json:"record" cborgen:"record"` 63 + ReplyCount *int64 `json:"replyCount,omitempty" cborgen:"replyCount"` 64 + RepostCount *int64 `json:"repostCount,omitempty" cborgen:"repostCount"` 65 + Uri string `json:"uri" cborgen:"uri"` 66 + Viewer *FeedDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer"` 67 67 } 68 68 69 69 type FeedDefs_PostView_Embed struct { 70 - EmbedImages_View *EmbedImages_View 71 - EmbedExternal_View *EmbedExternal_View 72 - EmbedRecord_View *EmbedRecord_View 70 + EmbedImages_View *EmbedImages_View 71 + EmbedExternal_View *EmbedExternal_View 72 + EmbedRecord_View *EmbedRecord_View 73 + EmbedRecordWithMedia_View *EmbedRecordWithMedia_View 73 74 } 74 75 75 76 func (t *FeedDefs_PostView_Embed) MarshalJSON() ([]byte, error) { ··· 85 86 t.EmbedRecord_View.LexiconTypeID = "app.bsky.embed.record#view" 86 87 return json.Marshal(t.EmbedRecord_View) 87 88 } 89 + if t.EmbedRecordWithMedia_View != nil { 90 + t.EmbedRecordWithMedia_View.LexiconTypeID = "app.bsky.embed.recordWithMedia#view" 91 + return json.Marshal(t.EmbedRecordWithMedia_View) 92 + } 88 93 return nil, fmt.Errorf("cannot marshal empty enum") 89 94 } 90 95 func (t *FeedDefs_PostView_Embed) UnmarshalJSON(b []byte) error { ··· 103 108 case "app.bsky.embed.record#view": 104 109 t.EmbedRecord_View = new(EmbedRecord_View) 105 110 return json.Unmarshal(b, t.EmbedRecord_View) 111 + case "app.bsky.embed.recordWithMedia#view": 112 + t.EmbedRecordWithMedia_View = new(EmbedRecordWithMedia_View) 113 + return json.Unmarshal(b, t.EmbedRecordWithMedia_View) 106 114 107 115 default: 108 116 return nil ··· 110 118 } 111 119 112 120 type FeedDefs_ReasonRepost struct { 113 - LexiconTypeID string `json:"$type,omitempty"` 114 - By *ActorDefs_WithInfo `json:"by" cborgen:"by"` 115 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 121 + LexiconTypeID string `json:"$type,omitempty"` 122 + By *ActorDefs_ProfileViewBasic `json:"by" cborgen:"by"` 123 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 116 124 } 117 125 118 126 type FeedDefs_ReplyRef struct {
+4 -4
api/bsky/feedgetLikes.go
··· 12 12 } 13 13 14 14 type FeedGetLikes_Like struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Actor *ActorDefs_WithInfo `json:"actor" cborgen:"actor"` 17 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Actor *ActorDefs_ProfileView `json:"actor" cborgen:"actor"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 19 19 } 20 20 21 21 type FeedGetLikes_Output struct {
+5 -5
api/bsky/feedgetRepostedBy.go
··· 12 12 } 13 13 14 14 type FeedGetRepostedBy_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Cid *string `json:"cid,omitempty" cborgen:"cid"` 17 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 18 - RepostedBy []*ActorDefs_WithInfo `json:"repostedBy" cborgen:"repostedBy"` 19 - Uri string `json:"uri" cborgen:"uri"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Cid *string `json:"cid,omitempty" cborgen:"cid"` 17 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 18 + RepostedBy []*ActorDefs_ProfileView `json:"repostedBy" cborgen:"repostedBy"` 19 + Uri string `json:"uri" cborgen:"uri"` 20 20 } 21 21 22 22 func FeedGetRepostedBy(ctx context.Context, c *xrpc.Client, cid string, cursor string, limit int64, uri string) (*FeedGetRepostedBy_Output, error) {
+17 -3
api/bsky/feedpost.go
··· 29 29 } 30 30 31 31 type FeedPost_Embed struct { 32 - EmbedImages *EmbedImages 33 - EmbedExternal *EmbedExternal 34 - EmbedRecord *EmbedRecord 32 + EmbedImages *EmbedImages 33 + EmbedExternal *EmbedExternal 34 + EmbedRecord *EmbedRecord 35 + EmbedRecordWithMedia *EmbedRecordWithMedia 35 36 } 36 37 37 38 func (t *FeedPost_Embed) MarshalJSON() ([]byte, error) { ··· 47 48 t.EmbedRecord.LexiconTypeID = "app.bsky.embed.record" 48 49 return json.Marshal(t.EmbedRecord) 49 50 } 51 + if t.EmbedRecordWithMedia != nil { 52 + t.EmbedRecordWithMedia.LexiconTypeID = "app.bsky.embed.recordWithMedia" 53 + return json.Marshal(t.EmbedRecordWithMedia) 54 + } 50 55 return nil, fmt.Errorf("cannot marshal empty enum") 51 56 } 52 57 func (t *FeedPost_Embed) UnmarshalJSON(b []byte) error { ··· 65 70 case "app.bsky.embed.record": 66 71 t.EmbedRecord = new(EmbedRecord) 67 72 return json.Unmarshal(b, t.EmbedRecord) 73 + case "app.bsky.embed.recordWithMedia": 74 + t.EmbedRecordWithMedia = new(EmbedRecordWithMedia) 75 + return json.Unmarshal(b, t.EmbedRecordWithMedia) 68 76 69 77 default: 70 78 return nil ··· 86 94 if t.EmbedRecord != nil { 87 95 return t.EmbedRecord.MarshalCBOR(w) 88 96 } 97 + if t.EmbedRecordWithMedia != nil { 98 + return t.EmbedRecordWithMedia.MarshalCBOR(w) 99 + } 89 100 return fmt.Errorf("cannot cbor marshal empty enum") 90 101 } 91 102 func (t *FeedPost_Embed) UnmarshalCBOR(r io.Reader) error { ··· 104 115 case "app.bsky.embed.record": 105 116 t.EmbedRecord = new(EmbedRecord) 106 117 return t.EmbedRecord.UnmarshalCBOR(bytes.NewReader(b)) 118 + case "app.bsky.embed.recordWithMedia": 119 + t.EmbedRecordWithMedia = new(EmbedRecordWithMedia) 120 + return t.EmbedRecordWithMedia.UnmarshalCBOR(bytes.NewReader(b)) 107 121 108 122 default: 109 123 return nil
+4 -4
api/bsky/graphgetFollowers.go
··· 12 12 } 13 13 14 14 type GraphGetFollowers_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 17 - Followers []*ActorDefs_WithInfo `json:"followers" cborgen:"followers"` 18 - Subject *ActorDefs_WithInfo `json:"subject" cborgen:"subject"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 17 + Followers []*ActorDefs_ProfileView `json:"followers" cborgen:"followers"` 18 + Subject *ActorDefs_ProfileView `json:"subject" cborgen:"subject"` 19 19 } 20 20 21 21 func GraphGetFollowers(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetFollowers_Output, error) {
+4 -4
api/bsky/graphgetFollows.go
··· 12 12 } 13 13 14 14 type GraphGetFollows_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 17 - Follows []*ActorDefs_WithInfo `json:"follows" cborgen:"follows"` 18 - Subject *ActorDefs_WithInfo `json:"subject" cborgen:"subject"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 17 + Follows []*ActorDefs_ProfileView `json:"follows" cborgen:"follows"` 18 + Subject *ActorDefs_ProfileView `json:"subject" cborgen:"subject"` 19 19 } 20 20 21 21 func GraphGetFollows(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetFollows_Output, error) {
+3 -3
api/bsky/graphgetMutes.go
··· 12 12 } 13 13 14 14 type GraphGetMutes_Output struct { 15 - LexiconTypeID string `json:"$type,omitempty"` 16 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 17 - Mutes []*ActorDefs_WithInfo `json:"mutes" cborgen:"mutes"` 15 + LexiconTypeID string `json:"$type,omitempty"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor"` 17 + Mutes []*ActorDefs_ProfileView `json:"mutes" cborgen:"mutes"` 18 18 } 19 19 20 20 func GraphGetMutes(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetMutes_Output, error) {
+1 -1
api/bsky/notificationlistNotifications.go
··· 14 14 15 15 type NotificationListNotifications_Notification struct { 16 16 LexiconTypeID string `json:"$type,omitempty"` 17 - Author *ActorDefs_WithInfo `json:"author" cborgen:"author"` 17 + Author *ActorDefs_ProfileView `json:"author" cborgen:"author"` 18 18 Cid string `json:"cid" cborgen:"cid"` 19 19 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 20 20 IsRead bool `json:"isRead" cborgen:"isRead"`
+1 -1
gen/main.go
··· 24 24 panic(err) 25 25 } 26 26 27 - if err := cbg.WriteMapEncodersToFile("api/bsky/cbor_gen.go", "bsky", bsky.FeedPost{}, bsky.FeedRepost{}, bsky.FeedPost_Entity{}, bsky.FeedPost_ReplyRef{}, bsky.FeedPost_TextSlice{}, bsky.EmbedImages{}, bsky.EmbedExternal{}, bsky.EmbedExternal_External{}, bsky.EmbedImages_Image{}, bsky.GraphFollow{}, bsky.ActorProfile{}, bsky.EmbedRecord{}, bsky.FeedLike{}, bsky.RichtextFacet{}, bsky.RichtextFacet_TextSlice{}, bsky.RichtextFacet_Value{}, bsky.RichtextFacet_Link{}, bsky.RichtextFacet_Mention{}); err != nil { 27 + if err := cbg.WriteMapEncodersToFile("api/bsky/cbor_gen.go", "bsky", bsky.FeedPost{}, bsky.FeedRepost{}, bsky.FeedPost_Entity{}, bsky.FeedPost_ReplyRef{}, bsky.FeedPost_TextSlice{}, bsky.EmbedImages{}, bsky.EmbedExternal{}, bsky.EmbedExternal_External{}, bsky.EmbedImages_Image{}, bsky.GraphFollow{}, bsky.ActorProfile{}, bsky.EmbedRecord{}, bsky.FeedLike{}, bsky.RichtextFacet{}, bsky.RichtextFacet_TextSlice{}, bsky.RichtextFacet_Value{}, bsky.RichtextFacet_Link{}, bsky.RichtextFacet_Mention{}, bsky.EmbedRecordWithMedia{}, bsky.EmbedRecordWithMedia_Media{}); err != nil { 28 28 panic(err) 29 29 } 30 30