[WIP] music platform user data scraper
teal-fm atproto

store generated lexicons here

Changed files
+13492
api
atproto
bsky
chat
ozone
teal
+55
api/atproto/admindefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.defs 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + // AdminDefs_AccountView is a "accountView" in the com.atproto.admin.defs schema. 12 + type AdminDefs_AccountView struct { 13 + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 14 + Did string `json:"did" cborgen:"did"` 15 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 16 + EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` 17 + Handle string `json:"handle" cborgen:"handle"` 18 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 19 + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 20 + InvitedBy *ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 21 + Invites []*ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` 22 + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 23 + RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords,omitempty" cborgen:"relatedRecords,omitempty"` 24 + ThreatSignatures []*AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` 25 + } 26 + 27 + // AdminDefs_RepoBlobRef is a "repoBlobRef" in the com.atproto.admin.defs schema. 28 + // 29 + // RECORDTYPE: AdminDefs_RepoBlobRef 30 + type AdminDefs_RepoBlobRef struct { 31 + LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoBlobRef" cborgen:"$type,const=com.atproto.admin.defs#repoBlobRef"` 32 + Cid string `json:"cid" cborgen:"cid"` 33 + Did string `json:"did" cborgen:"did"` 34 + RecordUri *string `json:"recordUri,omitempty" cborgen:"recordUri,omitempty"` 35 + } 36 + 37 + // AdminDefs_RepoRef is a "repoRef" in the com.atproto.admin.defs schema. 38 + // 39 + // RECORDTYPE: AdminDefs_RepoRef 40 + type AdminDefs_RepoRef struct { 41 + LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoRef" cborgen:"$type,const=com.atproto.admin.defs#repoRef"` 42 + Did string `json:"did" cborgen:"did"` 43 + } 44 + 45 + // AdminDefs_StatusAttr is a "statusAttr" in the com.atproto.admin.defs schema. 46 + type AdminDefs_StatusAttr struct { 47 + Applied bool `json:"applied" cborgen:"applied"` 48 + Ref *string `json:"ref,omitempty" cborgen:"ref,omitempty"` 49 + } 50 + 51 + // AdminDefs_ThreatSignature is a "threatSignature" in the com.atproto.admin.defs schema. 52 + type AdminDefs_ThreatSignature struct { 53 + Property string `json:"property" cborgen:"property"` 54 + Value string `json:"value" cborgen:"value"` 55 + }
+25
api/atproto/admindeleteAccount.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.deleteAccount 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminDeleteAccount_Input is the input argument to a com.atproto.admin.deleteAccount call. 14 + type AdminDeleteAccount_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + } 17 + 18 + // AdminDeleteAccount calls the XRPC method "com.atproto.admin.deleteAccount". 19 + func AdminDeleteAccount(ctx context.Context, c *xrpc.Client, input *AdminDeleteAccount_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.deleteAccount", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+27
api/atproto/admindisableAccountInvites.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.disableAccountInvites 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminDisableAccountInvites_Input is the input argument to a com.atproto.admin.disableAccountInvites call. 14 + type AdminDisableAccountInvites_Input struct { 15 + Account string `json:"account" cborgen:"account"` 16 + // note: Optional reason for disabled invites. 17 + Note *string `json:"note,omitempty" cborgen:"note,omitempty"` 18 + } 19 + 20 + // AdminDisableAccountInvites calls the XRPC method "com.atproto.admin.disableAccountInvites". 21 + func AdminDisableAccountInvites(ctx context.Context, c *xrpc.Client, input *AdminDisableAccountInvites_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.disableAccountInvites", nil, input, nil); err != nil { 23 + return err 24 + } 25 + 26 + return nil 27 + }
+26
api/atproto/admindisableInviteCodes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.disableInviteCodes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminDisableInviteCodes_Input is the input argument to a com.atproto.admin.disableInviteCodes call. 14 + type AdminDisableInviteCodes_Input struct { 15 + Accounts []string `json:"accounts,omitempty" cborgen:"accounts,omitempty"` 16 + Codes []string `json:"codes,omitempty" cborgen:"codes,omitempty"` 17 + } 18 + 19 + // AdminDisableInviteCodes calls the XRPC method "com.atproto.admin.disableInviteCodes". 20 + func AdminDisableInviteCodes(ctx context.Context, c *xrpc.Client, input *AdminDisableInviteCodes_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.disableInviteCodes", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+27
api/atproto/adminenableAccountInvites.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.enableAccountInvites 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminEnableAccountInvites_Input is the input argument to a com.atproto.admin.enableAccountInvites call. 14 + type AdminEnableAccountInvites_Input struct { 15 + Account string `json:"account" cborgen:"account"` 16 + // note: Optional reason for enabled invites. 17 + Note *string `json:"note,omitempty" cborgen:"note,omitempty"` 18 + } 19 + 20 + // AdminEnableAccountInvites calls the XRPC method "com.atproto.admin.enableAccountInvites". 21 + func AdminEnableAccountInvites(ctx context.Context, c *xrpc.Client, input *AdminEnableAccountInvites_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.enableAccountInvites", nil, input, nil); err != nil { 23 + return err 24 + } 25 + 26 + return nil 27 + }
+25
api/atproto/admingetAccountInfo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.getAccountInfo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminGetAccountInfo calls the XRPC method "com.atproto.admin.getAccountInfo". 14 + func AdminGetAccountInfo(ctx context.Context, c *xrpc.Client, did string) (*AdminDefs_AccountView, error) { 15 + var out AdminDefs_AccountView 16 + 17 + params := map[string]interface{}{ 18 + "did": did, 19 + } 20 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getAccountInfo", params, nil, &out); err != nil { 21 + return nil, err 22 + } 23 + 24 + return &out, nil 25 + }
+30
api/atproto/admingetAccountInfos.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.getAccountInfos 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminGetAccountInfos_Output is the output of a com.atproto.admin.getAccountInfos call. 14 + type AdminGetAccountInfos_Output struct { 15 + Infos []*AdminDefs_AccountView `json:"infos" cborgen:"infos"` 16 + } 17 + 18 + // AdminGetAccountInfos calls the XRPC method "com.atproto.admin.getAccountInfos". 19 + func AdminGetAccountInfos(ctx context.Context, c *xrpc.Client, dids []string) (*AdminGetAccountInfos_Output, error) { 20 + var out AdminGetAccountInfos_Output 21 + 22 + params := map[string]interface{}{ 23 + "dids": dids, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getAccountInfos", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+33
api/atproto/admingetInviteCodes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.getInviteCodes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminGetInviteCodes_Output is the output of a com.atproto.admin.getInviteCodes call. 14 + type AdminGetInviteCodes_Output struct { 15 + Codes []*ServerDefs_InviteCode `json:"codes" cborgen:"codes"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // AdminGetInviteCodes calls the XRPC method "com.atproto.admin.getInviteCodes". 20 + func AdminGetInviteCodes(ctx context.Context, c *xrpc.Client, cursor string, limit int64, sort string) (*AdminGetInviteCodes_Output, error) { 21 + var out AdminGetInviteCodes_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + "sort": sort, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getInviteCodes", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+80
api/atproto/admingetSubjectStatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.getSubjectStatus 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // AdminGetSubjectStatus_Output is the output of a com.atproto.admin.getSubjectStatus call. 17 + type AdminGetSubjectStatus_Output struct { 18 + Deactivated *AdminDefs_StatusAttr `json:"deactivated,omitempty" cborgen:"deactivated,omitempty"` 19 + Subject *AdminGetSubjectStatus_Output_Subject `json:"subject" cborgen:"subject"` 20 + Takedown *AdminDefs_StatusAttr `json:"takedown,omitempty" cborgen:"takedown,omitempty"` 21 + } 22 + 23 + type AdminGetSubjectStatus_Output_Subject struct { 24 + AdminDefs_RepoRef *AdminDefs_RepoRef 25 + RepoStrongRef *RepoStrongRef 26 + AdminDefs_RepoBlobRef *AdminDefs_RepoBlobRef 27 + } 28 + 29 + func (t *AdminGetSubjectStatus_Output_Subject) MarshalJSON() ([]byte, error) { 30 + if t.AdminDefs_RepoRef != nil { 31 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 32 + return json.Marshal(t.AdminDefs_RepoRef) 33 + } 34 + if t.RepoStrongRef != nil { 35 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 36 + return json.Marshal(t.RepoStrongRef) 37 + } 38 + if t.AdminDefs_RepoBlobRef != nil { 39 + t.AdminDefs_RepoBlobRef.LexiconTypeID = "com.atproto.admin.defs#repoBlobRef" 40 + return json.Marshal(t.AdminDefs_RepoBlobRef) 41 + } 42 + return nil, fmt.Errorf("cannot marshal empty enum") 43 + } 44 + func (t *AdminGetSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error { 45 + typ, err := util.TypeExtract(b) 46 + if err != nil { 47 + return err 48 + } 49 + 50 + switch typ { 51 + case "com.atproto.admin.defs#repoRef": 52 + t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 53 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 54 + case "com.atproto.repo.strongRef": 55 + t.RepoStrongRef = new(RepoStrongRef) 56 + return json.Unmarshal(b, t.RepoStrongRef) 57 + case "com.atproto.admin.defs#repoBlobRef": 58 + t.AdminDefs_RepoBlobRef = new(AdminDefs_RepoBlobRef) 59 + return json.Unmarshal(b, t.AdminDefs_RepoBlobRef) 60 + 61 + default: 62 + return nil 63 + } 64 + } 65 + 66 + // AdminGetSubjectStatus calls the XRPC method "com.atproto.admin.getSubjectStatus". 67 + func AdminGetSubjectStatus(ctx context.Context, c *xrpc.Client, blob string, did string, uri string) (*AdminGetSubjectStatus_Output, error) { 68 + var out AdminGetSubjectStatus_Output 69 + 70 + params := map[string]interface{}{ 71 + "blob": blob, 72 + "did": did, 73 + "uri": uri, 74 + } 75 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getSubjectStatus", params, nil, &out); err != nil { 76 + return nil, err 77 + } 78 + 79 + return &out, nil 80 + }
+33
api/atproto/adminsearchAccounts.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.searchAccounts 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminSearchAccounts_Output is the output of a com.atproto.admin.searchAccounts call. 14 + type AdminSearchAccounts_Output struct { 15 + Accounts []*AdminDefs_AccountView `json:"accounts" cborgen:"accounts"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // AdminSearchAccounts calls the XRPC method "com.atproto.admin.searchAccounts". 20 + func AdminSearchAccounts(ctx context.Context, c *xrpc.Client, cursor string, email string, limit int64) (*AdminSearchAccounts_Output, error) { 21 + var out AdminSearchAccounts_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "email": email, 26 + "limit": limit, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.searchAccounts", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+36
api/atproto/adminsendEmail.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.sendEmail 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminSendEmail_Input is the input argument to a com.atproto.admin.sendEmail call. 14 + type AdminSendEmail_Input struct { 15 + // comment: Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers 16 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 17 + Content string `json:"content" cborgen:"content"` 18 + RecipientDid string `json:"recipientDid" cborgen:"recipientDid"` 19 + SenderDid string `json:"senderDid" cborgen:"senderDid"` 20 + Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"` 21 + } 22 + 23 + // AdminSendEmail_Output is the output of a com.atproto.admin.sendEmail call. 24 + type AdminSendEmail_Output struct { 25 + Sent bool `json:"sent" cborgen:"sent"` 26 + } 27 + 28 + // AdminSendEmail calls the XRPC method "com.atproto.admin.sendEmail". 29 + func AdminSendEmail(ctx context.Context, c *xrpc.Client, input *AdminSendEmail_Input) (*AdminSendEmail_Output, error) { 30 + var out AdminSendEmail_Output 31 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.sendEmail", nil, input, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+27
api/atproto/adminupdateAccountEmail.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.updateAccountEmail 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminUpdateAccountEmail_Input is the input argument to a com.atproto.admin.updateAccountEmail call. 14 + type AdminUpdateAccountEmail_Input struct { 15 + // account: The handle or DID of the repo. 16 + Account string `json:"account" cborgen:"account"` 17 + Email string `json:"email" cborgen:"email"` 18 + } 19 + 20 + // AdminUpdateAccountEmail calls the XRPC method "com.atproto.admin.updateAccountEmail". 21 + func AdminUpdateAccountEmail(ctx context.Context, c *xrpc.Client, input *AdminUpdateAccountEmail_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.updateAccountEmail", nil, input, nil); err != nil { 23 + return err 24 + } 25 + 26 + return nil 27 + }
+26
api/atproto/adminupdateAccountHandle.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.updateAccountHandle 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminUpdateAccountHandle_Input is the input argument to a com.atproto.admin.updateAccountHandle call. 14 + type AdminUpdateAccountHandle_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + Handle string `json:"handle" cborgen:"handle"` 17 + } 18 + 19 + // AdminUpdateAccountHandle calls the XRPC method "com.atproto.admin.updateAccountHandle". 20 + func AdminUpdateAccountHandle(ctx context.Context, c *xrpc.Client, input *AdminUpdateAccountHandle_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.updateAccountHandle", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+26
api/atproto/adminupdateAccountPassword.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.updateAccountPassword 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminUpdateAccountPassword_Input is the input argument to a com.atproto.admin.updateAccountPassword call. 14 + type AdminUpdateAccountPassword_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + Password string `json:"password" cborgen:"password"` 17 + } 18 + 19 + // AdminUpdateAccountPassword calls the XRPC method "com.atproto.admin.updateAccountPassword". 20 + func AdminUpdateAccountPassword(ctx context.Context, c *xrpc.Client, input *AdminUpdateAccountPassword_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.updateAccountPassword", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+27
api/atproto/adminupdateAccountSigningKey.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.updateAccountSigningKey 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AdminUpdateAccountSigningKey_Input is the input argument to a com.atproto.admin.updateAccountSigningKey call. 14 + type AdminUpdateAccountSigningKey_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + // signingKey: Did-key formatted public key 17 + SigningKey string `json:"signingKey" cborgen:"signingKey"` 18 + } 19 + 20 + // AdminUpdateAccountSigningKey calls the XRPC method "com.atproto.admin.updateAccountSigningKey". 21 + func AdminUpdateAccountSigningKey(ctx context.Context, c *xrpc.Client, input *AdminUpdateAccountSigningKey_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.updateAccountSigningKey", nil, input, nil); err != nil { 23 + return err 24 + } 25 + 26 + return nil 27 + }
+123
api/atproto/adminupdateSubjectStatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.admin.updateSubjectStatus 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // AdminUpdateSubjectStatus_Input is the input argument to a com.atproto.admin.updateSubjectStatus call. 17 + type AdminUpdateSubjectStatus_Input struct { 18 + Deactivated *AdminDefs_StatusAttr `json:"deactivated,omitempty" cborgen:"deactivated,omitempty"` 19 + Subject *AdminUpdateSubjectStatus_Input_Subject `json:"subject" cborgen:"subject"` 20 + Takedown *AdminDefs_StatusAttr `json:"takedown,omitempty" cborgen:"takedown,omitempty"` 21 + } 22 + 23 + type AdminUpdateSubjectStatus_Input_Subject struct { 24 + AdminDefs_RepoRef *AdminDefs_RepoRef 25 + RepoStrongRef *RepoStrongRef 26 + AdminDefs_RepoBlobRef *AdminDefs_RepoBlobRef 27 + } 28 + 29 + func (t *AdminUpdateSubjectStatus_Input_Subject) MarshalJSON() ([]byte, error) { 30 + if t.AdminDefs_RepoRef != nil { 31 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 32 + return json.Marshal(t.AdminDefs_RepoRef) 33 + } 34 + if t.RepoStrongRef != nil { 35 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 36 + return json.Marshal(t.RepoStrongRef) 37 + } 38 + if t.AdminDefs_RepoBlobRef != nil { 39 + t.AdminDefs_RepoBlobRef.LexiconTypeID = "com.atproto.admin.defs#repoBlobRef" 40 + return json.Marshal(t.AdminDefs_RepoBlobRef) 41 + } 42 + return nil, fmt.Errorf("cannot marshal empty enum") 43 + } 44 + func (t *AdminUpdateSubjectStatus_Input_Subject) UnmarshalJSON(b []byte) error { 45 + typ, err := util.TypeExtract(b) 46 + if err != nil { 47 + return err 48 + } 49 + 50 + switch typ { 51 + case "com.atproto.admin.defs#repoRef": 52 + t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 53 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 54 + case "com.atproto.repo.strongRef": 55 + t.RepoStrongRef = new(RepoStrongRef) 56 + return json.Unmarshal(b, t.RepoStrongRef) 57 + case "com.atproto.admin.defs#repoBlobRef": 58 + t.AdminDefs_RepoBlobRef = new(AdminDefs_RepoBlobRef) 59 + return json.Unmarshal(b, t.AdminDefs_RepoBlobRef) 60 + 61 + default: 62 + return nil 63 + } 64 + } 65 + 66 + // AdminUpdateSubjectStatus_Output is the output of a com.atproto.admin.updateSubjectStatus call. 67 + type AdminUpdateSubjectStatus_Output struct { 68 + Subject *AdminUpdateSubjectStatus_Output_Subject `json:"subject" cborgen:"subject"` 69 + Takedown *AdminDefs_StatusAttr `json:"takedown,omitempty" cborgen:"takedown,omitempty"` 70 + } 71 + 72 + type AdminUpdateSubjectStatus_Output_Subject struct { 73 + AdminDefs_RepoRef *AdminDefs_RepoRef 74 + RepoStrongRef *RepoStrongRef 75 + AdminDefs_RepoBlobRef *AdminDefs_RepoBlobRef 76 + } 77 + 78 + func (t *AdminUpdateSubjectStatus_Output_Subject) MarshalJSON() ([]byte, error) { 79 + if t.AdminDefs_RepoRef != nil { 80 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 81 + return json.Marshal(t.AdminDefs_RepoRef) 82 + } 83 + if t.RepoStrongRef != nil { 84 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 85 + return json.Marshal(t.RepoStrongRef) 86 + } 87 + if t.AdminDefs_RepoBlobRef != nil { 88 + t.AdminDefs_RepoBlobRef.LexiconTypeID = "com.atproto.admin.defs#repoBlobRef" 89 + return json.Marshal(t.AdminDefs_RepoBlobRef) 90 + } 91 + return nil, fmt.Errorf("cannot marshal empty enum") 92 + } 93 + func (t *AdminUpdateSubjectStatus_Output_Subject) UnmarshalJSON(b []byte) error { 94 + typ, err := util.TypeExtract(b) 95 + if err != nil { 96 + return err 97 + } 98 + 99 + switch typ { 100 + case "com.atproto.admin.defs#repoRef": 101 + t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 102 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 103 + case "com.atproto.repo.strongRef": 104 + t.RepoStrongRef = new(RepoStrongRef) 105 + return json.Unmarshal(b, t.RepoStrongRef) 106 + case "com.atproto.admin.defs#repoBlobRef": 107 + t.AdminDefs_RepoBlobRef = new(AdminDefs_RepoBlobRef) 108 + return json.Unmarshal(b, t.AdminDefs_RepoBlobRef) 109 + 110 + default: 111 + return nil 112 + } 113 + } 114 + 115 + // AdminUpdateSubjectStatus calls the XRPC method "com.atproto.admin.updateSubjectStatus". 116 + func AdminUpdateSubjectStatus(ctx context.Context, c *xrpc.Client, input *AdminUpdateSubjectStatus_Input) (*AdminUpdateSubjectStatus_Output, error) { 117 + var out AdminUpdateSubjectStatus_Output 118 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.updateSubjectStatus", nil, input, &out); err != nil { 119 + return nil, err 120 + } 121 + 122 + return &out, nil 123 + }
+14
api/atproto/identitydefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.defs 6 + 7 + // IdentityDefs_IdentityInfo is a "identityInfo" in the com.atproto.identity.defs schema. 8 + type IdentityDefs_IdentityInfo struct { 9 + Did string `json:"did" cborgen:"did"` 10 + // didDoc: The complete DID document for the identity. 11 + DidDoc interface{} `json:"didDoc" cborgen:"didDoc"` 12 + // handle: The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. 13 + Handle string `json:"handle" cborgen:"handle"` 14 + }
+31
api/atproto/identitygetRecommendedDidCredentials.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.getRecommendedDidCredentials 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // IdentityGetRecommendedDidCredentials_Output is the output of a com.atproto.identity.getRecommendedDidCredentials call. 15 + type IdentityGetRecommendedDidCredentials_Output struct { 16 + AlsoKnownAs []string `json:"alsoKnownAs,omitempty" cborgen:"alsoKnownAs,omitempty"` 17 + // rotationKeys: Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. 18 + RotationKeys []string `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"` 19 + Services *util.LexiconTypeDecoder `json:"services,omitempty" cborgen:"services,omitempty"` 20 + VerificationMethods *util.LexiconTypeDecoder `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"` 21 + } 22 + 23 + // IdentityGetRecommendedDidCredentials calls the XRPC method "com.atproto.identity.getRecommendedDidCredentials". 24 + func IdentityGetRecommendedDidCredentials(ctx context.Context, c *xrpc.Client) (*IdentityGetRecommendedDidCredentials_Output, error) { 25 + var out IdentityGetRecommendedDidCredentials_Output 26 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.getRecommendedDidCredentials", nil, nil, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+26
api/atproto/identityrefreshIdentity.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.refreshIdentity 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // IdentityRefreshIdentity_Input is the input argument to a com.atproto.identity.refreshIdentity call. 14 + type IdentityRefreshIdentity_Input struct { 15 + Identifier string `json:"identifier" cborgen:"identifier"` 16 + } 17 + 18 + // IdentityRefreshIdentity calls the XRPC method "com.atproto.identity.refreshIdentity". 19 + func IdentityRefreshIdentity(ctx context.Context, c *xrpc.Client, input *IdentityRefreshIdentity_Input) (*IdentityDefs_IdentityInfo, error) { 20 + var out IdentityDefs_IdentityInfo 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.refreshIdentity", nil, input, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+20
api/atproto/identityrequestPlcOperationSignature.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.requestPlcOperationSignature 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // IdentityRequestPlcOperationSignature calls the XRPC method "com.atproto.identity.requestPlcOperationSignature". 14 + func IdentityRequestPlcOperationSignature(ctx context.Context, c *xrpc.Client) error { 15 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.identity.requestPlcOperationSignature", nil, nil, nil); err != nil { 16 + return err 17 + } 18 + 19 + return nil 20 + }
+33
api/atproto/identityresolveDid.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.resolveDid 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // IdentityResolveDid_Output is the output of a com.atproto.identity.resolveDid call. 14 + type IdentityResolveDid_Output struct { 15 + // didDoc: The complete DID document for the identity. 16 + DidDoc interface{} `json:"didDoc" cborgen:"didDoc"` 17 + } 18 + 19 + // IdentityResolveDid calls the XRPC method "com.atproto.identity.resolveDid". 20 + // 21 + // did: DID to resolve. 22 + func IdentityResolveDid(ctx context.Context, c *xrpc.Client, did string) (*IdentityResolveDid_Output, error) { 23 + var out IdentityResolveDid_Output 24 + 25 + params := map[string]interface{}{ 26 + "did": did, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.resolveDid", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+32
api/atproto/identityresolveHandle.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.resolveHandle 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // IdentityResolveHandle_Output is the output of a com.atproto.identity.resolveHandle call. 14 + type IdentityResolveHandle_Output struct { 15 + Did string `json:"did" cborgen:"did"` 16 + } 17 + 18 + // IdentityResolveHandle calls the XRPC method "com.atproto.identity.resolveHandle". 19 + // 20 + // handle: The handle to resolve. 21 + func IdentityResolveHandle(ctx context.Context, c *xrpc.Client, handle string) (*IdentityResolveHandle_Output, error) { 22 + var out IdentityResolveHandle_Output 23 + 24 + params := map[string]interface{}{ 25 + "handle": handle, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.resolveHandle", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+27
api/atproto/identityresolveIdentity.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.resolveIdentity 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // IdentityResolveIdentity calls the XRPC method "com.atproto.identity.resolveIdentity". 14 + // 15 + // identifier: Handle or DID to resolve. 16 + func IdentityResolveIdentity(ctx context.Context, c *xrpc.Client, identifier string) (*IdentityDefs_IdentityInfo, error) { 17 + var out IdentityDefs_IdentityInfo 18 + 19 + params := map[string]interface{}{ 20 + "identifier": identifier, 21 + } 22 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.identity.resolveIdentity", params, nil, &out); err != nil { 23 + return nil, err 24 + } 25 + 26 + return &out, nil 27 + }
+38
api/atproto/identitysignPlcOperation.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.signPlcOperation 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // IdentitySignPlcOperation_Input is the input argument to a com.atproto.identity.signPlcOperation call. 15 + type IdentitySignPlcOperation_Input struct { 16 + AlsoKnownAs []string `json:"alsoKnownAs,omitempty" cborgen:"alsoKnownAs,omitempty"` 17 + RotationKeys []string `json:"rotationKeys,omitempty" cborgen:"rotationKeys,omitempty"` 18 + Services *util.LexiconTypeDecoder `json:"services,omitempty" cborgen:"services,omitempty"` 19 + // token: A token received through com.atproto.identity.requestPlcOperationSignature 20 + Token *string `json:"token,omitempty" cborgen:"token,omitempty"` 21 + VerificationMethods *util.LexiconTypeDecoder `json:"verificationMethods,omitempty" cborgen:"verificationMethods,omitempty"` 22 + } 23 + 24 + // IdentitySignPlcOperation_Output is the output of a com.atproto.identity.signPlcOperation call. 25 + type IdentitySignPlcOperation_Output struct { 26 + // operation: A signed DID PLC operation. 27 + Operation *util.LexiconTypeDecoder `json:"operation" cborgen:"operation"` 28 + } 29 + 30 + // IdentitySignPlcOperation calls the XRPC method "com.atproto.identity.signPlcOperation". 31 + func IdentitySignPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySignPlcOperation_Input) (*IdentitySignPlcOperation_Output, error) { 32 + var out IdentitySignPlcOperation_Output 33 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.signPlcOperation", nil, input, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+26
api/atproto/identitysubmitPlcOperation.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.submitPlcOperation 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // IdentitySubmitPlcOperation_Input is the input argument to a com.atproto.identity.submitPlcOperation call. 15 + type IdentitySubmitPlcOperation_Input struct { 16 + Operation *util.LexiconTypeDecoder `json:"operation" cborgen:"operation"` 17 + } 18 + 19 + // IdentitySubmitPlcOperation calls the XRPC method "com.atproto.identity.submitPlcOperation". 20 + func IdentitySubmitPlcOperation(ctx context.Context, c *xrpc.Client, input *IdentitySubmitPlcOperation_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.submitPlcOperation", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+26
api/atproto/identityupdateHandle.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.identity.updateHandle 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // IdentityUpdateHandle_Input is the input argument to a com.atproto.identity.updateHandle call. 14 + type IdentityUpdateHandle_Input struct { 15 + // handle: The new handle. 16 + Handle string `json:"handle" cborgen:"handle"` 17 + } 18 + 19 + // IdentityUpdateHandle calls the XRPC method "com.atproto.identity.updateHandle". 20 + func IdentityUpdateHandle(ctx context.Context, c *xrpc.Client, input *IdentityUpdateHandle_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.identity.updateHandle", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+80
api/atproto/labeldefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.label.defs 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + // LabelDefs_Label is a "label" in the com.atproto.label.defs schema. 12 + // 13 + // Metadata tag on an atproto resource (eg, repo or record). 14 + type LabelDefs_Label struct { 15 + // cid: Optionally, CID specifying the specific version of 'uri' resource this label applies to. 16 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 17 + // cts: Timestamp when this label was created. 18 + Cts string `json:"cts" cborgen:"cts"` 19 + // exp: Timestamp at which this label expires (no longer applies). 20 + Exp *string `json:"exp,omitempty" cborgen:"exp,omitempty"` 21 + // neg: If true, this is a negation label, overwriting a previous label. 22 + Neg *bool `json:"neg,omitempty" cborgen:"neg,omitempty"` 23 + // sig: Signature of dag-cbor encoded label. 24 + Sig util.LexBytes `json:"sig,omitempty" cborgen:"sig,omitempty"` 25 + // src: DID of the actor who created this label. 26 + Src string `json:"src" cborgen:"src"` 27 + // uri: AT URI of the record, repository (account), or other resource that this label applies to. 28 + Uri string `json:"uri" cborgen:"uri"` 29 + // val: The short string name of the value or type of this label. 30 + Val string `json:"val" cborgen:"val"` 31 + // ver: The AT Protocol version of the label object. 32 + Ver *int64 `json:"ver,omitempty" cborgen:"ver,omitempty"` 33 + } 34 + 35 + // LabelDefs_LabelValueDefinition is a "labelValueDefinition" in the com.atproto.label.defs schema. 36 + // 37 + // Declares a label value and its expected interpretations and behaviors. 38 + type LabelDefs_LabelValueDefinition struct { 39 + // adultOnly: Does the user need to have adult content enabled in order to configure this label? 40 + AdultOnly *bool `json:"adultOnly,omitempty" cborgen:"adultOnly,omitempty"` 41 + // blurs: What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. 42 + Blurs string `json:"blurs" cborgen:"blurs"` 43 + // defaultSetting: The default setting for this label. 44 + DefaultSetting *string `json:"defaultSetting,omitempty" cborgen:"defaultSetting,omitempty"` 45 + // identifier: The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). 46 + Identifier string `json:"identifier" cborgen:"identifier"` 47 + Locales []*LabelDefs_LabelValueDefinitionStrings `json:"locales" cborgen:"locales"` 48 + // severity: How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. 49 + Severity string `json:"severity" cborgen:"severity"` 50 + } 51 + 52 + // LabelDefs_LabelValueDefinitionStrings is a "labelValueDefinitionStrings" in the com.atproto.label.defs schema. 53 + // 54 + // Strings which describe the label in the UI, localized into a specific language. 55 + type LabelDefs_LabelValueDefinitionStrings struct { 56 + // description: A longer description of what the label means and why it might be applied. 57 + Description string `json:"description" cborgen:"description"` 58 + // lang: The code of the language these strings are written in. 59 + Lang string `json:"lang" cborgen:"lang"` 60 + // name: A short human-readable name for the label. 61 + Name string `json:"name" cborgen:"name"` 62 + } 63 + 64 + // LabelDefs_SelfLabel is a "selfLabel" in the com.atproto.label.defs schema. 65 + // 66 + // Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. 67 + type LabelDefs_SelfLabel struct { 68 + // val: The short string name of the value or type of this label. 69 + Val string `json:"val" cborgen:"val"` 70 + } 71 + 72 + // LabelDefs_SelfLabels is a "selfLabels" in the com.atproto.label.defs schema. 73 + // 74 + // Metadata tags on an atproto record, published by the author within the record. 75 + // 76 + // RECORDTYPE: LabelDefs_SelfLabels 77 + type LabelDefs_SelfLabels struct { 78 + LexiconTypeID string `json:"$type,const=com.atproto.label.defs#selfLabels" cborgen:"$type,const=com.atproto.label.defs#selfLabels"` 79 + Values []*LabelDefs_SelfLabel `json:"values" cborgen:"values,preservenil"` 80 + }
+37
api/atproto/labelqueryLabels.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.label.queryLabels 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // LabelQueryLabels_Output is the output of a com.atproto.label.queryLabels call. 14 + type LabelQueryLabels_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Labels []*LabelDefs_Label `json:"labels" cborgen:"labels"` 17 + } 18 + 19 + // LabelQueryLabels calls the XRPC method "com.atproto.label.queryLabels". 20 + // 21 + // sources: Optional list of label sources (DIDs) to filter on. 22 + // uriPatterns: List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI. 23 + func LabelQueryLabels(ctx context.Context, c *xrpc.Client, cursor string, limit int64, sources []string, uriPatterns []string) (*LabelQueryLabels_Output, error) { 24 + var out LabelQueryLabels_Output 25 + 26 + params := map[string]interface{}{ 27 + "cursor": cursor, 28 + "limit": limit, 29 + "sources": sources, 30 + "uriPatterns": uriPatterns, 31 + } 32 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.label.queryLabels", params, nil, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+17
api/atproto/labelsubscribeLabels.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.label.subscribeLabels 6 + 7 + // LabelSubscribeLabels_Info is a "info" in the com.atproto.label.subscribeLabels schema. 8 + type LabelSubscribeLabels_Info struct { 9 + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 10 + Name string `json:"name" cborgen:"name"` 11 + } 12 + 13 + // LabelSubscribeLabels_Labels is a "labels" in the com.atproto.label.subscribeLabels schema. 14 + type LabelSubscribeLabels_Labels struct { 15 + Labels []*LabelDefs_Label `json:"labels" cborgen:"labels"` 16 + Seq int64 `json:"seq" cborgen:"seq"` 17 + }
+19
api/atproto/lexiconschema.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.lexicon.schema 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("com.atproto.lexicon.schema", &LexiconSchema{}) 13 + } // 14 + // RECORDTYPE: LexiconSchema 15 + type LexiconSchema struct { 16 + LexiconTypeID string `json:"$type,const=com.atproto.lexicon.schema" cborgen:"$type,const=com.atproto.lexicon.schema"` 17 + // lexicon: Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. 18 + Lexicon int64 `json:"lexicon" cborgen:"lexicon"` 19 + }
+113
api/atproto/moderationcreateReport.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.moderation.createReport 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // ModerationCreateReport_Input is the input argument to a com.atproto.moderation.createReport call. 17 + type ModerationCreateReport_Input struct { 18 + // reason: Additional context about the content and violation. 19 + Reason *string `json:"reason,omitempty" cborgen:"reason,omitempty"` 20 + // reasonType: Indicates the broad category of violation the report is for. 21 + ReasonType *string `json:"reasonType" cborgen:"reasonType"` 22 + Subject *ModerationCreateReport_Input_Subject `json:"subject" cborgen:"subject"` 23 + } 24 + 25 + type ModerationCreateReport_Input_Subject struct { 26 + AdminDefs_RepoRef *AdminDefs_RepoRef 27 + RepoStrongRef *RepoStrongRef 28 + } 29 + 30 + func (t *ModerationCreateReport_Input_Subject) MarshalJSON() ([]byte, error) { 31 + if t.AdminDefs_RepoRef != nil { 32 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 33 + return json.Marshal(t.AdminDefs_RepoRef) 34 + } 35 + if t.RepoStrongRef != nil { 36 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 37 + return json.Marshal(t.RepoStrongRef) 38 + } 39 + return nil, fmt.Errorf("cannot marshal empty enum") 40 + } 41 + func (t *ModerationCreateReport_Input_Subject) UnmarshalJSON(b []byte) error { 42 + typ, err := util.TypeExtract(b) 43 + if err != nil { 44 + return err 45 + } 46 + 47 + switch typ { 48 + case "com.atproto.admin.defs#repoRef": 49 + t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 50 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 51 + case "com.atproto.repo.strongRef": 52 + t.RepoStrongRef = new(RepoStrongRef) 53 + return json.Unmarshal(b, t.RepoStrongRef) 54 + 55 + default: 56 + return nil 57 + } 58 + } 59 + 60 + // ModerationCreateReport_Output is the output of a com.atproto.moderation.createReport call. 61 + type ModerationCreateReport_Output struct { 62 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 63 + Id int64 `json:"id" cborgen:"id"` 64 + Reason *string `json:"reason,omitempty" cborgen:"reason,omitempty"` 65 + ReasonType *string `json:"reasonType" cborgen:"reasonType"` 66 + ReportedBy string `json:"reportedBy" cborgen:"reportedBy"` 67 + Subject *ModerationCreateReport_Output_Subject `json:"subject" cborgen:"subject"` 68 + } 69 + 70 + type ModerationCreateReport_Output_Subject struct { 71 + AdminDefs_RepoRef *AdminDefs_RepoRef 72 + RepoStrongRef *RepoStrongRef 73 + } 74 + 75 + func (t *ModerationCreateReport_Output_Subject) MarshalJSON() ([]byte, error) { 76 + if t.AdminDefs_RepoRef != nil { 77 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 78 + return json.Marshal(t.AdminDefs_RepoRef) 79 + } 80 + if t.RepoStrongRef != nil { 81 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 82 + return json.Marshal(t.RepoStrongRef) 83 + } 84 + return nil, fmt.Errorf("cannot marshal empty enum") 85 + } 86 + func (t *ModerationCreateReport_Output_Subject) UnmarshalJSON(b []byte) error { 87 + typ, err := util.TypeExtract(b) 88 + if err != nil { 89 + return err 90 + } 91 + 92 + switch typ { 93 + case "com.atproto.admin.defs#repoRef": 94 + t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 95 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 96 + case "com.atproto.repo.strongRef": 97 + t.RepoStrongRef = new(RepoStrongRef) 98 + return json.Unmarshal(b, t.RepoStrongRef) 99 + 100 + default: 101 + return nil 102 + } 103 + } 104 + 105 + // ModerationCreateReport calls the XRPC method "com.atproto.moderation.createReport". 106 + func ModerationCreateReport(ctx context.Context, c *xrpc.Client, input *ModerationCreateReport_Input) (*ModerationCreateReport_Output, error) { 107 + var out ModerationCreateReport_Output 108 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.moderation.createReport", nil, input, &out); err != nil { 109 + return nil, err 110 + } 111 + 112 + return &out, nil 113 + }
+5
api/atproto/moderationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.moderation.defs
+190
api/atproto/repoapplyWrites.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.applyWrites 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // RepoApplyWrites_Create is a "create" in the com.atproto.repo.applyWrites schema. 17 + // 18 + // Operation which creates a new record. 19 + // 20 + // RECORDTYPE: RepoApplyWrites_Create 21 + type RepoApplyWrites_Create struct { 22 + LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#create" cborgen:"$type,const=com.atproto.repo.applyWrites#create"` 23 + Collection string `json:"collection" cborgen:"collection"` 24 + // rkey: NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. 25 + Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` 26 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 27 + } 28 + 29 + // RepoApplyWrites_CreateResult is a "createResult" in the com.atproto.repo.applyWrites schema. 30 + // 31 + // RECORDTYPE: RepoApplyWrites_CreateResult 32 + type RepoApplyWrites_CreateResult struct { 33 + LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#createResult" cborgen:"$type,const=com.atproto.repo.applyWrites#createResult"` 34 + Cid string `json:"cid" cborgen:"cid"` 35 + Uri string `json:"uri" cborgen:"uri"` 36 + ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` 37 + } 38 + 39 + // RepoApplyWrites_Delete is a "delete" in the com.atproto.repo.applyWrites schema. 40 + // 41 + // Operation which deletes an existing record. 42 + // 43 + // RECORDTYPE: RepoApplyWrites_Delete 44 + type RepoApplyWrites_Delete struct { 45 + LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#delete" cborgen:"$type,const=com.atproto.repo.applyWrites#delete"` 46 + Collection string `json:"collection" cborgen:"collection"` 47 + Rkey string `json:"rkey" cborgen:"rkey"` 48 + } 49 + 50 + // RepoApplyWrites_DeleteResult is a "deleteResult" in the com.atproto.repo.applyWrites schema. 51 + // 52 + // RECORDTYPE: RepoApplyWrites_DeleteResult 53 + type RepoApplyWrites_DeleteResult struct { 54 + LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#deleteResult" cborgen:"$type,const=com.atproto.repo.applyWrites#deleteResult"` 55 + } 56 + 57 + // RepoApplyWrites_Input is the input argument to a com.atproto.repo.applyWrites call. 58 + type RepoApplyWrites_Input struct { 59 + // repo: The handle or DID of the repo (aka, current account). 60 + Repo string `json:"repo" cborgen:"repo"` 61 + // swapCommit: If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations. 62 + SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` 63 + // validate: Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons. 64 + Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"` 65 + Writes []*RepoApplyWrites_Input_Writes_Elem `json:"writes" cborgen:"writes"` 66 + } 67 + 68 + type RepoApplyWrites_Input_Writes_Elem struct { 69 + RepoApplyWrites_Create *RepoApplyWrites_Create 70 + RepoApplyWrites_Update *RepoApplyWrites_Update 71 + RepoApplyWrites_Delete *RepoApplyWrites_Delete 72 + } 73 + 74 + func (t *RepoApplyWrites_Input_Writes_Elem) MarshalJSON() ([]byte, error) { 75 + if t.RepoApplyWrites_Create != nil { 76 + t.RepoApplyWrites_Create.LexiconTypeID = "com.atproto.repo.applyWrites#create" 77 + return json.Marshal(t.RepoApplyWrites_Create) 78 + } 79 + if t.RepoApplyWrites_Update != nil { 80 + t.RepoApplyWrites_Update.LexiconTypeID = "com.atproto.repo.applyWrites#update" 81 + return json.Marshal(t.RepoApplyWrites_Update) 82 + } 83 + if t.RepoApplyWrites_Delete != nil { 84 + t.RepoApplyWrites_Delete.LexiconTypeID = "com.atproto.repo.applyWrites#delete" 85 + return json.Marshal(t.RepoApplyWrites_Delete) 86 + } 87 + return nil, fmt.Errorf("cannot marshal empty enum") 88 + } 89 + func (t *RepoApplyWrites_Input_Writes_Elem) UnmarshalJSON(b []byte) error { 90 + typ, err := util.TypeExtract(b) 91 + if err != nil { 92 + return err 93 + } 94 + 95 + switch typ { 96 + case "com.atproto.repo.applyWrites#create": 97 + t.RepoApplyWrites_Create = new(RepoApplyWrites_Create) 98 + return json.Unmarshal(b, t.RepoApplyWrites_Create) 99 + case "com.atproto.repo.applyWrites#update": 100 + t.RepoApplyWrites_Update = new(RepoApplyWrites_Update) 101 + return json.Unmarshal(b, t.RepoApplyWrites_Update) 102 + case "com.atproto.repo.applyWrites#delete": 103 + t.RepoApplyWrites_Delete = new(RepoApplyWrites_Delete) 104 + return json.Unmarshal(b, t.RepoApplyWrites_Delete) 105 + 106 + default: 107 + return fmt.Errorf("closed enums must have a matching value") 108 + } 109 + } 110 + 111 + // RepoApplyWrites_Output is the output of a com.atproto.repo.applyWrites call. 112 + type RepoApplyWrites_Output struct { 113 + Commit *RepoDefs_CommitMeta `json:"commit,omitempty" cborgen:"commit,omitempty"` 114 + Results []*RepoApplyWrites_Output_Results_Elem `json:"results,omitempty" cborgen:"results,omitempty"` 115 + } 116 + 117 + type RepoApplyWrites_Output_Results_Elem struct { 118 + RepoApplyWrites_CreateResult *RepoApplyWrites_CreateResult 119 + RepoApplyWrites_UpdateResult *RepoApplyWrites_UpdateResult 120 + RepoApplyWrites_DeleteResult *RepoApplyWrites_DeleteResult 121 + } 122 + 123 + func (t *RepoApplyWrites_Output_Results_Elem) MarshalJSON() ([]byte, error) { 124 + if t.RepoApplyWrites_CreateResult != nil { 125 + t.RepoApplyWrites_CreateResult.LexiconTypeID = "com.atproto.repo.applyWrites#createResult" 126 + return json.Marshal(t.RepoApplyWrites_CreateResult) 127 + } 128 + if t.RepoApplyWrites_UpdateResult != nil { 129 + t.RepoApplyWrites_UpdateResult.LexiconTypeID = "com.atproto.repo.applyWrites#updateResult" 130 + return json.Marshal(t.RepoApplyWrites_UpdateResult) 131 + } 132 + if t.RepoApplyWrites_DeleteResult != nil { 133 + t.RepoApplyWrites_DeleteResult.LexiconTypeID = "com.atproto.repo.applyWrites#deleteResult" 134 + return json.Marshal(t.RepoApplyWrites_DeleteResult) 135 + } 136 + return nil, fmt.Errorf("cannot marshal empty enum") 137 + } 138 + func (t *RepoApplyWrites_Output_Results_Elem) UnmarshalJSON(b []byte) error { 139 + typ, err := util.TypeExtract(b) 140 + if err != nil { 141 + return err 142 + } 143 + 144 + switch typ { 145 + case "com.atproto.repo.applyWrites#createResult": 146 + t.RepoApplyWrites_CreateResult = new(RepoApplyWrites_CreateResult) 147 + return json.Unmarshal(b, t.RepoApplyWrites_CreateResult) 148 + case "com.atproto.repo.applyWrites#updateResult": 149 + t.RepoApplyWrites_UpdateResult = new(RepoApplyWrites_UpdateResult) 150 + return json.Unmarshal(b, t.RepoApplyWrites_UpdateResult) 151 + case "com.atproto.repo.applyWrites#deleteResult": 152 + t.RepoApplyWrites_DeleteResult = new(RepoApplyWrites_DeleteResult) 153 + return json.Unmarshal(b, t.RepoApplyWrites_DeleteResult) 154 + 155 + default: 156 + return fmt.Errorf("closed enums must have a matching value") 157 + } 158 + } 159 + 160 + // RepoApplyWrites_Update is a "update" in the com.atproto.repo.applyWrites schema. 161 + // 162 + // Operation which updates an existing record. 163 + // 164 + // RECORDTYPE: RepoApplyWrites_Update 165 + type RepoApplyWrites_Update struct { 166 + LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#update" cborgen:"$type,const=com.atproto.repo.applyWrites#update"` 167 + Collection string `json:"collection" cborgen:"collection"` 168 + Rkey string `json:"rkey" cborgen:"rkey"` 169 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 170 + } 171 + 172 + // RepoApplyWrites_UpdateResult is a "updateResult" in the com.atproto.repo.applyWrites schema. 173 + // 174 + // RECORDTYPE: RepoApplyWrites_UpdateResult 175 + type RepoApplyWrites_UpdateResult struct { 176 + LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#updateResult" cborgen:"$type,const=com.atproto.repo.applyWrites#updateResult"` 177 + Cid string `json:"cid" cborgen:"cid"` 178 + Uri string `json:"uri" cborgen:"uri"` 179 + ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` 180 + } 181 + 182 + // RepoApplyWrites calls the XRPC method "com.atproto.repo.applyWrites". 183 + func RepoApplyWrites(ctx context.Context, c *xrpc.Client, input *RepoApplyWrites_Input) (*RepoApplyWrites_Output, error) { 184 + var out RepoApplyWrites_Output 185 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.applyWrites", nil, input, &out); err != nil { 186 + return nil, err 187 + } 188 + 189 + return &out, nil 190 + }
+46
api/atproto/repocreateRecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.createRecord 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // RepoCreateRecord_Input is the input argument to a com.atproto.repo.createRecord call. 15 + type RepoCreateRecord_Input struct { 16 + // collection: The NSID of the record collection. 17 + Collection string `json:"collection" cborgen:"collection"` 18 + // record: The record itself. Must contain a $type field. 19 + Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 20 + // repo: The handle or DID of the repo (aka, current account). 21 + Repo string `json:"repo" cborgen:"repo"` 22 + // rkey: The Record Key. 23 + Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` 24 + // swapCommit: Compare and swap with the previous commit by CID. 25 + SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` 26 + // validate: Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. 27 + Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"` 28 + } 29 + 30 + // RepoCreateRecord_Output is the output of a com.atproto.repo.createRecord call. 31 + type RepoCreateRecord_Output struct { 32 + Cid string `json:"cid" cborgen:"cid"` 33 + Commit *RepoDefs_CommitMeta `json:"commit,omitempty" cborgen:"commit,omitempty"` 34 + Uri string `json:"uri" cborgen:"uri"` 35 + ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` 36 + } 37 + 38 + // RepoCreateRecord calls the XRPC method "com.atproto.repo.createRecord". 39 + func RepoCreateRecord(ctx context.Context, c *xrpc.Client, input *RepoCreateRecord_Input) (*RepoCreateRecord_Output, error) { 40 + var out RepoCreateRecord_Output 41 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.createRecord", nil, input, &out); err != nil { 42 + return nil, err 43 + } 44 + 45 + return &out, nil 46 + }
+11
api/atproto/repodefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.defs 6 + 7 + // RepoDefs_CommitMeta is a "commitMeta" in the com.atproto.repo.defs schema. 8 + type RepoDefs_CommitMeta struct { 9 + Cid string `json:"cid" cborgen:"cid"` 10 + Rev string `json:"rev" cborgen:"rev"` 11 + }
+40
api/atproto/repodeleteRecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.deleteRecord 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // RepoDeleteRecord_Input is the input argument to a com.atproto.repo.deleteRecord call. 14 + type RepoDeleteRecord_Input struct { 15 + // collection: The NSID of the record collection. 16 + Collection string `json:"collection" cborgen:"collection"` 17 + // repo: The handle or DID of the repo (aka, current account). 18 + Repo string `json:"repo" cborgen:"repo"` 19 + // rkey: The Record Key. 20 + Rkey string `json:"rkey" cborgen:"rkey"` 21 + // swapCommit: Compare and swap with the previous commit by CID. 22 + SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` 23 + // swapRecord: Compare and swap with the previous record by CID. 24 + SwapRecord *string `json:"swapRecord,omitempty" cborgen:"swapRecord,omitempty"` 25 + } 26 + 27 + // RepoDeleteRecord_Output is the output of a com.atproto.repo.deleteRecord call. 28 + type RepoDeleteRecord_Output struct { 29 + Commit *RepoDefs_CommitMeta `json:"commit,omitempty" cborgen:"commit,omitempty"` 30 + } 31 + 32 + // RepoDeleteRecord calls the XRPC method "com.atproto.repo.deleteRecord". 33 + func RepoDeleteRecord(ctx context.Context, c *xrpc.Client, input *RepoDeleteRecord_Input) (*RepoDeleteRecord_Output, error) { 34 + var out RepoDeleteRecord_Output 35 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.deleteRecord", nil, input, &out); err != nil { 36 + return nil, err 37 + } 38 + 39 + return &out, nil 40 + }
+39
api/atproto/repodescribeRepo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.describeRepo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // RepoDescribeRepo_Output is the output of a com.atproto.repo.describeRepo call. 14 + type RepoDescribeRepo_Output struct { 15 + // collections: List of all the collections (NSIDs) for which this repo contains at least one record. 16 + Collections []string `json:"collections" cborgen:"collections"` 17 + Did string `json:"did" cborgen:"did"` 18 + // didDoc: The complete DID document for this account. 19 + DidDoc interface{} `json:"didDoc" cborgen:"didDoc"` 20 + Handle string `json:"handle" cborgen:"handle"` 21 + // handleIsCorrect: Indicates if handle is currently valid (resolves bi-directionally) 22 + HandleIsCorrect bool `json:"handleIsCorrect" cborgen:"handleIsCorrect"` 23 + } 24 + 25 + // RepoDescribeRepo calls the XRPC method "com.atproto.repo.describeRepo". 26 + // 27 + // repo: The handle or DID of the repo. 28 + func RepoDescribeRepo(ctx context.Context, c *xrpc.Client, repo string) (*RepoDescribeRepo_Output, error) { 29 + var out RepoDescribeRepo_Output 30 + 31 + params := map[string]interface{}{ 32 + "repo": repo, 33 + } 34 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.describeRepo", params, nil, &out); err != nil { 35 + return nil, err 36 + } 37 + 38 + return &out, nil 39 + }
+41
api/atproto/repogetRecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.getRecord 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // RepoGetRecord_Output is the output of a com.atproto.repo.getRecord call. 15 + type RepoGetRecord_Output struct { 16 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 17 + Uri string `json:"uri" cborgen:"uri"` 18 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 19 + } 20 + 21 + // RepoGetRecord calls the XRPC method "com.atproto.repo.getRecord". 22 + // 23 + // cid: The CID of the version of the record. If not specified, then return the most recent version. 24 + // collection: The NSID of the record collection. 25 + // repo: The handle or DID of the repo. 26 + // rkey: The Record Key. 27 + func RepoGetRecord(ctx context.Context, c *xrpc.Client, cid string, collection string, repo string, rkey string) (*RepoGetRecord_Output, error) { 28 + var out RepoGetRecord_Output 29 + 30 + params := map[string]interface{}{ 31 + "cid": cid, 32 + "collection": collection, 33 + "repo": repo, 34 + "rkey": rkey, 35 + } 36 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.getRecord", params, nil, &out); err != nil { 37 + return nil, err 38 + } 39 + 40 + return &out, nil 41 + }
+21
api/atproto/repoimportRepo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.importRepo 6 + 7 + import ( 8 + "context" 9 + "io" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // RepoImportRepo calls the XRPC method "com.atproto.repo.importRepo". 15 + func RepoImportRepo(ctx context.Context, c *xrpc.Client, input io.Reader) error { 16 + if err := c.Do(ctx, xrpc.Procedure, "application/vnd.ipld.car", "com.atproto.repo.importRepo", nil, input, nil); err != nil { 17 + return err 18 + } 19 + 20 + return nil 21 + }
+38
api/atproto/repolistMissingBlobs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.listMissingBlobs 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // RepoListMissingBlobs_Output is the output of a com.atproto.repo.listMissingBlobs call. 14 + type RepoListMissingBlobs_Output struct { 15 + Blobs []*RepoListMissingBlobs_RecordBlob `json:"blobs" cborgen:"blobs"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // RepoListMissingBlobs_RecordBlob is a "recordBlob" in the com.atproto.repo.listMissingBlobs schema. 20 + type RepoListMissingBlobs_RecordBlob struct { 21 + Cid string `json:"cid" cborgen:"cid"` 22 + RecordUri string `json:"recordUri" cborgen:"recordUri"` 23 + } 24 + 25 + // RepoListMissingBlobs calls the XRPC method "com.atproto.repo.listMissingBlobs". 26 + func RepoListMissingBlobs(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*RepoListMissingBlobs_Output, error) { 27 + var out RepoListMissingBlobs_Output 28 + 29 + params := map[string]interface{}{ 30 + "cursor": cursor, 31 + "limit": limit, 32 + } 33 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.listMissingBlobs", params, nil, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+48
api/atproto/repolistRecords.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.listRecords 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // RepoListRecords_Output is the output of a com.atproto.repo.listRecords call. 15 + type RepoListRecords_Output struct { 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + Records []*RepoListRecords_Record `json:"records" cborgen:"records"` 18 + } 19 + 20 + // RepoListRecords_Record is a "record" in the com.atproto.repo.listRecords schema. 21 + type RepoListRecords_Record struct { 22 + Cid string `json:"cid" cborgen:"cid"` 23 + Uri string `json:"uri" cborgen:"uri"` 24 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 25 + } 26 + 27 + // RepoListRecords calls the XRPC method "com.atproto.repo.listRecords". 28 + // 29 + // collection: The NSID of the record type. 30 + // limit: The number of records to return. 31 + // repo: The handle or DID of the repo. 32 + // reverse: Flag to reverse the order of the returned records. 33 + func RepoListRecords(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64, repo string, reverse bool) (*RepoListRecords_Output, error) { 34 + var out RepoListRecords_Output 35 + 36 + params := map[string]interface{}{ 37 + "collection": collection, 38 + "cursor": cursor, 39 + "limit": limit, 40 + "repo": repo, 41 + "reverse": reverse, 42 + } 43 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.repo.listRecords", params, nil, &out); err != nil { 44 + return nil, err 45 + } 46 + 47 + return &out, nil 48 + }
+48
api/atproto/repoputRecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.putRecord 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // RepoPutRecord_Input is the input argument to a com.atproto.repo.putRecord call. 15 + type RepoPutRecord_Input struct { 16 + // collection: The NSID of the record collection. 17 + Collection string `json:"collection" cborgen:"collection"` 18 + // record: The record to write. 19 + Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 20 + // repo: The handle or DID of the repo (aka, current account). 21 + Repo string `json:"repo" cborgen:"repo"` 22 + // rkey: The Record Key. 23 + Rkey string `json:"rkey" cborgen:"rkey"` 24 + // swapCommit: Compare and swap with the previous commit by CID. 25 + SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` 26 + // swapRecord: Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation 27 + SwapRecord *string `json:"swapRecord" cborgen:"swapRecord"` 28 + // validate: Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. 29 + Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"` 30 + } 31 + 32 + // RepoPutRecord_Output is the output of a com.atproto.repo.putRecord call. 33 + type RepoPutRecord_Output struct { 34 + Cid string `json:"cid" cborgen:"cid"` 35 + Commit *RepoDefs_CommitMeta `json:"commit,omitempty" cborgen:"commit,omitempty"` 36 + Uri string `json:"uri" cborgen:"uri"` 37 + ValidationStatus *string `json:"validationStatus,omitempty" cborgen:"validationStatus,omitempty"` 38 + } 39 + 40 + // RepoPutRecord calls the XRPC method "com.atproto.repo.putRecord". 41 + func RepoPutRecord(ctx context.Context, c *xrpc.Client, input *RepoPutRecord_Input) (*RepoPutRecord_Output, error) { 42 + var out RepoPutRecord_Output 43 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.putRecord", nil, input, &out); err != nil { 44 + return nil, err 45 + } 46 + 47 + return &out, nil 48 + }
+19
api/atproto/repostrongRef.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.strongRef 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("com.atproto.repo.strongRef#main", &RepoStrongRef{}) 13 + } // RepoStrongRef is a "main" in the com.atproto.repo.strongRef schema. 14 + // RECORDTYPE: RepoStrongRef 15 + type RepoStrongRef struct { 16 + LexiconTypeID string `json:"$type,const=com.atproto.repo.strongRef,omitempty" cborgen:"$type,const=com.atproto.repo.strongRef,omitempty"` 17 + Cid string `json:"cid" cborgen:"cid"` 18 + Uri string `json:"uri" cborgen:"uri"` 19 + }
+28
api/atproto/repouploadBlob.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.repo.uploadBlob 6 + 7 + import ( 8 + "context" 9 + "io" 10 + 11 + "github.com/bluesky-social/indigo/lex/util" 12 + "github.com/bluesky-social/indigo/xrpc" 13 + ) 14 + 15 + // RepoUploadBlob_Output is the output of a com.atproto.repo.uploadBlob call. 16 + type RepoUploadBlob_Output struct { 17 + Blob *util.LexBlob `json:"blob" cborgen:"blob"` 18 + } 19 + 20 + // RepoUploadBlob calls the XRPC method "com.atproto.repo.uploadBlob". 21 + func RepoUploadBlob(ctx context.Context, c *xrpc.Client, input io.Reader) (*RepoUploadBlob_Output, error) { 22 + var out RepoUploadBlob_Output 23 + if err := c.Do(ctx, xrpc.Procedure, "*/*", "com.atproto.repo.uploadBlob", nil, input, &out); err != nil { 24 + return nil, err 25 + } 26 + 27 + return &out, nil 28 + }
+20
api/atproto/serveractivateAccount.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.activateAccount 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerActivateAccount calls the XRPC method "com.atproto.server.activateAccount". 14 + func ServerActivateAccount(ctx context.Context, c *xrpc.Client) error { 15 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.activateAccount", nil, nil, nil); err != nil { 16 + return err 17 + } 18 + 19 + return nil 20 + }
+34
api/atproto/servercheckAccountStatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.checkAccountStatus 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerCheckAccountStatus_Output is the output of a com.atproto.server.checkAccountStatus call. 14 + type ServerCheckAccountStatus_Output struct { 15 + Activated bool `json:"activated" cborgen:"activated"` 16 + ExpectedBlobs int64 `json:"expectedBlobs" cborgen:"expectedBlobs"` 17 + ImportedBlobs int64 `json:"importedBlobs" cborgen:"importedBlobs"` 18 + IndexedRecords int64 `json:"indexedRecords" cborgen:"indexedRecords"` 19 + PrivateStateValues int64 `json:"privateStateValues" cborgen:"privateStateValues"` 20 + RepoBlocks int64 `json:"repoBlocks" cborgen:"repoBlocks"` 21 + RepoCommit string `json:"repoCommit" cborgen:"repoCommit"` 22 + RepoRev string `json:"repoRev" cborgen:"repoRev"` 23 + ValidDid bool `json:"validDid" cborgen:"validDid"` 24 + } 25 + 26 + // ServerCheckAccountStatus calls the XRPC method "com.atproto.server.checkAccountStatus". 27 + func ServerCheckAccountStatus(ctx context.Context, c *xrpc.Client) (*ServerCheckAccountStatus_Output, error) { 28 + var out ServerCheckAccountStatus_Output 29 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.checkAccountStatus", nil, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+26
api/atproto/serverconfirmEmail.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.confirmEmail 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerConfirmEmail_Input is the input argument to a com.atproto.server.confirmEmail call. 14 + type ServerConfirmEmail_Input struct { 15 + Email string `json:"email" cborgen:"email"` 16 + Token string `json:"token" cborgen:"token"` 17 + } 18 + 19 + // ServerConfirmEmail calls the XRPC method "com.atproto.server.confirmEmail". 20 + func ServerConfirmEmail(ctx context.Context, c *xrpc.Client, input *ServerConfirmEmail_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.confirmEmail", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+52
api/atproto/servercreateAccount.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.createAccount 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerCreateAccount_Input is the input argument to a com.atproto.server.createAccount call. 14 + type ServerCreateAccount_Input struct { 15 + // did: Pre-existing atproto DID, being imported to a new account. 16 + Did *string `json:"did,omitempty" cborgen:"did,omitempty"` 17 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 18 + // handle: Requested handle for the account. 19 + Handle string `json:"handle" cborgen:"handle"` 20 + InviteCode *string `json:"inviteCode,omitempty" cborgen:"inviteCode,omitempty"` 21 + // password: Initial account password. May need to meet instance-specific password strength requirements. 22 + Password *string `json:"password,omitempty" cborgen:"password,omitempty"` 23 + // plcOp: A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented. 24 + PlcOp *interface{} `json:"plcOp,omitempty" cborgen:"plcOp,omitempty"` 25 + // recoveryKey: DID PLC rotation key (aka, recovery key) to be included in PLC creation operation. 26 + RecoveryKey *string `json:"recoveryKey,omitempty" cborgen:"recoveryKey,omitempty"` 27 + VerificationCode *string `json:"verificationCode,omitempty" cborgen:"verificationCode,omitempty"` 28 + VerificationPhone *string `json:"verificationPhone,omitempty" cborgen:"verificationPhone,omitempty"` 29 + } 30 + 31 + // ServerCreateAccount_Output is the output of a com.atproto.server.createAccount call. 32 + // 33 + // Account login session returned on successful account creation. 34 + type ServerCreateAccount_Output struct { 35 + AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 36 + // did: The DID of the new account. 37 + Did string `json:"did" cborgen:"did"` 38 + // didDoc: Complete DID document. 39 + DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"` 40 + Handle string `json:"handle" cborgen:"handle"` 41 + RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 42 + } 43 + 44 + // ServerCreateAccount calls the XRPC method "com.atproto.server.createAccount". 45 + func ServerCreateAccount(ctx context.Context, c *xrpc.Client, input *ServerCreateAccount_Input) (*ServerCreateAccount_Output, error) { 46 + var out ServerCreateAccount_Output 47 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.createAccount", nil, input, &out); err != nil { 48 + return nil, err 49 + } 50 + 51 + return &out, nil 52 + }
+37
api/atproto/servercreateAppPassword.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.createAppPassword 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerCreateAppPassword_AppPassword is a "appPassword" in the com.atproto.server.createAppPassword schema. 14 + type ServerCreateAppPassword_AppPassword struct { 15 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 16 + Name string `json:"name" cborgen:"name"` 17 + Password string `json:"password" cborgen:"password"` 18 + Privileged *bool `json:"privileged,omitempty" cborgen:"privileged,omitempty"` 19 + } 20 + 21 + // ServerCreateAppPassword_Input is the input argument to a com.atproto.server.createAppPassword call. 22 + type ServerCreateAppPassword_Input struct { 23 + // name: A short name for the App Password, to help distinguish them. 24 + Name string `json:"name" cborgen:"name"` 25 + // privileged: If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients. 26 + Privileged *bool `json:"privileged,omitempty" cborgen:"privileged,omitempty"` 27 + } 28 + 29 + // ServerCreateAppPassword calls the XRPC method "com.atproto.server.createAppPassword". 30 + func ServerCreateAppPassword(ctx context.Context, c *xrpc.Client, input *ServerCreateAppPassword_Input) (*ServerCreateAppPassword_AppPassword, error) { 31 + var out ServerCreateAppPassword_AppPassword 32 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.createAppPassword", nil, input, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+32
api/atproto/servercreateInviteCode.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.createInviteCode 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerCreateInviteCode_Input is the input argument to a com.atproto.server.createInviteCode call. 14 + type ServerCreateInviteCode_Input struct { 15 + ForAccount *string `json:"forAccount,omitempty" cborgen:"forAccount,omitempty"` 16 + UseCount int64 `json:"useCount" cborgen:"useCount"` 17 + } 18 + 19 + // ServerCreateInviteCode_Output is the output of a com.atproto.server.createInviteCode call. 20 + type ServerCreateInviteCode_Output struct { 21 + Code string `json:"code" cborgen:"code"` 22 + } 23 + 24 + // ServerCreateInviteCode calls the XRPC method "com.atproto.server.createInviteCode". 25 + func ServerCreateInviteCode(ctx context.Context, c *xrpc.Client, input *ServerCreateInviteCode_Input) (*ServerCreateInviteCode_Output, error) { 26 + var out ServerCreateInviteCode_Output 27 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.createInviteCode", nil, input, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+39
api/atproto/servercreateInviteCodes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.createInviteCodes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerCreateInviteCodes_AccountCodes is a "accountCodes" in the com.atproto.server.createInviteCodes schema. 14 + type ServerCreateInviteCodes_AccountCodes struct { 15 + Account string `json:"account" cborgen:"account"` 16 + Codes []string `json:"codes" cborgen:"codes"` 17 + } 18 + 19 + // ServerCreateInviteCodes_Input is the input argument to a com.atproto.server.createInviteCodes call. 20 + type ServerCreateInviteCodes_Input struct { 21 + CodeCount int64 `json:"codeCount" cborgen:"codeCount"` 22 + ForAccounts []string `json:"forAccounts,omitempty" cborgen:"forAccounts,omitempty"` 23 + UseCount int64 `json:"useCount" cborgen:"useCount"` 24 + } 25 + 26 + // ServerCreateInviteCodes_Output is the output of a com.atproto.server.createInviteCodes call. 27 + type ServerCreateInviteCodes_Output struct { 28 + Codes []*ServerCreateInviteCodes_AccountCodes `json:"codes" cborgen:"codes"` 29 + } 30 + 31 + // ServerCreateInviteCodes calls the XRPC method "com.atproto.server.createInviteCodes". 32 + func ServerCreateInviteCodes(ctx context.Context, c *xrpc.Client, input *ServerCreateInviteCodes_Input) (*ServerCreateInviteCodes_Output, error) { 33 + var out ServerCreateInviteCodes_Output 34 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.createInviteCodes", nil, input, &out); err != nil { 35 + return nil, err 36 + } 37 + 38 + return &out, nil 39 + }
+46
api/atproto/servercreateSession.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.createSession 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerCreateSession_Input is the input argument to a com.atproto.server.createSession call. 14 + type ServerCreateSession_Input struct { 15 + // allowTakendown: When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned 16 + AllowTakendown *bool `json:"allowTakendown,omitempty" cborgen:"allowTakendown,omitempty"` 17 + AuthFactorToken *string `json:"authFactorToken,omitempty" cborgen:"authFactorToken,omitempty"` 18 + // identifier: Handle or other identifier supported by the server for the authenticating user. 19 + Identifier string `json:"identifier" cborgen:"identifier"` 20 + Password string `json:"password" cborgen:"password"` 21 + } 22 + 23 + // ServerCreateSession_Output is the output of a com.atproto.server.createSession call. 24 + type ServerCreateSession_Output struct { 25 + AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 26 + Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` 27 + Did string `json:"did" cborgen:"did"` 28 + DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"` 29 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 30 + EmailAuthFactor *bool `json:"emailAuthFactor,omitempty" cborgen:"emailAuthFactor,omitempty"` 31 + EmailConfirmed *bool `json:"emailConfirmed,omitempty" cborgen:"emailConfirmed,omitempty"` 32 + Handle string `json:"handle" cborgen:"handle"` 33 + RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 34 + // status: If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. 35 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 36 + } 37 + 38 + // ServerCreateSession calls the XRPC method "com.atproto.server.createSession". 39 + func ServerCreateSession(ctx context.Context, c *xrpc.Client, input *ServerCreateSession_Input) (*ServerCreateSession_Output, error) { 40 + var out ServerCreateSession_Output 41 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.createSession", nil, input, &out); err != nil { 42 + return nil, err 43 + } 44 + 45 + return &out, nil 46 + }
+26
api/atproto/serverdeactivateAccount.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.deactivateAccount 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerDeactivateAccount_Input is the input argument to a com.atproto.server.deactivateAccount call. 14 + type ServerDeactivateAccount_Input struct { 15 + // deleteAfter: A recommendation to server as to how long they should hold onto the deactivated account before deleting. 16 + DeleteAfter *string `json:"deleteAfter,omitempty" cborgen:"deleteAfter,omitempty"` 17 + } 18 + 19 + // ServerDeactivateAccount calls the XRPC method "com.atproto.server.deactivateAccount". 20 + func ServerDeactivateAccount(ctx context.Context, c *xrpc.Client, input *ServerDeactivateAccount_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.deactivateAccount", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+22
api/atproto/serverdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.defs 6 + 7 + // ServerDefs_InviteCode is a "inviteCode" in the com.atproto.server.defs schema. 8 + type ServerDefs_InviteCode struct { 9 + Available int64 `json:"available" cborgen:"available"` 10 + Code string `json:"code" cborgen:"code"` 11 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 12 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 13 + Disabled bool `json:"disabled" cborgen:"disabled"` 14 + ForAccount string `json:"forAccount" cborgen:"forAccount"` 15 + Uses []*ServerDefs_InviteCodeUse `json:"uses" cborgen:"uses"` 16 + } 17 + 18 + // ServerDefs_InviteCodeUse is a "inviteCodeUse" in the com.atproto.server.defs schema. 19 + type ServerDefs_InviteCodeUse struct { 20 + UsedAt string `json:"usedAt" cborgen:"usedAt"` 21 + UsedBy string `json:"usedBy" cborgen:"usedBy"` 22 + }
+27
api/atproto/serverdeleteAccount.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.deleteAccount 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerDeleteAccount_Input is the input argument to a com.atproto.server.deleteAccount call. 14 + type ServerDeleteAccount_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + Password string `json:"password" cborgen:"password"` 17 + Token string `json:"token" cborgen:"token"` 18 + } 19 + 20 + // ServerDeleteAccount calls the XRPC method "com.atproto.server.deleteAccount". 21 + func ServerDeleteAccount(ctx context.Context, c *xrpc.Client, input *ServerDeleteAccount_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.deleteAccount", nil, input, nil); err != nil { 23 + return err 24 + } 25 + 26 + return nil 27 + }
+20
api/atproto/serverdeleteSession.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.deleteSession 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerDeleteSession calls the XRPC method "com.atproto.server.deleteSession". 14 + func ServerDeleteSession(ctx context.Context, c *xrpc.Client) error { 15 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.deleteSession", nil, nil, nil); err != nil { 16 + return err 17 + } 18 + 19 + return nil 20 + }
+47
api/atproto/serverdescribeServer.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.describeServer 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerDescribeServer_Contact is a "contact" in the com.atproto.server.describeServer schema. 14 + type ServerDescribeServer_Contact struct { 15 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 16 + } 17 + 18 + // ServerDescribeServer_Links is a "links" in the com.atproto.server.describeServer schema. 19 + type ServerDescribeServer_Links struct { 20 + PrivacyPolicy *string `json:"privacyPolicy,omitempty" cborgen:"privacyPolicy,omitempty"` 21 + TermsOfService *string `json:"termsOfService,omitempty" cborgen:"termsOfService,omitempty"` 22 + } 23 + 24 + // ServerDescribeServer_Output is the output of a com.atproto.server.describeServer call. 25 + type ServerDescribeServer_Output struct { 26 + // availableUserDomains: List of domain suffixes that can be used in account handles. 27 + AvailableUserDomains []string `json:"availableUserDomains" cborgen:"availableUserDomains"` 28 + // contact: Contact information 29 + Contact *ServerDescribeServer_Contact `json:"contact,omitempty" cborgen:"contact,omitempty"` 30 + Did string `json:"did" cborgen:"did"` 31 + // inviteCodeRequired: If true, an invite code must be supplied to create an account on this instance. 32 + InviteCodeRequired *bool `json:"inviteCodeRequired,omitempty" cborgen:"inviteCodeRequired,omitempty"` 33 + // links: URLs of service policy documents. 34 + Links *ServerDescribeServer_Links `json:"links,omitempty" cborgen:"links,omitempty"` 35 + // phoneVerificationRequired: If true, a phone verification token must be supplied to create an account on this instance. 36 + PhoneVerificationRequired *bool `json:"phoneVerificationRequired,omitempty" cborgen:"phoneVerificationRequired,omitempty"` 37 + } 38 + 39 + // ServerDescribeServer calls the XRPC method "com.atproto.server.describeServer". 40 + func ServerDescribeServer(ctx context.Context, c *xrpc.Client) (*ServerDescribeServer_Output, error) { 41 + var out ServerDescribeServer_Output 42 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.describeServer", nil, nil, &out); err != nil { 43 + return nil, err 44 + } 45 + 46 + return &out, nil 47 + }
+33
api/atproto/servergetAccountInviteCodes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.getAccountInviteCodes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerGetAccountInviteCodes_Output is the output of a com.atproto.server.getAccountInviteCodes call. 14 + type ServerGetAccountInviteCodes_Output struct { 15 + Codes []*ServerDefs_InviteCode `json:"codes" cborgen:"codes"` 16 + } 17 + 18 + // ServerGetAccountInviteCodes calls the XRPC method "com.atproto.server.getAccountInviteCodes". 19 + // 20 + // createAvailable: Controls whether any new 'earned' but not 'created' invites should be created. 21 + func ServerGetAccountInviteCodes(ctx context.Context, c *xrpc.Client, createAvailable bool, includeUsed bool) (*ServerGetAccountInviteCodes_Output, error) { 22 + var out ServerGetAccountInviteCodes_Output 23 + 24 + params := map[string]interface{}{ 25 + "createAvailable": createAvailable, 26 + "includeUsed": includeUsed, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getAccountInviteCodes", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+36
api/atproto/servergetServiceAuth.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.getServiceAuth 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerGetServiceAuth_Output is the output of a com.atproto.server.getServiceAuth call. 14 + type ServerGetServiceAuth_Output struct { 15 + Token string `json:"token" cborgen:"token"` 16 + } 17 + 18 + // ServerGetServiceAuth calls the XRPC method "com.atproto.server.getServiceAuth". 19 + // 20 + // aud: The DID of the service that the token will be used to authenticate with 21 + // exp: The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. 22 + // lxm: Lexicon (XRPC) method to bind the requested token to 23 + func ServerGetServiceAuth(ctx context.Context, c *xrpc.Client, aud string, exp int64, lxm string) (*ServerGetServiceAuth_Output, error) { 24 + var out ServerGetServiceAuth_Output 25 + 26 + params := map[string]interface{}{ 27 + "aud": aud, 28 + "exp": exp, 29 + "lxm": lxm, 30 + } 31 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getServiceAuth", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+34
api/atproto/servergetSession.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.getSession 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerGetSession_Output is the output of a com.atproto.server.getSession call. 14 + type ServerGetSession_Output struct { 15 + Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` 16 + Did string `json:"did" cborgen:"did"` 17 + DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"` 18 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 19 + EmailAuthFactor *bool `json:"emailAuthFactor,omitempty" cborgen:"emailAuthFactor,omitempty"` 20 + EmailConfirmed *bool `json:"emailConfirmed,omitempty" cborgen:"emailConfirmed,omitempty"` 21 + Handle string `json:"handle" cborgen:"handle"` 22 + // status: If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. 23 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 24 + } 25 + 26 + // ServerGetSession calls the XRPC method "com.atproto.server.getSession". 27 + func ServerGetSession(ctx context.Context, c *xrpc.Client) (*ServerGetSession_Output, error) { 28 + var out ServerGetSession_Output 29 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getSession", nil, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+33
api/atproto/serverlistAppPasswords.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.listAppPasswords 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerListAppPasswords_AppPassword is a "appPassword" in the com.atproto.server.listAppPasswords schema. 14 + type ServerListAppPasswords_AppPassword struct { 15 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 16 + Name string `json:"name" cborgen:"name"` 17 + Privileged *bool `json:"privileged,omitempty" cborgen:"privileged,omitempty"` 18 + } 19 + 20 + // ServerListAppPasswords_Output is the output of a com.atproto.server.listAppPasswords call. 21 + type ServerListAppPasswords_Output struct { 22 + Passwords []*ServerListAppPasswords_AppPassword `json:"passwords" cborgen:"passwords"` 23 + } 24 + 25 + // ServerListAppPasswords calls the XRPC method "com.atproto.server.listAppPasswords". 26 + func ServerListAppPasswords(ctx context.Context, c *xrpc.Client) (*ServerListAppPasswords_Output, error) { 27 + var out ServerListAppPasswords_Output 28 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.listAppPasswords", nil, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+33
api/atproto/serverrefreshSession.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.refreshSession 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRefreshSession_Output is the output of a com.atproto.server.refreshSession call. 14 + type ServerRefreshSession_Output struct { 15 + AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 16 + Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` 17 + Did string `json:"did" cborgen:"did"` 18 + DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"` 19 + Handle string `json:"handle" cborgen:"handle"` 20 + RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 21 + // status: Hosting status of the account. If not specified, then assume 'active'. 22 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 23 + } 24 + 25 + // ServerRefreshSession calls the XRPC method "com.atproto.server.refreshSession". 26 + func ServerRefreshSession(ctx context.Context, c *xrpc.Client) (*ServerRefreshSession_Output, error) { 27 + var out ServerRefreshSession_Output 28 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.refreshSession", nil, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+20
api/atproto/serverrequestAccountDelete.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.requestAccountDelete 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRequestAccountDelete calls the XRPC method "com.atproto.server.requestAccountDelete". 14 + func ServerRequestAccountDelete(ctx context.Context, c *xrpc.Client) error { 15 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.requestAccountDelete", nil, nil, nil); err != nil { 16 + return err 17 + } 18 + 19 + return nil 20 + }
+20
api/atproto/serverrequestEmailConfirmation.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.requestEmailConfirmation 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRequestEmailConfirmation calls the XRPC method "com.atproto.server.requestEmailConfirmation". 14 + func ServerRequestEmailConfirmation(ctx context.Context, c *xrpc.Client) error { 15 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.requestEmailConfirmation", nil, nil, nil); err != nil { 16 + return err 17 + } 18 + 19 + return nil 20 + }
+26
api/atproto/serverrequestEmailUpdate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.requestEmailUpdate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRequestEmailUpdate_Output is the output of a com.atproto.server.requestEmailUpdate call. 14 + type ServerRequestEmailUpdate_Output struct { 15 + TokenRequired bool `json:"tokenRequired" cborgen:"tokenRequired"` 16 + } 17 + 18 + // ServerRequestEmailUpdate calls the XRPC method "com.atproto.server.requestEmailUpdate". 19 + func ServerRequestEmailUpdate(ctx context.Context, c *xrpc.Client) (*ServerRequestEmailUpdate_Output, error) { 20 + var out ServerRequestEmailUpdate_Output 21 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.requestEmailUpdate", nil, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+25
api/atproto/serverrequestPasswordReset.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.requestPasswordReset 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRequestPasswordReset_Input is the input argument to a com.atproto.server.requestPasswordReset call. 14 + type ServerRequestPasswordReset_Input struct { 15 + Email string `json:"email" cborgen:"email"` 16 + } 17 + 18 + // ServerRequestPasswordReset calls the XRPC method "com.atproto.server.requestPasswordReset". 19 + func ServerRequestPasswordReset(ctx context.Context, c *xrpc.Client, input *ServerRequestPasswordReset_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.requestPasswordReset", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+33
api/atproto/serverreserveSigningKey.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.reserveSigningKey 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerReserveSigningKey_Input is the input argument to a com.atproto.server.reserveSigningKey call. 14 + type ServerReserveSigningKey_Input struct { 15 + // did: The DID to reserve a key for. 16 + Did *string `json:"did,omitempty" cborgen:"did,omitempty"` 17 + } 18 + 19 + // ServerReserveSigningKey_Output is the output of a com.atproto.server.reserveSigningKey call. 20 + type ServerReserveSigningKey_Output struct { 21 + // signingKey: The public key for the reserved signing key, in did:key serialization. 22 + SigningKey string `json:"signingKey" cborgen:"signingKey"` 23 + } 24 + 25 + // ServerReserveSigningKey calls the XRPC method "com.atproto.server.reserveSigningKey". 26 + func ServerReserveSigningKey(ctx context.Context, c *xrpc.Client, input *ServerReserveSigningKey_Input) (*ServerReserveSigningKey_Output, error) { 27 + var out ServerReserveSigningKey_Output 28 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.reserveSigningKey", nil, input, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+26
api/atproto/serverresetPassword.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.resetPassword 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerResetPassword_Input is the input argument to a com.atproto.server.resetPassword call. 14 + type ServerResetPassword_Input struct { 15 + Password string `json:"password" cborgen:"password"` 16 + Token string `json:"token" cborgen:"token"` 17 + } 18 + 19 + // ServerResetPassword calls the XRPC method "com.atproto.server.resetPassword". 20 + func ServerResetPassword(ctx context.Context, c *xrpc.Client, input *ServerResetPassword_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.resetPassword", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+25
api/atproto/serverrevokeAppPassword.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.revokeAppPassword 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRevokeAppPassword_Input is the input argument to a com.atproto.server.revokeAppPassword call. 14 + type ServerRevokeAppPassword_Input struct { 15 + Name string `json:"name" cborgen:"name"` 16 + } 17 + 18 + // ServerRevokeAppPassword calls the XRPC method "com.atproto.server.revokeAppPassword". 19 + func ServerRevokeAppPassword(ctx context.Context, c *xrpc.Client, input *ServerRevokeAppPassword_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.revokeAppPassword", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+28
api/atproto/serverupdateEmail.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.updateEmail 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerUpdateEmail_Input is the input argument to a com.atproto.server.updateEmail call. 14 + type ServerUpdateEmail_Input struct { 15 + Email string `json:"email" cborgen:"email"` 16 + EmailAuthFactor *bool `json:"emailAuthFactor,omitempty" cborgen:"emailAuthFactor,omitempty"` 17 + // token: Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. 18 + Token *string `json:"token,omitempty" cborgen:"token,omitempty"` 19 + } 20 + 21 + // ServerUpdateEmail calls the XRPC method "com.atproto.server.updateEmail". 22 + func ServerUpdateEmail(ctx context.Context, c *xrpc.Client, input *ServerUpdateEmail_Input) error { 23 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.updateEmail", nil, input, nil); err != nil { 24 + return err 25 + } 26 + 27 + return nil 28 + }
+5
api/atproto/syncdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.defs
+30
api/atproto/syncgetBlob.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getBlob 6 + 7 + import ( 8 + "bytes" 9 + "context" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SyncGetBlob calls the XRPC method "com.atproto.sync.getBlob". 15 + // 16 + // cid: The CID of the blob to fetch 17 + // did: The DID of the account. 18 + func SyncGetBlob(ctx context.Context, c *xrpc.Client, cid string, did string) ([]byte, error) { 19 + buf := new(bytes.Buffer) 20 + 21 + params := map[string]interface{}{ 22 + "cid": cid, 23 + "did": did, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getBlob", params, nil, buf); err != nil { 26 + return nil, err 27 + } 28 + 29 + return buf.Bytes(), nil 30 + }
+29
api/atproto/syncgetBlocks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getBlocks 6 + 7 + import ( 8 + "bytes" 9 + "context" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SyncGetBlocks calls the XRPC method "com.atproto.sync.getBlocks". 15 + // 16 + // did: The DID of the repo. 17 + func SyncGetBlocks(ctx context.Context, c *xrpc.Client, cids []string, did string) ([]byte, error) { 18 + buf := new(bytes.Buffer) 19 + 20 + params := map[string]interface{}{ 21 + "cids": cids, 22 + "did": did, 23 + } 24 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getBlocks", params, nil, buf); err != nil { 25 + return nil, err 26 + } 27 + 28 + return buf.Bytes(), nil 29 + }
+28
api/atproto/syncgetCheckout.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getCheckout 6 + 7 + import ( 8 + "bytes" 9 + "context" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SyncGetCheckout calls the XRPC method "com.atproto.sync.getCheckout". 15 + // 16 + // did: The DID of the repo. 17 + func SyncGetCheckout(ctx context.Context, c *xrpc.Client, did string) ([]byte, error) { 18 + buf := new(bytes.Buffer) 19 + 20 + params := map[string]interface{}{ 21 + "did": did, 22 + } 23 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getCheckout", params, nil, buf); err != nil { 24 + return nil, err 25 + } 26 + 27 + return buf.Bytes(), nil 28 + }
+32
api/atproto/syncgetHead.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getHead 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncGetHead_Output is the output of a com.atproto.sync.getHead call. 14 + type SyncGetHead_Output struct { 15 + Root string `json:"root" cborgen:"root"` 16 + } 17 + 18 + // SyncGetHead calls the XRPC method "com.atproto.sync.getHead". 19 + // 20 + // did: The DID of the repo. 21 + func SyncGetHead(ctx context.Context, c *xrpc.Client, did string) (*SyncGetHead_Output, error) { 22 + var out SyncGetHead_Output 23 + 24 + params := map[string]interface{}{ 25 + "did": did, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHead", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+37
api/atproto/syncgetHostStatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getHostStatus 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncGetHostStatus_Output is the output of a com.atproto.sync.getHostStatus call. 14 + type SyncGetHostStatus_Output struct { 15 + // accountCount: Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts. 16 + AccountCount *int64 `json:"accountCount,omitempty" cborgen:"accountCount,omitempty"` 17 + Hostname string `json:"hostname" cborgen:"hostname"` 18 + // seq: Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). 19 + Seq *int64 `json:"seq,omitempty" cborgen:"seq,omitempty"` 20 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 21 + } 22 + 23 + // SyncGetHostStatus calls the XRPC method "com.atproto.sync.getHostStatus". 24 + // 25 + // hostname: Hostname of the host (eg, PDS or relay) being queried. 26 + func SyncGetHostStatus(ctx context.Context, c *xrpc.Client, hostname string) (*SyncGetHostStatus_Output, error) { 27 + var out SyncGetHostStatus_Output 28 + 29 + params := map[string]interface{}{ 30 + "hostname": hostname, 31 + } 32 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getHostStatus", params, nil, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+33
api/atproto/syncgetLatestCommit.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getLatestCommit 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncGetLatestCommit_Output is the output of a com.atproto.sync.getLatestCommit call. 14 + type SyncGetLatestCommit_Output struct { 15 + Cid string `json:"cid" cborgen:"cid"` 16 + Rev string `json:"rev" cborgen:"rev"` 17 + } 18 + 19 + // SyncGetLatestCommit calls the XRPC method "com.atproto.sync.getLatestCommit". 20 + // 21 + // did: The DID of the repo. 22 + func SyncGetLatestCommit(ctx context.Context, c *xrpc.Client, did string) (*SyncGetLatestCommit_Output, error) { 23 + var out SyncGetLatestCommit_Output 24 + 25 + params := map[string]interface{}{ 26 + "did": did, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getLatestCommit", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+31
api/atproto/syncgetRecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getRecord 6 + 7 + import ( 8 + "bytes" 9 + "context" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SyncGetRecord calls the XRPC method "com.atproto.sync.getRecord". 15 + // 16 + // did: The DID of the repo. 17 + // rkey: Record Key 18 + func SyncGetRecord(ctx context.Context, c *xrpc.Client, collection string, did string, rkey string) ([]byte, error) { 19 + buf := new(bytes.Buffer) 20 + 21 + params := map[string]interface{}{ 22 + "collection": collection, 23 + "did": did, 24 + "rkey": rkey, 25 + } 26 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRecord", params, nil, buf); err != nil { 27 + return nil, err 28 + } 29 + 30 + return buf.Bytes(), nil 31 + }
+30
api/atproto/syncgetRepo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getRepo 6 + 7 + import ( 8 + "bytes" 9 + "context" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SyncGetRepo calls the XRPC method "com.atproto.sync.getRepo". 15 + // 16 + // did: The DID of the repo. 17 + // since: The revision ('rev') of the repo to create a diff from. 18 + func SyncGetRepo(ctx context.Context, c *xrpc.Client, did string, since string) ([]byte, error) { 19 + buf := new(bytes.Buffer) 20 + 21 + params := map[string]interface{}{ 22 + "did": did, 23 + "since": since, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRepo", params, nil, buf); err != nil { 26 + return nil, err 27 + } 28 + 29 + return buf.Bytes(), nil 30 + }
+37
api/atproto/syncgetRepoStatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.getRepoStatus 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncGetRepoStatus_Output is the output of a com.atproto.sync.getRepoStatus call. 14 + type SyncGetRepoStatus_Output struct { 15 + Active bool `json:"active" cborgen:"active"` 16 + Did string `json:"did" cborgen:"did"` 17 + // rev: Optional field, the current rev of the repo, if active=true 18 + Rev *string `json:"rev,omitempty" cborgen:"rev,omitempty"` 19 + // status: If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. 20 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 21 + } 22 + 23 + // SyncGetRepoStatus calls the XRPC method "com.atproto.sync.getRepoStatus". 24 + // 25 + // did: The DID of the repo. 26 + func SyncGetRepoStatus(ctx context.Context, c *xrpc.Client, did string) (*SyncGetRepoStatus_Output, error) { 27 + var out SyncGetRepoStatus_Output 28 + 29 + params := map[string]interface{}{ 30 + "did": did, 31 + } 32 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRepoStatus", params, nil, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+37
api/atproto/synclistBlobs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.listBlobs 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncListBlobs_Output is the output of a com.atproto.sync.listBlobs call. 14 + type SyncListBlobs_Output struct { 15 + Cids []string `json:"cids" cborgen:"cids"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // SyncListBlobs calls the XRPC method "com.atproto.sync.listBlobs". 20 + // 21 + // did: The DID of the repo. 22 + // since: Optional revision of the repo to list blobs since. 23 + func SyncListBlobs(ctx context.Context, c *xrpc.Client, cursor string, did string, limit int64, since string) (*SyncListBlobs_Output, error) { 24 + var out SyncListBlobs_Output 25 + 26 + params := map[string]interface{}{ 27 + "cursor": cursor, 28 + "did": did, 29 + "limit": limit, 30 + "since": since, 31 + } 32 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listBlobs", params, nil, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+43
api/atproto/synclistHosts.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.listHosts 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncListHosts_Host is a "host" in the com.atproto.sync.listHosts schema. 14 + type SyncListHosts_Host struct { 15 + AccountCount *int64 `json:"accountCount,omitempty" cborgen:"accountCount,omitempty"` 16 + // hostname: hostname of server; not a URL (no scheme) 17 + Hostname string `json:"hostname" cborgen:"hostname"` 18 + // seq: Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). 19 + Seq *int64 `json:"seq,omitempty" cborgen:"seq,omitempty"` 20 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 21 + } 22 + 23 + // SyncListHosts_Output is the output of a com.atproto.sync.listHosts call. 24 + type SyncListHosts_Output struct { 25 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 26 + // hosts: Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first. 27 + Hosts []*SyncListHosts_Host `json:"hosts" cborgen:"hosts"` 28 + } 29 + 30 + // SyncListHosts calls the XRPC method "com.atproto.sync.listHosts". 31 + func SyncListHosts(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*SyncListHosts_Output, error) { 32 + var out SyncListHosts_Output 33 + 34 + params := map[string]interface{}{ 35 + "cursor": cursor, 36 + "limit": limit, 37 + } 38 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listHosts", params, nil, &out); err != nil { 39 + return nil, err 40 + } 41 + 42 + return &out, nil 43 + }
+43
api/atproto/synclistRepos.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.listRepos 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncListRepos_Output is the output of a com.atproto.sync.listRepos call. 14 + type SyncListRepos_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Repos []*SyncListRepos_Repo `json:"repos" cborgen:"repos"` 17 + } 18 + 19 + // SyncListRepos_Repo is a "repo" in the com.atproto.sync.listRepos schema. 20 + type SyncListRepos_Repo struct { 21 + Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` 22 + Did string `json:"did" cborgen:"did"` 23 + // head: Current repo commit CID 24 + Head string `json:"head" cborgen:"head"` 25 + Rev string `json:"rev" cborgen:"rev"` 26 + // status: If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. 27 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 28 + } 29 + 30 + // SyncListRepos calls the XRPC method "com.atproto.sync.listRepos". 31 + func SyncListRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*SyncListRepos_Output, error) { 32 + var out SyncListRepos_Output 33 + 34 + params := map[string]interface{}{ 35 + "cursor": cursor, 36 + "limit": limit, 37 + } 38 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listRepos", params, nil, &out); err != nil { 39 + return nil, err 40 + } 41 + 42 + return &out, nil 43 + }
+40
api/atproto/synclistReposByCollection.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.listReposByCollection 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncListReposByCollection_Output is the output of a com.atproto.sync.listReposByCollection call. 14 + type SyncListReposByCollection_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Repos []*SyncListReposByCollection_Repo `json:"repos" cborgen:"repos"` 17 + } 18 + 19 + // SyncListReposByCollection_Repo is a "repo" in the com.atproto.sync.listReposByCollection schema. 20 + type SyncListReposByCollection_Repo struct { 21 + Did string `json:"did" cborgen:"did"` 22 + } 23 + 24 + // SyncListReposByCollection calls the XRPC method "com.atproto.sync.listReposByCollection". 25 + // 26 + // limit: Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists. 27 + func SyncListReposByCollection(ctx context.Context, c *xrpc.Client, collection string, cursor string, limit int64) (*SyncListReposByCollection_Output, error) { 28 + var out SyncListReposByCollection_Output 29 + 30 + params := map[string]interface{}{ 31 + "collection": collection, 32 + "cursor": cursor, 33 + "limit": limit, 34 + } 35 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listReposByCollection", params, nil, &out); err != nil { 36 + return nil, err 37 + } 38 + 39 + return &out, nil 40 + }
+26
api/atproto/syncnotifyOfUpdate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.notifyOfUpdate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncNotifyOfUpdate_Input is the input argument to a com.atproto.sync.notifyOfUpdate call. 14 + type SyncNotifyOfUpdate_Input struct { 15 + // hostname: Hostname of the current service (usually a PDS) that is notifying of update. 16 + Hostname string `json:"hostname" cborgen:"hostname"` 17 + } 18 + 19 + // SyncNotifyOfUpdate calls the XRPC method "com.atproto.sync.notifyOfUpdate". 20 + func SyncNotifyOfUpdate(ctx context.Context, c *xrpc.Client, input *SyncNotifyOfUpdate_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.sync.notifyOfUpdate", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+26
api/atproto/syncrequestCrawl.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.requestCrawl 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SyncRequestCrawl_Input is the input argument to a com.atproto.sync.requestCrawl call. 14 + type SyncRequestCrawl_Input struct { 15 + // hostname: Hostname of the current service (eg, PDS) that is requesting to be crawled. 16 + Hostname string `json:"hostname" cborgen:"hostname"` 17 + } 18 + 19 + // SyncRequestCrawl calls the XRPC method "com.atproto.sync.requestCrawl". 20 + func SyncRequestCrawl(ctx context.Context, c *xrpc.Client, input *SyncRequestCrawl_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.sync.requestCrawl", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+95
api/atproto/syncsubscribeRepos.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.sync.subscribeRepos 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + // SyncSubscribeRepos_Account is a "account" in the com.atproto.sync.subscribeRepos schema. 12 + // 13 + // Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active. 14 + type SyncSubscribeRepos_Account struct { 15 + // active: Indicates that the account has a repository which can be fetched from the host that emitted this event. 16 + Active bool `json:"active" cborgen:"active"` 17 + Did string `json:"did" cborgen:"did"` 18 + Seq int64 `json:"seq" cborgen:"seq"` 19 + // status: If active=false, this optional field indicates a reason for why the account is not active. 20 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 21 + Time string `json:"time" cborgen:"time"` 22 + } 23 + 24 + // SyncSubscribeRepos_Commit is a "commit" in the com.atproto.sync.subscribeRepos schema. 25 + // 26 + // Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. 27 + type SyncSubscribeRepos_Commit struct { 28 + Blobs []util.LexLink `json:"blobs" cborgen:"blobs"` 29 + // blocks: CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. 30 + Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` 31 + // commit: Repo commit object CID. 32 + Commit util.LexLink `json:"commit" cborgen:"commit"` 33 + Ops []*SyncSubscribeRepos_RepoOp `json:"ops" cborgen:"ops"` 34 + // prevData: The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. 35 + PrevData *util.LexLink `json:"prevData,omitempty" cborgen:"prevData,omitempty"` 36 + // rebase: DEPRECATED -- unused 37 + Rebase bool `json:"rebase" cborgen:"rebase"` 38 + // repo: The repo this event comes from. Note that all other message types name this field 'did'. 39 + Repo string `json:"repo" cborgen:"repo"` 40 + // rev: The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. 41 + Rev string `json:"rev" cborgen:"rev"` 42 + // seq: The stream sequence number of this message. 43 + Seq int64 `json:"seq" cborgen:"seq"` 44 + // since: The rev of the last emitted commit from this repo (if any). 45 + Since *string `json:"since" cborgen:"since"` 46 + // time: Timestamp of when this message was originally broadcast. 47 + Time string `json:"time" cborgen:"time"` 48 + // tooBig: DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. 49 + TooBig bool `json:"tooBig" cborgen:"tooBig"` 50 + } 51 + 52 + // SyncSubscribeRepos_Identity is a "identity" in the com.atproto.sync.subscribeRepos schema. 53 + // 54 + // Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. 55 + type SyncSubscribeRepos_Identity struct { 56 + Did string `json:"did" cborgen:"did"` 57 + // handle: The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. 58 + Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` 59 + Seq int64 `json:"seq" cborgen:"seq"` 60 + Time string `json:"time" cborgen:"time"` 61 + } 62 + 63 + // SyncSubscribeRepos_Info is a "info" in the com.atproto.sync.subscribeRepos schema. 64 + type SyncSubscribeRepos_Info struct { 65 + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 66 + Name string `json:"name" cborgen:"name"` 67 + } 68 + 69 + // SyncSubscribeRepos_RepoOp is a "repoOp" in the com.atproto.sync.subscribeRepos schema. 70 + // 71 + // A repo operation, ie a mutation of a single record. 72 + type SyncSubscribeRepos_RepoOp struct { 73 + Action string `json:"action" cborgen:"action"` 74 + // cid: For creates and updates, the new record CID. For deletions, null. 75 + Cid *util.LexLink `json:"cid" cborgen:"cid"` 76 + Path string `json:"path" cborgen:"path"` 77 + // prev: For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. 78 + Prev *util.LexLink `json:"prev,omitempty" cborgen:"prev,omitempty"` 79 + } 80 + 81 + // SyncSubscribeRepos_Sync is a "sync" in the com.atproto.sync.subscribeRepos schema. 82 + // 83 + // Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. 84 + type SyncSubscribeRepos_Sync struct { 85 + // blocks: CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. 86 + Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` 87 + // did: The account this repo event corresponds to. Must match that in the commit object. 88 + Did string `json:"did" cborgen:"did"` 89 + // rev: The rev of the commit. This value must match that in the commit object. 90 + Rev string `json:"rev" cborgen:"rev"` 91 + // seq: The stream sequence number of this message. 92 + Seq int64 `json:"seq" cborgen:"seq"` 93 + // time: Timestamp of when this message was originally broadcast. 94 + Time string `json:"time" cborgen:"time"` 95 + }
+30
api/atproto/tempaddReservedHandle.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.addReservedHandle 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TempAddReservedHandle_Input is the input argument to a com.atproto.temp.addReservedHandle call. 14 + type TempAddReservedHandle_Input struct { 15 + Handle string `json:"handle" cborgen:"handle"` 16 + } 17 + 18 + // TempAddReservedHandle_Output is the output of a com.atproto.temp.addReservedHandle call. 19 + type TempAddReservedHandle_Output struct { 20 + } 21 + 22 + // TempAddReservedHandle calls the XRPC method "com.atproto.temp.addReservedHandle". 23 + func TempAddReservedHandle(ctx context.Context, c *xrpc.Client, input *TempAddReservedHandle_Input) (*TempAddReservedHandle_Output, error) { 24 + var out TempAddReservedHandle_Output 25 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.addReservedHandle", nil, input, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+28
api/atproto/tempcheckSignupQueue.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.checkSignupQueue 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TempCheckSignupQueue_Output is the output of a com.atproto.temp.checkSignupQueue call. 14 + type TempCheckSignupQueue_Output struct { 15 + Activated bool `json:"activated" cborgen:"activated"` 16 + EstimatedTimeMs *int64 `json:"estimatedTimeMs,omitempty" cborgen:"estimatedTimeMs,omitempty"` 17 + PlaceInQueue *int64 `json:"placeInQueue,omitempty" cborgen:"placeInQueue,omitempty"` 18 + } 19 + 20 + // TempCheckSignupQueue calls the XRPC method "com.atproto.temp.checkSignupQueue". 21 + func TempCheckSignupQueue(ctx context.Context, c *xrpc.Client) (*TempCheckSignupQueue_Output, error) { 22 + var out TempCheckSignupQueue_Output 23 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.temp.checkSignupQueue", nil, nil, &out); err != nil { 24 + return nil, err 25 + } 26 + 27 + return &out, nil 28 + }
+31
api/atproto/tempfetchLabels.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.fetchLabels 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TempFetchLabels_Output is the output of a com.atproto.temp.fetchLabels call. 14 + type TempFetchLabels_Output struct { 15 + Labels []*LabelDefs_Label `json:"labels" cborgen:"labels"` 16 + } 17 + 18 + // TempFetchLabels calls the XRPC method "com.atproto.temp.fetchLabels". 19 + func TempFetchLabels(ctx context.Context, c *xrpc.Client, limit int64, since int64) (*TempFetchLabels_Output, error) { 20 + var out TempFetchLabels_Output 21 + 22 + params := map[string]interface{}{ 23 + "limit": limit, 24 + "since": since, 25 + } 26 + if err := c.Do(ctx, xrpc.Query, "", "com.atproto.temp.fetchLabels", params, nil, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+25
api/atproto/temprequestPhoneVerification.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.requestPhoneVerification 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TempRequestPhoneVerification_Input is the input argument to a com.atproto.temp.requestPhoneVerification call. 14 + type TempRequestPhoneVerification_Input struct { 15 + PhoneNumber string `json:"phoneNumber" cborgen:"phoneNumber"` 16 + } 17 + 18 + // TempRequestPhoneVerification calls the XRPC method "com.atproto.temp.requestPhoneVerification". 19 + func TempRequestPhoneVerification(ctx context.Context, c *xrpc.Client, input *TempRequestPhoneVerification_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.requestPhoneVerification", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+573
api/bsky/actordefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.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 + // ActorDefs_AdultContentPref is a "adultContentPref" in the app.bsky.actor.defs schema. 16 + // 17 + // RECORDTYPE: ActorDefs_AdultContentPref 18 + type ActorDefs_AdultContentPref struct { 19 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#adultContentPref" cborgen:"$type,const=app.bsky.actor.defs#adultContentPref"` 20 + Enabled bool `json:"enabled" cborgen:"enabled"` 21 + } 22 + 23 + // ActorDefs_BskyAppProgressGuide is a "bskyAppProgressGuide" in the app.bsky.actor.defs schema. 24 + // 25 + // If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. 26 + type ActorDefs_BskyAppProgressGuide struct { 27 + Guide string `json:"guide" cborgen:"guide"` 28 + } 29 + 30 + // ActorDefs_BskyAppStatePref is a "bskyAppStatePref" in the app.bsky.actor.defs schema. 31 + // 32 + // A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. 33 + // 34 + // RECORDTYPE: ActorDefs_BskyAppStatePref 35 + type ActorDefs_BskyAppStatePref struct { 36 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#bskyAppStatePref" cborgen:"$type,const=app.bsky.actor.defs#bskyAppStatePref"` 37 + ActiveProgressGuide *ActorDefs_BskyAppProgressGuide `json:"activeProgressGuide,omitempty" cborgen:"activeProgressGuide,omitempty"` 38 + // nuxs: Storage for NUXs the user has encountered. 39 + Nuxs []*ActorDefs_Nux `json:"nuxs,omitempty" cborgen:"nuxs,omitempty"` 40 + // queuedNudges: An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. 41 + QueuedNudges []string `json:"queuedNudges,omitempty" cborgen:"queuedNudges,omitempty"` 42 + } 43 + 44 + // ActorDefs_ContentLabelPref is a "contentLabelPref" in the app.bsky.actor.defs schema. 45 + // 46 + // RECORDTYPE: ActorDefs_ContentLabelPref 47 + type ActorDefs_ContentLabelPref struct { 48 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#contentLabelPref" cborgen:"$type,const=app.bsky.actor.defs#contentLabelPref"` 49 + Label string `json:"label" cborgen:"label"` 50 + // labelerDid: Which labeler does this preference apply to? If undefined, applies globally. 51 + LabelerDid *string `json:"labelerDid,omitempty" cborgen:"labelerDid,omitempty"` 52 + Visibility string `json:"visibility" cborgen:"visibility"` 53 + } 54 + 55 + // ActorDefs_FeedViewPref is a "feedViewPref" in the app.bsky.actor.defs schema. 56 + // 57 + // RECORDTYPE: ActorDefs_FeedViewPref 58 + type ActorDefs_FeedViewPref struct { 59 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#feedViewPref" cborgen:"$type,const=app.bsky.actor.defs#feedViewPref"` 60 + // feed: The URI of the feed, or an identifier which describes the feed. 61 + Feed string `json:"feed" cborgen:"feed"` 62 + // hideQuotePosts: Hide quote posts in the feed. 63 + HideQuotePosts *bool `json:"hideQuotePosts,omitempty" cborgen:"hideQuotePosts,omitempty"` 64 + // hideReplies: Hide replies in the feed. 65 + HideReplies *bool `json:"hideReplies,omitempty" cborgen:"hideReplies,omitempty"` 66 + // hideRepliesByLikeCount: Hide replies in the feed if they do not have this number of likes. 67 + HideRepliesByLikeCount *int64 `json:"hideRepliesByLikeCount,omitempty" cborgen:"hideRepliesByLikeCount,omitempty"` 68 + // hideRepliesByUnfollowed: Hide replies in the feed if they are not by followed users. 69 + HideRepliesByUnfollowed *bool `json:"hideRepliesByUnfollowed,omitempty" cborgen:"hideRepliesByUnfollowed,omitempty"` 70 + // hideReposts: Hide reposts in the feed. 71 + HideReposts *bool `json:"hideReposts,omitempty" cborgen:"hideReposts,omitempty"` 72 + } 73 + 74 + // ActorDefs_HiddenPostsPref is a "hiddenPostsPref" in the app.bsky.actor.defs schema. 75 + // 76 + // RECORDTYPE: ActorDefs_HiddenPostsPref 77 + type ActorDefs_HiddenPostsPref struct { 78 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#hiddenPostsPref" cborgen:"$type,const=app.bsky.actor.defs#hiddenPostsPref"` 79 + // items: A list of URIs of posts the account owner has hidden. 80 + Items []string `json:"items" cborgen:"items"` 81 + } 82 + 83 + // ActorDefs_InterestsPref is a "interestsPref" in the app.bsky.actor.defs schema. 84 + // 85 + // RECORDTYPE: ActorDefs_InterestsPref 86 + type ActorDefs_InterestsPref struct { 87 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#interestsPref" cborgen:"$type,const=app.bsky.actor.defs#interestsPref"` 88 + // tags: A list of tags which describe the account owner's interests gathered during onboarding. 89 + Tags []string `json:"tags" cborgen:"tags"` 90 + } 91 + 92 + // ActorDefs_KnownFollowers is a "knownFollowers" in the app.bsky.actor.defs schema. 93 + // 94 + // The subject's followers whom you also follow 95 + type ActorDefs_KnownFollowers struct { 96 + Count int64 `json:"count" cborgen:"count"` 97 + Followers []*ActorDefs_ProfileViewBasic `json:"followers" cborgen:"followers"` 98 + } 99 + 100 + // ActorDefs_LabelerPrefItem is a "labelerPrefItem" in the app.bsky.actor.defs schema. 101 + type ActorDefs_LabelerPrefItem struct { 102 + Did string `json:"did" cborgen:"did"` 103 + } 104 + 105 + // ActorDefs_LabelersPref is a "labelersPref" in the app.bsky.actor.defs schema. 106 + // 107 + // RECORDTYPE: ActorDefs_LabelersPref 108 + type ActorDefs_LabelersPref struct { 109 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#labelersPref" cborgen:"$type,const=app.bsky.actor.defs#labelersPref"` 110 + Labelers []*ActorDefs_LabelerPrefItem `json:"labelers" cborgen:"labelers"` 111 + } 112 + 113 + // ActorDefs_MutedWord is a "mutedWord" in the app.bsky.actor.defs schema. 114 + // 115 + // A word that the account owner has muted. 116 + type ActorDefs_MutedWord struct { 117 + // actorTarget: Groups of users to apply the muted word to. If undefined, applies to all users. 118 + ActorTarget *string `json:"actorTarget,omitempty" cborgen:"actorTarget,omitempty"` 119 + // expiresAt: The date and time at which the muted word will expire and no longer be applied. 120 + ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"` 121 + Id *string `json:"id,omitempty" cborgen:"id,omitempty"` 122 + // targets: The intended targets of the muted word. 123 + Targets []*string `json:"targets" cborgen:"targets"` 124 + // value: The muted word itself. 125 + Value string `json:"value" cborgen:"value"` 126 + } 127 + 128 + // ActorDefs_MutedWordsPref is a "mutedWordsPref" in the app.bsky.actor.defs schema. 129 + // 130 + // RECORDTYPE: ActorDefs_MutedWordsPref 131 + type ActorDefs_MutedWordsPref struct { 132 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#mutedWordsPref" cborgen:"$type,const=app.bsky.actor.defs#mutedWordsPref"` 133 + // items: A list of words the account owner has muted. 134 + Items []*ActorDefs_MutedWord `json:"items" cborgen:"items"` 135 + } 136 + 137 + // ActorDefs_Nux is a "nux" in the app.bsky.actor.defs schema. 138 + // 139 + // A new user experiences (NUX) storage object 140 + type ActorDefs_Nux struct { 141 + Completed bool `json:"completed" cborgen:"completed"` 142 + // data: Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. 143 + Data *string `json:"data,omitempty" cborgen:"data,omitempty"` 144 + // expiresAt: The date and time at which the NUX will expire and should be considered completed. 145 + ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"` 146 + Id string `json:"id" cborgen:"id"` 147 + } 148 + 149 + // ActorDefs_PersonalDetailsPref is a "personalDetailsPref" in the app.bsky.actor.defs schema. 150 + // 151 + // RECORDTYPE: ActorDefs_PersonalDetailsPref 152 + type ActorDefs_PersonalDetailsPref struct { 153 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#personalDetailsPref" cborgen:"$type,const=app.bsky.actor.defs#personalDetailsPref"` 154 + // birthDate: The birth date of account owner. 155 + BirthDate *string `json:"birthDate,omitempty" cborgen:"birthDate,omitempty"` 156 + } 157 + 158 + // ActorDefs_PostInteractionSettingsPref is a "postInteractionSettingsPref" in the app.bsky.actor.defs schema. 159 + // 160 + // Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. 161 + // 162 + // RECORDTYPE: ActorDefs_PostInteractionSettingsPref 163 + type ActorDefs_PostInteractionSettingsPref struct { 164 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref" cborgen:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref"` 165 + // postgateEmbeddingRules: Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. 166 + PostgateEmbeddingRules []*ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem `json:"postgateEmbeddingRules,omitempty" cborgen:"postgateEmbeddingRules,omitempty"` 167 + // threadgateAllowRules: Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. 168 + ThreadgateAllowRules []*ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem `json:"threadgateAllowRules,omitempty" cborgen:"threadgateAllowRules,omitempty"` 169 + } 170 + 171 + type ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem struct { 172 + FeedPostgate_DisableRule *FeedPostgate_DisableRule 173 + } 174 + 175 + func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) MarshalJSON() ([]byte, error) { 176 + if t.FeedPostgate_DisableRule != nil { 177 + t.FeedPostgate_DisableRule.LexiconTypeID = "app.bsky.feed.postgate#disableRule" 178 + return json.Marshal(t.FeedPostgate_DisableRule) 179 + } 180 + return nil, fmt.Errorf("cannot marshal empty enum") 181 + } 182 + func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalJSON(b []byte) error { 183 + typ, err := util.TypeExtract(b) 184 + if err != nil { 185 + return err 186 + } 187 + 188 + switch typ { 189 + case "app.bsky.feed.postgate#disableRule": 190 + t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) 191 + return json.Unmarshal(b, t.FeedPostgate_DisableRule) 192 + 193 + default: 194 + return nil 195 + } 196 + } 197 + 198 + type ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem struct { 199 + FeedThreadgate_MentionRule *FeedThreadgate_MentionRule 200 + FeedThreadgate_FollowerRule *FeedThreadgate_FollowerRule 201 + FeedThreadgate_FollowingRule *FeedThreadgate_FollowingRule 202 + FeedThreadgate_ListRule *FeedThreadgate_ListRule 203 + } 204 + 205 + func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) MarshalJSON() ([]byte, error) { 206 + if t.FeedThreadgate_MentionRule != nil { 207 + t.FeedThreadgate_MentionRule.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule" 208 + return json.Marshal(t.FeedThreadgate_MentionRule) 209 + } 210 + if t.FeedThreadgate_FollowerRule != nil { 211 + t.FeedThreadgate_FollowerRule.LexiconTypeID = "app.bsky.feed.threadgate#followerRule" 212 + return json.Marshal(t.FeedThreadgate_FollowerRule) 213 + } 214 + if t.FeedThreadgate_FollowingRule != nil { 215 + t.FeedThreadgate_FollowingRule.LexiconTypeID = "app.bsky.feed.threadgate#followingRule" 216 + return json.Marshal(t.FeedThreadgate_FollowingRule) 217 + } 218 + if t.FeedThreadgate_ListRule != nil { 219 + t.FeedThreadgate_ListRule.LexiconTypeID = "app.bsky.feed.threadgate#listRule" 220 + return json.Marshal(t.FeedThreadgate_ListRule) 221 + } 222 + return nil, fmt.Errorf("cannot marshal empty enum") 223 + } 224 + func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalJSON(b []byte) error { 225 + typ, err := util.TypeExtract(b) 226 + if err != nil { 227 + return err 228 + } 229 + 230 + switch typ { 231 + case "app.bsky.feed.threadgate#mentionRule": 232 + t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) 233 + return json.Unmarshal(b, t.FeedThreadgate_MentionRule) 234 + case "app.bsky.feed.threadgate#followerRule": 235 + t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) 236 + return json.Unmarshal(b, t.FeedThreadgate_FollowerRule) 237 + case "app.bsky.feed.threadgate#followingRule": 238 + t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) 239 + return json.Unmarshal(b, t.FeedThreadgate_FollowingRule) 240 + case "app.bsky.feed.threadgate#listRule": 241 + t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) 242 + return json.Unmarshal(b, t.FeedThreadgate_ListRule) 243 + 244 + default: 245 + return nil 246 + } 247 + } 248 + 249 + type ActorDefs_Preferences_Elem struct { 250 + ActorDefs_AdultContentPref *ActorDefs_AdultContentPref 251 + ActorDefs_ContentLabelPref *ActorDefs_ContentLabelPref 252 + ActorDefs_SavedFeedsPref *ActorDefs_SavedFeedsPref 253 + ActorDefs_SavedFeedsPrefV2 *ActorDefs_SavedFeedsPrefV2 254 + ActorDefs_PersonalDetailsPref *ActorDefs_PersonalDetailsPref 255 + ActorDefs_FeedViewPref *ActorDefs_FeedViewPref 256 + ActorDefs_ThreadViewPref *ActorDefs_ThreadViewPref 257 + ActorDefs_InterestsPref *ActorDefs_InterestsPref 258 + ActorDefs_MutedWordsPref *ActorDefs_MutedWordsPref 259 + ActorDefs_HiddenPostsPref *ActorDefs_HiddenPostsPref 260 + ActorDefs_BskyAppStatePref *ActorDefs_BskyAppStatePref 261 + ActorDefs_LabelersPref *ActorDefs_LabelersPref 262 + ActorDefs_PostInteractionSettingsPref *ActorDefs_PostInteractionSettingsPref 263 + ActorDefs_VerificationPrefs *ActorDefs_VerificationPrefs 264 + } 265 + 266 + func (t *ActorDefs_Preferences_Elem) MarshalJSON() ([]byte, error) { 267 + if t.ActorDefs_AdultContentPref != nil { 268 + t.ActorDefs_AdultContentPref.LexiconTypeID = "app.bsky.actor.defs#adultContentPref" 269 + return json.Marshal(t.ActorDefs_AdultContentPref) 270 + } 271 + if t.ActorDefs_ContentLabelPref != nil { 272 + t.ActorDefs_ContentLabelPref.LexiconTypeID = "app.bsky.actor.defs#contentLabelPref" 273 + return json.Marshal(t.ActorDefs_ContentLabelPref) 274 + } 275 + if t.ActorDefs_SavedFeedsPref != nil { 276 + t.ActorDefs_SavedFeedsPref.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPref" 277 + return json.Marshal(t.ActorDefs_SavedFeedsPref) 278 + } 279 + if t.ActorDefs_SavedFeedsPrefV2 != nil { 280 + t.ActorDefs_SavedFeedsPrefV2.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPrefV2" 281 + return json.Marshal(t.ActorDefs_SavedFeedsPrefV2) 282 + } 283 + if t.ActorDefs_PersonalDetailsPref != nil { 284 + t.ActorDefs_PersonalDetailsPref.LexiconTypeID = "app.bsky.actor.defs#personalDetailsPref" 285 + return json.Marshal(t.ActorDefs_PersonalDetailsPref) 286 + } 287 + if t.ActorDefs_FeedViewPref != nil { 288 + t.ActorDefs_FeedViewPref.LexiconTypeID = "app.bsky.actor.defs#feedViewPref" 289 + return json.Marshal(t.ActorDefs_FeedViewPref) 290 + } 291 + if t.ActorDefs_ThreadViewPref != nil { 292 + t.ActorDefs_ThreadViewPref.LexiconTypeID = "app.bsky.actor.defs#threadViewPref" 293 + return json.Marshal(t.ActorDefs_ThreadViewPref) 294 + } 295 + if t.ActorDefs_InterestsPref != nil { 296 + t.ActorDefs_InterestsPref.LexiconTypeID = "app.bsky.actor.defs#interestsPref" 297 + return json.Marshal(t.ActorDefs_InterestsPref) 298 + } 299 + if t.ActorDefs_MutedWordsPref != nil { 300 + t.ActorDefs_MutedWordsPref.LexiconTypeID = "app.bsky.actor.defs#mutedWordsPref" 301 + return json.Marshal(t.ActorDefs_MutedWordsPref) 302 + } 303 + if t.ActorDefs_HiddenPostsPref != nil { 304 + t.ActorDefs_HiddenPostsPref.LexiconTypeID = "app.bsky.actor.defs#hiddenPostsPref" 305 + return json.Marshal(t.ActorDefs_HiddenPostsPref) 306 + } 307 + if t.ActorDefs_BskyAppStatePref != nil { 308 + t.ActorDefs_BskyAppStatePref.LexiconTypeID = "app.bsky.actor.defs#bskyAppStatePref" 309 + return json.Marshal(t.ActorDefs_BskyAppStatePref) 310 + } 311 + if t.ActorDefs_LabelersPref != nil { 312 + t.ActorDefs_LabelersPref.LexiconTypeID = "app.bsky.actor.defs#labelersPref" 313 + return json.Marshal(t.ActorDefs_LabelersPref) 314 + } 315 + if t.ActorDefs_PostInteractionSettingsPref != nil { 316 + t.ActorDefs_PostInteractionSettingsPref.LexiconTypeID = "app.bsky.actor.defs#postInteractionSettingsPref" 317 + return json.Marshal(t.ActorDefs_PostInteractionSettingsPref) 318 + } 319 + if t.ActorDefs_VerificationPrefs != nil { 320 + t.ActorDefs_VerificationPrefs.LexiconTypeID = "app.bsky.actor.defs#verificationPrefs" 321 + return json.Marshal(t.ActorDefs_VerificationPrefs) 322 + } 323 + return nil, fmt.Errorf("cannot marshal empty enum") 324 + } 325 + func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error { 326 + typ, err := util.TypeExtract(b) 327 + if err != nil { 328 + return err 329 + } 330 + 331 + switch typ { 332 + case "app.bsky.actor.defs#adultContentPref": 333 + t.ActorDefs_AdultContentPref = new(ActorDefs_AdultContentPref) 334 + return json.Unmarshal(b, t.ActorDefs_AdultContentPref) 335 + case "app.bsky.actor.defs#contentLabelPref": 336 + t.ActorDefs_ContentLabelPref = new(ActorDefs_ContentLabelPref) 337 + return json.Unmarshal(b, t.ActorDefs_ContentLabelPref) 338 + case "app.bsky.actor.defs#savedFeedsPref": 339 + t.ActorDefs_SavedFeedsPref = new(ActorDefs_SavedFeedsPref) 340 + return json.Unmarshal(b, t.ActorDefs_SavedFeedsPref) 341 + case "app.bsky.actor.defs#savedFeedsPrefV2": 342 + t.ActorDefs_SavedFeedsPrefV2 = new(ActorDefs_SavedFeedsPrefV2) 343 + return json.Unmarshal(b, t.ActorDefs_SavedFeedsPrefV2) 344 + case "app.bsky.actor.defs#personalDetailsPref": 345 + t.ActorDefs_PersonalDetailsPref = new(ActorDefs_PersonalDetailsPref) 346 + return json.Unmarshal(b, t.ActorDefs_PersonalDetailsPref) 347 + case "app.bsky.actor.defs#feedViewPref": 348 + t.ActorDefs_FeedViewPref = new(ActorDefs_FeedViewPref) 349 + return json.Unmarshal(b, t.ActorDefs_FeedViewPref) 350 + case "app.bsky.actor.defs#threadViewPref": 351 + t.ActorDefs_ThreadViewPref = new(ActorDefs_ThreadViewPref) 352 + return json.Unmarshal(b, t.ActorDefs_ThreadViewPref) 353 + case "app.bsky.actor.defs#interestsPref": 354 + t.ActorDefs_InterestsPref = new(ActorDefs_InterestsPref) 355 + return json.Unmarshal(b, t.ActorDefs_InterestsPref) 356 + case "app.bsky.actor.defs#mutedWordsPref": 357 + t.ActorDefs_MutedWordsPref = new(ActorDefs_MutedWordsPref) 358 + return json.Unmarshal(b, t.ActorDefs_MutedWordsPref) 359 + case "app.bsky.actor.defs#hiddenPostsPref": 360 + t.ActorDefs_HiddenPostsPref = new(ActorDefs_HiddenPostsPref) 361 + return json.Unmarshal(b, t.ActorDefs_HiddenPostsPref) 362 + case "app.bsky.actor.defs#bskyAppStatePref": 363 + t.ActorDefs_BskyAppStatePref = new(ActorDefs_BskyAppStatePref) 364 + return json.Unmarshal(b, t.ActorDefs_BskyAppStatePref) 365 + case "app.bsky.actor.defs#labelersPref": 366 + t.ActorDefs_LabelersPref = new(ActorDefs_LabelersPref) 367 + return json.Unmarshal(b, t.ActorDefs_LabelersPref) 368 + case "app.bsky.actor.defs#postInteractionSettingsPref": 369 + t.ActorDefs_PostInteractionSettingsPref = new(ActorDefs_PostInteractionSettingsPref) 370 + return json.Unmarshal(b, t.ActorDefs_PostInteractionSettingsPref) 371 + case "app.bsky.actor.defs#verificationPrefs": 372 + t.ActorDefs_VerificationPrefs = new(ActorDefs_VerificationPrefs) 373 + return json.Unmarshal(b, t.ActorDefs_VerificationPrefs) 374 + 375 + default: 376 + return nil 377 + } 378 + } 379 + 380 + // ActorDefs_ProfileAssociated is a "profileAssociated" in the app.bsky.actor.defs schema. 381 + type ActorDefs_ProfileAssociated struct { 382 + Chat *ActorDefs_ProfileAssociatedChat `json:"chat,omitempty" cborgen:"chat,omitempty"` 383 + Feedgens *int64 `json:"feedgens,omitempty" cborgen:"feedgens,omitempty"` 384 + Labeler *bool `json:"labeler,omitempty" cborgen:"labeler,omitempty"` 385 + Lists *int64 `json:"lists,omitempty" cborgen:"lists,omitempty"` 386 + StarterPacks *int64 `json:"starterPacks,omitempty" cborgen:"starterPacks,omitempty"` 387 + } 388 + 389 + // ActorDefs_ProfileAssociatedChat is a "profileAssociatedChat" in the app.bsky.actor.defs schema. 390 + type ActorDefs_ProfileAssociatedChat struct { 391 + AllowIncoming string `json:"allowIncoming" cborgen:"allowIncoming"` 392 + } 393 + 394 + // ActorDefs_ProfileView is a "profileView" in the app.bsky.actor.defs schema. 395 + type ActorDefs_ProfileView struct { 396 + Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` 397 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 398 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 399 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 400 + Did string `json:"did" cborgen:"did"` 401 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 402 + Handle string `json:"handle" cborgen:"handle"` 403 + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` 404 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 405 + Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 406 + Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 407 + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 408 + } 409 + 410 + // ActorDefs_ProfileViewBasic is a "profileViewBasic" in the app.bsky.actor.defs schema. 411 + type ActorDefs_ProfileViewBasic struct { 412 + Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` 413 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 414 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 415 + Did string `json:"did" cborgen:"did"` 416 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 417 + Handle string `json:"handle" cborgen:"handle"` 418 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 419 + Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 420 + Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 421 + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 422 + } 423 + 424 + // ActorDefs_ProfileViewDetailed is a "profileViewDetailed" in the app.bsky.actor.defs schema. 425 + type ActorDefs_ProfileViewDetailed struct { 426 + Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` 427 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 428 + Banner *string `json:"banner,omitempty" cborgen:"banner,omitempty"` 429 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 430 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 431 + Did string `json:"did" cborgen:"did"` 432 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 433 + FollowersCount *int64 `json:"followersCount,omitempty" cborgen:"followersCount,omitempty"` 434 + FollowsCount *int64 `json:"followsCount,omitempty" cborgen:"followsCount,omitempty"` 435 + Handle string `json:"handle" cborgen:"handle"` 436 + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` 437 + JoinedViaStarterPack *GraphDefs_StarterPackViewBasic `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"` 438 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 439 + PinnedPost *comatprototypes.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` 440 + PostsCount *int64 `json:"postsCount,omitempty" cborgen:"postsCount,omitempty"` 441 + Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 442 + Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 443 + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 444 + } 445 + 446 + // ActorDefs_SavedFeed is a "savedFeed" in the app.bsky.actor.defs schema. 447 + type ActorDefs_SavedFeed struct { 448 + Id string `json:"id" cborgen:"id"` 449 + Pinned bool `json:"pinned" cborgen:"pinned"` 450 + Type string `json:"type" cborgen:"type"` 451 + Value string `json:"value" cborgen:"value"` 452 + } 453 + 454 + // ActorDefs_SavedFeedsPref is a "savedFeedsPref" in the app.bsky.actor.defs schema. 455 + // 456 + // RECORDTYPE: ActorDefs_SavedFeedsPref 457 + type ActorDefs_SavedFeedsPref struct { 458 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPref" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"` 459 + Pinned []string `json:"pinned" cborgen:"pinned"` 460 + Saved []string `json:"saved" cborgen:"saved"` 461 + TimelineIndex *int64 `json:"timelineIndex,omitempty" cborgen:"timelineIndex,omitempty"` 462 + } 463 + 464 + // ActorDefs_SavedFeedsPrefV2 is a "savedFeedsPrefV2" in the app.bsky.actor.defs schema. 465 + // 466 + // RECORDTYPE: ActorDefs_SavedFeedsPrefV2 467 + type ActorDefs_SavedFeedsPrefV2 struct { 468 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2"` 469 + Items []*ActorDefs_SavedFeed `json:"items" cborgen:"items"` 470 + } 471 + 472 + // ActorDefs_StatusView is a "statusView" in the app.bsky.actor.defs schema. 473 + type ActorDefs_StatusView struct { 474 + // embed: An optional embed associated with the status. 475 + Embed *ActorDefs_StatusView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 476 + // expiresAt: The date when this status will expire. The application might choose to no longer return the status after expiration. 477 + ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"` 478 + // isActive: True if the status is not expired, false if it is expired. Only present if expiration was set. 479 + IsActive *bool `json:"isActive,omitempty" cborgen:"isActive,omitempty"` 480 + Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 481 + // status: The status for the account. 482 + Status string `json:"status" cborgen:"status"` 483 + } 484 + 485 + // An optional embed associated with the status. 486 + type ActorDefs_StatusView_Embed struct { 487 + EmbedExternal_View *EmbedExternal_View 488 + } 489 + 490 + func (t *ActorDefs_StatusView_Embed) MarshalJSON() ([]byte, error) { 491 + if t.EmbedExternal_View != nil { 492 + t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" 493 + return json.Marshal(t.EmbedExternal_View) 494 + } 495 + return nil, fmt.Errorf("cannot marshal empty enum") 496 + } 497 + func (t *ActorDefs_StatusView_Embed) UnmarshalJSON(b []byte) error { 498 + typ, err := util.TypeExtract(b) 499 + if err != nil { 500 + return err 501 + } 502 + 503 + switch typ { 504 + case "app.bsky.embed.external#view": 505 + t.EmbedExternal_View = new(EmbedExternal_View) 506 + return json.Unmarshal(b, t.EmbedExternal_View) 507 + 508 + default: 509 + return nil 510 + } 511 + } 512 + 513 + // ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema. 514 + // 515 + // RECORDTYPE: ActorDefs_ThreadViewPref 516 + type ActorDefs_ThreadViewPref struct { 517 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#threadViewPref" cborgen:"$type,const=app.bsky.actor.defs#threadViewPref"` 518 + // prioritizeFollowedUsers: Show followed users at the top of all replies. 519 + PrioritizeFollowedUsers *bool `json:"prioritizeFollowedUsers,omitempty" cborgen:"prioritizeFollowedUsers,omitempty"` 520 + // sort: Sorting mode for threads. 521 + Sort *string `json:"sort,omitempty" cborgen:"sort,omitempty"` 522 + } 523 + 524 + // ActorDefs_VerificationPrefs is a "verificationPrefs" in the app.bsky.actor.defs schema. 525 + // 526 + // Preferences for how verified accounts appear in the app. 527 + // 528 + // RECORDTYPE: ActorDefs_VerificationPrefs 529 + type ActorDefs_VerificationPrefs struct { 530 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#verificationPrefs" cborgen:"$type,const=app.bsky.actor.defs#verificationPrefs"` 531 + // hideBadges: Hide the blue check badges for verified accounts and trusted verifiers. 532 + HideBadges *bool `json:"hideBadges,omitempty" cborgen:"hideBadges,omitempty"` 533 + } 534 + 535 + // ActorDefs_VerificationState is a "verificationState" in the app.bsky.actor.defs schema. 536 + // 537 + // Represents the verification information about the user this object is attached to. 538 + type ActorDefs_VerificationState struct { 539 + // trustedVerifierStatus: The user's status as a trusted verifier. 540 + TrustedVerifierStatus string `json:"trustedVerifierStatus" cborgen:"trustedVerifierStatus"` 541 + // verifications: All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. 542 + Verifications []*ActorDefs_VerificationView `json:"verifications" cborgen:"verifications"` 543 + // verifiedStatus: The user's status as a verified account. 544 + VerifiedStatus string `json:"verifiedStatus" cborgen:"verifiedStatus"` 545 + } 546 + 547 + // ActorDefs_VerificationView is a "verificationView" in the app.bsky.actor.defs schema. 548 + // 549 + // An individual verification for an associated subject. 550 + type ActorDefs_VerificationView struct { 551 + // createdAt: Timestamp when the verification was created. 552 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 553 + // isValid: True if the verification passes validation, otherwise false. 554 + IsValid bool `json:"isValid" cborgen:"isValid"` 555 + // issuer: The user who issued this verification. 556 + Issuer string `json:"issuer" cborgen:"issuer"` 557 + // uri: The AT-URI of the verification record. 558 + Uri string `json:"uri" cborgen:"uri"` 559 + } 560 + 561 + // ActorDefs_ViewerState is a "viewerState" in the app.bsky.actor.defs schema. 562 + // 563 + // Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. 564 + type ActorDefs_ViewerState struct { 565 + BlockedBy *bool `json:"blockedBy,omitempty" cborgen:"blockedBy,omitempty"` 566 + Blocking *string `json:"blocking,omitempty" cborgen:"blocking,omitempty"` 567 + BlockingByList *GraphDefs_ListViewBasic `json:"blockingByList,omitempty" cborgen:"blockingByList,omitempty"` 568 + FollowedBy *string `json:"followedBy,omitempty" cborgen:"followedBy,omitempty"` 569 + Following *string `json:"following,omitempty" cborgen:"following,omitempty"` 570 + KnownFollowers *ActorDefs_KnownFollowers `json:"knownFollowers,omitempty" cborgen:"knownFollowers,omitempty"` 571 + Muted *bool `json:"muted,omitempty" cborgen:"muted,omitempty"` 572 + MutedByList *GraphDefs_ListViewBasic `json:"mutedByList,omitempty" cborgen:"mutedByList,omitempty"` 573 + }
+28
api/bsky/actorgetPreferences.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.getPreferences 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorGetPreferences_Output is the output of a app.bsky.actor.getPreferences call. 14 + type ActorGetPreferences_Output struct { 15 + Preferences []ActorDefs_Preferences_Elem `json:"preferences" cborgen:"preferences"` 16 + } 17 + 18 + // ActorGetPreferences calls the XRPC method "app.bsky.actor.getPreferences". 19 + func ActorGetPreferences(ctx context.Context, c *xrpc.Client) (*ActorGetPreferences_Output, error) { 20 + var out ActorGetPreferences_Output 21 + 22 + params := map[string]interface{}{} 23 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getPreferences", params, nil, &out); err != nil { 24 + return nil, err 25 + } 26 + 27 + return &out, nil 28 + }
+27
api/bsky/actorgetProfile.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.getProfile 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorGetProfile calls the XRPC method "app.bsky.actor.getProfile". 14 + // 15 + // actor: Handle or DID of account to fetch profile of. 16 + func ActorGetProfile(ctx context.Context, c *xrpc.Client, actor string) (*ActorDefs_ProfileViewDetailed, error) { 17 + var out ActorDefs_ProfileViewDetailed 18 + 19 + params := map[string]interface{}{ 20 + "actor": actor, 21 + } 22 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getProfile", params, nil, &out); err != nil { 23 + return nil, err 24 + } 25 + 26 + return &out, nil 27 + }
+30
api/bsky/actorgetProfiles.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.getProfiles 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorGetProfiles_Output is the output of a app.bsky.actor.getProfiles call. 14 + type ActorGetProfiles_Output struct { 15 + Profiles []*ActorDefs_ProfileViewDetailed `json:"profiles" cborgen:"profiles"` 16 + } 17 + 18 + // ActorGetProfiles calls the XRPC method "app.bsky.actor.getProfiles". 19 + func ActorGetProfiles(ctx context.Context, c *xrpc.Client, actors []string) (*ActorGetProfiles_Output, error) { 20 + var out ActorGetProfiles_Output 21 + 22 + params := map[string]interface{}{ 23 + "actors": actors, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getProfiles", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+34
api/bsky/actorgetSuggestions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.getSuggestions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorGetSuggestions_Output is the output of a app.bsky.actor.getSuggestions call. 14 + type ActorGetSuggestions_Output struct { 15 + Actors []*ActorDefs_ProfileView `json:"actors" cborgen:"actors"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + // recId: Snowflake for this recommendation, use when submitting recommendation events. 18 + RecId *int64 `json:"recId,omitempty" cborgen:"recId,omitempty"` 19 + } 20 + 21 + // ActorGetSuggestions calls the XRPC method "app.bsky.actor.getSuggestions". 22 + func ActorGetSuggestions(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*ActorGetSuggestions_Output, error) { 23 + var out ActorGetSuggestions_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "limit": limit, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.getSuggestions", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+91
api/bsky/actorprofile.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.profile 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 14 + "github.com/bluesky-social/indigo/lex/util" 15 + cbg "github.com/whyrusleeping/cbor-gen" 16 + ) 17 + 18 + func init() { 19 + util.RegisterType("app.bsky.actor.profile", &ActorProfile{}) 20 + } // 21 + // RECORDTYPE: ActorProfile 22 + type ActorProfile struct { 23 + LexiconTypeID string `json:"$type,const=app.bsky.actor.profile" cborgen:"$type,const=app.bsky.actor.profile"` 24 + // avatar: Small image to be displayed next to posts from account. AKA, 'profile picture' 25 + Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 26 + // banner: Larger horizontal image to display behind profile view. 27 + Banner *util.LexBlob `json:"banner,omitempty" cborgen:"banner,omitempty"` 28 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 29 + // description: Free-form profile description text. 30 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 31 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 32 + JoinedViaStarterPack *comatprototypes.RepoStrongRef `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"` 33 + // labels: Self-label values, specific to the Bluesky application, on the overall account. 34 + Labels *ActorProfile_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` 35 + PinnedPost *comatprototypes.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` 36 + } 37 + 38 + // Self-label values, specific to the Bluesky application, on the overall account. 39 + type ActorProfile_Labels struct { 40 + LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels 41 + } 42 + 43 + func (t *ActorProfile_Labels) MarshalJSON() ([]byte, error) { 44 + if t.LabelDefs_SelfLabels != nil { 45 + t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" 46 + return json.Marshal(t.LabelDefs_SelfLabels) 47 + } 48 + return nil, fmt.Errorf("cannot marshal empty enum") 49 + } 50 + func (t *ActorProfile_Labels) UnmarshalJSON(b []byte) error { 51 + typ, err := util.TypeExtract(b) 52 + if err != nil { 53 + return err 54 + } 55 + 56 + switch typ { 57 + case "com.atproto.label.defs#selfLabels": 58 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 59 + return json.Unmarshal(b, t.LabelDefs_SelfLabels) 60 + 61 + default: 62 + return nil 63 + } 64 + } 65 + 66 + func (t *ActorProfile_Labels) MarshalCBOR(w io.Writer) error { 67 + 68 + if t == nil { 69 + _, err := w.Write(cbg.CborNull) 70 + return err 71 + } 72 + if t.LabelDefs_SelfLabels != nil { 73 + return t.LabelDefs_SelfLabels.MarshalCBOR(w) 74 + } 75 + return fmt.Errorf("cannot cbor marshal empty enum") 76 + } 77 + func (t *ActorProfile_Labels) UnmarshalCBOR(r io.Reader) error { 78 + typ, b, err := util.CborTypeExtractReader(r) 79 + if err != nil { 80 + return err 81 + } 82 + 83 + switch typ { 84 + case "com.atproto.label.defs#selfLabels": 85 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 86 + return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) 87 + 88 + default: 89 + return nil 90 + } 91 + }
+25
api/bsky/actorputPreferences.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.putPreferences 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorPutPreferences_Input is the input argument to a app.bsky.actor.putPreferences call. 14 + type ActorPutPreferences_Input struct { 15 + Preferences []ActorDefs_Preferences_Elem `json:"preferences" cborgen:"preferences"` 16 + } 17 + 18 + // ActorPutPreferences calls the XRPC method "app.bsky.actor.putPreferences". 19 + func ActorPutPreferences(ctx context.Context, c *xrpc.Client, input *ActorPutPreferences_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.actor.putPreferences", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+37
api/bsky/actorsearchActors.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.searchActors 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorSearchActors_Output is the output of a app.bsky.actor.searchActors call. 14 + type ActorSearchActors_Output struct { 15 + Actors []*ActorDefs_ProfileView `json:"actors" cborgen:"actors"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // ActorSearchActors calls the XRPC method "app.bsky.actor.searchActors". 20 + // 21 + // q: Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. 22 + // term: DEPRECATED: use 'q' instead. 23 + func ActorSearchActors(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*ActorSearchActors_Output, error) { 24 + var out ActorSearchActors_Output 25 + 26 + params := map[string]interface{}{ 27 + "cursor": cursor, 28 + "limit": limit, 29 + "q": q, 30 + "term": term, 31 + } 32 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.searchActors", params, nil, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+35
api/bsky/actorsearchActorsTypeahead.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.searchActorsTypeahead 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorSearchActorsTypeahead_Output is the output of a app.bsky.actor.searchActorsTypeahead call. 14 + type ActorSearchActorsTypeahead_Output struct { 15 + Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"` 16 + } 17 + 18 + // ActorSearchActorsTypeahead calls the XRPC method "app.bsky.actor.searchActorsTypeahead". 19 + // 20 + // q: Search query prefix; not a full query string. 21 + // term: DEPRECATED: use 'q' instead. 22 + func ActorSearchActorsTypeahead(ctx context.Context, c *xrpc.Client, limit int64, q string, term string) (*ActorSearchActorsTypeahead_Output, error) { 23 + var out ActorSearchActorsTypeahead_Output 24 + 25 + params := map[string]interface{}{ 26 + "limit": limit, 27 + "q": q, 28 + "term": term, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.actor.searchActorsTypeahead", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+85
api/bsky/actorstatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.actor.status 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + "github.com/bluesky-social/indigo/lex/util" 14 + cbg "github.com/whyrusleeping/cbor-gen" 15 + ) 16 + 17 + func init() { 18 + util.RegisterType("app.bsky.actor.status", &ActorStatus{}) 19 + } // 20 + // RECORDTYPE: ActorStatus 21 + type ActorStatus struct { 22 + LexiconTypeID string `json:"$type,const=app.bsky.actor.status" cborgen:"$type,const=app.bsky.actor.status"` 23 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 24 + // durationMinutes: The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. 25 + DurationMinutes *int64 `json:"durationMinutes,omitempty" cborgen:"durationMinutes,omitempty"` 26 + // embed: An optional embed associated with the status. 27 + Embed *ActorStatus_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 28 + // status: The status for the account. 29 + Status string `json:"status" cborgen:"status"` 30 + } 31 + 32 + // An optional embed associated with the status. 33 + type ActorStatus_Embed struct { 34 + EmbedExternal *EmbedExternal 35 + } 36 + 37 + func (t *ActorStatus_Embed) MarshalJSON() ([]byte, error) { 38 + if t.EmbedExternal != nil { 39 + t.EmbedExternal.LexiconTypeID = "app.bsky.embed.external" 40 + return json.Marshal(t.EmbedExternal) 41 + } 42 + return nil, fmt.Errorf("cannot marshal empty enum") 43 + } 44 + func (t *ActorStatus_Embed) UnmarshalJSON(b []byte) error { 45 + typ, err := util.TypeExtract(b) 46 + if err != nil { 47 + return err 48 + } 49 + 50 + switch typ { 51 + case "app.bsky.embed.external": 52 + t.EmbedExternal = new(EmbedExternal) 53 + return json.Unmarshal(b, t.EmbedExternal) 54 + 55 + default: 56 + return nil 57 + } 58 + } 59 + 60 + func (t *ActorStatus_Embed) MarshalCBOR(w io.Writer) error { 61 + 62 + if t == nil { 63 + _, err := w.Write(cbg.CborNull) 64 + return err 65 + } 66 + if t.EmbedExternal != nil { 67 + return t.EmbedExternal.MarshalCBOR(w) 68 + } 69 + return fmt.Errorf("cannot cbor marshal empty enum") 70 + } 71 + func (t *ActorStatus_Embed) UnmarshalCBOR(r io.Reader) error { 72 + typ, b, err := util.CborTypeExtractReader(r) 73 + if err != nil { 74 + return err 75 + } 76 + 77 + switch typ { 78 + case "app.bsky.embed.external": 79 + t.EmbedExternal = new(EmbedExternal) 80 + return t.EmbedExternal.UnmarshalCBOR(bytes.NewReader(b)) 81 + 82 + default: 83 + return nil 84 + } 85 + }
+13
api/bsky/embeddefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.embed.defs 6 + 7 + // EmbedDefs_AspectRatio is a "aspectRatio" in the app.bsky.embed.defs schema. 8 + // 9 + // width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. 10 + type EmbedDefs_AspectRatio struct { 11 + Height int64 `json:"height" cborgen:"height"` 12 + Width int64 `json:"width" cborgen:"width"` 13 + }
+44
api/bsky/embedexternal.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.embed.external 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.embed.external#main", &EmbedExternal{}) 13 + } // EmbedExternal is a "main" in the app.bsky.embed.external schema. 14 + // A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). 15 + // 16 + // RECORDTYPE: EmbedExternal 17 + type EmbedExternal struct { 18 + LexiconTypeID string `json:"$type,const=app.bsky.embed.external" cborgen:"$type,const=app.bsky.embed.external"` 19 + External *EmbedExternal_External `json:"external" cborgen:"external"` 20 + } 21 + 22 + // EmbedExternal_External is a "external" in the app.bsky.embed.external schema. 23 + type EmbedExternal_External struct { 24 + Description string `json:"description" cborgen:"description"` 25 + Thumb *util.LexBlob `json:"thumb,omitempty" cborgen:"thumb,omitempty"` 26 + Title string `json:"title" cborgen:"title"` 27 + Uri string `json:"uri" cborgen:"uri"` 28 + } 29 + 30 + // EmbedExternal_View is a "view" in the app.bsky.embed.external schema. 31 + // 32 + // RECORDTYPE: EmbedExternal_View 33 + type EmbedExternal_View struct { 34 + LexiconTypeID string `json:"$type,const=app.bsky.embed.external#view" cborgen:"$type,const=app.bsky.embed.external#view"` 35 + External *EmbedExternal_ViewExternal `json:"external" cborgen:"external"` 36 + } 37 + 38 + // EmbedExternal_ViewExternal is a "viewExternal" in the app.bsky.embed.external schema. 39 + type EmbedExternal_ViewExternal struct { 40 + Description string `json:"description" cborgen:"description"` 41 + Thumb *string `json:"thumb,omitempty" cborgen:"thumb,omitempty"` 42 + Title string `json:"title" cborgen:"title"` 43 + Uri string `json:"uri" cborgen:"uri"` 44 + }
+45
api/bsky/embedimages.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.embed.images 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.embed.images#main", &EmbedImages{}) 13 + } // EmbedImages is a "main" in the app.bsky.embed.images schema. 14 + // RECORDTYPE: EmbedImages 15 + type EmbedImages struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.embed.images" cborgen:"$type,const=app.bsky.embed.images"` 17 + Images []*EmbedImages_Image `json:"images" cborgen:"images"` 18 + } 19 + 20 + // EmbedImages_Image is a "image" in the app.bsky.embed.images schema. 21 + type EmbedImages_Image struct { 22 + // alt: Alt text description of the image, for accessibility. 23 + Alt string `json:"alt" cborgen:"alt"` 24 + AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` 25 + Image *util.LexBlob `json:"image" cborgen:"image"` 26 + } 27 + 28 + // EmbedImages_View is a "view" in the app.bsky.embed.images schema. 29 + // 30 + // RECORDTYPE: EmbedImages_View 31 + type EmbedImages_View struct { 32 + LexiconTypeID string `json:"$type,const=app.bsky.embed.images#view" cborgen:"$type,const=app.bsky.embed.images#view"` 33 + Images []*EmbedImages_ViewImage `json:"images" cborgen:"images"` 34 + } 35 + 36 + // EmbedImages_ViewImage is a "viewImage" in the app.bsky.embed.images schema. 37 + type EmbedImages_ViewImage struct { 38 + // alt: Alt text description of the image, for accessibility. 39 + Alt string `json:"alt" cborgen:"alt"` 40 + AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` 41 + // fullsize: Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. 42 + Fullsize string `json:"fullsize" cborgen:"fullsize"` 43 + // thumb: Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. 44 + Thumb string `json:"thumb" cborgen:"thumb"` 45 + }
+219
api/bsky/embedrecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.embed.record 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 + func init() { 16 + util.RegisterType("app.bsky.embed.record#main", &EmbedRecord{}) 17 + } // EmbedRecord is a "main" in the app.bsky.embed.record schema. 18 + // RECORDTYPE: EmbedRecord 19 + type EmbedRecord struct { 20 + LexiconTypeID string `json:"$type,const=app.bsky.embed.record" cborgen:"$type,const=app.bsky.embed.record"` 21 + Record *comatprototypes.RepoStrongRef `json:"record" cborgen:"record"` 22 + } 23 + 24 + // EmbedRecord_View is a "view" in the app.bsky.embed.record schema. 25 + // 26 + // RECORDTYPE: EmbedRecord_View 27 + type EmbedRecord_View struct { 28 + LexiconTypeID string `json:"$type,const=app.bsky.embed.record#view" cborgen:"$type,const=app.bsky.embed.record#view"` 29 + Record *EmbedRecord_View_Record `json:"record" cborgen:"record"` 30 + } 31 + 32 + // EmbedRecord_ViewBlocked is a "viewBlocked" in the app.bsky.embed.record schema. 33 + // 34 + // RECORDTYPE: EmbedRecord_ViewBlocked 35 + type EmbedRecord_ViewBlocked struct { 36 + LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewBlocked" cborgen:"$type,const=app.bsky.embed.record#viewBlocked"` 37 + Author *FeedDefs_BlockedAuthor `json:"author" cborgen:"author"` 38 + Blocked bool `json:"blocked" cborgen:"blocked"` 39 + Uri string `json:"uri" cborgen:"uri"` 40 + } 41 + 42 + // EmbedRecord_ViewDetached is a "viewDetached" in the app.bsky.embed.record schema. 43 + // 44 + // RECORDTYPE: EmbedRecord_ViewDetached 45 + type EmbedRecord_ViewDetached struct { 46 + LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewDetached" cborgen:"$type,const=app.bsky.embed.record#viewDetached"` 47 + Detached bool `json:"detached" cborgen:"detached"` 48 + Uri string `json:"uri" cborgen:"uri"` 49 + } 50 + 51 + // EmbedRecord_ViewNotFound is a "viewNotFound" in the app.bsky.embed.record schema. 52 + // 53 + // RECORDTYPE: EmbedRecord_ViewNotFound 54 + type EmbedRecord_ViewNotFound struct { 55 + LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewNotFound" cborgen:"$type,const=app.bsky.embed.record#viewNotFound"` 56 + NotFound bool `json:"notFound" cborgen:"notFound"` 57 + Uri string `json:"uri" cborgen:"uri"` 58 + } 59 + 60 + // EmbedRecord_ViewRecord is a "viewRecord" in the app.bsky.embed.record schema. 61 + // 62 + // RECORDTYPE: EmbedRecord_ViewRecord 63 + type EmbedRecord_ViewRecord struct { 64 + LexiconTypeID string `json:"$type,const=app.bsky.embed.record#viewRecord" cborgen:"$type,const=app.bsky.embed.record#viewRecord"` 65 + Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` 66 + Cid string `json:"cid" cborgen:"cid"` 67 + Embeds []*EmbedRecord_ViewRecord_Embeds_Elem `json:"embeds,omitempty" cborgen:"embeds,omitempty"` 68 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 69 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 70 + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` 71 + QuoteCount *int64 `json:"quoteCount,omitempty" cborgen:"quoteCount,omitempty"` 72 + ReplyCount *int64 `json:"replyCount,omitempty" cborgen:"replyCount,omitempty"` 73 + RepostCount *int64 `json:"repostCount,omitempty" cborgen:"repostCount,omitempty"` 74 + Uri string `json:"uri" cborgen:"uri"` 75 + // value: The record data itself. 76 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 77 + } 78 + 79 + type EmbedRecord_ViewRecord_Embeds_Elem struct { 80 + EmbedImages_View *EmbedImages_View 81 + EmbedVideo_View *EmbedVideo_View 82 + EmbedExternal_View *EmbedExternal_View 83 + EmbedRecord_View *EmbedRecord_View 84 + EmbedRecordWithMedia_View *EmbedRecordWithMedia_View 85 + } 86 + 87 + func (t *EmbedRecord_ViewRecord_Embeds_Elem) MarshalJSON() ([]byte, error) { 88 + if t.EmbedImages_View != nil { 89 + t.EmbedImages_View.LexiconTypeID = "app.bsky.embed.images#view" 90 + return json.Marshal(t.EmbedImages_View) 91 + } 92 + if t.EmbedVideo_View != nil { 93 + t.EmbedVideo_View.LexiconTypeID = "app.bsky.embed.video#view" 94 + return json.Marshal(t.EmbedVideo_View) 95 + } 96 + if t.EmbedExternal_View != nil { 97 + t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" 98 + return json.Marshal(t.EmbedExternal_View) 99 + } 100 + if t.EmbedRecord_View != nil { 101 + t.EmbedRecord_View.LexiconTypeID = "app.bsky.embed.record#view" 102 + return json.Marshal(t.EmbedRecord_View) 103 + } 104 + if t.EmbedRecordWithMedia_View != nil { 105 + t.EmbedRecordWithMedia_View.LexiconTypeID = "app.bsky.embed.recordWithMedia#view" 106 + return json.Marshal(t.EmbedRecordWithMedia_View) 107 + } 108 + return nil, fmt.Errorf("cannot marshal empty enum") 109 + } 110 + func (t *EmbedRecord_ViewRecord_Embeds_Elem) UnmarshalJSON(b []byte) error { 111 + typ, err := util.TypeExtract(b) 112 + if err != nil { 113 + return err 114 + } 115 + 116 + switch typ { 117 + case "app.bsky.embed.images#view": 118 + t.EmbedImages_View = new(EmbedImages_View) 119 + return json.Unmarshal(b, t.EmbedImages_View) 120 + case "app.bsky.embed.video#view": 121 + t.EmbedVideo_View = new(EmbedVideo_View) 122 + return json.Unmarshal(b, t.EmbedVideo_View) 123 + case "app.bsky.embed.external#view": 124 + t.EmbedExternal_View = new(EmbedExternal_View) 125 + return json.Unmarshal(b, t.EmbedExternal_View) 126 + case "app.bsky.embed.record#view": 127 + t.EmbedRecord_View = new(EmbedRecord_View) 128 + return json.Unmarshal(b, t.EmbedRecord_View) 129 + case "app.bsky.embed.recordWithMedia#view": 130 + t.EmbedRecordWithMedia_View = new(EmbedRecordWithMedia_View) 131 + return json.Unmarshal(b, t.EmbedRecordWithMedia_View) 132 + 133 + default: 134 + return nil 135 + } 136 + } 137 + 138 + type EmbedRecord_View_Record struct { 139 + EmbedRecord_ViewRecord *EmbedRecord_ViewRecord 140 + EmbedRecord_ViewNotFound *EmbedRecord_ViewNotFound 141 + EmbedRecord_ViewBlocked *EmbedRecord_ViewBlocked 142 + EmbedRecord_ViewDetached *EmbedRecord_ViewDetached 143 + FeedDefs_GeneratorView *FeedDefs_GeneratorView 144 + GraphDefs_ListView *GraphDefs_ListView 145 + LabelerDefs_LabelerView *LabelerDefs_LabelerView 146 + GraphDefs_StarterPackViewBasic *GraphDefs_StarterPackViewBasic 147 + } 148 + 149 + func (t *EmbedRecord_View_Record) MarshalJSON() ([]byte, error) { 150 + if t.EmbedRecord_ViewRecord != nil { 151 + t.EmbedRecord_ViewRecord.LexiconTypeID = "app.bsky.embed.record#viewRecord" 152 + return json.Marshal(t.EmbedRecord_ViewRecord) 153 + } 154 + if t.EmbedRecord_ViewNotFound != nil { 155 + t.EmbedRecord_ViewNotFound.LexiconTypeID = "app.bsky.embed.record#viewNotFound" 156 + return json.Marshal(t.EmbedRecord_ViewNotFound) 157 + } 158 + if t.EmbedRecord_ViewBlocked != nil { 159 + t.EmbedRecord_ViewBlocked.LexiconTypeID = "app.bsky.embed.record#viewBlocked" 160 + return json.Marshal(t.EmbedRecord_ViewBlocked) 161 + } 162 + if t.EmbedRecord_ViewDetached != nil { 163 + t.EmbedRecord_ViewDetached.LexiconTypeID = "app.bsky.embed.record#viewDetached" 164 + return json.Marshal(t.EmbedRecord_ViewDetached) 165 + } 166 + if t.FeedDefs_GeneratorView != nil { 167 + t.FeedDefs_GeneratorView.LexiconTypeID = "app.bsky.feed.defs#generatorView" 168 + return json.Marshal(t.FeedDefs_GeneratorView) 169 + } 170 + if t.GraphDefs_ListView != nil { 171 + t.GraphDefs_ListView.LexiconTypeID = "app.bsky.graph.defs#listView" 172 + return json.Marshal(t.GraphDefs_ListView) 173 + } 174 + if t.LabelerDefs_LabelerView != nil { 175 + t.LabelerDefs_LabelerView.LexiconTypeID = "app.bsky.labeler.defs#labelerView" 176 + return json.Marshal(t.LabelerDefs_LabelerView) 177 + } 178 + if t.GraphDefs_StarterPackViewBasic != nil { 179 + t.GraphDefs_StarterPackViewBasic.LexiconTypeID = "app.bsky.graph.defs#starterPackViewBasic" 180 + return json.Marshal(t.GraphDefs_StarterPackViewBasic) 181 + } 182 + return nil, fmt.Errorf("cannot marshal empty enum") 183 + } 184 + func (t *EmbedRecord_View_Record) UnmarshalJSON(b []byte) error { 185 + typ, err := util.TypeExtract(b) 186 + if err != nil { 187 + return err 188 + } 189 + 190 + switch typ { 191 + case "app.bsky.embed.record#viewRecord": 192 + t.EmbedRecord_ViewRecord = new(EmbedRecord_ViewRecord) 193 + return json.Unmarshal(b, t.EmbedRecord_ViewRecord) 194 + case "app.bsky.embed.record#viewNotFound": 195 + t.EmbedRecord_ViewNotFound = new(EmbedRecord_ViewNotFound) 196 + return json.Unmarshal(b, t.EmbedRecord_ViewNotFound) 197 + case "app.bsky.embed.record#viewBlocked": 198 + t.EmbedRecord_ViewBlocked = new(EmbedRecord_ViewBlocked) 199 + return json.Unmarshal(b, t.EmbedRecord_ViewBlocked) 200 + case "app.bsky.embed.record#viewDetached": 201 + t.EmbedRecord_ViewDetached = new(EmbedRecord_ViewDetached) 202 + return json.Unmarshal(b, t.EmbedRecord_ViewDetached) 203 + case "app.bsky.feed.defs#generatorView": 204 + t.FeedDefs_GeneratorView = new(FeedDefs_GeneratorView) 205 + return json.Unmarshal(b, t.FeedDefs_GeneratorView) 206 + case "app.bsky.graph.defs#listView": 207 + t.GraphDefs_ListView = new(GraphDefs_ListView) 208 + return json.Unmarshal(b, t.GraphDefs_ListView) 209 + case "app.bsky.labeler.defs#labelerView": 210 + t.LabelerDefs_LabelerView = new(LabelerDefs_LabelerView) 211 + return json.Unmarshal(b, t.LabelerDefs_LabelerView) 212 + case "app.bsky.graph.defs#starterPackViewBasic": 213 + t.GraphDefs_StarterPackViewBasic = new(GraphDefs_StarterPackViewBasic) 214 + return json.Unmarshal(b, t.GraphDefs_StarterPackViewBasic) 215 + 216 + default: 217 + return nil 218 + } 219 + }
+159
api/bsky/embedrecordWithMedia.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.embed.recordWithMedia 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + "github.com/bluesky-social/indigo/lex/util" 14 + cbg "github.com/whyrusleeping/cbor-gen" 15 + ) 16 + 17 + func init() { 18 + util.RegisterType("app.bsky.embed.recordWithMedia#main", &EmbedRecordWithMedia{}) 19 + } // EmbedRecordWithMedia is a "main" in the app.bsky.embed.recordWithMedia schema. 20 + // RECORDTYPE: EmbedRecordWithMedia 21 + type EmbedRecordWithMedia struct { 22 + LexiconTypeID string `json:"$type,const=app.bsky.embed.recordWithMedia" cborgen:"$type,const=app.bsky.embed.recordWithMedia"` 23 + Media *EmbedRecordWithMedia_Media `json:"media" cborgen:"media"` 24 + Record *EmbedRecord `json:"record" cborgen:"record"` 25 + } 26 + 27 + type EmbedRecordWithMedia_Media struct { 28 + EmbedImages *EmbedImages 29 + EmbedVideo *EmbedVideo 30 + EmbedExternal *EmbedExternal 31 + } 32 + 33 + func (t *EmbedRecordWithMedia_Media) MarshalJSON() ([]byte, error) { 34 + if t.EmbedImages != nil { 35 + t.EmbedImages.LexiconTypeID = "app.bsky.embed.images" 36 + return json.Marshal(t.EmbedImages) 37 + } 38 + if t.EmbedVideo != nil { 39 + t.EmbedVideo.LexiconTypeID = "app.bsky.embed.video" 40 + return json.Marshal(t.EmbedVideo) 41 + } 42 + if t.EmbedExternal != nil { 43 + t.EmbedExternal.LexiconTypeID = "app.bsky.embed.external" 44 + return json.Marshal(t.EmbedExternal) 45 + } 46 + return nil, fmt.Errorf("cannot marshal empty enum") 47 + } 48 + func (t *EmbedRecordWithMedia_Media) UnmarshalJSON(b []byte) error { 49 + typ, err := util.TypeExtract(b) 50 + if err != nil { 51 + return err 52 + } 53 + 54 + switch typ { 55 + case "app.bsky.embed.images": 56 + t.EmbedImages = new(EmbedImages) 57 + return json.Unmarshal(b, t.EmbedImages) 58 + case "app.bsky.embed.video": 59 + t.EmbedVideo = new(EmbedVideo) 60 + return json.Unmarshal(b, t.EmbedVideo) 61 + case "app.bsky.embed.external": 62 + t.EmbedExternal = new(EmbedExternal) 63 + return json.Unmarshal(b, t.EmbedExternal) 64 + 65 + default: 66 + return nil 67 + } 68 + } 69 + 70 + func (t *EmbedRecordWithMedia_Media) MarshalCBOR(w io.Writer) error { 71 + 72 + if t == nil { 73 + _, err := w.Write(cbg.CborNull) 74 + return err 75 + } 76 + if t.EmbedImages != nil { 77 + return t.EmbedImages.MarshalCBOR(w) 78 + } 79 + if t.EmbedVideo != nil { 80 + return t.EmbedVideo.MarshalCBOR(w) 81 + } 82 + if t.EmbedExternal != nil { 83 + return t.EmbedExternal.MarshalCBOR(w) 84 + } 85 + return fmt.Errorf("cannot cbor marshal empty enum") 86 + } 87 + func (t *EmbedRecordWithMedia_Media) UnmarshalCBOR(r io.Reader) error { 88 + typ, b, err := util.CborTypeExtractReader(r) 89 + if err != nil { 90 + return err 91 + } 92 + 93 + switch typ { 94 + case "app.bsky.embed.images": 95 + t.EmbedImages = new(EmbedImages) 96 + return t.EmbedImages.UnmarshalCBOR(bytes.NewReader(b)) 97 + case "app.bsky.embed.video": 98 + t.EmbedVideo = new(EmbedVideo) 99 + return t.EmbedVideo.UnmarshalCBOR(bytes.NewReader(b)) 100 + case "app.bsky.embed.external": 101 + t.EmbedExternal = new(EmbedExternal) 102 + return t.EmbedExternal.UnmarshalCBOR(bytes.NewReader(b)) 103 + 104 + default: 105 + return nil 106 + } 107 + } 108 + 109 + // EmbedRecordWithMedia_View is a "view" in the app.bsky.embed.recordWithMedia schema. 110 + // 111 + // RECORDTYPE: EmbedRecordWithMedia_View 112 + type EmbedRecordWithMedia_View struct { 113 + LexiconTypeID string `json:"$type,const=app.bsky.embed.recordWithMedia#view" cborgen:"$type,const=app.bsky.embed.recordWithMedia#view"` 114 + Media *EmbedRecordWithMedia_View_Media `json:"media" cborgen:"media"` 115 + Record *EmbedRecord_View `json:"record" cborgen:"record"` 116 + } 117 + 118 + type EmbedRecordWithMedia_View_Media struct { 119 + EmbedImages_View *EmbedImages_View 120 + EmbedVideo_View *EmbedVideo_View 121 + EmbedExternal_View *EmbedExternal_View 122 + } 123 + 124 + func (t *EmbedRecordWithMedia_View_Media) MarshalJSON() ([]byte, error) { 125 + if t.EmbedImages_View != nil { 126 + t.EmbedImages_View.LexiconTypeID = "app.bsky.embed.images#view" 127 + return json.Marshal(t.EmbedImages_View) 128 + } 129 + if t.EmbedVideo_View != nil { 130 + t.EmbedVideo_View.LexiconTypeID = "app.bsky.embed.video#view" 131 + return json.Marshal(t.EmbedVideo_View) 132 + } 133 + if t.EmbedExternal_View != nil { 134 + t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" 135 + return json.Marshal(t.EmbedExternal_View) 136 + } 137 + return nil, fmt.Errorf("cannot marshal empty enum") 138 + } 139 + func (t *EmbedRecordWithMedia_View_Media) UnmarshalJSON(b []byte) error { 140 + typ, err := util.TypeExtract(b) 141 + if err != nil { 142 + return err 143 + } 144 + 145 + switch typ { 146 + case "app.bsky.embed.images#view": 147 + t.EmbedImages_View = new(EmbedImages_View) 148 + return json.Unmarshal(b, t.EmbedImages_View) 149 + case "app.bsky.embed.video#view": 150 + t.EmbedVideo_View = new(EmbedVideo_View) 151 + return json.Unmarshal(b, t.EmbedVideo_View) 152 + case "app.bsky.embed.external#view": 153 + t.EmbedExternal_View = new(EmbedExternal_View) 154 + return json.Unmarshal(b, t.EmbedExternal_View) 155 + 156 + default: 157 + return nil 158 + } 159 + }
+41
api/bsky/embedvideo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.embed.video 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.embed.video#main", &EmbedVideo{}) 13 + } // EmbedVideo is a "main" in the app.bsky.embed.video schema. 14 + // RECORDTYPE: EmbedVideo 15 + type EmbedVideo struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.embed.video" cborgen:"$type,const=app.bsky.embed.video"` 17 + // alt: Alt text description of the video, for accessibility. 18 + Alt *string `json:"alt,omitempty" cborgen:"alt,omitempty"` 19 + AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` 20 + Captions []*EmbedVideo_Caption `json:"captions,omitempty" cborgen:"captions,omitempty"` 21 + // video: The mp4 video file. May be up to 100mb, formerly limited to 50mb. 22 + Video *util.LexBlob `json:"video" cborgen:"video"` 23 + } 24 + 25 + // EmbedVideo_Caption is a "caption" in the app.bsky.embed.video schema. 26 + type EmbedVideo_Caption struct { 27 + File *util.LexBlob `json:"file" cborgen:"file"` 28 + Lang string `json:"lang" cborgen:"lang"` 29 + } 30 + 31 + // EmbedVideo_View is a "view" in the app.bsky.embed.video schema. 32 + // 33 + // RECORDTYPE: EmbedVideo_View 34 + type EmbedVideo_View struct { 35 + LexiconTypeID string `json:"$type,const=app.bsky.embed.video#view" cborgen:"$type,const=app.bsky.embed.video#view"` 36 + Alt *string `json:"alt,omitempty" cborgen:"alt,omitempty"` 37 + AspectRatio *EmbedDefs_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` 38 + Cid string `json:"cid" cborgen:"cid"` 39 + Playlist string `json:"playlist" cborgen:"playlist"` 40 + Thumbnail *string `json:"thumbnail,omitempty" cborgen:"thumbnail,omitempty"` 41 + }
+487
api/bsky/feeddefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.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 + // FeedDefs_BlockedAuthor is a "blockedAuthor" in the app.bsky.feed.defs schema. 16 + type FeedDefs_BlockedAuthor struct { 17 + Did string `json:"did" cborgen:"did"` 18 + Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 19 + } 20 + 21 + // FeedDefs_BlockedPost is a "blockedPost" in the app.bsky.feed.defs schema. 22 + // 23 + // RECORDTYPE: FeedDefs_BlockedPost 24 + type FeedDefs_BlockedPost struct { 25 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#blockedPost" cborgen:"$type,const=app.bsky.feed.defs#blockedPost"` 26 + Author *FeedDefs_BlockedAuthor `json:"author" cborgen:"author"` 27 + Blocked bool `json:"blocked" cborgen:"blocked"` 28 + Uri string `json:"uri" cborgen:"uri"` 29 + } 30 + 31 + // FeedDefs_FeedViewPost is a "feedViewPost" in the app.bsky.feed.defs schema. 32 + type FeedDefs_FeedViewPost struct { 33 + // feedContext: Context provided by feed generator that may be passed back alongside interactions. 34 + FeedContext *string `json:"feedContext,omitempty" cborgen:"feedContext,omitempty"` 35 + Post *FeedDefs_PostView `json:"post" cborgen:"post"` 36 + Reason *FeedDefs_FeedViewPost_Reason `json:"reason,omitempty" cborgen:"reason,omitempty"` 37 + Reply *FeedDefs_ReplyRef `json:"reply,omitempty" cborgen:"reply,omitempty"` 38 + } 39 + 40 + type FeedDefs_FeedViewPost_Reason struct { 41 + FeedDefs_ReasonRepost *FeedDefs_ReasonRepost 42 + FeedDefs_ReasonPin *FeedDefs_ReasonPin 43 + } 44 + 45 + func (t *FeedDefs_FeedViewPost_Reason) MarshalJSON() ([]byte, error) { 46 + if t.FeedDefs_ReasonRepost != nil { 47 + t.FeedDefs_ReasonRepost.LexiconTypeID = "app.bsky.feed.defs#reasonRepost" 48 + return json.Marshal(t.FeedDefs_ReasonRepost) 49 + } 50 + if t.FeedDefs_ReasonPin != nil { 51 + t.FeedDefs_ReasonPin.LexiconTypeID = "app.bsky.feed.defs#reasonPin" 52 + return json.Marshal(t.FeedDefs_ReasonPin) 53 + } 54 + return nil, fmt.Errorf("cannot marshal empty enum") 55 + } 56 + func (t *FeedDefs_FeedViewPost_Reason) UnmarshalJSON(b []byte) error { 57 + typ, err := util.TypeExtract(b) 58 + if err != nil { 59 + return err 60 + } 61 + 62 + switch typ { 63 + case "app.bsky.feed.defs#reasonRepost": 64 + t.FeedDefs_ReasonRepost = new(FeedDefs_ReasonRepost) 65 + return json.Unmarshal(b, t.FeedDefs_ReasonRepost) 66 + case "app.bsky.feed.defs#reasonPin": 67 + t.FeedDefs_ReasonPin = new(FeedDefs_ReasonPin) 68 + return json.Unmarshal(b, t.FeedDefs_ReasonPin) 69 + 70 + default: 71 + return nil 72 + } 73 + } 74 + 75 + // FeedDefs_GeneratorView is a "generatorView" in the app.bsky.feed.defs schema. 76 + // 77 + // RECORDTYPE: FeedDefs_GeneratorView 78 + type FeedDefs_GeneratorView struct { 79 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#generatorView" cborgen:"$type,const=app.bsky.feed.defs#generatorView"` 80 + AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` 81 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 82 + Cid string `json:"cid" cborgen:"cid"` 83 + ContentMode *string `json:"contentMode,omitempty" cborgen:"contentMode,omitempty"` 84 + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` 85 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 86 + DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 87 + Did string `json:"did" cborgen:"did"` 88 + DisplayName string `json:"displayName" cborgen:"displayName"` 89 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 90 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 91 + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` 92 + Uri string `json:"uri" cborgen:"uri"` 93 + Viewer *FeedDefs_GeneratorViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 94 + } 95 + 96 + // FeedDefs_GeneratorViewerState is a "generatorViewerState" in the app.bsky.feed.defs schema. 97 + type FeedDefs_GeneratorViewerState struct { 98 + Like *string `json:"like,omitempty" cborgen:"like,omitempty"` 99 + } 100 + 101 + // FeedDefs_Interaction is a "interaction" in the app.bsky.feed.defs schema. 102 + type FeedDefs_Interaction struct { 103 + Event *string `json:"event,omitempty" cborgen:"event,omitempty"` 104 + // feedContext: Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. 105 + FeedContext *string `json:"feedContext,omitempty" cborgen:"feedContext,omitempty"` 106 + Item *string `json:"item,omitempty" cborgen:"item,omitempty"` 107 + } 108 + 109 + // FeedDefs_NotFoundPost is a "notFoundPost" in the app.bsky.feed.defs schema. 110 + // 111 + // RECORDTYPE: FeedDefs_NotFoundPost 112 + type FeedDefs_NotFoundPost struct { 113 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#notFoundPost" cborgen:"$type,const=app.bsky.feed.defs#notFoundPost"` 114 + NotFound bool `json:"notFound" cborgen:"notFound"` 115 + Uri string `json:"uri" cborgen:"uri"` 116 + } 117 + 118 + // FeedDefs_PostView is a "postView" in the app.bsky.feed.defs schema. 119 + // 120 + // RECORDTYPE: FeedDefs_PostView 121 + type FeedDefs_PostView struct { 122 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#postView" cborgen:"$type,const=app.bsky.feed.defs#postView"` 123 + Author *ActorDefs_ProfileViewBasic `json:"author" cborgen:"author"` 124 + Cid string `json:"cid" cborgen:"cid"` 125 + Embed *FeedDefs_PostView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 126 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 127 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 128 + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` 129 + QuoteCount *int64 `json:"quoteCount,omitempty" cborgen:"quoteCount,omitempty"` 130 + Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 131 + ReplyCount *int64 `json:"replyCount,omitempty" cborgen:"replyCount,omitempty"` 132 + RepostCount *int64 `json:"repostCount,omitempty" cborgen:"repostCount,omitempty"` 133 + Threadgate *FeedDefs_ThreadgateView `json:"threadgate,omitempty" cborgen:"threadgate,omitempty"` 134 + Uri string `json:"uri" cborgen:"uri"` 135 + Viewer *FeedDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 136 + } 137 + 138 + type FeedDefs_PostView_Embed struct { 139 + EmbedImages_View *EmbedImages_View 140 + EmbedVideo_View *EmbedVideo_View 141 + EmbedExternal_View *EmbedExternal_View 142 + EmbedRecord_View *EmbedRecord_View 143 + EmbedRecordWithMedia_View *EmbedRecordWithMedia_View 144 + } 145 + 146 + func (t *FeedDefs_PostView_Embed) MarshalJSON() ([]byte, error) { 147 + if t.EmbedImages_View != nil { 148 + t.EmbedImages_View.LexiconTypeID = "app.bsky.embed.images#view" 149 + return json.Marshal(t.EmbedImages_View) 150 + } 151 + if t.EmbedVideo_View != nil { 152 + t.EmbedVideo_View.LexiconTypeID = "app.bsky.embed.video#view" 153 + return json.Marshal(t.EmbedVideo_View) 154 + } 155 + if t.EmbedExternal_View != nil { 156 + t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view" 157 + return json.Marshal(t.EmbedExternal_View) 158 + } 159 + if t.EmbedRecord_View != nil { 160 + t.EmbedRecord_View.LexiconTypeID = "app.bsky.embed.record#view" 161 + return json.Marshal(t.EmbedRecord_View) 162 + } 163 + if t.EmbedRecordWithMedia_View != nil { 164 + t.EmbedRecordWithMedia_View.LexiconTypeID = "app.bsky.embed.recordWithMedia#view" 165 + return json.Marshal(t.EmbedRecordWithMedia_View) 166 + } 167 + return nil, fmt.Errorf("cannot marshal empty enum") 168 + } 169 + func (t *FeedDefs_PostView_Embed) UnmarshalJSON(b []byte) error { 170 + typ, err := util.TypeExtract(b) 171 + if err != nil { 172 + return err 173 + } 174 + 175 + switch typ { 176 + case "app.bsky.embed.images#view": 177 + t.EmbedImages_View = new(EmbedImages_View) 178 + return json.Unmarshal(b, t.EmbedImages_View) 179 + case "app.bsky.embed.video#view": 180 + t.EmbedVideo_View = new(EmbedVideo_View) 181 + return json.Unmarshal(b, t.EmbedVideo_View) 182 + case "app.bsky.embed.external#view": 183 + t.EmbedExternal_View = new(EmbedExternal_View) 184 + return json.Unmarshal(b, t.EmbedExternal_View) 185 + case "app.bsky.embed.record#view": 186 + t.EmbedRecord_View = new(EmbedRecord_View) 187 + return json.Unmarshal(b, t.EmbedRecord_View) 188 + case "app.bsky.embed.recordWithMedia#view": 189 + t.EmbedRecordWithMedia_View = new(EmbedRecordWithMedia_View) 190 + return json.Unmarshal(b, t.EmbedRecordWithMedia_View) 191 + 192 + default: 193 + return nil 194 + } 195 + } 196 + 197 + // FeedDefs_ReasonPin is a "reasonPin" in the app.bsky.feed.defs schema. 198 + // 199 + // RECORDTYPE: FeedDefs_ReasonPin 200 + type FeedDefs_ReasonPin struct { 201 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#reasonPin" cborgen:"$type,const=app.bsky.feed.defs#reasonPin"` 202 + } 203 + 204 + // FeedDefs_ReasonRepost is a "reasonRepost" in the app.bsky.feed.defs schema. 205 + // 206 + // RECORDTYPE: FeedDefs_ReasonRepost 207 + type FeedDefs_ReasonRepost struct { 208 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#reasonRepost" cborgen:"$type,const=app.bsky.feed.defs#reasonRepost"` 209 + By *ActorDefs_ProfileViewBasic `json:"by" cborgen:"by"` 210 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 211 + } 212 + 213 + // FeedDefs_ReplyRef is a "replyRef" in the app.bsky.feed.defs schema. 214 + type FeedDefs_ReplyRef struct { 215 + // grandparentAuthor: When parent is a reply to another post, this is the author of that post. 216 + GrandparentAuthor *ActorDefs_ProfileViewBasic `json:"grandparentAuthor,omitempty" cborgen:"grandparentAuthor,omitempty"` 217 + Parent *FeedDefs_ReplyRef_Parent `json:"parent" cborgen:"parent"` 218 + Root *FeedDefs_ReplyRef_Root `json:"root" cborgen:"root"` 219 + } 220 + 221 + type FeedDefs_ReplyRef_Parent struct { 222 + FeedDefs_PostView *FeedDefs_PostView 223 + FeedDefs_NotFoundPost *FeedDefs_NotFoundPost 224 + FeedDefs_BlockedPost *FeedDefs_BlockedPost 225 + } 226 + 227 + func (t *FeedDefs_ReplyRef_Parent) MarshalJSON() ([]byte, error) { 228 + if t.FeedDefs_PostView != nil { 229 + t.FeedDefs_PostView.LexiconTypeID = "app.bsky.feed.defs#postView" 230 + return json.Marshal(t.FeedDefs_PostView) 231 + } 232 + if t.FeedDefs_NotFoundPost != nil { 233 + t.FeedDefs_NotFoundPost.LexiconTypeID = "app.bsky.feed.defs#notFoundPost" 234 + return json.Marshal(t.FeedDefs_NotFoundPost) 235 + } 236 + if t.FeedDefs_BlockedPost != nil { 237 + t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" 238 + return json.Marshal(t.FeedDefs_BlockedPost) 239 + } 240 + return nil, fmt.Errorf("cannot marshal empty enum") 241 + } 242 + func (t *FeedDefs_ReplyRef_Parent) UnmarshalJSON(b []byte) error { 243 + typ, err := util.TypeExtract(b) 244 + if err != nil { 245 + return err 246 + } 247 + 248 + switch typ { 249 + case "app.bsky.feed.defs#postView": 250 + t.FeedDefs_PostView = new(FeedDefs_PostView) 251 + return json.Unmarshal(b, t.FeedDefs_PostView) 252 + case "app.bsky.feed.defs#notFoundPost": 253 + t.FeedDefs_NotFoundPost = new(FeedDefs_NotFoundPost) 254 + return json.Unmarshal(b, t.FeedDefs_NotFoundPost) 255 + case "app.bsky.feed.defs#blockedPost": 256 + t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) 257 + return json.Unmarshal(b, t.FeedDefs_BlockedPost) 258 + 259 + default: 260 + return nil 261 + } 262 + } 263 + 264 + type FeedDefs_ReplyRef_Root struct { 265 + FeedDefs_PostView *FeedDefs_PostView 266 + FeedDefs_NotFoundPost *FeedDefs_NotFoundPost 267 + FeedDefs_BlockedPost *FeedDefs_BlockedPost 268 + } 269 + 270 + func (t *FeedDefs_ReplyRef_Root) MarshalJSON() ([]byte, error) { 271 + if t.FeedDefs_PostView != nil { 272 + t.FeedDefs_PostView.LexiconTypeID = "app.bsky.feed.defs#postView" 273 + return json.Marshal(t.FeedDefs_PostView) 274 + } 275 + if t.FeedDefs_NotFoundPost != nil { 276 + t.FeedDefs_NotFoundPost.LexiconTypeID = "app.bsky.feed.defs#notFoundPost" 277 + return json.Marshal(t.FeedDefs_NotFoundPost) 278 + } 279 + if t.FeedDefs_BlockedPost != nil { 280 + t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" 281 + return json.Marshal(t.FeedDefs_BlockedPost) 282 + } 283 + return nil, fmt.Errorf("cannot marshal empty enum") 284 + } 285 + func (t *FeedDefs_ReplyRef_Root) UnmarshalJSON(b []byte) error { 286 + typ, err := util.TypeExtract(b) 287 + if err != nil { 288 + return err 289 + } 290 + 291 + switch typ { 292 + case "app.bsky.feed.defs#postView": 293 + t.FeedDefs_PostView = new(FeedDefs_PostView) 294 + return json.Unmarshal(b, t.FeedDefs_PostView) 295 + case "app.bsky.feed.defs#notFoundPost": 296 + t.FeedDefs_NotFoundPost = new(FeedDefs_NotFoundPost) 297 + return json.Unmarshal(b, t.FeedDefs_NotFoundPost) 298 + case "app.bsky.feed.defs#blockedPost": 299 + t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) 300 + return json.Unmarshal(b, t.FeedDefs_BlockedPost) 301 + 302 + default: 303 + return nil 304 + } 305 + } 306 + 307 + // FeedDefs_SkeletonFeedPost is a "skeletonFeedPost" in the app.bsky.feed.defs schema. 308 + type FeedDefs_SkeletonFeedPost struct { 309 + // feedContext: Context that will be passed through to client and may be passed to feed generator back alongside interactions. 310 + FeedContext *string `json:"feedContext,omitempty" cborgen:"feedContext,omitempty"` 311 + Post string `json:"post" cborgen:"post"` 312 + Reason *FeedDefs_SkeletonFeedPost_Reason `json:"reason,omitempty" cborgen:"reason,omitempty"` 313 + } 314 + 315 + type FeedDefs_SkeletonFeedPost_Reason struct { 316 + FeedDefs_SkeletonReasonRepost *FeedDefs_SkeletonReasonRepost 317 + FeedDefs_SkeletonReasonPin *FeedDefs_SkeletonReasonPin 318 + } 319 + 320 + func (t *FeedDefs_SkeletonFeedPost_Reason) MarshalJSON() ([]byte, error) { 321 + if t.FeedDefs_SkeletonReasonRepost != nil { 322 + t.FeedDefs_SkeletonReasonRepost.LexiconTypeID = "app.bsky.feed.defs#skeletonReasonRepost" 323 + return json.Marshal(t.FeedDefs_SkeletonReasonRepost) 324 + } 325 + if t.FeedDefs_SkeletonReasonPin != nil { 326 + t.FeedDefs_SkeletonReasonPin.LexiconTypeID = "app.bsky.feed.defs#skeletonReasonPin" 327 + return json.Marshal(t.FeedDefs_SkeletonReasonPin) 328 + } 329 + return nil, fmt.Errorf("cannot marshal empty enum") 330 + } 331 + func (t *FeedDefs_SkeletonFeedPost_Reason) UnmarshalJSON(b []byte) error { 332 + typ, err := util.TypeExtract(b) 333 + if err != nil { 334 + return err 335 + } 336 + 337 + switch typ { 338 + case "app.bsky.feed.defs#skeletonReasonRepost": 339 + t.FeedDefs_SkeletonReasonRepost = new(FeedDefs_SkeletonReasonRepost) 340 + return json.Unmarshal(b, t.FeedDefs_SkeletonReasonRepost) 341 + case "app.bsky.feed.defs#skeletonReasonPin": 342 + t.FeedDefs_SkeletonReasonPin = new(FeedDefs_SkeletonReasonPin) 343 + return json.Unmarshal(b, t.FeedDefs_SkeletonReasonPin) 344 + 345 + default: 346 + return nil 347 + } 348 + } 349 + 350 + // FeedDefs_SkeletonReasonPin is a "skeletonReasonPin" in the app.bsky.feed.defs schema. 351 + // 352 + // RECORDTYPE: FeedDefs_SkeletonReasonPin 353 + type FeedDefs_SkeletonReasonPin struct { 354 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#skeletonReasonPin" cborgen:"$type,const=app.bsky.feed.defs#skeletonReasonPin"` 355 + } 356 + 357 + // FeedDefs_SkeletonReasonRepost is a "skeletonReasonRepost" in the app.bsky.feed.defs schema. 358 + // 359 + // RECORDTYPE: FeedDefs_SkeletonReasonRepost 360 + type FeedDefs_SkeletonReasonRepost struct { 361 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#skeletonReasonRepost" cborgen:"$type,const=app.bsky.feed.defs#skeletonReasonRepost"` 362 + Repost string `json:"repost" cborgen:"repost"` 363 + } 364 + 365 + // FeedDefs_ThreadContext is a "threadContext" in the app.bsky.feed.defs schema. 366 + // 367 + // Metadata about this post within the context of the thread it is in. 368 + type FeedDefs_ThreadContext struct { 369 + RootAuthorLike *string `json:"rootAuthorLike,omitempty" cborgen:"rootAuthorLike,omitempty"` 370 + } 371 + 372 + // FeedDefs_ThreadViewPost is a "threadViewPost" in the app.bsky.feed.defs schema. 373 + // 374 + // RECORDTYPE: FeedDefs_ThreadViewPost 375 + type FeedDefs_ThreadViewPost struct { 376 + LexiconTypeID string `json:"$type,const=app.bsky.feed.defs#threadViewPost" cborgen:"$type,const=app.bsky.feed.defs#threadViewPost"` 377 + Parent *FeedDefs_ThreadViewPost_Parent `json:"parent,omitempty" cborgen:"parent,omitempty"` 378 + Post *FeedDefs_PostView `json:"post" cborgen:"post"` 379 + Replies []*FeedDefs_ThreadViewPost_Replies_Elem `json:"replies,omitempty" cborgen:"replies,omitempty"` 380 + ThreadContext *FeedDefs_ThreadContext `json:"threadContext,omitempty" cborgen:"threadContext,omitempty"` 381 + } 382 + 383 + type FeedDefs_ThreadViewPost_Parent struct { 384 + FeedDefs_ThreadViewPost *FeedDefs_ThreadViewPost 385 + FeedDefs_NotFoundPost *FeedDefs_NotFoundPost 386 + FeedDefs_BlockedPost *FeedDefs_BlockedPost 387 + } 388 + 389 + func (t *FeedDefs_ThreadViewPost_Parent) MarshalJSON() ([]byte, error) { 390 + if t.FeedDefs_ThreadViewPost != nil { 391 + t.FeedDefs_ThreadViewPost.LexiconTypeID = "app.bsky.feed.defs#threadViewPost" 392 + return json.Marshal(t.FeedDefs_ThreadViewPost) 393 + } 394 + if t.FeedDefs_NotFoundPost != nil { 395 + t.FeedDefs_NotFoundPost.LexiconTypeID = "app.bsky.feed.defs#notFoundPost" 396 + return json.Marshal(t.FeedDefs_NotFoundPost) 397 + } 398 + if t.FeedDefs_BlockedPost != nil { 399 + t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" 400 + return json.Marshal(t.FeedDefs_BlockedPost) 401 + } 402 + return nil, fmt.Errorf("cannot marshal empty enum") 403 + } 404 + func (t *FeedDefs_ThreadViewPost_Parent) UnmarshalJSON(b []byte) error { 405 + typ, err := util.TypeExtract(b) 406 + if err != nil { 407 + return err 408 + } 409 + 410 + switch typ { 411 + case "app.bsky.feed.defs#threadViewPost": 412 + t.FeedDefs_ThreadViewPost = new(FeedDefs_ThreadViewPost) 413 + return json.Unmarshal(b, t.FeedDefs_ThreadViewPost) 414 + case "app.bsky.feed.defs#notFoundPost": 415 + t.FeedDefs_NotFoundPost = new(FeedDefs_NotFoundPost) 416 + return json.Unmarshal(b, t.FeedDefs_NotFoundPost) 417 + case "app.bsky.feed.defs#blockedPost": 418 + t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) 419 + return json.Unmarshal(b, t.FeedDefs_BlockedPost) 420 + 421 + default: 422 + return nil 423 + } 424 + } 425 + 426 + type FeedDefs_ThreadViewPost_Replies_Elem struct { 427 + FeedDefs_ThreadViewPost *FeedDefs_ThreadViewPost 428 + FeedDefs_NotFoundPost *FeedDefs_NotFoundPost 429 + FeedDefs_BlockedPost *FeedDefs_BlockedPost 430 + } 431 + 432 + func (t *FeedDefs_ThreadViewPost_Replies_Elem) MarshalJSON() ([]byte, error) { 433 + if t.FeedDefs_ThreadViewPost != nil { 434 + t.FeedDefs_ThreadViewPost.LexiconTypeID = "app.bsky.feed.defs#threadViewPost" 435 + return json.Marshal(t.FeedDefs_ThreadViewPost) 436 + } 437 + if t.FeedDefs_NotFoundPost != nil { 438 + t.FeedDefs_NotFoundPost.LexiconTypeID = "app.bsky.feed.defs#notFoundPost" 439 + return json.Marshal(t.FeedDefs_NotFoundPost) 440 + } 441 + if t.FeedDefs_BlockedPost != nil { 442 + t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" 443 + return json.Marshal(t.FeedDefs_BlockedPost) 444 + } 445 + return nil, fmt.Errorf("cannot marshal empty enum") 446 + } 447 + func (t *FeedDefs_ThreadViewPost_Replies_Elem) UnmarshalJSON(b []byte) error { 448 + typ, err := util.TypeExtract(b) 449 + if err != nil { 450 + return err 451 + } 452 + 453 + switch typ { 454 + case "app.bsky.feed.defs#threadViewPost": 455 + t.FeedDefs_ThreadViewPost = new(FeedDefs_ThreadViewPost) 456 + return json.Unmarshal(b, t.FeedDefs_ThreadViewPost) 457 + case "app.bsky.feed.defs#notFoundPost": 458 + t.FeedDefs_NotFoundPost = new(FeedDefs_NotFoundPost) 459 + return json.Unmarshal(b, t.FeedDefs_NotFoundPost) 460 + case "app.bsky.feed.defs#blockedPost": 461 + t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) 462 + return json.Unmarshal(b, t.FeedDefs_BlockedPost) 463 + 464 + default: 465 + return nil 466 + } 467 + } 468 + 469 + // FeedDefs_ThreadgateView is a "threadgateView" in the app.bsky.feed.defs schema. 470 + type FeedDefs_ThreadgateView struct { 471 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 472 + Lists []*GraphDefs_ListViewBasic `json:"lists,omitempty" cborgen:"lists,omitempty"` 473 + Record *util.LexiconTypeDecoder `json:"record,omitempty" cborgen:"record,omitempty"` 474 + Uri *string `json:"uri,omitempty" cborgen:"uri,omitempty"` 475 + } 476 + 477 + // FeedDefs_ViewerState is a "viewerState" in the app.bsky.feed.defs schema. 478 + // 479 + // Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. 480 + type FeedDefs_ViewerState struct { 481 + EmbeddingDisabled *bool `json:"embeddingDisabled,omitempty" cborgen:"embeddingDisabled,omitempty"` 482 + Like *string `json:"like,omitempty" cborgen:"like,omitempty"` 483 + Pinned *bool `json:"pinned,omitempty" cborgen:"pinned,omitempty"` 484 + ReplyDisabled *bool `json:"replyDisabled,omitempty" cborgen:"replyDisabled,omitempty"` 485 + Repost *string `json:"repost,omitempty" cborgen:"repost,omitempty"` 486 + ThreadMuted *bool `json:"threadMuted,omitempty" cborgen:"threadMuted,omitempty"` 487 + }
+39
api/bsky/feeddescribeFeedGenerator.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.describeFeedGenerator 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedDescribeFeedGenerator_Feed is a "feed" in the app.bsky.feed.describeFeedGenerator schema. 14 + type FeedDescribeFeedGenerator_Feed struct { 15 + Uri string `json:"uri" cborgen:"uri"` 16 + } 17 + 18 + // FeedDescribeFeedGenerator_Links is a "links" in the app.bsky.feed.describeFeedGenerator schema. 19 + type FeedDescribeFeedGenerator_Links struct { 20 + PrivacyPolicy *string `json:"privacyPolicy,omitempty" cborgen:"privacyPolicy,omitempty"` 21 + TermsOfService *string `json:"termsOfService,omitempty" cborgen:"termsOfService,omitempty"` 22 + } 23 + 24 + // FeedDescribeFeedGenerator_Output is the output of a app.bsky.feed.describeFeedGenerator call. 25 + type FeedDescribeFeedGenerator_Output struct { 26 + Did string `json:"did" cborgen:"did"` 27 + Feeds []*FeedDescribeFeedGenerator_Feed `json:"feeds" cborgen:"feeds"` 28 + Links *FeedDescribeFeedGenerator_Links `json:"links,omitempty" cborgen:"links,omitempty"` 29 + } 30 + 31 + // FeedDescribeFeedGenerator calls the XRPC method "app.bsky.feed.describeFeedGenerator". 32 + func FeedDescribeFeedGenerator(ctx context.Context, c *xrpc.Client) (*FeedDescribeFeedGenerator_Output, error) { 33 + var out FeedDescribeFeedGenerator_Output 34 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.describeFeedGenerator", nil, nil, &out); err != nil { 35 + return nil, err 36 + } 37 + 38 + return &out, nil 39 + }
+90
api/bsky/feedgenerator.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.generator 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 14 + "github.com/bluesky-social/indigo/lex/util" 15 + cbg "github.com/whyrusleeping/cbor-gen" 16 + ) 17 + 18 + func init() { 19 + util.RegisterType("app.bsky.feed.generator", &FeedGenerator{}) 20 + } // 21 + // RECORDTYPE: FeedGenerator 22 + type FeedGenerator struct { 23 + LexiconTypeID string `json:"$type,const=app.bsky.feed.generator" cborgen:"$type,const=app.bsky.feed.generator"` 24 + // acceptsInteractions: Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions 25 + AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` 26 + Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 27 + ContentMode *string `json:"contentMode,omitempty" cborgen:"contentMode,omitempty"` 28 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 29 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 30 + DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 31 + Did string `json:"did" cborgen:"did"` 32 + DisplayName string `json:"displayName" cborgen:"displayName"` 33 + // labels: Self-label values 34 + Labels *FeedGenerator_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` 35 + } 36 + 37 + // Self-label values 38 + type FeedGenerator_Labels struct { 39 + LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels 40 + } 41 + 42 + func (t *FeedGenerator_Labels) MarshalJSON() ([]byte, error) { 43 + if t.LabelDefs_SelfLabels != nil { 44 + t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" 45 + return json.Marshal(t.LabelDefs_SelfLabels) 46 + } 47 + return nil, fmt.Errorf("cannot marshal empty enum") 48 + } 49 + func (t *FeedGenerator_Labels) UnmarshalJSON(b []byte) error { 50 + typ, err := util.TypeExtract(b) 51 + if err != nil { 52 + return err 53 + } 54 + 55 + switch typ { 56 + case "com.atproto.label.defs#selfLabels": 57 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 58 + return json.Unmarshal(b, t.LabelDefs_SelfLabels) 59 + 60 + default: 61 + return nil 62 + } 63 + } 64 + 65 + func (t *FeedGenerator_Labels) MarshalCBOR(w io.Writer) error { 66 + 67 + if t == nil { 68 + _, err := w.Write(cbg.CborNull) 69 + return err 70 + } 71 + if t.LabelDefs_SelfLabels != nil { 72 + return t.LabelDefs_SelfLabels.MarshalCBOR(w) 73 + } 74 + return fmt.Errorf("cannot cbor marshal empty enum") 75 + } 76 + func (t *FeedGenerator_Labels) UnmarshalCBOR(r io.Reader) error { 77 + typ, b, err := util.CborTypeExtractReader(r) 78 + if err != nil { 79 + return err 80 + } 81 + 82 + switch typ { 83 + case "com.atproto.label.defs#selfLabels": 84 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 85 + return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) 86 + 87 + default: 88 + return nil 89 + } 90 + }
+33
api/bsky/feedgetActorFeeds.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getActorFeeds 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetActorFeeds_Output is the output of a app.bsky.feed.getActorFeeds call. 14 + type FeedGetActorFeeds_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feeds []*FeedDefs_GeneratorView `json:"feeds" cborgen:"feeds"` 17 + } 18 + 19 + // FeedGetActorFeeds calls the XRPC method "app.bsky.feed.getActorFeeds". 20 + func FeedGetActorFeeds(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*FeedGetActorFeeds_Output, error) { 21 + var out FeedGetActorFeeds_Output 22 + 23 + params := map[string]interface{}{ 24 + "actor": actor, 25 + "cursor": cursor, 26 + "limit": limit, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getActorFeeds", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+33
api/bsky/feedgetActorLikes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getActorLikes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetActorLikes_Output is the output of a app.bsky.feed.getActorLikes call. 14 + type FeedGetActorLikes_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"` 17 + } 18 + 19 + // FeedGetActorLikes calls the XRPC method "app.bsky.feed.getActorLikes". 20 + func FeedGetActorLikes(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*FeedGetActorLikes_Output, error) { 21 + var out FeedGetActorLikes_Output 22 + 23 + params := map[string]interface{}{ 24 + "actor": actor, 25 + "cursor": cursor, 26 + "limit": limit, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getActorLikes", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+37
api/bsky/feedgetAuthorFeed.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getAuthorFeed 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetAuthorFeed_Output is the output of a app.bsky.feed.getAuthorFeed call. 14 + type FeedGetAuthorFeed_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"` 17 + } 18 + 19 + // FeedGetAuthorFeed calls the XRPC method "app.bsky.feed.getAuthorFeed". 20 + // 21 + // filter: Combinations of post/repost types to include in response. 22 + func FeedGetAuthorFeed(ctx context.Context, c *xrpc.Client, actor string, cursor string, filter string, includePins bool, limit int64) (*FeedGetAuthorFeed_Output, error) { 23 + var out FeedGetAuthorFeed_Output 24 + 25 + params := map[string]interface{}{ 26 + "actor": actor, 27 + "cursor": cursor, 28 + "filter": filter, 29 + "includePins": includePins, 30 + "limit": limit, 31 + } 32 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getAuthorFeed", params, nil, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+33
api/bsky/feedgetFeed.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getFeed 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetFeed_Output is the output of a app.bsky.feed.getFeed call. 14 + type FeedGetFeed_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"` 17 + } 18 + 19 + // FeedGetFeed calls the XRPC method "app.bsky.feed.getFeed". 20 + func FeedGetFeed(ctx context.Context, c *xrpc.Client, cursor string, feed string, limit int64) (*FeedGetFeed_Output, error) { 21 + var out FeedGetFeed_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "feed": feed, 26 + "limit": limit, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeed", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+36
api/bsky/feedgetFeedGenerator.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getFeedGenerator 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetFeedGenerator_Output is the output of a app.bsky.feed.getFeedGenerator call. 14 + type FeedGetFeedGenerator_Output struct { 15 + // isOnline: Indicates whether the feed generator service has been online recently, or else seems to be inactive. 16 + IsOnline bool `json:"isOnline" cborgen:"isOnline"` 17 + // isValid: Indicates whether the feed generator service is compatible with the record declaration. 18 + IsValid bool `json:"isValid" cborgen:"isValid"` 19 + View *FeedDefs_GeneratorView `json:"view" cborgen:"view"` 20 + } 21 + 22 + // FeedGetFeedGenerator calls the XRPC method "app.bsky.feed.getFeedGenerator". 23 + // 24 + // feed: AT-URI of the feed generator record. 25 + func FeedGetFeedGenerator(ctx context.Context, c *xrpc.Client, feed string) (*FeedGetFeedGenerator_Output, error) { 26 + var out FeedGetFeedGenerator_Output 27 + 28 + params := map[string]interface{}{ 29 + "feed": feed, 30 + } 31 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeedGenerator", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+30
api/bsky/feedgetFeedGenerators.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getFeedGenerators 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetFeedGenerators_Output is the output of a app.bsky.feed.getFeedGenerators call. 14 + type FeedGetFeedGenerators_Output struct { 15 + Feeds []*FeedDefs_GeneratorView `json:"feeds" cborgen:"feeds"` 16 + } 17 + 18 + // FeedGetFeedGenerators calls the XRPC method "app.bsky.feed.getFeedGenerators". 19 + func FeedGetFeedGenerators(ctx context.Context, c *xrpc.Client, feeds []string) (*FeedGetFeedGenerators_Output, error) { 20 + var out FeedGetFeedGenerators_Output 21 + 22 + params := map[string]interface{}{ 23 + "feeds": feeds, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeedGenerators", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+35
api/bsky/feedgetFeedSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getFeedSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetFeedSkeleton_Output is the output of a app.bsky.feed.getFeedSkeleton call. 14 + type FeedGetFeedSkeleton_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feed []*FeedDefs_SkeletonFeedPost `json:"feed" cborgen:"feed"` 17 + } 18 + 19 + // FeedGetFeedSkeleton calls the XRPC method "app.bsky.feed.getFeedSkeleton". 20 + // 21 + // feed: Reference to feed generator record describing the specific feed being requested. 22 + func FeedGetFeedSkeleton(ctx context.Context, c *xrpc.Client, cursor string, feed string, limit int64) (*FeedGetFeedSkeleton_Output, error) { 23 + var out FeedGetFeedSkeleton_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "feed": feed, 28 + "limit": limit, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getFeedSkeleton", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+46
api/bsky/feedgetLikes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getLikes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetLikes_Like is a "like" in the app.bsky.feed.getLikes schema. 14 + type FeedGetLikes_Like struct { 15 + Actor *ActorDefs_ProfileView `json:"actor" cborgen:"actor"` 16 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 17 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 18 + } 19 + 20 + // FeedGetLikes_Output is the output of a app.bsky.feed.getLikes call. 21 + type FeedGetLikes_Output struct { 22 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 23 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 24 + Likes []*FeedGetLikes_Like `json:"likes" cborgen:"likes"` 25 + Uri string `json:"uri" cborgen:"uri"` 26 + } 27 + 28 + // FeedGetLikes calls the XRPC method "app.bsky.feed.getLikes". 29 + // 30 + // cid: CID of the subject record (aka, specific version of record), to filter likes. 31 + // uri: AT-URI of the subject (eg, a post record). 32 + func FeedGetLikes(ctx context.Context, c *xrpc.Client, cid string, cursor string, limit int64, uri string) (*FeedGetLikes_Output, error) { 33 + var out FeedGetLikes_Output 34 + 35 + params := map[string]interface{}{ 36 + "cid": cid, 37 + "cursor": cursor, 38 + "limit": limit, 39 + "uri": uri, 40 + } 41 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getLikes", params, nil, &out); err != nil { 42 + return nil, err 43 + } 44 + 45 + return &out, nil 46 + }
+35
api/bsky/feedgetListFeed.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getListFeed 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetListFeed_Output is the output of a app.bsky.feed.getListFeed call. 14 + type FeedGetListFeed_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"` 17 + } 18 + 19 + // FeedGetListFeed calls the XRPC method "app.bsky.feed.getListFeed". 20 + // 21 + // list: Reference (AT-URI) to the list record. 22 + func FeedGetListFeed(ctx context.Context, c *xrpc.Client, cursor string, limit int64, list string) (*FeedGetListFeed_Output, error) { 23 + var out FeedGetListFeed_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "limit": limit, 28 + "list": list, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getListFeed", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+83
api/bsky/feedgetPostThread.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getPostThread 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // FeedGetPostThread_Output is the output of a app.bsky.feed.getPostThread call. 17 + type FeedGetPostThread_Output struct { 18 + Thread *FeedGetPostThread_Output_Thread `json:"thread" cborgen:"thread"` 19 + Threadgate *FeedDefs_ThreadgateView `json:"threadgate,omitempty" cborgen:"threadgate,omitempty"` 20 + } 21 + 22 + type FeedGetPostThread_Output_Thread struct { 23 + FeedDefs_ThreadViewPost *FeedDefs_ThreadViewPost 24 + FeedDefs_NotFoundPost *FeedDefs_NotFoundPost 25 + FeedDefs_BlockedPost *FeedDefs_BlockedPost 26 + } 27 + 28 + func (t *FeedGetPostThread_Output_Thread) MarshalJSON() ([]byte, error) { 29 + if t.FeedDefs_ThreadViewPost != nil { 30 + t.FeedDefs_ThreadViewPost.LexiconTypeID = "app.bsky.feed.defs#threadViewPost" 31 + return json.Marshal(t.FeedDefs_ThreadViewPost) 32 + } 33 + if t.FeedDefs_NotFoundPost != nil { 34 + t.FeedDefs_NotFoundPost.LexiconTypeID = "app.bsky.feed.defs#notFoundPost" 35 + return json.Marshal(t.FeedDefs_NotFoundPost) 36 + } 37 + if t.FeedDefs_BlockedPost != nil { 38 + t.FeedDefs_BlockedPost.LexiconTypeID = "app.bsky.feed.defs#blockedPost" 39 + return json.Marshal(t.FeedDefs_BlockedPost) 40 + } 41 + return nil, fmt.Errorf("cannot marshal empty enum") 42 + } 43 + func (t *FeedGetPostThread_Output_Thread) UnmarshalJSON(b []byte) error { 44 + typ, err := util.TypeExtract(b) 45 + if err != nil { 46 + return err 47 + } 48 + 49 + switch typ { 50 + case "app.bsky.feed.defs#threadViewPost": 51 + t.FeedDefs_ThreadViewPost = new(FeedDefs_ThreadViewPost) 52 + return json.Unmarshal(b, t.FeedDefs_ThreadViewPost) 53 + case "app.bsky.feed.defs#notFoundPost": 54 + t.FeedDefs_NotFoundPost = new(FeedDefs_NotFoundPost) 55 + return json.Unmarshal(b, t.FeedDefs_NotFoundPost) 56 + case "app.bsky.feed.defs#blockedPost": 57 + t.FeedDefs_BlockedPost = new(FeedDefs_BlockedPost) 58 + return json.Unmarshal(b, t.FeedDefs_BlockedPost) 59 + 60 + default: 61 + return nil 62 + } 63 + } 64 + 65 + // FeedGetPostThread calls the XRPC method "app.bsky.feed.getPostThread". 66 + // 67 + // depth: How many levels of reply depth should be included in response. 68 + // parentHeight: How many levels of parent (and grandparent, etc) post to include. 69 + // uri: Reference (AT-URI) to post record. 70 + func FeedGetPostThread(ctx context.Context, c *xrpc.Client, depth int64, parentHeight int64, uri string) (*FeedGetPostThread_Output, error) { 71 + var out FeedGetPostThread_Output 72 + 73 + params := map[string]interface{}{ 74 + "depth": depth, 75 + "parentHeight": parentHeight, 76 + "uri": uri, 77 + } 78 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getPostThread", params, nil, &out); err != nil { 79 + return nil, err 80 + } 81 + 82 + return &out, nil 83 + }
+32
api/bsky/feedgetPosts.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getPosts 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetPosts_Output is the output of a app.bsky.feed.getPosts call. 14 + type FeedGetPosts_Output struct { 15 + Posts []*FeedDefs_PostView `json:"posts" cborgen:"posts"` 16 + } 17 + 18 + // FeedGetPosts calls the XRPC method "app.bsky.feed.getPosts". 19 + // 20 + // uris: List of post AT-URIs to return hydrated views for. 21 + func FeedGetPosts(ctx context.Context, c *xrpc.Client, uris []string) (*FeedGetPosts_Output, error) { 22 + var out FeedGetPosts_Output 23 + 24 + params := map[string]interface{}{ 25 + "uris": uris, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getPosts", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+39
api/bsky/feedgetQuotes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getQuotes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetQuotes_Output is the output of a app.bsky.feed.getQuotes call. 14 + type FeedGetQuotes_Output struct { 15 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + Posts []*FeedDefs_PostView `json:"posts" cborgen:"posts"` 18 + Uri string `json:"uri" cborgen:"uri"` 19 + } 20 + 21 + // FeedGetQuotes calls the XRPC method "app.bsky.feed.getQuotes". 22 + // 23 + // cid: If supplied, filters to quotes of specific version (by CID) of the post record. 24 + // uri: Reference (AT-URI) of post record 25 + func FeedGetQuotes(ctx context.Context, c *xrpc.Client, cid string, cursor string, limit int64, uri string) (*FeedGetQuotes_Output, error) { 26 + var out FeedGetQuotes_Output 27 + 28 + params := map[string]interface{}{ 29 + "cid": cid, 30 + "cursor": cursor, 31 + "limit": limit, 32 + "uri": uri, 33 + } 34 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getQuotes", params, nil, &out); err != nil { 35 + return nil, err 36 + } 37 + 38 + return &out, nil 39 + }
+39
api/bsky/feedgetRepostedBy.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getRepostedBy 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetRepostedBy_Output is the output of a app.bsky.feed.getRepostedBy call. 14 + type FeedGetRepostedBy_Output struct { 15 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + RepostedBy []*ActorDefs_ProfileView `json:"repostedBy" cborgen:"repostedBy"` 18 + Uri string `json:"uri" cborgen:"uri"` 19 + } 20 + 21 + // FeedGetRepostedBy calls the XRPC method "app.bsky.feed.getRepostedBy". 22 + // 23 + // cid: If supplied, filters to reposts of specific version (by CID) of the post record. 24 + // uri: Reference (AT-URI) of post record 25 + func FeedGetRepostedBy(ctx context.Context, c *xrpc.Client, cid string, cursor string, limit int64, uri string) (*FeedGetRepostedBy_Output, error) { 26 + var out FeedGetRepostedBy_Output 27 + 28 + params := map[string]interface{}{ 29 + "cid": cid, 30 + "cursor": cursor, 31 + "limit": limit, 32 + "uri": uri, 33 + } 34 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getRepostedBy", params, nil, &out); err != nil { 35 + return nil, err 36 + } 37 + 38 + return &out, nil 39 + }
+32
api/bsky/feedgetSuggestedFeeds.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getSuggestedFeeds 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetSuggestedFeeds_Output is the output of a app.bsky.feed.getSuggestedFeeds call. 14 + type FeedGetSuggestedFeeds_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feeds []*FeedDefs_GeneratorView `json:"feeds" cborgen:"feeds"` 17 + } 18 + 19 + // FeedGetSuggestedFeeds calls the XRPC method "app.bsky.feed.getSuggestedFeeds". 20 + func FeedGetSuggestedFeeds(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*FeedGetSuggestedFeeds_Output, error) { 21 + var out FeedGetSuggestedFeeds_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getSuggestedFeeds", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+35
api/bsky/feedgetTimeline.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getTimeline 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetTimeline_Output is the output of a app.bsky.feed.getTimeline call. 14 + type FeedGetTimeline_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"` 17 + } 18 + 19 + // FeedGetTimeline calls the XRPC method "app.bsky.feed.getTimeline". 20 + // 21 + // algorithm: Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. 22 + func FeedGetTimeline(ctx context.Context, c *xrpc.Client, algorithm string, cursor string, limit int64) (*FeedGetTimeline_Output, error) { 23 + var out FeedGetTimeline_Output 24 + 25 + params := map[string]interface{}{ 26 + "algorithm": algorithm, 27 + "cursor": cursor, 28 + "limit": limit, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getTimeline", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+20
api/bsky/feedlike.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.like 6 + 7 + import ( 8 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 9 + "github.com/bluesky-social/indigo/lex/util" 10 + ) 11 + 12 + func init() { 13 + util.RegisterType("app.bsky.feed.like", &FeedLike{}) 14 + } // 15 + // RECORDTYPE: FeedLike 16 + type FeedLike struct { 17 + LexiconTypeID string `json:"$type,const=app.bsky.feed.like" cborgen:"$type,const=app.bsky.feed.like"` 18 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 19 + Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` 20 + }
+229
api/bsky/feedpost.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.post 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 14 + "github.com/bluesky-social/indigo/lex/util" 15 + cbg "github.com/whyrusleeping/cbor-gen" 16 + ) 17 + 18 + func init() { 19 + util.RegisterType("app.bsky.feed.post", &FeedPost{}) 20 + } // 21 + // RECORDTYPE: FeedPost 22 + type FeedPost struct { 23 + LexiconTypeID string `json:"$type,const=app.bsky.feed.post" cborgen:"$type,const=app.bsky.feed.post"` 24 + // createdAt: Client-declared timestamp when this post was originally created. 25 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 26 + Embed *FeedPost_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 27 + // entities: DEPRECATED: replaced by app.bsky.richtext.facet. 28 + Entities []*FeedPost_Entity `json:"entities,omitempty" cborgen:"entities,omitempty"` 29 + // facets: Annotations of text (mentions, URLs, hashtags, etc) 30 + Facets []*RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` 31 + // labels: Self-label values for this post. Effectively content warnings. 32 + Labels *FeedPost_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` 33 + // langs: Indicates human language of post primary text content. 34 + Langs []string `json:"langs,omitempty" cborgen:"langs,omitempty"` 35 + Reply *FeedPost_ReplyRef `json:"reply,omitempty" cborgen:"reply,omitempty"` 36 + // tags: Additional hashtags, in addition to any included in post text and facets. 37 + Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 38 + // text: The primary post content. May be an empty string, if there are embeds. 39 + Text string `json:"text" cborgen:"text"` 40 + } 41 + 42 + type FeedPost_Embed struct { 43 + EmbedImages *EmbedImages 44 + EmbedVideo *EmbedVideo 45 + EmbedExternal *EmbedExternal 46 + EmbedRecord *EmbedRecord 47 + EmbedRecordWithMedia *EmbedRecordWithMedia 48 + } 49 + 50 + func (t *FeedPost_Embed) MarshalJSON() ([]byte, error) { 51 + if t.EmbedImages != nil { 52 + t.EmbedImages.LexiconTypeID = "app.bsky.embed.images" 53 + return json.Marshal(t.EmbedImages) 54 + } 55 + if t.EmbedVideo != nil { 56 + t.EmbedVideo.LexiconTypeID = "app.bsky.embed.video" 57 + return json.Marshal(t.EmbedVideo) 58 + } 59 + if t.EmbedExternal != nil { 60 + t.EmbedExternal.LexiconTypeID = "app.bsky.embed.external" 61 + return json.Marshal(t.EmbedExternal) 62 + } 63 + if t.EmbedRecord != nil { 64 + t.EmbedRecord.LexiconTypeID = "app.bsky.embed.record" 65 + return json.Marshal(t.EmbedRecord) 66 + } 67 + if t.EmbedRecordWithMedia != nil { 68 + t.EmbedRecordWithMedia.LexiconTypeID = "app.bsky.embed.recordWithMedia" 69 + return json.Marshal(t.EmbedRecordWithMedia) 70 + } 71 + return nil, fmt.Errorf("cannot marshal empty enum") 72 + } 73 + func (t *FeedPost_Embed) UnmarshalJSON(b []byte) error { 74 + typ, err := util.TypeExtract(b) 75 + if err != nil { 76 + return err 77 + } 78 + 79 + switch typ { 80 + case "app.bsky.embed.images": 81 + t.EmbedImages = new(EmbedImages) 82 + return json.Unmarshal(b, t.EmbedImages) 83 + case "app.bsky.embed.video": 84 + t.EmbedVideo = new(EmbedVideo) 85 + return json.Unmarshal(b, t.EmbedVideo) 86 + case "app.bsky.embed.external": 87 + t.EmbedExternal = new(EmbedExternal) 88 + return json.Unmarshal(b, t.EmbedExternal) 89 + case "app.bsky.embed.record": 90 + t.EmbedRecord = new(EmbedRecord) 91 + return json.Unmarshal(b, t.EmbedRecord) 92 + case "app.bsky.embed.recordWithMedia": 93 + t.EmbedRecordWithMedia = new(EmbedRecordWithMedia) 94 + return json.Unmarshal(b, t.EmbedRecordWithMedia) 95 + 96 + default: 97 + return nil 98 + } 99 + } 100 + 101 + func (t *FeedPost_Embed) MarshalCBOR(w io.Writer) error { 102 + 103 + if t == nil { 104 + _, err := w.Write(cbg.CborNull) 105 + return err 106 + } 107 + if t.EmbedImages != nil { 108 + return t.EmbedImages.MarshalCBOR(w) 109 + } 110 + if t.EmbedVideo != nil { 111 + return t.EmbedVideo.MarshalCBOR(w) 112 + } 113 + if t.EmbedExternal != nil { 114 + return t.EmbedExternal.MarshalCBOR(w) 115 + } 116 + if t.EmbedRecord != nil { 117 + return t.EmbedRecord.MarshalCBOR(w) 118 + } 119 + if t.EmbedRecordWithMedia != nil { 120 + return t.EmbedRecordWithMedia.MarshalCBOR(w) 121 + } 122 + return fmt.Errorf("cannot cbor marshal empty enum") 123 + } 124 + func (t *FeedPost_Embed) UnmarshalCBOR(r io.Reader) error { 125 + typ, b, err := util.CborTypeExtractReader(r) 126 + if err != nil { 127 + return err 128 + } 129 + 130 + switch typ { 131 + case "app.bsky.embed.images": 132 + t.EmbedImages = new(EmbedImages) 133 + return t.EmbedImages.UnmarshalCBOR(bytes.NewReader(b)) 134 + case "app.bsky.embed.video": 135 + t.EmbedVideo = new(EmbedVideo) 136 + return t.EmbedVideo.UnmarshalCBOR(bytes.NewReader(b)) 137 + case "app.bsky.embed.external": 138 + t.EmbedExternal = new(EmbedExternal) 139 + return t.EmbedExternal.UnmarshalCBOR(bytes.NewReader(b)) 140 + case "app.bsky.embed.record": 141 + t.EmbedRecord = new(EmbedRecord) 142 + return t.EmbedRecord.UnmarshalCBOR(bytes.NewReader(b)) 143 + case "app.bsky.embed.recordWithMedia": 144 + t.EmbedRecordWithMedia = new(EmbedRecordWithMedia) 145 + return t.EmbedRecordWithMedia.UnmarshalCBOR(bytes.NewReader(b)) 146 + 147 + default: 148 + return nil 149 + } 150 + } 151 + 152 + // FeedPost_Entity is a "entity" in the app.bsky.feed.post schema. 153 + // 154 + // Deprecated: use facets instead. 155 + type FeedPost_Entity struct { 156 + Index *FeedPost_TextSlice `json:"index" cborgen:"index"` 157 + // type: Expected values are 'mention' and 'link'. 158 + Type string `json:"type" cborgen:"type"` 159 + Value string `json:"value" cborgen:"value"` 160 + } 161 + 162 + // Self-label values for this post. Effectively content warnings. 163 + type FeedPost_Labels struct { 164 + LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels 165 + } 166 + 167 + func (t *FeedPost_Labels) MarshalJSON() ([]byte, error) { 168 + if t.LabelDefs_SelfLabels != nil { 169 + t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" 170 + return json.Marshal(t.LabelDefs_SelfLabels) 171 + } 172 + return nil, fmt.Errorf("cannot marshal empty enum") 173 + } 174 + func (t *FeedPost_Labels) UnmarshalJSON(b []byte) error { 175 + typ, err := util.TypeExtract(b) 176 + if err != nil { 177 + return err 178 + } 179 + 180 + switch typ { 181 + case "com.atproto.label.defs#selfLabels": 182 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 183 + return json.Unmarshal(b, t.LabelDefs_SelfLabels) 184 + 185 + default: 186 + return nil 187 + } 188 + } 189 + 190 + func (t *FeedPost_Labels) MarshalCBOR(w io.Writer) error { 191 + 192 + if t == nil { 193 + _, err := w.Write(cbg.CborNull) 194 + return err 195 + } 196 + if t.LabelDefs_SelfLabels != nil { 197 + return t.LabelDefs_SelfLabels.MarshalCBOR(w) 198 + } 199 + return fmt.Errorf("cannot cbor marshal empty enum") 200 + } 201 + func (t *FeedPost_Labels) UnmarshalCBOR(r io.Reader) error { 202 + typ, b, err := util.CborTypeExtractReader(r) 203 + if err != nil { 204 + return err 205 + } 206 + 207 + switch typ { 208 + case "com.atproto.label.defs#selfLabels": 209 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 210 + return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) 211 + 212 + default: 213 + return nil 214 + } 215 + } 216 + 217 + // FeedPost_ReplyRef is a "replyRef" in the app.bsky.feed.post schema. 218 + type FeedPost_ReplyRef struct { 219 + Parent *comatprototypes.RepoStrongRef `json:"parent" cborgen:"parent"` 220 + Root *comatprototypes.RepoStrongRef `json:"root" cborgen:"root"` 221 + } 222 + 223 + // FeedPost_TextSlice is a "textSlice" in the app.bsky.feed.post schema. 224 + // 225 + // Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. 226 + type FeedPost_TextSlice struct { 227 + End int64 `json:"end" cborgen:"end"` 228 + Start int64 `json:"start" cborgen:"start"` 229 + }
+93
api/bsky/feedpostgate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.postgate 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + "github.com/bluesky-social/indigo/lex/util" 14 + cbg "github.com/whyrusleeping/cbor-gen" 15 + ) 16 + 17 + func init() { 18 + util.RegisterType("app.bsky.feed.postgate", &FeedPostgate{}) 19 + } // 20 + // RECORDTYPE: FeedPostgate 21 + type FeedPostgate struct { 22 + LexiconTypeID string `json:"$type,const=app.bsky.feed.postgate" cborgen:"$type,const=app.bsky.feed.postgate"` 23 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 24 + // detachedEmbeddingUris: List of AT-URIs embedding this post that the author has detached from. 25 + DetachedEmbeddingUris []string `json:"detachedEmbeddingUris,omitempty" cborgen:"detachedEmbeddingUris,omitempty"` 26 + // embeddingRules: List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. 27 + EmbeddingRules []*FeedPostgate_EmbeddingRules_Elem `json:"embeddingRules,omitempty" cborgen:"embeddingRules,omitempty"` 28 + // post: Reference (AT-URI) to the post record. 29 + Post string `json:"post" cborgen:"post"` 30 + } 31 + 32 + // FeedPostgate_DisableRule is a "disableRule" in the app.bsky.feed.postgate schema. 33 + // 34 + // Disables embedding of this post. 35 + // 36 + // RECORDTYPE: FeedPostgate_DisableRule 37 + type FeedPostgate_DisableRule struct { 38 + LexiconTypeID string `json:"$type,const=app.bsky.feed.postgate#disableRule" cborgen:"$type,const=app.bsky.feed.postgate#disableRule"` 39 + } 40 + 41 + type FeedPostgate_EmbeddingRules_Elem struct { 42 + FeedPostgate_DisableRule *FeedPostgate_DisableRule 43 + } 44 + 45 + func (t *FeedPostgate_EmbeddingRules_Elem) MarshalJSON() ([]byte, error) { 46 + if t.FeedPostgate_DisableRule != nil { 47 + t.FeedPostgate_DisableRule.LexiconTypeID = "app.bsky.feed.postgate#disableRule" 48 + return json.Marshal(t.FeedPostgate_DisableRule) 49 + } 50 + return nil, fmt.Errorf("cannot marshal empty enum") 51 + } 52 + func (t *FeedPostgate_EmbeddingRules_Elem) 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.postgate#disableRule": 60 + t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) 61 + return json.Unmarshal(b, t.FeedPostgate_DisableRule) 62 + 63 + default: 64 + return nil 65 + } 66 + } 67 + 68 + func (t *FeedPostgate_EmbeddingRules_Elem) MarshalCBOR(w io.Writer) error { 69 + 70 + if t == nil { 71 + _, err := w.Write(cbg.CborNull) 72 + return err 73 + } 74 + if t.FeedPostgate_DisableRule != nil { 75 + return t.FeedPostgate_DisableRule.MarshalCBOR(w) 76 + } 77 + return fmt.Errorf("cannot cbor marshal empty enum") 78 + } 79 + func (t *FeedPostgate_EmbeddingRules_Elem) UnmarshalCBOR(r io.Reader) error { 80 + typ, b, err := util.CborTypeExtractReader(r) 81 + if err != nil { 82 + return err 83 + } 84 + 85 + switch typ { 86 + case "app.bsky.feed.postgate#disableRule": 87 + t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) 88 + return t.FeedPostgate_DisableRule.UnmarshalCBOR(bytes.NewReader(b)) 89 + 90 + default: 91 + return nil 92 + } 93 + }
+20
api/bsky/feedrepost.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.repost 6 + 7 + import ( 8 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 9 + "github.com/bluesky-social/indigo/lex/util" 10 + ) 11 + 12 + func init() { 13 + util.RegisterType("app.bsky.feed.repost", &FeedRepost{}) 14 + } // 15 + // RECORDTYPE: FeedRepost 16 + type FeedRepost struct { 17 + LexiconTypeID string `json:"$type,const=app.bsky.feed.repost" cborgen:"$type,const=app.bsky.feed.repost"` 18 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 19 + Subject *comatprototypes.RepoStrongRef `json:"subject" cborgen:"subject"` 20 + }
+56
api/bsky/feedsearchPosts.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.searchPosts 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedSearchPosts_Output is the output of a app.bsky.feed.searchPosts call. 14 + type FeedSearchPosts_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + // hitsTotal: Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. 17 + HitsTotal *int64 `json:"hitsTotal,omitempty" cborgen:"hitsTotal,omitempty"` 18 + Posts []*FeedDefs_PostView `json:"posts" cborgen:"posts"` 19 + } 20 + 21 + // FeedSearchPosts calls the XRPC method "app.bsky.feed.searchPosts". 22 + // 23 + // author: Filter to posts by the given account. Handles are resolved to DID before query-time. 24 + // cursor: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. 25 + // domain: Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. 26 + // lang: Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. 27 + // mentions: Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. 28 + // q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. 29 + // since: Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). 30 + // sort: Specifies the ranking order of results. 31 + // tag: Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. 32 + // until: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). 33 + // url: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. 34 + func FeedSearchPosts(ctx context.Context, c *xrpc.Client, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string) (*FeedSearchPosts_Output, error) { 35 + var out FeedSearchPosts_Output 36 + 37 + params := map[string]interface{}{ 38 + "author": author, 39 + "cursor": cursor, 40 + "domain": domain, 41 + "lang": lang, 42 + "limit": limit, 43 + "mentions": mentions, 44 + "q": q, 45 + "since": since, 46 + "sort": sort, 47 + "tag": tag, 48 + "until": until, 49 + "url": url, 50 + } 51 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.searchPosts", params, nil, &out); err != nil { 52 + return nil, err 53 + } 54 + 55 + return &out, nil 56 + }
+30
api/bsky/feedsendInteractions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.sendInteractions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedSendInteractions_Input is the input argument to a app.bsky.feed.sendInteractions call. 14 + type FeedSendInteractions_Input struct { 15 + Interactions []*FeedDefs_Interaction `json:"interactions" cborgen:"interactions"` 16 + } 17 + 18 + // FeedSendInteractions_Output is the output of a app.bsky.feed.sendInteractions call. 19 + type FeedSendInteractions_Output struct { 20 + } 21 + 22 + // FeedSendInteractions calls the XRPC method "app.bsky.feed.sendInteractions". 23 + func FeedSendInteractions(ctx context.Context, c *xrpc.Client, input *FeedSendInteractions_Input) (*FeedSendInteractions_Output, error) { 24 + var out FeedSendInteractions_Output 25 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.feed.sendInteractions", nil, input, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+163
api/bsky/feedthreadgate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.threadgate 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + "github.com/bluesky-social/indigo/lex/util" 14 + cbg "github.com/whyrusleeping/cbor-gen" 15 + ) 16 + 17 + func init() { 18 + util.RegisterType("app.bsky.feed.threadgate", &FeedThreadgate{}) 19 + } // 20 + // RECORDTYPE: FeedThreadgate 21 + type FeedThreadgate struct { 22 + LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate" cborgen:"$type,const=app.bsky.feed.threadgate"` 23 + // allow: List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. 24 + Allow []*FeedThreadgate_Allow_Elem `json:"allow,omitempty" cborgen:"allow,omitempty"` 25 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 26 + // hiddenReplies: List of hidden reply URIs. 27 + HiddenReplies []string `json:"hiddenReplies,omitempty" cborgen:"hiddenReplies,omitempty"` 28 + // post: Reference (AT-URI) to the post record. 29 + Post string `json:"post" cborgen:"post"` 30 + } 31 + 32 + type FeedThreadgate_Allow_Elem struct { 33 + FeedThreadgate_MentionRule *FeedThreadgate_MentionRule 34 + FeedThreadgate_FollowerRule *FeedThreadgate_FollowerRule 35 + FeedThreadgate_FollowingRule *FeedThreadgate_FollowingRule 36 + FeedThreadgate_ListRule *FeedThreadgate_ListRule 37 + } 38 + 39 + func (t *FeedThreadgate_Allow_Elem) MarshalJSON() ([]byte, error) { 40 + if t.FeedThreadgate_MentionRule != nil { 41 + t.FeedThreadgate_MentionRule.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule" 42 + return json.Marshal(t.FeedThreadgate_MentionRule) 43 + } 44 + if t.FeedThreadgate_FollowerRule != nil { 45 + t.FeedThreadgate_FollowerRule.LexiconTypeID = "app.bsky.feed.threadgate#followerRule" 46 + return json.Marshal(t.FeedThreadgate_FollowerRule) 47 + } 48 + if t.FeedThreadgate_FollowingRule != nil { 49 + t.FeedThreadgate_FollowingRule.LexiconTypeID = "app.bsky.feed.threadgate#followingRule" 50 + return json.Marshal(t.FeedThreadgate_FollowingRule) 51 + } 52 + if t.FeedThreadgate_ListRule != nil { 53 + t.FeedThreadgate_ListRule.LexiconTypeID = "app.bsky.feed.threadgate#listRule" 54 + return json.Marshal(t.FeedThreadgate_ListRule) 55 + } 56 + return nil, fmt.Errorf("cannot marshal empty enum") 57 + } 58 + func (t *FeedThreadgate_Allow_Elem) UnmarshalJSON(b []byte) error { 59 + typ, err := util.TypeExtract(b) 60 + if err != nil { 61 + return err 62 + } 63 + 64 + switch typ { 65 + case "app.bsky.feed.threadgate#mentionRule": 66 + t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) 67 + return json.Unmarshal(b, t.FeedThreadgate_MentionRule) 68 + case "app.bsky.feed.threadgate#followerRule": 69 + t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) 70 + return json.Unmarshal(b, t.FeedThreadgate_FollowerRule) 71 + case "app.bsky.feed.threadgate#followingRule": 72 + t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) 73 + return json.Unmarshal(b, t.FeedThreadgate_FollowingRule) 74 + case "app.bsky.feed.threadgate#listRule": 75 + t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) 76 + return json.Unmarshal(b, t.FeedThreadgate_ListRule) 77 + 78 + default: 79 + return nil 80 + } 81 + } 82 + 83 + func (t *FeedThreadgate_Allow_Elem) MarshalCBOR(w io.Writer) error { 84 + 85 + if t == nil { 86 + _, err := w.Write(cbg.CborNull) 87 + return err 88 + } 89 + if t.FeedThreadgate_MentionRule != nil { 90 + return t.FeedThreadgate_MentionRule.MarshalCBOR(w) 91 + } 92 + if t.FeedThreadgate_FollowerRule != nil { 93 + return t.FeedThreadgate_FollowerRule.MarshalCBOR(w) 94 + } 95 + if t.FeedThreadgate_FollowingRule != nil { 96 + return t.FeedThreadgate_FollowingRule.MarshalCBOR(w) 97 + } 98 + if t.FeedThreadgate_ListRule != nil { 99 + return t.FeedThreadgate_ListRule.MarshalCBOR(w) 100 + } 101 + return fmt.Errorf("cannot cbor marshal empty enum") 102 + } 103 + func (t *FeedThreadgate_Allow_Elem) UnmarshalCBOR(r io.Reader) error { 104 + typ, b, err := util.CborTypeExtractReader(r) 105 + if err != nil { 106 + return err 107 + } 108 + 109 + switch typ { 110 + case "app.bsky.feed.threadgate#mentionRule": 111 + t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) 112 + return t.FeedThreadgate_MentionRule.UnmarshalCBOR(bytes.NewReader(b)) 113 + case "app.bsky.feed.threadgate#followerRule": 114 + t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) 115 + return t.FeedThreadgate_FollowerRule.UnmarshalCBOR(bytes.NewReader(b)) 116 + case "app.bsky.feed.threadgate#followingRule": 117 + t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) 118 + return t.FeedThreadgate_FollowingRule.UnmarshalCBOR(bytes.NewReader(b)) 119 + case "app.bsky.feed.threadgate#listRule": 120 + t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) 121 + return t.FeedThreadgate_ListRule.UnmarshalCBOR(bytes.NewReader(b)) 122 + 123 + default: 124 + return nil 125 + } 126 + } 127 + 128 + // FeedThreadgate_FollowerRule is a "followerRule" in the app.bsky.feed.threadgate schema. 129 + // 130 + // Allow replies from actors who follow you. 131 + // 132 + // RECORDTYPE: FeedThreadgate_FollowerRule 133 + type FeedThreadgate_FollowerRule struct { 134 + LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#followerRule" cborgen:"$type,const=app.bsky.feed.threadgate#followerRule"` 135 + } 136 + 137 + // FeedThreadgate_FollowingRule is a "followingRule" in the app.bsky.feed.threadgate schema. 138 + // 139 + // Allow replies from actors you follow. 140 + // 141 + // RECORDTYPE: FeedThreadgate_FollowingRule 142 + type FeedThreadgate_FollowingRule struct { 143 + LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#followingRule" cborgen:"$type,const=app.bsky.feed.threadgate#followingRule"` 144 + } 145 + 146 + // FeedThreadgate_ListRule is a "listRule" in the app.bsky.feed.threadgate schema. 147 + // 148 + // Allow replies from actors on a list. 149 + // 150 + // RECORDTYPE: FeedThreadgate_ListRule 151 + type FeedThreadgate_ListRule struct { 152 + LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#listRule" cborgen:"$type,const=app.bsky.feed.threadgate#listRule"` 153 + List string `json:"list" cborgen:"list"` 154 + } 155 + 156 + // FeedThreadgate_MentionRule is a "mentionRule" in the app.bsky.feed.threadgate schema. 157 + // 158 + // Allow replies from actors mentioned in your post. 159 + // 160 + // RECORDTYPE: FeedThreadgate_MentionRule 161 + type FeedThreadgate_MentionRule struct { 162 + LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#mentionRule" cborgen:"$type,const=app.bsky.feed.threadgate#mentionRule"` 163 + }
+20
api/bsky/graphblock.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.block 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.graph.block", &GraphBlock{}) 13 + } // 14 + // RECORDTYPE: GraphBlock 15 + type GraphBlock struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.graph.block" cborgen:"$type,const=app.bsky.graph.block"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + // subject: DID of the account to be blocked. 19 + Subject string `json:"subject" cborgen:"subject"` 20 + }
+110
api/bsky/graphdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.defs 6 + 7 + import ( 8 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 9 + "github.com/bluesky-social/indigo/lex/util" 10 + ) 11 + 12 + // GraphDefs_ListItemView is a "listItemView" in the app.bsky.graph.defs schema. 13 + type GraphDefs_ListItemView struct { 14 + Subject *ActorDefs_ProfileView `json:"subject" cborgen:"subject"` 15 + Uri string `json:"uri" cborgen:"uri"` 16 + } 17 + 18 + // GraphDefs_ListView is a "listView" in the app.bsky.graph.defs schema. 19 + // 20 + // RECORDTYPE: GraphDefs_ListView 21 + type GraphDefs_ListView struct { 22 + LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#listView" cborgen:"$type,const=app.bsky.graph.defs#listView"` 23 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 24 + Cid string `json:"cid" cborgen:"cid"` 25 + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` 26 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 27 + DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 28 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 29 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 30 + ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` 31 + Name string `json:"name" cborgen:"name"` 32 + Purpose *string `json:"purpose" cborgen:"purpose"` 33 + Uri string `json:"uri" cborgen:"uri"` 34 + Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 35 + } 36 + 37 + // GraphDefs_ListViewBasic is a "listViewBasic" in the app.bsky.graph.defs schema. 38 + type GraphDefs_ListViewBasic struct { 39 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 40 + Cid string `json:"cid" cborgen:"cid"` 41 + IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` 42 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 43 + ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` 44 + Name string `json:"name" cborgen:"name"` 45 + Purpose *string `json:"purpose" cborgen:"purpose"` 46 + Uri string `json:"uri" cborgen:"uri"` 47 + Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 48 + } 49 + 50 + // GraphDefs_ListViewerState is a "listViewerState" in the app.bsky.graph.defs schema. 51 + type GraphDefs_ListViewerState struct { 52 + Blocked *string `json:"blocked,omitempty" cborgen:"blocked,omitempty"` 53 + Muted *bool `json:"muted,omitempty" cborgen:"muted,omitempty"` 54 + } 55 + 56 + // GraphDefs_NotFoundActor is a "notFoundActor" in the app.bsky.graph.defs schema. 57 + // 58 + // indicates that a handle or DID could not be resolved 59 + // 60 + // RECORDTYPE: GraphDefs_NotFoundActor 61 + type GraphDefs_NotFoundActor struct { 62 + LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#notFoundActor" cborgen:"$type,const=app.bsky.graph.defs#notFoundActor"` 63 + Actor string `json:"actor" cborgen:"actor"` 64 + NotFound bool `json:"notFound" cborgen:"notFound"` 65 + } 66 + 67 + // GraphDefs_Relationship is a "relationship" in the app.bsky.graph.defs schema. 68 + // 69 + // lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) 70 + // 71 + // RECORDTYPE: GraphDefs_Relationship 72 + type GraphDefs_Relationship struct { 73 + LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#relationship" cborgen:"$type,const=app.bsky.graph.defs#relationship"` 74 + Did string `json:"did" cborgen:"did"` 75 + // followedBy: if the actor is followed by this DID, contains the AT-URI of the follow record 76 + FollowedBy *string `json:"followedBy,omitempty" cborgen:"followedBy,omitempty"` 77 + // following: if the actor follows this DID, this is the AT-URI of the follow record 78 + Following *string `json:"following,omitempty" cborgen:"following,omitempty"` 79 + } 80 + 81 + // GraphDefs_StarterPackView is a "starterPackView" in the app.bsky.graph.defs schema. 82 + type GraphDefs_StarterPackView struct { 83 + Cid string `json:"cid" cborgen:"cid"` 84 + Creator *ActorDefs_ProfileViewBasic `json:"creator" cborgen:"creator"` 85 + Feeds []*FeedDefs_GeneratorView `json:"feeds,omitempty" cborgen:"feeds,omitempty"` 86 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 87 + JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty" cborgen:"joinedAllTimeCount,omitempty"` 88 + JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty" cborgen:"joinedWeekCount,omitempty"` 89 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 90 + List *GraphDefs_ListViewBasic `json:"list,omitempty" cborgen:"list,omitempty"` 91 + ListItemsSample []*GraphDefs_ListItemView `json:"listItemsSample,omitempty" cborgen:"listItemsSample,omitempty"` 92 + Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 93 + Uri string `json:"uri" cborgen:"uri"` 94 + } 95 + 96 + // GraphDefs_StarterPackViewBasic is a "starterPackViewBasic" in the app.bsky.graph.defs schema. 97 + // 98 + // RECORDTYPE: GraphDefs_StarterPackViewBasic 99 + type GraphDefs_StarterPackViewBasic struct { 100 + LexiconTypeID string `json:"$type,const=app.bsky.graph.defs#starterPackViewBasic" cborgen:"$type,const=app.bsky.graph.defs#starterPackViewBasic"` 101 + Cid string `json:"cid" cborgen:"cid"` 102 + Creator *ActorDefs_ProfileViewBasic `json:"creator" cborgen:"creator"` 103 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 104 + JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty" cborgen:"joinedAllTimeCount,omitempty"` 105 + JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty" cborgen:"joinedWeekCount,omitempty"` 106 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 107 + ListItemCount *int64 `json:"listItemCount,omitempty" cborgen:"listItemCount,omitempty"` 108 + Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 109 + Uri string `json:"uri" cborgen:"uri"` 110 + }
+19
api/bsky/graphfollow.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.follow 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.graph.follow", &GraphFollow{}) 13 + } // 14 + // RECORDTYPE: GraphFollow 15 + type GraphFollow struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.graph.follow" cborgen:"$type,const=app.bsky.graph.follow"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + Subject string `json:"subject" cborgen:"subject"` 19 + }
+33
api/bsky/graphgetActorStarterPacks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getActorStarterPacks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetActorStarterPacks_Output is the output of a app.bsky.graph.getActorStarterPacks call. 14 + type GraphGetActorStarterPacks_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + StarterPacks []*GraphDefs_StarterPackViewBasic `json:"starterPacks" cborgen:"starterPacks"` 17 + } 18 + 19 + // GraphGetActorStarterPacks calls the XRPC method "app.bsky.graph.getActorStarterPacks". 20 + func GraphGetActorStarterPacks(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetActorStarterPacks_Output, error) { 21 + var out GraphGetActorStarterPacks_Output 22 + 23 + params := map[string]interface{}{ 24 + "actor": actor, 25 + "cursor": cursor, 26 + "limit": limit, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getActorStarterPacks", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+32
api/bsky/graphgetBlocks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getBlocks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetBlocks_Output is the output of a app.bsky.graph.getBlocks call. 14 + type GraphGetBlocks_Output struct { 15 + Blocks []*ActorDefs_ProfileView `json:"blocks" cborgen:"blocks"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // GraphGetBlocks calls the XRPC method "app.bsky.graph.getBlocks". 20 + func GraphGetBlocks(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetBlocks_Output, error) { 21 + var out GraphGetBlocks_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getBlocks", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+34
api/bsky/graphgetFollowers.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getFollowers 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetFollowers_Output is the output of a app.bsky.graph.getFollowers call. 14 + type GraphGetFollowers_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Followers []*ActorDefs_ProfileView `json:"followers" cborgen:"followers"` 17 + Subject *ActorDefs_ProfileView `json:"subject" cborgen:"subject"` 18 + } 19 + 20 + // GraphGetFollowers calls the XRPC method "app.bsky.graph.getFollowers". 21 + func GraphGetFollowers(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetFollowers_Output, error) { 22 + var out GraphGetFollowers_Output 23 + 24 + params := map[string]interface{}{ 25 + "actor": actor, 26 + "cursor": cursor, 27 + "limit": limit, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getFollowers", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+34
api/bsky/graphgetFollows.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getFollows 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetFollows_Output is the output of a app.bsky.graph.getFollows call. 14 + type GraphGetFollows_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Follows []*ActorDefs_ProfileView `json:"follows" cborgen:"follows"` 17 + Subject *ActorDefs_ProfileView `json:"subject" cborgen:"subject"` 18 + } 19 + 20 + // GraphGetFollows calls the XRPC method "app.bsky.graph.getFollows". 21 + func GraphGetFollows(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetFollows_Output, error) { 22 + var out GraphGetFollows_Output 23 + 24 + params := map[string]interface{}{ 25 + "actor": actor, 26 + "cursor": cursor, 27 + "limit": limit, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getFollows", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+34
api/bsky/graphgetKnownFollowers.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getKnownFollowers 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetKnownFollowers_Output is the output of a app.bsky.graph.getKnownFollowers call. 14 + type GraphGetKnownFollowers_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Followers []*ActorDefs_ProfileView `json:"followers" cborgen:"followers"` 17 + Subject *ActorDefs_ProfileView `json:"subject" cborgen:"subject"` 18 + } 19 + 20 + // GraphGetKnownFollowers calls the XRPC method "app.bsky.graph.getKnownFollowers". 21 + func GraphGetKnownFollowers(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetKnownFollowers_Output, error) { 22 + var out GraphGetKnownFollowers_Output 23 + 24 + params := map[string]interface{}{ 25 + "actor": actor, 26 + "cursor": cursor, 27 + "limit": limit, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getKnownFollowers", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+36
api/bsky/graphgetList.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getList 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetList_Output is the output of a app.bsky.graph.getList call. 14 + type GraphGetList_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Items []*GraphDefs_ListItemView `json:"items" cborgen:"items"` 17 + List *GraphDefs_ListView `json:"list" cborgen:"list"` 18 + } 19 + 20 + // GraphGetList calls the XRPC method "app.bsky.graph.getList". 21 + // 22 + // list: Reference (AT-URI) of the list record to hydrate. 23 + func GraphGetList(ctx context.Context, c *xrpc.Client, cursor string, limit int64, list string) (*GraphGetList_Output, error) { 24 + var out GraphGetList_Output 25 + 26 + params := map[string]interface{}{ 27 + "cursor": cursor, 28 + "limit": limit, 29 + "list": list, 30 + } 31 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getList", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+32
api/bsky/graphgetListBlocks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getListBlocks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetListBlocks_Output is the output of a app.bsky.graph.getListBlocks call. 14 + type GraphGetListBlocks_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Lists []*GraphDefs_ListView `json:"lists" cborgen:"lists"` 17 + } 18 + 19 + // GraphGetListBlocks calls the XRPC method "app.bsky.graph.getListBlocks". 20 + func GraphGetListBlocks(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetListBlocks_Output, error) { 21 + var out GraphGetListBlocks_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getListBlocks", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+32
api/bsky/graphgetListMutes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getListMutes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetListMutes_Output is the output of a app.bsky.graph.getListMutes call. 14 + type GraphGetListMutes_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Lists []*GraphDefs_ListView `json:"lists" cborgen:"lists"` 17 + } 18 + 19 + // GraphGetListMutes calls the XRPC method "app.bsky.graph.getListMutes". 20 + func GraphGetListMutes(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetListMutes_Output, error) { 21 + var out GraphGetListMutes_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getListMutes", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+35
api/bsky/graphgetLists.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getLists 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetLists_Output is the output of a app.bsky.graph.getLists call. 14 + type GraphGetLists_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Lists []*GraphDefs_ListView `json:"lists" cborgen:"lists"` 17 + } 18 + 19 + // GraphGetLists calls the XRPC method "app.bsky.graph.getLists". 20 + // 21 + // actor: The account (actor) to enumerate lists from. 22 + func GraphGetLists(ctx context.Context, c *xrpc.Client, actor string, cursor string, limit int64) (*GraphGetLists_Output, error) { 23 + var out GraphGetLists_Output 24 + 25 + params := map[string]interface{}{ 26 + "actor": actor, 27 + "cursor": cursor, 28 + "limit": limit, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getLists", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+32
api/bsky/graphgetMutes.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getMutes 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetMutes_Output is the output of a app.bsky.graph.getMutes call. 14 + type GraphGetMutes_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Mutes []*ActorDefs_ProfileView `json:"mutes" cborgen:"mutes"` 17 + } 18 + 19 + // GraphGetMutes calls the XRPC method "app.bsky.graph.getMutes". 20 + func GraphGetMutes(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*GraphGetMutes_Output, error) { 21 + var out GraphGetMutes_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getMutes", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+73
api/bsky/graphgetRelationships.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getRelationships 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // GraphGetRelationships_Output is the output of a app.bsky.graph.getRelationships call. 17 + type GraphGetRelationships_Output struct { 18 + Actor *string `json:"actor,omitempty" cborgen:"actor,omitempty"` 19 + Relationships []*GraphGetRelationships_Output_Relationships_Elem `json:"relationships" cborgen:"relationships"` 20 + } 21 + 22 + type GraphGetRelationships_Output_Relationships_Elem struct { 23 + GraphDefs_Relationship *GraphDefs_Relationship 24 + GraphDefs_NotFoundActor *GraphDefs_NotFoundActor 25 + } 26 + 27 + func (t *GraphGetRelationships_Output_Relationships_Elem) MarshalJSON() ([]byte, error) { 28 + if t.GraphDefs_Relationship != nil { 29 + t.GraphDefs_Relationship.LexiconTypeID = "app.bsky.graph.defs#relationship" 30 + return json.Marshal(t.GraphDefs_Relationship) 31 + } 32 + if t.GraphDefs_NotFoundActor != nil { 33 + t.GraphDefs_NotFoundActor.LexiconTypeID = "app.bsky.graph.defs#notFoundActor" 34 + return json.Marshal(t.GraphDefs_NotFoundActor) 35 + } 36 + return nil, fmt.Errorf("cannot marshal empty enum") 37 + } 38 + func (t *GraphGetRelationships_Output_Relationships_Elem) UnmarshalJSON(b []byte) error { 39 + typ, err := util.TypeExtract(b) 40 + if err != nil { 41 + return err 42 + } 43 + 44 + switch typ { 45 + case "app.bsky.graph.defs#relationship": 46 + t.GraphDefs_Relationship = new(GraphDefs_Relationship) 47 + return json.Unmarshal(b, t.GraphDefs_Relationship) 48 + case "app.bsky.graph.defs#notFoundActor": 49 + t.GraphDefs_NotFoundActor = new(GraphDefs_NotFoundActor) 50 + return json.Unmarshal(b, t.GraphDefs_NotFoundActor) 51 + 52 + default: 53 + return nil 54 + } 55 + } 56 + 57 + // GraphGetRelationships calls the XRPC method "app.bsky.graph.getRelationships". 58 + // 59 + // actor: Primary account requesting relationships for. 60 + // others: List of 'other' accounts to be related back to the primary. 61 + func GraphGetRelationships(ctx context.Context, c *xrpc.Client, actor string, others []string) (*GraphGetRelationships_Output, error) { 62 + var out GraphGetRelationships_Output 63 + 64 + params := map[string]interface{}{ 65 + "actor": actor, 66 + "others": others, 67 + } 68 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getRelationships", params, nil, &out); err != nil { 69 + return nil, err 70 + } 71 + 72 + return &out, nil 73 + }
+32
api/bsky/graphgetStarterPack.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getStarterPack 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetStarterPack_Output is the output of a app.bsky.graph.getStarterPack call. 14 + type GraphGetStarterPack_Output struct { 15 + StarterPack *GraphDefs_StarterPackView `json:"starterPack" cborgen:"starterPack"` 16 + } 17 + 18 + // GraphGetStarterPack calls the XRPC method "app.bsky.graph.getStarterPack". 19 + // 20 + // starterPack: Reference (AT-URI) of the starter pack record. 21 + func GraphGetStarterPack(ctx context.Context, c *xrpc.Client, starterPack string) (*GraphGetStarterPack_Output, error) { 22 + var out GraphGetStarterPack_Output 23 + 24 + params := map[string]interface{}{ 25 + "starterPack": starterPack, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getStarterPack", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+30
api/bsky/graphgetStarterPacks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getStarterPacks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetStarterPacks_Output is the output of a app.bsky.graph.getStarterPacks call. 14 + type GraphGetStarterPacks_Output struct { 15 + StarterPacks []*GraphDefs_StarterPackViewBasic `json:"starterPacks" cborgen:"starterPacks"` 16 + } 17 + 18 + // GraphGetStarterPacks calls the XRPC method "app.bsky.graph.getStarterPacks". 19 + func GraphGetStarterPacks(ctx context.Context, c *xrpc.Client, uris []string) (*GraphGetStarterPacks_Output, error) { 20 + var out GraphGetStarterPacks_Output 21 + 22 + params := map[string]interface{}{ 23 + "uris": uris, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getStarterPacks", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+34
api/bsky/graphgetSuggestedFollowsByActor.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getSuggestedFollowsByActor 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetSuggestedFollowsByActor_Output is the output of a app.bsky.graph.getSuggestedFollowsByActor call. 14 + type GraphGetSuggestedFollowsByActor_Output struct { 15 + // isFallback: If true, response has fallen-back to generic results, and is not scoped using relativeToDid 16 + IsFallback *bool `json:"isFallback,omitempty" cborgen:"isFallback,omitempty"` 17 + // recId: Snowflake for this recommendation, use when submitting recommendation events. 18 + RecId *int64 `json:"recId,omitempty" cborgen:"recId,omitempty"` 19 + Suggestions []*ActorDefs_ProfileView `json:"suggestions" cborgen:"suggestions"` 20 + } 21 + 22 + // GraphGetSuggestedFollowsByActor calls the XRPC method "app.bsky.graph.getSuggestedFollowsByActor". 23 + func GraphGetSuggestedFollowsByActor(ctx context.Context, c *xrpc.Client, actor string) (*GraphGetSuggestedFollowsByActor_Output, error) { 24 + var out GraphGetSuggestedFollowsByActor_Output 25 + 26 + params := map[string]interface{}{ 27 + "actor": actor, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getSuggestedFollowsByActor", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+87
api/bsky/graphlist.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.list 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 14 + "github.com/bluesky-social/indigo/lex/util" 15 + cbg "github.com/whyrusleeping/cbor-gen" 16 + ) 17 + 18 + func init() { 19 + util.RegisterType("app.bsky.graph.list", &GraphList{}) 20 + } // 21 + // RECORDTYPE: GraphList 22 + type GraphList struct { 23 + LexiconTypeID string `json:"$type,const=app.bsky.graph.list" cborgen:"$type,const=app.bsky.graph.list"` 24 + Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 25 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 26 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 27 + DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 28 + Labels *GraphList_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` 29 + // name: Display name for list; can not be empty. 30 + Name string `json:"name" cborgen:"name"` 31 + // purpose: Defines the purpose of the list (aka, moderation-oriented or curration-oriented) 32 + Purpose *string `json:"purpose" cborgen:"purpose"` 33 + } 34 + 35 + type GraphList_Labels struct { 36 + LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels 37 + } 38 + 39 + func (t *GraphList_Labels) MarshalJSON() ([]byte, error) { 40 + if t.LabelDefs_SelfLabels != nil { 41 + t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" 42 + return json.Marshal(t.LabelDefs_SelfLabels) 43 + } 44 + return nil, fmt.Errorf("cannot marshal empty enum") 45 + } 46 + func (t *GraphList_Labels) UnmarshalJSON(b []byte) error { 47 + typ, err := util.TypeExtract(b) 48 + if err != nil { 49 + return err 50 + } 51 + 52 + switch typ { 53 + case "com.atproto.label.defs#selfLabels": 54 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 55 + return json.Unmarshal(b, t.LabelDefs_SelfLabels) 56 + 57 + default: 58 + return nil 59 + } 60 + } 61 + 62 + func (t *GraphList_Labels) MarshalCBOR(w io.Writer) error { 63 + 64 + if t == nil { 65 + _, err := w.Write(cbg.CborNull) 66 + return err 67 + } 68 + if t.LabelDefs_SelfLabels != nil { 69 + return t.LabelDefs_SelfLabels.MarshalCBOR(w) 70 + } 71 + return fmt.Errorf("cannot cbor marshal empty enum") 72 + } 73 + func (t *GraphList_Labels) UnmarshalCBOR(r io.Reader) error { 74 + typ, b, err := util.CborTypeExtractReader(r) 75 + if err != nil { 76 + return err 77 + } 78 + 79 + switch typ { 80 + case "com.atproto.label.defs#selfLabels": 81 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 82 + return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) 83 + 84 + default: 85 + return nil 86 + } 87 + }
+20
api/bsky/graphlistblock.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.listblock 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.graph.listblock", &GraphListblock{}) 13 + } // 14 + // RECORDTYPE: GraphListblock 15 + type GraphListblock struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.graph.listblock" cborgen:"$type,const=app.bsky.graph.listblock"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + // subject: Reference (AT-URI) to the mod list record. 19 + Subject string `json:"subject" cborgen:"subject"` 20 + }
+22
api/bsky/graphlistitem.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.listitem 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.graph.listitem", &GraphListitem{}) 13 + } // 14 + // RECORDTYPE: GraphListitem 15 + type GraphListitem struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.graph.listitem" cborgen:"$type,const=app.bsky.graph.listitem"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + // list: Reference (AT-URI) to the list record (app.bsky.graph.list). 19 + List string `json:"list" cborgen:"list"` 20 + // subject: The account which is included on the list. 21 + Subject string `json:"subject" cborgen:"subject"` 22 + }
+25
api/bsky/graphmuteActor.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.muteActor 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphMuteActor_Input is the input argument to a app.bsky.graph.muteActor call. 14 + type GraphMuteActor_Input struct { 15 + Actor string `json:"actor" cborgen:"actor"` 16 + } 17 + 18 + // GraphMuteActor calls the XRPC method "app.bsky.graph.muteActor". 19 + func GraphMuteActor(ctx context.Context, c *xrpc.Client, input *GraphMuteActor_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.graph.muteActor", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+25
api/bsky/graphmuteActorList.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.muteActorList 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphMuteActorList_Input is the input argument to a app.bsky.graph.muteActorList call. 14 + type GraphMuteActorList_Input struct { 15 + List string `json:"list" cborgen:"list"` 16 + } 17 + 18 + // GraphMuteActorList calls the XRPC method "app.bsky.graph.muteActorList". 19 + func GraphMuteActorList(ctx context.Context, c *xrpc.Client, input *GraphMuteActorList_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.graph.muteActorList", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+25
api/bsky/graphmuteThread.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.muteThread 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphMuteThread_Input is the input argument to a app.bsky.graph.muteThread call. 14 + type GraphMuteThread_Input struct { 15 + Root string `json:"root" cborgen:"root"` 16 + } 17 + 18 + // GraphMuteThread calls the XRPC method "app.bsky.graph.muteThread". 19 + func GraphMuteThread(ctx context.Context, c *xrpc.Client, input *GraphMuteThread_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.graph.muteThread", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+35
api/bsky/graphsearchStarterPacks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.searchStarterPacks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphSearchStarterPacks_Output is the output of a app.bsky.graph.searchStarterPacks call. 14 + type GraphSearchStarterPacks_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + StarterPacks []*GraphDefs_StarterPackViewBasic `json:"starterPacks" cborgen:"starterPacks"` 17 + } 18 + 19 + // GraphSearchStarterPacks calls the XRPC method "app.bsky.graph.searchStarterPacks". 20 + // 21 + // q: Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. 22 + func GraphSearchStarterPacks(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string) (*GraphSearchStarterPacks_Output, error) { 23 + var out GraphSearchStarterPacks_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "limit": limit, 28 + "q": q, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.searchStarterPacks", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+30
api/bsky/graphstarterpack.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.starterpack 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.graph.starterpack", &GraphStarterpack{}) 13 + } // 14 + // RECORDTYPE: GraphStarterpack 15 + type GraphStarterpack struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.graph.starterpack" cborgen:"$type,const=app.bsky.graph.starterpack"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 19 + DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 20 + Feeds []*GraphStarterpack_FeedItem `json:"feeds,omitempty" cborgen:"feeds,omitempty"` 21 + // list: Reference (AT-URI) to the list record. 22 + List string `json:"list" cborgen:"list"` 23 + // name: Display name for starter pack; can not be empty. 24 + Name string `json:"name" cborgen:"name"` 25 + } 26 + 27 + // GraphStarterpack_FeedItem is a "feedItem" in the app.bsky.graph.starterpack schema. 28 + type GraphStarterpack_FeedItem struct { 29 + Uri string `json:"uri" cborgen:"uri"` 30 + }
+25
api/bsky/graphunmuteActor.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.unmuteActor 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphUnmuteActor_Input is the input argument to a app.bsky.graph.unmuteActor call. 14 + type GraphUnmuteActor_Input struct { 15 + Actor string `json:"actor" cborgen:"actor"` 16 + } 17 + 18 + // GraphUnmuteActor calls the XRPC method "app.bsky.graph.unmuteActor". 19 + func GraphUnmuteActor(ctx context.Context, c *xrpc.Client, input *GraphUnmuteActor_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.graph.unmuteActor", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+25
api/bsky/graphunmuteActorList.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.unmuteActorList 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphUnmuteActorList_Input is the input argument to a app.bsky.graph.unmuteActorList call. 14 + type GraphUnmuteActorList_Input struct { 15 + List string `json:"list" cborgen:"list"` 16 + } 17 + 18 + // GraphUnmuteActorList calls the XRPC method "app.bsky.graph.unmuteActorList". 19 + func GraphUnmuteActorList(ctx context.Context, c *xrpc.Client, input *GraphUnmuteActorList_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.graph.unmuteActorList", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+25
api/bsky/graphunmuteThread.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.unmuteThread 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphUnmuteThread_Input is the input argument to a app.bsky.graph.unmuteThread call. 14 + type GraphUnmuteThread_Input struct { 15 + Root string `json:"root" cborgen:"root"` 16 + } 17 + 18 + // GraphUnmuteThread calls the XRPC method "app.bsky.graph.unmuteThread". 19 + func GraphUnmuteThread(ctx context.Context, c *xrpc.Client, input *GraphUnmuteThread_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.graph.unmuteThread", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+25
api/bsky/graphverification.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.verification 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("app.bsky.graph.verification", &GraphVerification{}) 13 + } // 14 + // RECORDTYPE: GraphVerification 15 + type GraphVerification struct { 16 + LexiconTypeID string `json:"$type,const=app.bsky.graph.verification" cborgen:"$type,const=app.bsky.graph.verification"` 17 + // createdAt: Date of when the verification was created. 18 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 19 + // displayName: Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. 20 + DisplayName string `json:"displayName" cborgen:"displayName"` 21 + // handle: Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. 22 + Handle string `json:"handle" cborgen:"handle"` 23 + // subject: DID of the subject the verification applies to. 24 + Subject string `json:"subject" cborgen:"subject"` 25 + }
+57
api/bsky/labelerdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.labeler.defs 6 + 7 + import ( 8 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 9 + ) 10 + 11 + // LabelerDefs_LabelerPolicies is a "labelerPolicies" in the app.bsky.labeler.defs schema. 12 + type LabelerDefs_LabelerPolicies struct { 13 + // labelValueDefinitions: Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. 14 + LabelValueDefinitions []*comatprototypes.LabelDefs_LabelValueDefinition `json:"labelValueDefinitions,omitempty" cborgen:"labelValueDefinitions,omitempty"` 15 + // labelValues: The label values which this labeler publishes. May include global or custom labels. 16 + LabelValues []*string `json:"labelValues" cborgen:"labelValues"` 17 + } 18 + 19 + // LabelerDefs_LabelerView is a "labelerView" in the app.bsky.labeler.defs schema. 20 + // 21 + // RECORDTYPE: LabelerDefs_LabelerView 22 + type LabelerDefs_LabelerView struct { 23 + LexiconTypeID string `json:"$type,const=app.bsky.labeler.defs#labelerView" cborgen:"$type,const=app.bsky.labeler.defs#labelerView"` 24 + Cid string `json:"cid" cborgen:"cid"` 25 + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` 26 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 27 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 28 + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` 29 + Uri string `json:"uri" cborgen:"uri"` 30 + Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 31 + } 32 + 33 + // LabelerDefs_LabelerViewDetailed is a "labelerViewDetailed" in the app.bsky.labeler.defs schema. 34 + // 35 + // RECORDTYPE: LabelerDefs_LabelerViewDetailed 36 + type LabelerDefs_LabelerViewDetailed struct { 37 + LexiconTypeID string `json:"$type,const=app.bsky.labeler.defs#labelerViewDetailed" cborgen:"$type,const=app.bsky.labeler.defs#labelerViewDetailed"` 38 + Cid string `json:"cid" cborgen:"cid"` 39 + Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` 40 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 41 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 42 + LikeCount *int64 `json:"likeCount,omitempty" cborgen:"likeCount,omitempty"` 43 + Policies *LabelerDefs_LabelerPolicies `json:"policies" cborgen:"policies"` 44 + // reasonTypes: The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. 45 + ReasonTypes []*string `json:"reasonTypes,omitempty" cborgen:"reasonTypes,omitempty"` 46 + // subjectCollections: Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. 47 + SubjectCollections []string `json:"subjectCollections,omitempty" cborgen:"subjectCollections,omitempty"` 48 + // subjectTypes: The set of subject types (account, record, etc) this service accepts reports on. 49 + SubjectTypes []*string `json:"subjectTypes,omitempty" cborgen:"subjectTypes,omitempty"` 50 + Uri string `json:"uri" cborgen:"uri"` 51 + Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 52 + } 53 + 54 + // LabelerDefs_LabelerViewerState is a "labelerViewerState" in the app.bsky.labeler.defs schema. 55 + type LabelerDefs_LabelerViewerState struct { 56 + Like *string `json:"like,omitempty" cborgen:"like,omitempty"` 57 + }
+69
api/bsky/labelergetServices.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.labeler.getServices 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // LabelerGetServices_Output is the output of a app.bsky.labeler.getServices call. 17 + type LabelerGetServices_Output struct { 18 + Views []*LabelerGetServices_Output_Views_Elem `json:"views" cborgen:"views"` 19 + } 20 + 21 + type LabelerGetServices_Output_Views_Elem struct { 22 + LabelerDefs_LabelerView *LabelerDefs_LabelerView 23 + LabelerDefs_LabelerViewDetailed *LabelerDefs_LabelerViewDetailed 24 + } 25 + 26 + func (t *LabelerGetServices_Output_Views_Elem) MarshalJSON() ([]byte, error) { 27 + if t.LabelerDefs_LabelerView != nil { 28 + t.LabelerDefs_LabelerView.LexiconTypeID = "app.bsky.labeler.defs#labelerView" 29 + return json.Marshal(t.LabelerDefs_LabelerView) 30 + } 31 + if t.LabelerDefs_LabelerViewDetailed != nil { 32 + t.LabelerDefs_LabelerViewDetailed.LexiconTypeID = "app.bsky.labeler.defs#labelerViewDetailed" 33 + return json.Marshal(t.LabelerDefs_LabelerViewDetailed) 34 + } 35 + return nil, fmt.Errorf("cannot marshal empty enum") 36 + } 37 + func (t *LabelerGetServices_Output_Views_Elem) 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.labeler.defs#labelerView": 45 + t.LabelerDefs_LabelerView = new(LabelerDefs_LabelerView) 46 + return json.Unmarshal(b, t.LabelerDefs_LabelerView) 47 + case "app.bsky.labeler.defs#labelerViewDetailed": 48 + t.LabelerDefs_LabelerViewDetailed = new(LabelerDefs_LabelerViewDetailed) 49 + return json.Unmarshal(b, t.LabelerDefs_LabelerViewDetailed) 50 + 51 + default: 52 + return nil 53 + } 54 + } 55 + 56 + // LabelerGetServices calls the XRPC method "app.bsky.labeler.getServices". 57 + func LabelerGetServices(ctx context.Context, c *xrpc.Client, detailed bool, dids []string) (*LabelerGetServices_Output, error) { 58 + var out LabelerGetServices_Output 59 + 60 + params := map[string]interface{}{ 61 + "detailed": detailed, 62 + "dids": dids, 63 + } 64 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.labeler.getServices", params, nil, &out); err != nil { 65 + return nil, err 66 + } 67 + 68 + return &out, nil 69 + }
+87
api/bsky/labelerservice.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.labeler.service 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 14 + "github.com/bluesky-social/indigo/lex/util" 15 + cbg "github.com/whyrusleeping/cbor-gen" 16 + ) 17 + 18 + func init() { 19 + util.RegisterType("app.bsky.labeler.service", &LabelerService{}) 20 + } // 21 + // RECORDTYPE: LabelerService 22 + type LabelerService struct { 23 + LexiconTypeID string `json:"$type,const=app.bsky.labeler.service" cborgen:"$type,const=app.bsky.labeler.service"` 24 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 25 + Labels *LabelerService_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` 26 + Policies *LabelerDefs_LabelerPolicies `json:"policies" cborgen:"policies"` 27 + // reasonTypes: The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. 28 + ReasonTypes []*string `json:"reasonTypes,omitempty" cborgen:"reasonTypes,omitempty"` 29 + // subjectCollections: Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. 30 + SubjectCollections []string `json:"subjectCollections,omitempty" cborgen:"subjectCollections,omitempty"` 31 + // subjectTypes: The set of subject types (account, record, etc) this service accepts reports on. 32 + SubjectTypes []*string `json:"subjectTypes,omitempty" cborgen:"subjectTypes,omitempty"` 33 + } 34 + 35 + type LabelerService_Labels struct { 36 + LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels 37 + } 38 + 39 + func (t *LabelerService_Labels) MarshalJSON() ([]byte, error) { 40 + if t.LabelDefs_SelfLabels != nil { 41 + t.LabelDefs_SelfLabels.LexiconTypeID = "com.atproto.label.defs#selfLabels" 42 + return json.Marshal(t.LabelDefs_SelfLabels) 43 + } 44 + return nil, fmt.Errorf("cannot marshal empty enum") 45 + } 46 + func (t *LabelerService_Labels) UnmarshalJSON(b []byte) error { 47 + typ, err := util.TypeExtract(b) 48 + if err != nil { 49 + return err 50 + } 51 + 52 + switch typ { 53 + case "com.atproto.label.defs#selfLabels": 54 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 55 + return json.Unmarshal(b, t.LabelDefs_SelfLabels) 56 + 57 + default: 58 + return nil 59 + } 60 + } 61 + 62 + func (t *LabelerService_Labels) MarshalCBOR(w io.Writer) error { 63 + 64 + if t == nil { 65 + _, err := w.Write(cbg.CborNull) 66 + return err 67 + } 68 + if t.LabelDefs_SelfLabels != nil { 69 + return t.LabelDefs_SelfLabels.MarshalCBOR(w) 70 + } 71 + return fmt.Errorf("cannot cbor marshal empty enum") 72 + } 73 + func (t *LabelerService_Labels) UnmarshalCBOR(r io.Reader) error { 74 + typ, b, err := util.CborTypeExtractReader(r) 75 + if err != nil { 76 + return err 77 + } 78 + 79 + switch typ { 80 + case "com.atproto.label.defs#selfLabels": 81 + t.LabelDefs_SelfLabels = new(comatprototypes.LabelDefs_SelfLabels) 82 + return t.LabelDefs_SelfLabels.UnmarshalCBOR(bytes.NewReader(b)) 83 + 84 + default: 85 + return nil 86 + } 87 + }
+9
api/bsky/notificationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.defs 6 + 7 + // NotificationDefs_RecordDeleted is a "recordDeleted" in the app.bsky.notification.defs schema. 8 + type NotificationDefs_RecordDeleted struct { 9 + }
+31
api/bsky/notificationgetUnreadCount.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.getUnreadCount 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // NotificationGetUnreadCount_Output is the output of a app.bsky.notification.getUnreadCount call. 14 + type NotificationGetUnreadCount_Output struct { 15 + Count int64 `json:"count" cborgen:"count"` 16 + } 17 + 18 + // NotificationGetUnreadCount calls the XRPC method "app.bsky.notification.getUnreadCount". 19 + func NotificationGetUnreadCount(ctx context.Context, c *xrpc.Client, priority bool, seenAt string) (*NotificationGetUnreadCount_Output, error) { 20 + var out NotificationGetUnreadCount_Output 21 + 22 + params := map[string]interface{}{ 23 + "priority": priority, 24 + "seenAt": seenAt, 25 + } 26 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.notification.getUnreadCount", params, nil, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+55
api/bsky/notificationlistNotifications.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.listNotifications 6 + 7 + import ( 8 + "context" 9 + 10 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 11 + "github.com/bluesky-social/indigo/lex/util" 12 + "github.com/bluesky-social/indigo/xrpc" 13 + ) 14 + 15 + // NotificationListNotifications_Notification is a "notification" in the app.bsky.notification.listNotifications schema. 16 + type NotificationListNotifications_Notification struct { 17 + Author *ActorDefs_ProfileView `json:"author" cborgen:"author"` 18 + Cid string `json:"cid" cborgen:"cid"` 19 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 20 + IsRead bool `json:"isRead" cborgen:"isRead"` 21 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 22 + // reason: Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', 'starterpack-joined', 'verified', and 'unverified'. 23 + Reason string `json:"reason" cborgen:"reason"` 24 + ReasonSubject *string `json:"reasonSubject,omitempty" cborgen:"reasonSubject,omitempty"` 25 + Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"` 26 + Uri string `json:"uri" cborgen:"uri"` 27 + } 28 + 29 + // NotificationListNotifications_Output is the output of a app.bsky.notification.listNotifications call. 30 + type NotificationListNotifications_Output struct { 31 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 32 + Notifications []*NotificationListNotifications_Notification `json:"notifications" cborgen:"notifications"` 33 + Priority *bool `json:"priority,omitempty" cborgen:"priority,omitempty"` 34 + SeenAt *string `json:"seenAt,omitempty" cborgen:"seenAt,omitempty"` 35 + } 36 + 37 + // NotificationListNotifications calls the XRPC method "app.bsky.notification.listNotifications". 38 + // 39 + // reasons: Notification reasons to include in response. 40 + func NotificationListNotifications(ctx context.Context, c *xrpc.Client, cursor string, limit int64, priority bool, reasons []string, seenAt string) (*NotificationListNotifications_Output, error) { 41 + var out NotificationListNotifications_Output 42 + 43 + params := map[string]interface{}{ 44 + "cursor": cursor, 45 + "limit": limit, 46 + "priority": priority, 47 + "reasons": reasons, 48 + "seenAt": seenAt, 49 + } 50 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.notification.listNotifications", params, nil, &out); err != nil { 51 + return nil, err 52 + } 53 + 54 + return &out, nil 55 + }
+25
api/bsky/notificationputPreferences.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.putPreferences 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // NotificationPutPreferences_Input is the input argument to a app.bsky.notification.putPreferences call. 14 + type NotificationPutPreferences_Input struct { 15 + Priority bool `json:"priority" cborgen:"priority"` 16 + } 17 + 18 + // NotificationPutPreferences calls the XRPC method "app.bsky.notification.putPreferences". 19 + func NotificationPutPreferences(ctx context.Context, c *xrpc.Client, input *NotificationPutPreferences_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.notification.putPreferences", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+28
api/bsky/notificationregisterPush.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.registerPush 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // NotificationRegisterPush_Input is the input argument to a app.bsky.notification.registerPush call. 14 + type NotificationRegisterPush_Input struct { 15 + AppId string `json:"appId" cborgen:"appId"` 16 + Platform string `json:"platform" cborgen:"platform"` 17 + ServiceDid string `json:"serviceDid" cborgen:"serviceDid"` 18 + Token string `json:"token" cborgen:"token"` 19 + } 20 + 21 + // NotificationRegisterPush calls the XRPC method "app.bsky.notification.registerPush". 22 + func NotificationRegisterPush(ctx context.Context, c *xrpc.Client, input *NotificationRegisterPush_Input) error { 23 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.notification.registerPush", nil, input, nil); err != nil { 24 + return err 25 + } 26 + 27 + return nil 28 + }
+25
api/bsky/notificationupdateSeen.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.notification.updateSeen 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // NotificationUpdateSeen_Input is the input argument to a app.bsky.notification.updateSeen call. 14 + type NotificationUpdateSeen_Input struct { 15 + SeenAt string `json:"seenAt" cborgen:"seenAt"` 16 + } 17 + 18 + // NotificationUpdateSeen calls the XRPC method "app.bsky.notification.updateSeen". 19 + func NotificationUpdateSeen(ctx context.Context, c *xrpc.Client, input *NotificationUpdateSeen_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "app.bsky.notification.updateSeen", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+143
api/bsky/richtextfacet.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.richtext.facet 6 + 7 + import ( 8 + "bytes" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + 13 + "github.com/bluesky-social/indigo/lex/util" 14 + cbg "github.com/whyrusleeping/cbor-gen" 15 + ) 16 + 17 + // RichtextFacet is a "main" in the app.bsky.richtext.facet schema. 18 + // 19 + // Annotation of a sub-string within rich text. 20 + type RichtextFacet struct { 21 + Features []*RichtextFacet_Features_Elem `json:"features" cborgen:"features"` 22 + Index *RichtextFacet_ByteSlice `json:"index" cborgen:"index"` 23 + } 24 + 25 + // RichtextFacet_ByteSlice is a "byteSlice" in the app.bsky.richtext.facet schema. 26 + // 27 + // Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. 28 + type RichtextFacet_ByteSlice struct { 29 + ByteEnd int64 `json:"byteEnd" cborgen:"byteEnd"` 30 + ByteStart int64 `json:"byteStart" cborgen:"byteStart"` 31 + } 32 + 33 + type RichtextFacet_Features_Elem struct { 34 + RichtextFacet_Mention *RichtextFacet_Mention 35 + RichtextFacet_Link *RichtextFacet_Link 36 + RichtextFacet_Tag *RichtextFacet_Tag 37 + } 38 + 39 + func (t *RichtextFacet_Features_Elem) MarshalJSON() ([]byte, error) { 40 + if t.RichtextFacet_Mention != nil { 41 + t.RichtextFacet_Mention.LexiconTypeID = "app.bsky.richtext.facet#mention" 42 + return json.Marshal(t.RichtextFacet_Mention) 43 + } 44 + if t.RichtextFacet_Link != nil { 45 + t.RichtextFacet_Link.LexiconTypeID = "app.bsky.richtext.facet#link" 46 + return json.Marshal(t.RichtextFacet_Link) 47 + } 48 + if t.RichtextFacet_Tag != nil { 49 + t.RichtextFacet_Tag.LexiconTypeID = "app.bsky.richtext.facet#tag" 50 + return json.Marshal(t.RichtextFacet_Tag) 51 + } 52 + return nil, fmt.Errorf("cannot marshal empty enum") 53 + } 54 + func (t *RichtextFacet_Features_Elem) UnmarshalJSON(b []byte) error { 55 + typ, err := util.TypeExtract(b) 56 + if err != nil { 57 + return err 58 + } 59 + 60 + switch typ { 61 + case "app.bsky.richtext.facet#mention": 62 + t.RichtextFacet_Mention = new(RichtextFacet_Mention) 63 + return json.Unmarshal(b, t.RichtextFacet_Mention) 64 + case "app.bsky.richtext.facet#link": 65 + t.RichtextFacet_Link = new(RichtextFacet_Link) 66 + return json.Unmarshal(b, t.RichtextFacet_Link) 67 + case "app.bsky.richtext.facet#tag": 68 + t.RichtextFacet_Tag = new(RichtextFacet_Tag) 69 + return json.Unmarshal(b, t.RichtextFacet_Tag) 70 + 71 + default: 72 + return nil 73 + } 74 + } 75 + 76 + func (t *RichtextFacet_Features_Elem) MarshalCBOR(w io.Writer) error { 77 + 78 + if t == nil { 79 + _, err := w.Write(cbg.CborNull) 80 + return err 81 + } 82 + if t.RichtextFacet_Mention != nil { 83 + return t.RichtextFacet_Mention.MarshalCBOR(w) 84 + } 85 + if t.RichtextFacet_Link != nil { 86 + return t.RichtextFacet_Link.MarshalCBOR(w) 87 + } 88 + if t.RichtextFacet_Tag != nil { 89 + return t.RichtextFacet_Tag.MarshalCBOR(w) 90 + } 91 + return fmt.Errorf("cannot cbor marshal empty enum") 92 + } 93 + func (t *RichtextFacet_Features_Elem) UnmarshalCBOR(r io.Reader) error { 94 + typ, b, err := util.CborTypeExtractReader(r) 95 + if err != nil { 96 + return err 97 + } 98 + 99 + switch typ { 100 + case "app.bsky.richtext.facet#mention": 101 + t.RichtextFacet_Mention = new(RichtextFacet_Mention) 102 + return t.RichtextFacet_Mention.UnmarshalCBOR(bytes.NewReader(b)) 103 + case "app.bsky.richtext.facet#link": 104 + t.RichtextFacet_Link = new(RichtextFacet_Link) 105 + return t.RichtextFacet_Link.UnmarshalCBOR(bytes.NewReader(b)) 106 + case "app.bsky.richtext.facet#tag": 107 + t.RichtextFacet_Tag = new(RichtextFacet_Tag) 108 + return t.RichtextFacet_Tag.UnmarshalCBOR(bytes.NewReader(b)) 109 + 110 + default: 111 + return nil 112 + } 113 + } 114 + 115 + // RichtextFacet_Link is a "link" in the app.bsky.richtext.facet schema. 116 + // 117 + // Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. 118 + // 119 + // RECORDTYPE: RichtextFacet_Link 120 + type RichtextFacet_Link struct { 121 + LexiconTypeID string `json:"$type,const=app.bsky.richtext.facet#link" cborgen:"$type,const=app.bsky.richtext.facet#link"` 122 + Uri string `json:"uri" cborgen:"uri"` 123 + } 124 + 125 + // RichtextFacet_Mention is a "mention" in the app.bsky.richtext.facet schema. 126 + // 127 + // Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. 128 + // 129 + // RECORDTYPE: RichtextFacet_Mention 130 + type RichtextFacet_Mention struct { 131 + LexiconTypeID string `json:"$type,const=app.bsky.richtext.facet#mention" cborgen:"$type,const=app.bsky.richtext.facet#mention"` 132 + Did string `json:"did" cborgen:"did"` 133 + } 134 + 135 + // RichtextFacet_Tag is a "tag" in the app.bsky.richtext.facet schema. 136 + // 137 + // Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). 138 + // 139 + // RECORDTYPE: RichtextFacet_Tag 140 + type RichtextFacet_Tag struct { 141 + LexiconTypeID string `json:"$type,const=app.bsky.richtext.facet#tag" cborgen:"$type,const=app.bsky.richtext.facet#tag"` 142 + Tag string `json:"tag" cborgen:"tag"` 143 + }
+52
api/bsky/unspecceddefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.defs 6 + 7 + // UnspeccedDefs_SkeletonSearchActor is a "skeletonSearchActor" in the app.bsky.unspecced.defs schema. 8 + type UnspeccedDefs_SkeletonSearchActor struct { 9 + Did string `json:"did" cborgen:"did"` 10 + } 11 + 12 + // UnspeccedDefs_SkeletonSearchPost is a "skeletonSearchPost" in the app.bsky.unspecced.defs schema. 13 + type UnspeccedDefs_SkeletonSearchPost struct { 14 + Uri string `json:"uri" cborgen:"uri"` 15 + } 16 + 17 + // UnspeccedDefs_SkeletonSearchStarterPack is a "skeletonSearchStarterPack" in the app.bsky.unspecced.defs schema. 18 + type UnspeccedDefs_SkeletonSearchStarterPack struct { 19 + Uri string `json:"uri" cborgen:"uri"` 20 + } 21 + 22 + // UnspeccedDefs_SkeletonTrend is a "skeletonTrend" in the app.bsky.unspecced.defs schema. 23 + type UnspeccedDefs_SkeletonTrend struct { 24 + Category *string `json:"category,omitempty" cborgen:"category,omitempty"` 25 + Dids []string `json:"dids" cborgen:"dids"` 26 + DisplayName string `json:"displayName" cborgen:"displayName"` 27 + Link string `json:"link" cborgen:"link"` 28 + PostCount int64 `json:"postCount" cborgen:"postCount"` 29 + StartedAt string `json:"startedAt" cborgen:"startedAt"` 30 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 31 + Topic string `json:"topic" cborgen:"topic"` 32 + } 33 + 34 + // UnspeccedDefs_TrendView is a "trendView" in the app.bsky.unspecced.defs schema. 35 + type UnspeccedDefs_TrendView struct { 36 + Actors []*ActorDefs_ProfileViewBasic `json:"actors" cborgen:"actors"` 37 + Category *string `json:"category,omitempty" cborgen:"category,omitempty"` 38 + DisplayName string `json:"displayName" cborgen:"displayName"` 39 + Link string `json:"link" cborgen:"link"` 40 + PostCount int64 `json:"postCount" cborgen:"postCount"` 41 + StartedAt string `json:"startedAt" cborgen:"startedAt"` 42 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 43 + Topic string `json:"topic" cborgen:"topic"` 44 + } 45 + 46 + // UnspeccedDefs_TrendingTopic is a "trendingTopic" in the app.bsky.unspecced.defs schema. 47 + type UnspeccedDefs_TrendingTopic struct { 48 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 49 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 50 + Link string `json:"link" cborgen:"link"` 51 + Topic string `json:"topic" cborgen:"topic"` 52 + }
+26
api/bsky/unspeccedgetConfig.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getConfig 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetConfig_Output is the output of a app.bsky.unspecced.getConfig call. 14 + type UnspeccedGetConfig_Output struct { 15 + CheckEmailConfirmed *bool `json:"checkEmailConfirmed,omitempty" cborgen:"checkEmailConfirmed,omitempty"` 16 + } 17 + 18 + // UnspeccedGetConfig calls the XRPC method "app.bsky.unspecced.getConfig". 19 + func UnspeccedGetConfig(ctx context.Context, c *xrpc.Client) (*UnspeccedGetConfig_Output, error) { 20 + var out UnspeccedGetConfig_Output 21 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getConfig", nil, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+33
api/bsky/unspeccedgetPopularFeedGenerators.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getPopularFeedGenerators 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetPopularFeedGenerators_Output is the output of a app.bsky.unspecced.getPopularFeedGenerators call. 14 + type UnspeccedGetPopularFeedGenerators_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feeds []*FeedDefs_GeneratorView `json:"feeds" cborgen:"feeds"` 17 + } 18 + 19 + // UnspeccedGetPopularFeedGenerators calls the XRPC method "app.bsky.unspecced.getPopularFeedGenerators". 20 + func UnspeccedGetPopularFeedGenerators(ctx context.Context, c *xrpc.Client, cursor string, limit int64, query string) (*UnspeccedGetPopularFeedGenerators_Output, error) { 21 + var out UnspeccedGetPopularFeedGenerators_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + "query": query, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getPopularFeedGenerators", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+30
api/bsky/unspeccedgetSuggestedFeeds.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getSuggestedFeeds 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetSuggestedFeeds_Output is the output of a app.bsky.unspecced.getSuggestedFeeds call. 14 + type UnspeccedGetSuggestedFeeds_Output struct { 15 + Feeds []*FeedDefs_GeneratorView `json:"feeds" cborgen:"feeds"` 16 + } 17 + 18 + // UnspeccedGetSuggestedFeeds calls the XRPC method "app.bsky.unspecced.getSuggestedFeeds". 19 + func UnspeccedGetSuggestedFeeds(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetSuggestedFeeds_Output, error) { 20 + var out UnspeccedGetSuggestedFeeds_Output 21 + 22 + params := map[string]interface{}{ 23 + "limit": limit, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedFeeds", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+33
api/bsky/unspeccedgetSuggestedFeedsSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getSuggestedFeedsSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetSuggestedFeedsSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedFeedsSkeleton call. 14 + type UnspeccedGetSuggestedFeedsSkeleton_Output struct { 15 + Feeds []string `json:"feeds" cborgen:"feeds"` 16 + } 17 + 18 + // UnspeccedGetSuggestedFeedsSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedFeedsSkeleton". 19 + // 20 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). 21 + func UnspeccedGetSuggestedFeedsSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetSuggestedFeedsSkeleton_Output, error) { 22 + var out UnspeccedGetSuggestedFeedsSkeleton_Output 23 + 24 + params := map[string]interface{}{ 25 + "limit": limit, 26 + "viewer": viewer, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedFeedsSkeleton", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+30
api/bsky/unspeccedgetSuggestedStarterPacks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getSuggestedStarterPacks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetSuggestedStarterPacks_Output is the output of a app.bsky.unspecced.getSuggestedStarterPacks call. 14 + type UnspeccedGetSuggestedStarterPacks_Output struct { 15 + StarterPacks []*GraphDefs_StarterPackView `json:"starterPacks" cborgen:"starterPacks"` 16 + } 17 + 18 + // UnspeccedGetSuggestedStarterPacks calls the XRPC method "app.bsky.unspecced.getSuggestedStarterPacks". 19 + func UnspeccedGetSuggestedStarterPacks(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetSuggestedStarterPacks_Output, error) { 20 + var out UnspeccedGetSuggestedStarterPacks_Output 21 + 22 + params := map[string]interface{}{ 23 + "limit": limit, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedStarterPacks", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+33
api/bsky/unspeccedgetSuggestedStarterPacksSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getSuggestedStarterPacksSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetSuggestedStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedStarterPacksSkeleton call. 14 + type UnspeccedGetSuggestedStarterPacksSkeleton_Output struct { 15 + StarterPacks []string `json:"starterPacks" cborgen:"starterPacks"` 16 + } 17 + 18 + // UnspeccedGetSuggestedStarterPacksSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedStarterPacksSkeleton". 19 + // 20 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). 21 + func UnspeccedGetSuggestedStarterPacksSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetSuggestedStarterPacksSkeleton_Output, error) { 22 + var out UnspeccedGetSuggestedStarterPacksSkeleton_Output 23 + 24 + params := map[string]interface{}{ 25 + "limit": limit, 26 + "viewer": viewer, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+33
api/bsky/unspeccedgetSuggestedUsers.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getSuggestedUsers 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetSuggestedUsers_Output is the output of a app.bsky.unspecced.getSuggestedUsers call. 14 + type UnspeccedGetSuggestedUsers_Output struct { 15 + Actors []*ActorDefs_ProfileView `json:"actors" cborgen:"actors"` 16 + } 17 + 18 + // UnspeccedGetSuggestedUsers calls the XRPC method "app.bsky.unspecced.getSuggestedUsers". 19 + // 20 + // category: Category of users to get suggestions for. 21 + func UnspeccedGetSuggestedUsers(ctx context.Context, c *xrpc.Client, category string, limit int64) (*UnspeccedGetSuggestedUsers_Output, error) { 22 + var out UnspeccedGetSuggestedUsers_Output 23 + 24 + params := map[string]interface{}{ 25 + "category": category, 26 + "limit": limit, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedUsers", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+35
api/bsky/unspeccedgetSuggestedUsersSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getSuggestedUsersSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetSuggestedUsersSkeleton_Output is the output of a app.bsky.unspecced.getSuggestedUsersSkeleton call. 14 + type UnspeccedGetSuggestedUsersSkeleton_Output struct { 15 + Dids []string `json:"dids" cborgen:"dids"` 16 + } 17 + 18 + // UnspeccedGetSuggestedUsersSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestedUsersSkeleton". 19 + // 20 + // category: Category of users to get suggestions for. 21 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). 22 + func UnspeccedGetSuggestedUsersSkeleton(ctx context.Context, c *xrpc.Client, category string, limit int64, viewer string) (*UnspeccedGetSuggestedUsersSkeleton_Output, error) { 23 + var out UnspeccedGetSuggestedUsersSkeleton_Output 24 + 25 + params := map[string]interface{}{ 26 + "category": category, 27 + "limit": limit, 28 + "viewer": viewer, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestedUsersSkeleton", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+41
api/bsky/unspeccedgetSuggestionsSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getSuggestionsSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetSuggestionsSkeleton_Output is the output of a app.bsky.unspecced.getSuggestionsSkeleton call. 14 + type UnspeccedGetSuggestionsSkeleton_Output struct { 15 + Actors []*UnspeccedDefs_SkeletonSearchActor `json:"actors" cborgen:"actors"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + // recId: Snowflake for this recommendation, use when submitting recommendation events. 18 + RecId *int64 `json:"recId,omitempty" cborgen:"recId,omitempty"` 19 + // relativeToDid: DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. 20 + RelativeToDid *string `json:"relativeToDid,omitempty" cborgen:"relativeToDid,omitempty"` 21 + } 22 + 23 + // UnspeccedGetSuggestionsSkeleton calls the XRPC method "app.bsky.unspecced.getSuggestionsSkeleton". 24 + // 25 + // relativeToDid: DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. 26 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. 27 + func UnspeccedGetSuggestionsSkeleton(ctx context.Context, c *xrpc.Client, cursor string, limit int64, relativeToDid string, viewer string) (*UnspeccedGetSuggestionsSkeleton_Output, error) { 28 + var out UnspeccedGetSuggestionsSkeleton_Output 29 + 30 + params := map[string]interface{}{ 31 + "cursor": cursor, 32 + "limit": limit, 33 + "relativeToDid": relativeToDid, 34 + "viewer": viewer, 35 + } 36 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getSuggestionsSkeleton", params, nil, &out); err != nil { 37 + return nil, err 38 + } 39 + 40 + return &out, nil 41 + }
+35
api/bsky/unspeccedgetTaggedSuggestions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getTaggedSuggestions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetTaggedSuggestions_Output is the output of a app.bsky.unspecced.getTaggedSuggestions call. 14 + type UnspeccedGetTaggedSuggestions_Output struct { 15 + Suggestions []*UnspeccedGetTaggedSuggestions_Suggestion `json:"suggestions" cborgen:"suggestions"` 16 + } 17 + 18 + // UnspeccedGetTaggedSuggestions_Suggestion is a "suggestion" in the app.bsky.unspecced.getTaggedSuggestions schema. 19 + type UnspeccedGetTaggedSuggestions_Suggestion struct { 20 + Subject string `json:"subject" cborgen:"subject"` 21 + SubjectType string `json:"subjectType" cborgen:"subjectType"` 22 + Tag string `json:"tag" cborgen:"tag"` 23 + } 24 + 25 + // UnspeccedGetTaggedSuggestions calls the XRPC method "app.bsky.unspecced.getTaggedSuggestions". 26 + func UnspeccedGetTaggedSuggestions(ctx context.Context, c *xrpc.Client) (*UnspeccedGetTaggedSuggestions_Output, error) { 27 + var out UnspeccedGetTaggedSuggestions_Output 28 + 29 + params := map[string]interface{}{} 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTaggedSuggestions", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+34
api/bsky/unspeccedgetTrendingTopics.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getTrendingTopics 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetTrendingTopics_Output is the output of a app.bsky.unspecced.getTrendingTopics call. 14 + type UnspeccedGetTrendingTopics_Output struct { 15 + Suggested []*UnspeccedDefs_TrendingTopic `json:"suggested" cborgen:"suggested"` 16 + Topics []*UnspeccedDefs_TrendingTopic `json:"topics" cborgen:"topics"` 17 + } 18 + 19 + // UnspeccedGetTrendingTopics calls the XRPC method "app.bsky.unspecced.getTrendingTopics". 20 + // 21 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. 22 + func UnspeccedGetTrendingTopics(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetTrendingTopics_Output, error) { 23 + var out UnspeccedGetTrendingTopics_Output 24 + 25 + params := map[string]interface{}{ 26 + "limit": limit, 27 + "viewer": viewer, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrendingTopics", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+30
api/bsky/unspeccedgetTrends.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getTrends 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetTrends_Output is the output of a app.bsky.unspecced.getTrends call. 14 + type UnspeccedGetTrends_Output struct { 15 + Trends []*UnspeccedDefs_TrendView `json:"trends" cborgen:"trends"` 16 + } 17 + 18 + // UnspeccedGetTrends calls the XRPC method "app.bsky.unspecced.getTrends". 19 + func UnspeccedGetTrends(ctx context.Context, c *xrpc.Client, limit int64) (*UnspeccedGetTrends_Output, error) { 20 + var out UnspeccedGetTrends_Output 21 + 22 + params := map[string]interface{}{ 23 + "limit": limit, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrends", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+33
api/bsky/unspeccedgetTrendsSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getTrendsSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetTrendsSkeleton_Output is the output of a app.bsky.unspecced.getTrendsSkeleton call. 14 + type UnspeccedGetTrendsSkeleton_Output struct { 15 + Trends []*UnspeccedDefs_SkeletonTrend `json:"trends" cborgen:"trends"` 16 + } 17 + 18 + // UnspeccedGetTrendsSkeleton calls the XRPC method "app.bsky.unspecced.getTrendsSkeleton". 19 + // 20 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). 21 + func UnspeccedGetTrendsSkeleton(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetTrendsSkeleton_Output, error) { 22 + var out UnspeccedGetTrendsSkeleton_Output 23 + 24 + params := map[string]interface{}{ 25 + "limit": limit, 26 + "viewer": viewer, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrendsSkeleton", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+42
api/bsky/unspeccedsearchActorsSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.searchActorsSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedSearchActorsSkeleton_Output is the output of a app.bsky.unspecced.searchActorsSkeleton call. 14 + type UnspeccedSearchActorsSkeleton_Output struct { 15 + Actors []*UnspeccedDefs_SkeletonSearchActor `json:"actors" cborgen:"actors"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + // hitsTotal: Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. 18 + HitsTotal *int64 `json:"hitsTotal,omitempty" cborgen:"hitsTotal,omitempty"` 19 + } 20 + 21 + // UnspeccedSearchActorsSkeleton calls the XRPC method "app.bsky.unspecced.searchActorsSkeleton". 22 + // 23 + // cursor: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. 24 + // q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. 25 + // typeahead: If true, acts as fast/simple 'typeahead' query. 26 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. 27 + func UnspeccedSearchActorsSkeleton(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, typeahead bool, viewer string) (*UnspeccedSearchActorsSkeleton_Output, error) { 28 + var out UnspeccedSearchActorsSkeleton_Output 29 + 30 + params := map[string]interface{}{ 31 + "cursor": cursor, 32 + "limit": limit, 33 + "q": q, 34 + "typeahead": typeahead, 35 + "viewer": viewer, 36 + } 37 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.searchActorsSkeleton", params, nil, &out); err != nil { 38 + return nil, err 39 + } 40 + 41 + return &out, nil 42 + }
+58
api/bsky/unspeccedsearchPostsSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.searchPostsSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedSearchPostsSkeleton_Output is the output of a app.bsky.unspecced.searchPostsSkeleton call. 14 + type UnspeccedSearchPostsSkeleton_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + // hitsTotal: Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. 17 + HitsTotal *int64 `json:"hitsTotal,omitempty" cborgen:"hitsTotal,omitempty"` 18 + Posts []*UnspeccedDefs_SkeletonSearchPost `json:"posts" cborgen:"posts"` 19 + } 20 + 21 + // UnspeccedSearchPostsSkeleton calls the XRPC method "app.bsky.unspecced.searchPostsSkeleton". 22 + // 23 + // author: Filter to posts by the given account. Handles are resolved to DID before query-time. 24 + // cursor: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. 25 + // domain: Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. 26 + // lang: Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. 27 + // mentions: Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. 28 + // q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. 29 + // since: Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). 30 + // sort: Specifies the ranking order of results. 31 + // tag: Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. 32 + // until: Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). 33 + // url: Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. 34 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. 35 + func UnspeccedSearchPostsSkeleton(ctx context.Context, c *xrpc.Client, author string, cursor string, domain string, lang string, limit int64, mentions string, q string, since string, sort string, tag []string, until string, url string, viewer string) (*UnspeccedSearchPostsSkeleton_Output, error) { 36 + var out UnspeccedSearchPostsSkeleton_Output 37 + 38 + params := map[string]interface{}{ 39 + "author": author, 40 + "cursor": cursor, 41 + "domain": domain, 42 + "lang": lang, 43 + "limit": limit, 44 + "mentions": mentions, 45 + "q": q, 46 + "since": since, 47 + "sort": sort, 48 + "tag": tag, 49 + "until": until, 50 + "url": url, 51 + "viewer": viewer, 52 + } 53 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.searchPostsSkeleton", params, nil, &out); err != nil { 54 + return nil, err 55 + } 56 + 57 + return &out, nil 58 + }
+40
api/bsky/unspeccedsearchStarterPacksSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.searchStarterPacksSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedSearchStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.searchStarterPacksSkeleton call. 14 + type UnspeccedSearchStarterPacksSkeleton_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + // hitsTotal: Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. 17 + HitsTotal *int64 `json:"hitsTotal,omitempty" cborgen:"hitsTotal,omitempty"` 18 + StarterPacks []*UnspeccedDefs_SkeletonSearchStarterPack `json:"starterPacks" cborgen:"starterPacks"` 19 + } 20 + 21 + // UnspeccedSearchStarterPacksSkeleton calls the XRPC method "app.bsky.unspecced.searchStarterPacksSkeleton". 22 + // 23 + // cursor: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. 24 + // q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. 25 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). 26 + func UnspeccedSearchStarterPacksSkeleton(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, viewer string) (*UnspeccedSearchStarterPacksSkeleton_Output, error) { 27 + var out UnspeccedSearchStarterPacksSkeleton_Output 28 + 29 + params := map[string]interface{}{ 30 + "cursor": cursor, 31 + "limit": limit, 32 + "q": q, 33 + "viewer": viewer, 34 + } 35 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.searchStarterPacksSkeleton", params, nil, &out); err != nil { 36 + return nil, err 37 + } 38 + 39 + return &out, nil 40 + }
+22
api/bsky/videodefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.video.defs 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + // VideoDefs_JobStatus is a "jobStatus" in the app.bsky.video.defs schema. 12 + type VideoDefs_JobStatus struct { 13 + Blob *util.LexBlob `json:"blob,omitempty" cborgen:"blob,omitempty"` 14 + Did string `json:"did" cborgen:"did"` 15 + Error *string `json:"error,omitempty" cborgen:"error,omitempty"` 16 + JobId string `json:"jobId" cborgen:"jobId"` 17 + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 18 + // progress: Progress within the current processing state. 19 + Progress *int64 `json:"progress,omitempty" cborgen:"progress,omitempty"` 20 + // state: The state of the video processing job. All values not listed as a known value indicate that the job is in process. 21 + State string `json:"state" cborgen:"state"` 22 + }
+30
api/bsky/videogetJobStatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.video.getJobStatus 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VideoGetJobStatus_Output is the output of a app.bsky.video.getJobStatus call. 14 + type VideoGetJobStatus_Output struct { 15 + JobStatus *VideoDefs_JobStatus `json:"jobStatus" cborgen:"jobStatus"` 16 + } 17 + 18 + // VideoGetJobStatus calls the XRPC method "app.bsky.video.getJobStatus". 19 + func VideoGetJobStatus(ctx context.Context, c *xrpc.Client, jobId string) (*VideoGetJobStatus_Output, error) { 20 + var out VideoGetJobStatus_Output 21 + 22 + params := map[string]interface{}{ 23 + "jobId": jobId, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.video.getJobStatus", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+30
api/bsky/videogetUploadLimits.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.video.getUploadLimits 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VideoGetUploadLimits_Output is the output of a app.bsky.video.getUploadLimits call. 14 + type VideoGetUploadLimits_Output struct { 15 + CanUpload bool `json:"canUpload" cborgen:"canUpload"` 16 + Error *string `json:"error,omitempty" cborgen:"error,omitempty"` 17 + Message *string `json:"message,omitempty" cborgen:"message,omitempty"` 18 + RemainingDailyBytes *int64 `json:"remainingDailyBytes,omitempty" cborgen:"remainingDailyBytes,omitempty"` 19 + RemainingDailyVideos *int64 `json:"remainingDailyVideos,omitempty" cborgen:"remainingDailyVideos,omitempty"` 20 + } 21 + 22 + // VideoGetUploadLimits calls the XRPC method "app.bsky.video.getUploadLimits". 23 + func VideoGetUploadLimits(ctx context.Context, c *xrpc.Client) (*VideoGetUploadLimits_Output, error) { 24 + var out VideoGetUploadLimits_Output 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.video.getUploadLimits", nil, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+27
api/bsky/videouploadVideo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.video.uploadVideo 6 + 7 + import ( 8 + "context" 9 + "io" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // VideoUploadVideo_Output is the output of a app.bsky.video.uploadVideo call. 15 + type VideoUploadVideo_Output struct { 16 + JobStatus *VideoDefs_JobStatus `json:"jobStatus" cborgen:"jobStatus"` 17 + } 18 + 19 + // VideoUploadVideo calls the XRPC method "app.bsky.video.uploadVideo". 20 + func VideoUploadVideo(ctx context.Context, c *xrpc.Client, input io.Reader) (*VideoUploadVideo_Output, error) { 21 + var out VideoUploadVideo_Output 22 + if err := c.Do(ctx, xrpc.Procedure, "video/mp4", "app.bsky.video.uploadVideo", nil, input, &out); err != nil { 23 + return nil, err 24 + } 25 + 26 + return &out, nil 27 + }
+18
api/chat/actordeclaration.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.actor.declaration 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("chat.bsky.actor.declaration", &ActorDeclaration{}) 13 + } // 14 + // RECORDTYPE: ActorDeclaration 15 + type ActorDeclaration struct { 16 + LexiconTypeID string `json:"$type,const=chat.bsky.actor.declaration" cborgen:"$type,const=chat.bsky.actor.declaration"` 17 + AllowIncoming string `json:"allowIncoming" cborgen:"allowIncoming"` 18 + }
+24
api/chat/actordefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.actor.defs 6 + 7 + import ( 8 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 9 + appbskytypes "github.com/bluesky-social/indigo/api/bsky" 10 + ) 11 + 12 + // ActorDefs_ProfileViewBasic is a "profileViewBasic" in the chat.bsky.actor.defs schema. 13 + type ActorDefs_ProfileViewBasic struct { 14 + Associated *appbskytypes.ActorDefs_ProfileAssociated `json:"associated,omitempty" cborgen:"associated,omitempty"` 15 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 16 + // chatDisabled: Set to true when the actor cannot actively participate in conversations 17 + ChatDisabled *bool `json:"chatDisabled,omitempty" cborgen:"chatDisabled,omitempty"` 18 + Did string `json:"did" cborgen:"did"` 19 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 20 + Handle string `json:"handle" cborgen:"handle"` 21 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 22 + Verification *appbskytypes.ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 23 + Viewer *appbskytypes.ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 24 + }
+25
api/chat/actordeleteAccount.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.actor.deleteAccount 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ActorDeleteAccount_Output is the output of a chat.bsky.actor.deleteAccount call. 14 + type ActorDeleteAccount_Output struct { 15 + } 16 + 17 + // ActorDeleteAccount calls the XRPC method "chat.bsky.actor.deleteAccount". 18 + func ActorDeleteAccount(ctx context.Context, c *xrpc.Client) (*ActorDeleteAccount_Output, error) { 19 + var out ActorDeleteAccount_Output 20 + if err := c.Do(ctx, xrpc.Procedure, "", "chat.bsky.actor.deleteAccount", nil, nil, &out); err != nil { 21 + return nil, err 22 + } 23 + 24 + return &out, nil 25 + }
+22
api/chat/actorexportAccountData.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.actor.exportAccountData 6 + 7 + import ( 8 + "bytes" 9 + "context" 10 + 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // ActorExportAccountData calls the XRPC method "chat.bsky.actor.exportAccountData". 15 + func ActorExportAccountData(ctx context.Context, c *xrpc.Client) ([]byte, error) { 16 + buf := new(bytes.Buffer) 17 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.actor.exportAccountData", nil, nil, buf); err != nil { 18 + return nil, err 19 + } 20 + 21 + return buf.Bytes(), nil 22 + }
+32
api/chat/convoacceptConvo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.acceptConvo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoAcceptConvo_Input is the input argument to a chat.bsky.convo.acceptConvo call. 14 + type ConvoAcceptConvo_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + } 17 + 18 + // ConvoAcceptConvo_Output is the output of a chat.bsky.convo.acceptConvo call. 19 + type ConvoAcceptConvo_Output struct { 20 + // rev: Rev when the convo was accepted. If not present, the convo was already accepted. 21 + Rev *string `json:"rev,omitempty" cborgen:"rev,omitempty"` 22 + } 23 + 24 + // ConvoAcceptConvo calls the XRPC method "chat.bsky.convo.acceptConvo". 25 + func ConvoAcceptConvo(ctx context.Context, c *xrpc.Client, input *ConvoAcceptConvo_Input) (*ConvoAcceptConvo_Output, error) { 26 + var out ConvoAcceptConvo_Output 27 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.acceptConvo", nil, input, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+33
api/chat/convoaddReaction.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.addReaction 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoAddReaction_Input is the input argument to a chat.bsky.convo.addReaction call. 14 + type ConvoAddReaction_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + MessageId string `json:"messageId" cborgen:"messageId"` 17 + Value string `json:"value" cborgen:"value"` 18 + } 19 + 20 + // ConvoAddReaction_Output is the output of a chat.bsky.convo.addReaction call. 21 + type ConvoAddReaction_Output struct { 22 + Message *ConvoDefs_MessageView `json:"message" cborgen:"message"` 23 + } 24 + 25 + // ConvoAddReaction calls the XRPC method "chat.bsky.convo.addReaction". 26 + func ConvoAddReaction(ctx context.Context, c *xrpc.Client, input *ConvoAddReaction_Input) (*ConvoAddReaction_Output, error) { 27 + var out ConvoAddReaction_Output 28 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.addReaction", nil, input, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+485
api/chat/convodefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.defs 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + appbskytypes "github.com/bluesky-social/indigo/api/bsky" 12 + "github.com/bluesky-social/indigo/lex/util" 13 + ) 14 + 15 + // ConvoDefs_ConvoView is a "convoView" in the chat.bsky.convo.defs schema. 16 + type ConvoDefs_ConvoView struct { 17 + Id string `json:"id" cborgen:"id"` 18 + LastMessage *ConvoDefs_ConvoView_LastMessage `json:"lastMessage,omitempty" cborgen:"lastMessage,omitempty"` 19 + LastReaction *ConvoDefs_ConvoView_LastReaction `json:"lastReaction,omitempty" cborgen:"lastReaction,omitempty"` 20 + Members []*ActorDefs_ProfileViewBasic `json:"members" cborgen:"members"` 21 + Muted bool `json:"muted" cborgen:"muted"` 22 + Rev string `json:"rev" cborgen:"rev"` 23 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 24 + UnreadCount int64 `json:"unreadCount" cborgen:"unreadCount"` 25 + } 26 + 27 + type ConvoDefs_ConvoView_LastMessage struct { 28 + ConvoDefs_MessageView *ConvoDefs_MessageView 29 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 30 + } 31 + 32 + func (t *ConvoDefs_ConvoView_LastMessage) MarshalJSON() ([]byte, error) { 33 + if t.ConvoDefs_MessageView != nil { 34 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 35 + return json.Marshal(t.ConvoDefs_MessageView) 36 + } 37 + if t.ConvoDefs_DeletedMessageView != nil { 38 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 39 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 40 + } 41 + return nil, fmt.Errorf("cannot marshal empty enum") 42 + } 43 + func (t *ConvoDefs_ConvoView_LastMessage) UnmarshalJSON(b []byte) error { 44 + typ, err := util.TypeExtract(b) 45 + if err != nil { 46 + return err 47 + } 48 + 49 + switch typ { 50 + case "chat.bsky.convo.defs#messageView": 51 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 52 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 53 + case "chat.bsky.convo.defs#deletedMessageView": 54 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 55 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 56 + 57 + default: 58 + return nil 59 + } 60 + } 61 + 62 + type ConvoDefs_ConvoView_LastReaction struct { 63 + ConvoDefs_MessageAndReactionView *ConvoDefs_MessageAndReactionView 64 + } 65 + 66 + func (t *ConvoDefs_ConvoView_LastReaction) MarshalJSON() ([]byte, error) { 67 + if t.ConvoDefs_MessageAndReactionView != nil { 68 + t.ConvoDefs_MessageAndReactionView.LexiconTypeID = "chat.bsky.convo.defs#messageAndReactionView" 69 + return json.Marshal(t.ConvoDefs_MessageAndReactionView) 70 + } 71 + return nil, fmt.Errorf("cannot marshal empty enum") 72 + } 73 + func (t *ConvoDefs_ConvoView_LastReaction) UnmarshalJSON(b []byte) error { 74 + typ, err := util.TypeExtract(b) 75 + if err != nil { 76 + return err 77 + } 78 + 79 + switch typ { 80 + case "chat.bsky.convo.defs#messageAndReactionView": 81 + t.ConvoDefs_MessageAndReactionView = new(ConvoDefs_MessageAndReactionView) 82 + return json.Unmarshal(b, t.ConvoDefs_MessageAndReactionView) 83 + 84 + default: 85 + return nil 86 + } 87 + } 88 + 89 + // ConvoDefs_DeletedMessageView is a "deletedMessageView" in the chat.bsky.convo.defs schema. 90 + // 91 + // RECORDTYPE: ConvoDefs_DeletedMessageView 92 + type ConvoDefs_DeletedMessageView struct { 93 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#deletedMessageView" cborgen:"$type,const=chat.bsky.convo.defs#deletedMessageView"` 94 + Id string `json:"id" cborgen:"id"` 95 + Rev string `json:"rev" cborgen:"rev"` 96 + Sender *ConvoDefs_MessageViewSender `json:"sender" cborgen:"sender"` 97 + SentAt string `json:"sentAt" cborgen:"sentAt"` 98 + } 99 + 100 + // ConvoDefs_LogAcceptConvo is a "logAcceptConvo" in the chat.bsky.convo.defs schema. 101 + // 102 + // RECORDTYPE: ConvoDefs_LogAcceptConvo 103 + type ConvoDefs_LogAcceptConvo struct { 104 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logAcceptConvo" cborgen:"$type,const=chat.bsky.convo.defs#logAcceptConvo"` 105 + ConvoId string `json:"convoId" cborgen:"convoId"` 106 + Rev string `json:"rev" cborgen:"rev"` 107 + } 108 + 109 + // ConvoDefs_LogAddReaction is a "logAddReaction" in the chat.bsky.convo.defs schema. 110 + // 111 + // RECORDTYPE: ConvoDefs_LogAddReaction 112 + type ConvoDefs_LogAddReaction struct { 113 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logAddReaction" cborgen:"$type,const=chat.bsky.convo.defs#logAddReaction"` 114 + ConvoId string `json:"convoId" cborgen:"convoId"` 115 + Message *ConvoDefs_LogAddReaction_Message `json:"message" cborgen:"message"` 116 + Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` 117 + Rev string `json:"rev" cborgen:"rev"` 118 + } 119 + 120 + type ConvoDefs_LogAddReaction_Message struct { 121 + ConvoDefs_MessageView *ConvoDefs_MessageView 122 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 123 + } 124 + 125 + func (t *ConvoDefs_LogAddReaction_Message) MarshalJSON() ([]byte, error) { 126 + if t.ConvoDefs_MessageView != nil { 127 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 128 + return json.Marshal(t.ConvoDefs_MessageView) 129 + } 130 + if t.ConvoDefs_DeletedMessageView != nil { 131 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 132 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 133 + } 134 + return nil, fmt.Errorf("cannot marshal empty enum") 135 + } 136 + func (t *ConvoDefs_LogAddReaction_Message) UnmarshalJSON(b []byte) error { 137 + typ, err := util.TypeExtract(b) 138 + if err != nil { 139 + return err 140 + } 141 + 142 + switch typ { 143 + case "chat.bsky.convo.defs#messageView": 144 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 145 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 146 + case "chat.bsky.convo.defs#deletedMessageView": 147 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 148 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 149 + 150 + default: 151 + return nil 152 + } 153 + } 154 + 155 + // ConvoDefs_LogBeginConvo is a "logBeginConvo" in the chat.bsky.convo.defs schema. 156 + // 157 + // RECORDTYPE: ConvoDefs_LogBeginConvo 158 + type ConvoDefs_LogBeginConvo struct { 159 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logBeginConvo" cborgen:"$type,const=chat.bsky.convo.defs#logBeginConvo"` 160 + ConvoId string `json:"convoId" cborgen:"convoId"` 161 + Rev string `json:"rev" cborgen:"rev"` 162 + } 163 + 164 + // ConvoDefs_LogCreateMessage is a "logCreateMessage" in the chat.bsky.convo.defs schema. 165 + // 166 + // RECORDTYPE: ConvoDefs_LogCreateMessage 167 + type ConvoDefs_LogCreateMessage struct { 168 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logCreateMessage" cborgen:"$type,const=chat.bsky.convo.defs#logCreateMessage"` 169 + ConvoId string `json:"convoId" cborgen:"convoId"` 170 + Message *ConvoDefs_LogCreateMessage_Message `json:"message" cborgen:"message"` 171 + Rev string `json:"rev" cborgen:"rev"` 172 + } 173 + 174 + type ConvoDefs_LogCreateMessage_Message struct { 175 + ConvoDefs_MessageView *ConvoDefs_MessageView 176 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 177 + } 178 + 179 + func (t *ConvoDefs_LogCreateMessage_Message) MarshalJSON() ([]byte, error) { 180 + if t.ConvoDefs_MessageView != nil { 181 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 182 + return json.Marshal(t.ConvoDefs_MessageView) 183 + } 184 + if t.ConvoDefs_DeletedMessageView != nil { 185 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 186 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 187 + } 188 + return nil, fmt.Errorf("cannot marshal empty enum") 189 + } 190 + func (t *ConvoDefs_LogCreateMessage_Message) UnmarshalJSON(b []byte) error { 191 + typ, err := util.TypeExtract(b) 192 + if err != nil { 193 + return err 194 + } 195 + 196 + switch typ { 197 + case "chat.bsky.convo.defs#messageView": 198 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 199 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 200 + case "chat.bsky.convo.defs#deletedMessageView": 201 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 202 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 203 + 204 + default: 205 + return nil 206 + } 207 + } 208 + 209 + // ConvoDefs_LogDeleteMessage is a "logDeleteMessage" in the chat.bsky.convo.defs schema. 210 + // 211 + // RECORDTYPE: ConvoDefs_LogDeleteMessage 212 + type ConvoDefs_LogDeleteMessage struct { 213 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logDeleteMessage" cborgen:"$type,const=chat.bsky.convo.defs#logDeleteMessage"` 214 + ConvoId string `json:"convoId" cborgen:"convoId"` 215 + Message *ConvoDefs_LogDeleteMessage_Message `json:"message" cborgen:"message"` 216 + Rev string `json:"rev" cborgen:"rev"` 217 + } 218 + 219 + type ConvoDefs_LogDeleteMessage_Message struct { 220 + ConvoDefs_MessageView *ConvoDefs_MessageView 221 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 222 + } 223 + 224 + func (t *ConvoDefs_LogDeleteMessage_Message) MarshalJSON() ([]byte, error) { 225 + if t.ConvoDefs_MessageView != nil { 226 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 227 + return json.Marshal(t.ConvoDefs_MessageView) 228 + } 229 + if t.ConvoDefs_DeletedMessageView != nil { 230 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 231 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 232 + } 233 + return nil, fmt.Errorf("cannot marshal empty enum") 234 + } 235 + func (t *ConvoDefs_LogDeleteMessage_Message) UnmarshalJSON(b []byte) error { 236 + typ, err := util.TypeExtract(b) 237 + if err != nil { 238 + return err 239 + } 240 + 241 + switch typ { 242 + case "chat.bsky.convo.defs#messageView": 243 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 244 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 245 + case "chat.bsky.convo.defs#deletedMessageView": 246 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 247 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 248 + 249 + default: 250 + return nil 251 + } 252 + } 253 + 254 + // ConvoDefs_LogLeaveConvo is a "logLeaveConvo" in the chat.bsky.convo.defs schema. 255 + // 256 + // RECORDTYPE: ConvoDefs_LogLeaveConvo 257 + type ConvoDefs_LogLeaveConvo struct { 258 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logLeaveConvo" cborgen:"$type,const=chat.bsky.convo.defs#logLeaveConvo"` 259 + ConvoId string `json:"convoId" cborgen:"convoId"` 260 + Rev string `json:"rev" cborgen:"rev"` 261 + } 262 + 263 + // ConvoDefs_LogMuteConvo is a "logMuteConvo" in the chat.bsky.convo.defs schema. 264 + // 265 + // RECORDTYPE: ConvoDefs_LogMuteConvo 266 + type ConvoDefs_LogMuteConvo struct { 267 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logMuteConvo" cborgen:"$type,const=chat.bsky.convo.defs#logMuteConvo"` 268 + ConvoId string `json:"convoId" cborgen:"convoId"` 269 + Rev string `json:"rev" cborgen:"rev"` 270 + } 271 + 272 + // ConvoDefs_LogReadMessage is a "logReadMessage" in the chat.bsky.convo.defs schema. 273 + // 274 + // RECORDTYPE: ConvoDefs_LogReadMessage 275 + type ConvoDefs_LogReadMessage struct { 276 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logReadMessage" cborgen:"$type,const=chat.bsky.convo.defs#logReadMessage"` 277 + ConvoId string `json:"convoId" cborgen:"convoId"` 278 + Message *ConvoDefs_LogReadMessage_Message `json:"message" cborgen:"message"` 279 + Rev string `json:"rev" cborgen:"rev"` 280 + } 281 + 282 + type ConvoDefs_LogReadMessage_Message struct { 283 + ConvoDefs_MessageView *ConvoDefs_MessageView 284 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 285 + } 286 + 287 + func (t *ConvoDefs_LogReadMessage_Message) MarshalJSON() ([]byte, error) { 288 + if t.ConvoDefs_MessageView != nil { 289 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 290 + return json.Marshal(t.ConvoDefs_MessageView) 291 + } 292 + if t.ConvoDefs_DeletedMessageView != nil { 293 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 294 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 295 + } 296 + return nil, fmt.Errorf("cannot marshal empty enum") 297 + } 298 + func (t *ConvoDefs_LogReadMessage_Message) UnmarshalJSON(b []byte) error { 299 + typ, err := util.TypeExtract(b) 300 + if err != nil { 301 + return err 302 + } 303 + 304 + switch typ { 305 + case "chat.bsky.convo.defs#messageView": 306 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 307 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 308 + case "chat.bsky.convo.defs#deletedMessageView": 309 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 310 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 311 + 312 + default: 313 + return nil 314 + } 315 + } 316 + 317 + // ConvoDefs_LogRemoveReaction is a "logRemoveReaction" in the chat.bsky.convo.defs schema. 318 + // 319 + // RECORDTYPE: ConvoDefs_LogRemoveReaction 320 + type ConvoDefs_LogRemoveReaction struct { 321 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logRemoveReaction" cborgen:"$type,const=chat.bsky.convo.defs#logRemoveReaction"` 322 + ConvoId string `json:"convoId" cborgen:"convoId"` 323 + Message *ConvoDefs_LogRemoveReaction_Message `json:"message" cborgen:"message"` 324 + Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` 325 + Rev string `json:"rev" cborgen:"rev"` 326 + } 327 + 328 + type ConvoDefs_LogRemoveReaction_Message struct { 329 + ConvoDefs_MessageView *ConvoDefs_MessageView 330 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 331 + } 332 + 333 + func (t *ConvoDefs_LogRemoveReaction_Message) MarshalJSON() ([]byte, error) { 334 + if t.ConvoDefs_MessageView != nil { 335 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 336 + return json.Marshal(t.ConvoDefs_MessageView) 337 + } 338 + if t.ConvoDefs_DeletedMessageView != nil { 339 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 340 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 341 + } 342 + return nil, fmt.Errorf("cannot marshal empty enum") 343 + } 344 + func (t *ConvoDefs_LogRemoveReaction_Message) UnmarshalJSON(b []byte) error { 345 + typ, err := util.TypeExtract(b) 346 + if err != nil { 347 + return err 348 + } 349 + 350 + switch typ { 351 + case "chat.bsky.convo.defs#messageView": 352 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 353 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 354 + case "chat.bsky.convo.defs#deletedMessageView": 355 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 356 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 357 + 358 + default: 359 + return nil 360 + } 361 + } 362 + 363 + // ConvoDefs_LogUnmuteConvo is a "logUnmuteConvo" in the chat.bsky.convo.defs schema. 364 + // 365 + // RECORDTYPE: ConvoDefs_LogUnmuteConvo 366 + type ConvoDefs_LogUnmuteConvo struct { 367 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logUnmuteConvo" cborgen:"$type,const=chat.bsky.convo.defs#logUnmuteConvo"` 368 + ConvoId string `json:"convoId" cborgen:"convoId"` 369 + Rev string `json:"rev" cborgen:"rev"` 370 + } 371 + 372 + // ConvoDefs_MessageAndReactionView is a "messageAndReactionView" in the chat.bsky.convo.defs schema. 373 + // 374 + // RECORDTYPE: ConvoDefs_MessageAndReactionView 375 + type ConvoDefs_MessageAndReactionView struct { 376 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#messageAndReactionView" cborgen:"$type,const=chat.bsky.convo.defs#messageAndReactionView"` 377 + Message *ConvoDefs_MessageView `json:"message" cborgen:"message"` 378 + Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` 379 + } 380 + 381 + // ConvoDefs_MessageInput is the input argument to a chat.bsky.convo.defs call. 382 + type ConvoDefs_MessageInput struct { 383 + Embed *ConvoDefs_MessageInput_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 384 + // facets: Annotations of text (mentions, URLs, hashtags, etc) 385 + Facets []*appbskytypes.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` 386 + Text string `json:"text" cborgen:"text"` 387 + } 388 + 389 + type ConvoDefs_MessageInput_Embed struct { 390 + EmbedRecord *appbskytypes.EmbedRecord 391 + } 392 + 393 + func (t *ConvoDefs_MessageInput_Embed) MarshalJSON() ([]byte, error) { 394 + if t.EmbedRecord != nil { 395 + t.EmbedRecord.LexiconTypeID = "app.bsky.embed.record" 396 + return json.Marshal(t.EmbedRecord) 397 + } 398 + return nil, fmt.Errorf("cannot marshal empty enum") 399 + } 400 + func (t *ConvoDefs_MessageInput_Embed) UnmarshalJSON(b []byte) error { 401 + typ, err := util.TypeExtract(b) 402 + if err != nil { 403 + return err 404 + } 405 + 406 + switch typ { 407 + case "app.bsky.embed.record": 408 + t.EmbedRecord = new(appbskytypes.EmbedRecord) 409 + return json.Unmarshal(b, t.EmbedRecord) 410 + 411 + default: 412 + return nil 413 + } 414 + } 415 + 416 + // ConvoDefs_MessageRef is a "messageRef" in the chat.bsky.convo.defs schema. 417 + // 418 + // RECORDTYPE: ConvoDefs_MessageRef 419 + type ConvoDefs_MessageRef struct { 420 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#messageRef" cborgen:"$type,const=chat.bsky.convo.defs#messageRef"` 421 + ConvoId string `json:"convoId" cborgen:"convoId"` 422 + Did string `json:"did" cborgen:"did"` 423 + MessageId string `json:"messageId" cborgen:"messageId"` 424 + } 425 + 426 + // ConvoDefs_MessageView is a "messageView" in the chat.bsky.convo.defs schema. 427 + // 428 + // RECORDTYPE: ConvoDefs_MessageView 429 + type ConvoDefs_MessageView struct { 430 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#messageView" cborgen:"$type,const=chat.bsky.convo.defs#messageView"` 431 + Embed *ConvoDefs_MessageView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"` 432 + // facets: Annotations of text (mentions, URLs, hashtags, etc) 433 + Facets []*appbskytypes.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` 434 + Id string `json:"id" cborgen:"id"` 435 + // reactions: Reactions to this message, in ascending order of creation time. 436 + Reactions []*ConvoDefs_ReactionView `json:"reactions,omitempty" cborgen:"reactions,omitempty"` 437 + Rev string `json:"rev" cborgen:"rev"` 438 + Sender *ConvoDefs_MessageViewSender `json:"sender" cborgen:"sender"` 439 + SentAt string `json:"sentAt" cborgen:"sentAt"` 440 + Text string `json:"text" cborgen:"text"` 441 + } 442 + 443 + // ConvoDefs_MessageViewSender is a "messageViewSender" in the chat.bsky.convo.defs schema. 444 + type ConvoDefs_MessageViewSender struct { 445 + Did string `json:"did" cborgen:"did"` 446 + } 447 + 448 + type ConvoDefs_MessageView_Embed struct { 449 + EmbedRecord_View *appbskytypes.EmbedRecord_View 450 + } 451 + 452 + func (t *ConvoDefs_MessageView_Embed) MarshalJSON() ([]byte, error) { 453 + if t.EmbedRecord_View != nil { 454 + t.EmbedRecord_View.LexiconTypeID = "app.bsky.embed.record#view" 455 + return json.Marshal(t.EmbedRecord_View) 456 + } 457 + return nil, fmt.Errorf("cannot marshal empty enum") 458 + } 459 + func (t *ConvoDefs_MessageView_Embed) UnmarshalJSON(b []byte) error { 460 + typ, err := util.TypeExtract(b) 461 + if err != nil { 462 + return err 463 + } 464 + 465 + switch typ { 466 + case "app.bsky.embed.record#view": 467 + t.EmbedRecord_View = new(appbskytypes.EmbedRecord_View) 468 + return json.Unmarshal(b, t.EmbedRecord_View) 469 + 470 + default: 471 + return nil 472 + } 473 + } 474 + 475 + // ConvoDefs_ReactionView is a "reactionView" in the chat.bsky.convo.defs schema. 476 + type ConvoDefs_ReactionView struct { 477 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 478 + Sender *ConvoDefs_ReactionViewSender `json:"sender" cborgen:"sender"` 479 + Value string `json:"value" cborgen:"value"` 480 + } 481 + 482 + // ConvoDefs_ReactionViewSender is a "reactionViewSender" in the chat.bsky.convo.defs schema. 483 + type ConvoDefs_ReactionViewSender struct { 484 + Did string `json:"did" cborgen:"did"` 485 + }
+27
api/chat/convodeleteMessageForSelf.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.deleteMessageForSelf 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoDeleteMessageForSelf_Input is the input argument to a chat.bsky.convo.deleteMessageForSelf call. 14 + type ConvoDeleteMessageForSelf_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + MessageId string `json:"messageId" cborgen:"messageId"` 17 + } 18 + 19 + // ConvoDeleteMessageForSelf calls the XRPC method "chat.bsky.convo.deleteMessageForSelf". 20 + func ConvoDeleteMessageForSelf(ctx context.Context, c *xrpc.Client, input *ConvoDeleteMessageForSelf_Input) (*ConvoDefs_DeletedMessageView, error) { 21 + var out ConvoDefs_DeletedMessageView 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.deleteMessageForSelf", nil, input, &out); err != nil { 23 + return nil, err 24 + } 25 + 26 + return &out, nil 27 + }
+30
api/chat/convogetConvo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.getConvo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoGetConvo_Output is the output of a chat.bsky.convo.getConvo call. 14 + type ConvoGetConvo_Output struct { 15 + Convo *ConvoDefs_ConvoView `json:"convo" cborgen:"convo"` 16 + } 17 + 18 + // ConvoGetConvo calls the XRPC method "chat.bsky.convo.getConvo". 19 + func ConvoGetConvo(ctx context.Context, c *xrpc.Client, convoId string) (*ConvoGetConvo_Output, error) { 20 + var out ConvoGetConvo_Output 21 + 22 + params := map[string]interface{}{ 23 + "convoId": convoId, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvo", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+31
api/chat/convogetConvoAvailability.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.getConvoAvailability 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoGetConvoAvailability_Output is the output of a chat.bsky.convo.getConvoAvailability call. 14 + type ConvoGetConvoAvailability_Output struct { 15 + CanChat bool `json:"canChat" cborgen:"canChat"` 16 + Convo *ConvoDefs_ConvoView `json:"convo,omitempty" cborgen:"convo,omitempty"` 17 + } 18 + 19 + // ConvoGetConvoAvailability calls the XRPC method "chat.bsky.convo.getConvoAvailability". 20 + func ConvoGetConvoAvailability(ctx context.Context, c *xrpc.Client, members []string) (*ConvoGetConvoAvailability_Output, error) { 21 + var out ConvoGetConvoAvailability_Output 22 + 23 + params := map[string]interface{}{ 24 + "members": members, 25 + } 26 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvoAvailability", params, nil, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+30
api/chat/convogetConvoForMembers.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.getConvoForMembers 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoGetConvoForMembers_Output is the output of a chat.bsky.convo.getConvoForMembers call. 14 + type ConvoGetConvoForMembers_Output struct { 15 + Convo *ConvoDefs_ConvoView `json:"convo" cborgen:"convo"` 16 + } 17 + 18 + // ConvoGetConvoForMembers calls the XRPC method "chat.bsky.convo.getConvoForMembers". 19 + func ConvoGetConvoForMembers(ctx context.Context, c *xrpc.Client, members []string) (*ConvoGetConvoForMembers_Output, error) { 20 + var out ConvoGetConvoForMembers_Output 21 + 22 + params := map[string]interface{}{ 23 + "members": members, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvoForMembers", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+133
api/chat/convogetLog.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.getLog 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // ConvoGetLog_Output is the output of a chat.bsky.convo.getLog call. 17 + type ConvoGetLog_Output struct { 18 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 19 + Logs []*ConvoGetLog_Output_Logs_Elem `json:"logs" cborgen:"logs"` 20 + } 21 + 22 + type ConvoGetLog_Output_Logs_Elem struct { 23 + ConvoDefs_LogBeginConvo *ConvoDefs_LogBeginConvo 24 + ConvoDefs_LogAcceptConvo *ConvoDefs_LogAcceptConvo 25 + ConvoDefs_LogLeaveConvo *ConvoDefs_LogLeaveConvo 26 + ConvoDefs_LogMuteConvo *ConvoDefs_LogMuteConvo 27 + ConvoDefs_LogUnmuteConvo *ConvoDefs_LogUnmuteConvo 28 + ConvoDefs_LogCreateMessage *ConvoDefs_LogCreateMessage 29 + ConvoDefs_LogDeleteMessage *ConvoDefs_LogDeleteMessage 30 + ConvoDefs_LogReadMessage *ConvoDefs_LogReadMessage 31 + ConvoDefs_LogAddReaction *ConvoDefs_LogAddReaction 32 + ConvoDefs_LogRemoveReaction *ConvoDefs_LogRemoveReaction 33 + } 34 + 35 + func (t *ConvoGetLog_Output_Logs_Elem) MarshalJSON() ([]byte, error) { 36 + if t.ConvoDefs_LogBeginConvo != nil { 37 + t.ConvoDefs_LogBeginConvo.LexiconTypeID = "chat.bsky.convo.defs#logBeginConvo" 38 + return json.Marshal(t.ConvoDefs_LogBeginConvo) 39 + } 40 + if t.ConvoDefs_LogAcceptConvo != nil { 41 + t.ConvoDefs_LogAcceptConvo.LexiconTypeID = "chat.bsky.convo.defs#logAcceptConvo" 42 + return json.Marshal(t.ConvoDefs_LogAcceptConvo) 43 + } 44 + if t.ConvoDefs_LogLeaveConvo != nil { 45 + t.ConvoDefs_LogLeaveConvo.LexiconTypeID = "chat.bsky.convo.defs#logLeaveConvo" 46 + return json.Marshal(t.ConvoDefs_LogLeaveConvo) 47 + } 48 + if t.ConvoDefs_LogMuteConvo != nil { 49 + t.ConvoDefs_LogMuteConvo.LexiconTypeID = "chat.bsky.convo.defs#logMuteConvo" 50 + return json.Marshal(t.ConvoDefs_LogMuteConvo) 51 + } 52 + if t.ConvoDefs_LogUnmuteConvo != nil { 53 + t.ConvoDefs_LogUnmuteConvo.LexiconTypeID = "chat.bsky.convo.defs#logUnmuteConvo" 54 + return json.Marshal(t.ConvoDefs_LogUnmuteConvo) 55 + } 56 + if t.ConvoDefs_LogCreateMessage != nil { 57 + t.ConvoDefs_LogCreateMessage.LexiconTypeID = "chat.bsky.convo.defs#logCreateMessage" 58 + return json.Marshal(t.ConvoDefs_LogCreateMessage) 59 + } 60 + if t.ConvoDefs_LogDeleteMessage != nil { 61 + t.ConvoDefs_LogDeleteMessage.LexiconTypeID = "chat.bsky.convo.defs#logDeleteMessage" 62 + return json.Marshal(t.ConvoDefs_LogDeleteMessage) 63 + } 64 + if t.ConvoDefs_LogReadMessage != nil { 65 + t.ConvoDefs_LogReadMessage.LexiconTypeID = "chat.bsky.convo.defs#logReadMessage" 66 + return json.Marshal(t.ConvoDefs_LogReadMessage) 67 + } 68 + if t.ConvoDefs_LogAddReaction != nil { 69 + t.ConvoDefs_LogAddReaction.LexiconTypeID = "chat.bsky.convo.defs#logAddReaction" 70 + return json.Marshal(t.ConvoDefs_LogAddReaction) 71 + } 72 + if t.ConvoDefs_LogRemoveReaction != nil { 73 + t.ConvoDefs_LogRemoveReaction.LexiconTypeID = "chat.bsky.convo.defs#logRemoveReaction" 74 + return json.Marshal(t.ConvoDefs_LogRemoveReaction) 75 + } 76 + return nil, fmt.Errorf("cannot marshal empty enum") 77 + } 78 + func (t *ConvoGetLog_Output_Logs_Elem) UnmarshalJSON(b []byte) error { 79 + typ, err := util.TypeExtract(b) 80 + if err != nil { 81 + return err 82 + } 83 + 84 + switch typ { 85 + case "chat.bsky.convo.defs#logBeginConvo": 86 + t.ConvoDefs_LogBeginConvo = new(ConvoDefs_LogBeginConvo) 87 + return json.Unmarshal(b, t.ConvoDefs_LogBeginConvo) 88 + case "chat.bsky.convo.defs#logAcceptConvo": 89 + t.ConvoDefs_LogAcceptConvo = new(ConvoDefs_LogAcceptConvo) 90 + return json.Unmarshal(b, t.ConvoDefs_LogAcceptConvo) 91 + case "chat.bsky.convo.defs#logLeaveConvo": 92 + t.ConvoDefs_LogLeaveConvo = new(ConvoDefs_LogLeaveConvo) 93 + return json.Unmarshal(b, t.ConvoDefs_LogLeaveConvo) 94 + case "chat.bsky.convo.defs#logMuteConvo": 95 + t.ConvoDefs_LogMuteConvo = new(ConvoDefs_LogMuteConvo) 96 + return json.Unmarshal(b, t.ConvoDefs_LogMuteConvo) 97 + case "chat.bsky.convo.defs#logUnmuteConvo": 98 + t.ConvoDefs_LogUnmuteConvo = new(ConvoDefs_LogUnmuteConvo) 99 + return json.Unmarshal(b, t.ConvoDefs_LogUnmuteConvo) 100 + case "chat.bsky.convo.defs#logCreateMessage": 101 + t.ConvoDefs_LogCreateMessage = new(ConvoDefs_LogCreateMessage) 102 + return json.Unmarshal(b, t.ConvoDefs_LogCreateMessage) 103 + case "chat.bsky.convo.defs#logDeleteMessage": 104 + t.ConvoDefs_LogDeleteMessage = new(ConvoDefs_LogDeleteMessage) 105 + return json.Unmarshal(b, t.ConvoDefs_LogDeleteMessage) 106 + case "chat.bsky.convo.defs#logReadMessage": 107 + t.ConvoDefs_LogReadMessage = new(ConvoDefs_LogReadMessage) 108 + return json.Unmarshal(b, t.ConvoDefs_LogReadMessage) 109 + case "chat.bsky.convo.defs#logAddReaction": 110 + t.ConvoDefs_LogAddReaction = new(ConvoDefs_LogAddReaction) 111 + return json.Unmarshal(b, t.ConvoDefs_LogAddReaction) 112 + case "chat.bsky.convo.defs#logRemoveReaction": 113 + t.ConvoDefs_LogRemoveReaction = new(ConvoDefs_LogRemoveReaction) 114 + return json.Unmarshal(b, t.ConvoDefs_LogRemoveReaction) 115 + 116 + default: 117 + return nil 118 + } 119 + } 120 + 121 + // ConvoGetLog calls the XRPC method "chat.bsky.convo.getLog". 122 + func ConvoGetLog(ctx context.Context, c *xrpc.Client, cursor string) (*ConvoGetLog_Output, error) { 123 + var out ConvoGetLog_Output 124 + 125 + params := map[string]interface{}{ 126 + "cursor": cursor, 127 + } 128 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getLog", params, nil, &out); err != nil { 129 + return nil, err 130 + } 131 + 132 + return &out, nil 133 + }
+71
api/chat/convogetMessages.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.getMessages 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // ConvoGetMessages_Output is the output of a chat.bsky.convo.getMessages call. 17 + type ConvoGetMessages_Output struct { 18 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 19 + Messages []*ConvoGetMessages_Output_Messages_Elem `json:"messages" cborgen:"messages"` 20 + } 21 + 22 + type ConvoGetMessages_Output_Messages_Elem struct { 23 + ConvoDefs_MessageView *ConvoDefs_MessageView 24 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 25 + } 26 + 27 + func (t *ConvoGetMessages_Output_Messages_Elem) MarshalJSON() ([]byte, error) { 28 + if t.ConvoDefs_MessageView != nil { 29 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 30 + return json.Marshal(t.ConvoDefs_MessageView) 31 + } 32 + if t.ConvoDefs_DeletedMessageView != nil { 33 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 34 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 35 + } 36 + return nil, fmt.Errorf("cannot marshal empty enum") 37 + } 38 + func (t *ConvoGetMessages_Output_Messages_Elem) UnmarshalJSON(b []byte) error { 39 + typ, err := util.TypeExtract(b) 40 + if err != nil { 41 + return err 42 + } 43 + 44 + switch typ { 45 + case "chat.bsky.convo.defs#messageView": 46 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 47 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 48 + case "chat.bsky.convo.defs#deletedMessageView": 49 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 50 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 51 + 52 + default: 53 + return nil 54 + } 55 + } 56 + 57 + // ConvoGetMessages calls the XRPC method "chat.bsky.convo.getMessages". 58 + func ConvoGetMessages(ctx context.Context, c *xrpc.Client, convoId string, cursor string, limit int64) (*ConvoGetMessages_Output, error) { 59 + var out ConvoGetMessages_Output 60 + 61 + params := map[string]interface{}{ 62 + "convoId": convoId, 63 + "cursor": cursor, 64 + "limit": limit, 65 + } 66 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getMessages", params, nil, &out); err != nil { 67 + return nil, err 68 + } 69 + 70 + return &out, nil 71 + }
+32
api/chat/convoleaveConvo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.leaveConvo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoLeaveConvo_Input is the input argument to a chat.bsky.convo.leaveConvo call. 14 + type ConvoLeaveConvo_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + } 17 + 18 + // ConvoLeaveConvo_Output is the output of a chat.bsky.convo.leaveConvo call. 19 + type ConvoLeaveConvo_Output struct { 20 + ConvoId string `json:"convoId" cborgen:"convoId"` 21 + Rev string `json:"rev" cborgen:"rev"` 22 + } 23 + 24 + // ConvoLeaveConvo calls the XRPC method "chat.bsky.convo.leaveConvo". 25 + func ConvoLeaveConvo(ctx context.Context, c *xrpc.Client, input *ConvoLeaveConvo_Input) (*ConvoLeaveConvo_Output, error) { 26 + var out ConvoLeaveConvo_Output 27 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.leaveConvo", nil, input, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+34
api/chat/convolistConvos.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.listConvos 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoListConvos_Output is the output of a chat.bsky.convo.listConvos call. 14 + type ConvoListConvos_Output struct { 15 + Convos []*ConvoDefs_ConvoView `json:"convos" cborgen:"convos"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // ConvoListConvos calls the XRPC method "chat.bsky.convo.listConvos". 20 + func ConvoListConvos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, readState string, status string) (*ConvoListConvos_Output, error) { 21 + var out ConvoListConvos_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + "readState": readState, 27 + "status": status, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.listConvos", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+31
api/chat/convomuteConvo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.muteConvo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoMuteConvo_Input is the input argument to a chat.bsky.convo.muteConvo call. 14 + type ConvoMuteConvo_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + } 17 + 18 + // ConvoMuteConvo_Output is the output of a chat.bsky.convo.muteConvo call. 19 + type ConvoMuteConvo_Output struct { 20 + Convo *ConvoDefs_ConvoView `json:"convo" cborgen:"convo"` 21 + } 22 + 23 + // ConvoMuteConvo calls the XRPC method "chat.bsky.convo.muteConvo". 24 + func ConvoMuteConvo(ctx context.Context, c *xrpc.Client, input *ConvoMuteConvo_Input) (*ConvoMuteConvo_Output, error) { 25 + var out ConvoMuteConvo_Output 26 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.muteConvo", nil, input, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+33
api/chat/convoremoveReaction.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.removeReaction 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoRemoveReaction_Input is the input argument to a chat.bsky.convo.removeReaction call. 14 + type ConvoRemoveReaction_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + MessageId string `json:"messageId" cborgen:"messageId"` 17 + Value string `json:"value" cborgen:"value"` 18 + } 19 + 20 + // ConvoRemoveReaction_Output is the output of a chat.bsky.convo.removeReaction call. 21 + type ConvoRemoveReaction_Output struct { 22 + Message *ConvoDefs_MessageView `json:"message" cborgen:"message"` 23 + } 24 + 25 + // ConvoRemoveReaction calls the XRPC method "chat.bsky.convo.removeReaction". 26 + func ConvoRemoveReaction(ctx context.Context, c *xrpc.Client, input *ConvoRemoveReaction_Input) (*ConvoRemoveReaction_Output, error) { 27 + var out ConvoRemoveReaction_Output 28 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.removeReaction", nil, input, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+27
api/chat/convosendMessage.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.sendMessage 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoSendMessage_Input is the input argument to a chat.bsky.convo.sendMessage call. 14 + type ConvoSendMessage_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + Message *ConvoDefs_MessageInput `json:"message" cborgen:"message"` 17 + } 18 + 19 + // ConvoSendMessage calls the XRPC method "chat.bsky.convo.sendMessage". 20 + func ConvoSendMessage(ctx context.Context, c *xrpc.Client, input *ConvoSendMessage_Input) (*ConvoDefs_MessageView, error) { 21 + var out ConvoDefs_MessageView 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.sendMessage", nil, input, &out); err != nil { 23 + return nil, err 24 + } 25 + 26 + return &out, nil 27 + }
+37
api/chat/convosendMessageBatch.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.sendMessageBatch 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoSendMessageBatch_BatchItem is a "batchItem" in the chat.bsky.convo.sendMessageBatch schema. 14 + type ConvoSendMessageBatch_BatchItem struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + Message *ConvoDefs_MessageInput `json:"message" cborgen:"message"` 17 + } 18 + 19 + // ConvoSendMessageBatch_Input is the input argument to a chat.bsky.convo.sendMessageBatch call. 20 + type ConvoSendMessageBatch_Input struct { 21 + Items []*ConvoSendMessageBatch_BatchItem `json:"items" cborgen:"items"` 22 + } 23 + 24 + // ConvoSendMessageBatch_Output is the output of a chat.bsky.convo.sendMessageBatch call. 25 + type ConvoSendMessageBatch_Output struct { 26 + Items []*ConvoDefs_MessageView `json:"items" cborgen:"items"` 27 + } 28 + 29 + // ConvoSendMessageBatch calls the XRPC method "chat.bsky.convo.sendMessageBatch". 30 + func ConvoSendMessageBatch(ctx context.Context, c *xrpc.Client, input *ConvoSendMessageBatch_Input) (*ConvoSendMessageBatch_Output, error) { 31 + var out ConvoSendMessageBatch_Output 32 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.sendMessageBatch", nil, input, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+31
api/chat/convounmuteConvo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.unmuteConvo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoUnmuteConvo_Input is the input argument to a chat.bsky.convo.unmuteConvo call. 14 + type ConvoUnmuteConvo_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + } 17 + 18 + // ConvoUnmuteConvo_Output is the output of a chat.bsky.convo.unmuteConvo call. 19 + type ConvoUnmuteConvo_Output struct { 20 + Convo *ConvoDefs_ConvoView `json:"convo" cborgen:"convo"` 21 + } 22 + 23 + // ConvoUnmuteConvo calls the XRPC method "chat.bsky.convo.unmuteConvo". 24 + func ConvoUnmuteConvo(ctx context.Context, c *xrpc.Client, input *ConvoUnmuteConvo_Input) (*ConvoUnmuteConvo_Output, error) { 25 + var out ConvoUnmuteConvo_Output 26 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.unmuteConvo", nil, input, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+32
api/chat/convoupdateAllRead.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.updateAllRead 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoUpdateAllRead_Input is the input argument to a chat.bsky.convo.updateAllRead call. 14 + type ConvoUpdateAllRead_Input struct { 15 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 16 + } 17 + 18 + // ConvoUpdateAllRead_Output is the output of a chat.bsky.convo.updateAllRead call. 19 + type ConvoUpdateAllRead_Output struct { 20 + // updatedCount: The count of updated convos. 21 + UpdatedCount int64 `json:"updatedCount" cborgen:"updatedCount"` 22 + } 23 + 24 + // ConvoUpdateAllRead calls the XRPC method "chat.bsky.convo.updateAllRead". 25 + func ConvoUpdateAllRead(ctx context.Context, c *xrpc.Client, input *ConvoUpdateAllRead_Input) (*ConvoUpdateAllRead_Output, error) { 26 + var out ConvoUpdateAllRead_Output 27 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.updateAllRead", nil, input, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+32
api/chat/convoupdateRead.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.updateRead 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoUpdateRead_Input is the input argument to a chat.bsky.convo.updateRead call. 14 + type ConvoUpdateRead_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + MessageId *string `json:"messageId,omitempty" cborgen:"messageId,omitempty"` 17 + } 18 + 19 + // ConvoUpdateRead_Output is the output of a chat.bsky.convo.updateRead call. 20 + type ConvoUpdateRead_Output struct { 21 + Convo *ConvoDefs_ConvoView `json:"convo" cborgen:"convo"` 22 + } 23 + 24 + // ConvoUpdateRead calls the XRPC method "chat.bsky.convo.updateRead". 25 + func ConvoUpdateRead(ctx context.Context, c *xrpc.Client, input *ConvoUpdateRead_Input) (*ConvoUpdateRead_Output, error) { 26 + var out ConvoUpdateRead_Output 27 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.updateRead", nil, input, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+40
api/chat/moderationgetActorMetadata.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.moderation.getActorMetadata 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetActorMetadata_Metadata is a "metadata" in the chat.bsky.moderation.getActorMetadata schema. 14 + type ModerationGetActorMetadata_Metadata struct { 15 + Convos int64 `json:"convos" cborgen:"convos"` 16 + ConvosStarted int64 `json:"convosStarted" cborgen:"convosStarted"` 17 + MessagesReceived int64 `json:"messagesReceived" cborgen:"messagesReceived"` 18 + MessagesSent int64 `json:"messagesSent" cborgen:"messagesSent"` 19 + } 20 + 21 + // ModerationGetActorMetadata_Output is the output of a chat.bsky.moderation.getActorMetadata call. 22 + type ModerationGetActorMetadata_Output struct { 23 + All *ModerationGetActorMetadata_Metadata `json:"all" cborgen:"all"` 24 + Day *ModerationGetActorMetadata_Metadata `json:"day" cborgen:"day"` 25 + Month *ModerationGetActorMetadata_Metadata `json:"month" cborgen:"month"` 26 + } 27 + 28 + // ModerationGetActorMetadata calls the XRPC method "chat.bsky.moderation.getActorMetadata". 29 + func ModerationGetActorMetadata(ctx context.Context, c *xrpc.Client, actor string) (*ModerationGetActorMetadata_Output, error) { 30 + var out ModerationGetActorMetadata_Output 31 + 32 + params := map[string]interface{}{ 33 + "actor": actor, 34 + } 35 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.moderation.getActorMetadata", params, nil, &out); err != nil { 36 + return nil, err 37 + } 38 + 39 + return &out, nil 40 + }
+73
api/chat/moderationgetMessageContext.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.moderation.getMessageContext 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // ModerationGetMessageContext_Output is the output of a chat.bsky.moderation.getMessageContext call. 17 + type ModerationGetMessageContext_Output struct { 18 + Messages []*ModerationGetMessageContext_Output_Messages_Elem `json:"messages" cborgen:"messages"` 19 + } 20 + 21 + type ModerationGetMessageContext_Output_Messages_Elem struct { 22 + ConvoDefs_MessageView *ConvoDefs_MessageView 23 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 24 + } 25 + 26 + func (t *ModerationGetMessageContext_Output_Messages_Elem) MarshalJSON() ([]byte, error) { 27 + if t.ConvoDefs_MessageView != nil { 28 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 29 + return json.Marshal(t.ConvoDefs_MessageView) 30 + } 31 + if t.ConvoDefs_DeletedMessageView != nil { 32 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 33 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 34 + } 35 + return nil, fmt.Errorf("cannot marshal empty enum") 36 + } 37 + func (t *ModerationGetMessageContext_Output_Messages_Elem) UnmarshalJSON(b []byte) error { 38 + typ, err := util.TypeExtract(b) 39 + if err != nil { 40 + return err 41 + } 42 + 43 + switch typ { 44 + case "chat.bsky.convo.defs#messageView": 45 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 46 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 47 + case "chat.bsky.convo.defs#deletedMessageView": 48 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 49 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 50 + 51 + default: 52 + return nil 53 + } 54 + } 55 + 56 + // ModerationGetMessageContext calls the XRPC method "chat.bsky.moderation.getMessageContext". 57 + // 58 + // convoId: Conversation that the message is from. NOTE: this field will eventually be required. 59 + func ModerationGetMessageContext(ctx context.Context, c *xrpc.Client, after int64, before int64, convoId string, messageId string) (*ModerationGetMessageContext_Output, error) { 60 + var out ModerationGetMessageContext_Output 61 + 62 + params := map[string]interface{}{ 63 + "after": after, 64 + "before": before, 65 + "convoId": convoId, 66 + "messageId": messageId, 67 + } 68 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.moderation.getMessageContext", params, nil, &out); err != nil { 69 + return nil, err 70 + } 71 + 72 + return &out, nil 73 + }
+27
api/chat/moderationupdateActorAccess.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.moderation.updateActorAccess 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationUpdateActorAccess_Input is the input argument to a chat.bsky.moderation.updateActorAccess call. 14 + type ModerationUpdateActorAccess_Input struct { 15 + Actor string `json:"actor" cborgen:"actor"` 16 + AllowAccess bool `json:"allowAccess" cborgen:"allowAccess"` 17 + Ref *string `json:"ref,omitempty" cborgen:"ref,omitempty"` 18 + } 19 + 20 + // ModerationUpdateActorAccess calls the XRPC method "chat.bsky.moderation.updateActorAccess". 21 + func ModerationUpdateActorAccess(ctx context.Context, c *xrpc.Client, input *ModerationUpdateActorAccess_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.moderation.updateActorAccess", nil, input, nil); err != nil { 23 + return err 24 + } 25 + 26 + return nil 27 + }
+35
api/ozone/communicationcreateTemplate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.createTemplate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationCreateTemplate_Input is the input argument to a tools.ozone.communication.createTemplate call. 14 + type CommunicationCreateTemplate_Input struct { 15 + // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders. 16 + ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"` 17 + // createdBy: DID of the user who is creating the template. 18 + CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"` 19 + // lang: Message language. 20 + Lang *string `json:"lang,omitempty" cborgen:"lang,omitempty"` 21 + // name: Name of the template. 22 + Name string `json:"name" cborgen:"name"` 23 + // subject: Subject of the message, used in emails. 24 + Subject string `json:"subject" cborgen:"subject"` 25 + } 26 + 27 + // CommunicationCreateTemplate calls the XRPC method "tools.ozone.communication.createTemplate". 28 + func CommunicationCreateTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationCreateTemplate_Input) (*CommunicationDefs_TemplateView, error) { 29 + var out CommunicationDefs_TemplateView 30 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.createTemplate", nil, input, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+23
api/ozone/communicationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.defs 6 + 7 + // CommunicationDefs_TemplateView is a "templateView" in the tools.ozone.communication.defs schema. 8 + type CommunicationDefs_TemplateView struct { 9 + // contentMarkdown: Subject of the message, used in emails. 10 + ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"` 11 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 12 + Disabled bool `json:"disabled" cborgen:"disabled"` 13 + Id string `json:"id" cborgen:"id"` 14 + // lang: Message language. 15 + Lang *string `json:"lang,omitempty" cborgen:"lang,omitempty"` 16 + // lastUpdatedBy: DID of the user who last updated the template. 17 + LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"` 18 + // name: Name of the template. 19 + Name string `json:"name" cborgen:"name"` 20 + // subject: Content of the template, can contain markdown and variable placeholders. 21 + Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"` 22 + UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 23 + }
+25
api/ozone/communicationdeleteTemplate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.deleteTemplate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationDeleteTemplate_Input is the input argument to a tools.ozone.communication.deleteTemplate call. 14 + type CommunicationDeleteTemplate_Input struct { 15 + Id string `json:"id" cborgen:"id"` 16 + } 17 + 18 + // CommunicationDeleteTemplate calls the XRPC method "tools.ozone.communication.deleteTemplate". 19 + func CommunicationDeleteTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationDeleteTemplate_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.deleteTemplate", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+26
api/ozone/communicationlistTemplates.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.listTemplates 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationListTemplates_Output is the output of a tools.ozone.communication.listTemplates call. 14 + type CommunicationListTemplates_Output struct { 15 + CommunicationTemplates []*CommunicationDefs_TemplateView `json:"communicationTemplates" cborgen:"communicationTemplates"` 16 + } 17 + 18 + // CommunicationListTemplates calls the XRPC method "tools.ozone.communication.listTemplates". 19 + func CommunicationListTemplates(ctx context.Context, c *xrpc.Client) (*CommunicationListTemplates_Output, error) { 20 + var out CommunicationListTemplates_Output 21 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.communication.listTemplates", nil, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+38
api/ozone/communicationupdateTemplate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.updateTemplate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationUpdateTemplate_Input is the input argument to a tools.ozone.communication.updateTemplate call. 14 + type CommunicationUpdateTemplate_Input struct { 15 + // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders. 16 + ContentMarkdown *string `json:"contentMarkdown,omitempty" cborgen:"contentMarkdown,omitempty"` 17 + Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"` 18 + // id: ID of the template to be updated. 19 + Id string `json:"id" cborgen:"id"` 20 + // lang: Message language. 21 + Lang *string `json:"lang,omitempty" cborgen:"lang,omitempty"` 22 + // name: Name of the template. 23 + Name *string `json:"name,omitempty" cborgen:"name,omitempty"` 24 + // subject: Subject of the message, used in emails. 25 + Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"` 26 + // updatedBy: DID of the user who is updating the template. 27 + UpdatedBy *string `json:"updatedBy,omitempty" cborgen:"updatedBy,omitempty"` 28 + } 29 + 30 + // CommunicationUpdateTemplate calls the XRPC method "tools.ozone.communication.updateTemplate". 31 + func CommunicationUpdateTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationUpdateTemplate_Input) (*CommunicationDefs_TemplateView, error) { 32 + var out CommunicationDefs_TemplateView 33 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.updateTemplate", nil, input, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+143
api/ozone/hostinggetAccountHistory.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.hosting.getAccountHistory 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // HostingGetAccountHistory_AccountCreated is a "accountCreated" in the tools.ozone.hosting.getAccountHistory schema. 17 + // 18 + // RECORDTYPE: HostingGetAccountHistory_AccountCreated 19 + type HostingGetAccountHistory_AccountCreated struct { 20 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#accountCreated"` 21 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 22 + Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` 23 + } 24 + 25 + // HostingGetAccountHistory_EmailConfirmed is a "emailConfirmed" in the tools.ozone.hosting.getAccountHistory schema. 26 + // 27 + // RECORDTYPE: HostingGetAccountHistory_EmailConfirmed 28 + type HostingGetAccountHistory_EmailConfirmed struct { 29 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailConfirmed"` 30 + Email string `json:"email" cborgen:"email"` 31 + } 32 + 33 + // HostingGetAccountHistory_EmailUpdated is a "emailUpdated" in the tools.ozone.hosting.getAccountHistory schema. 34 + // 35 + // RECORDTYPE: HostingGetAccountHistory_EmailUpdated 36 + type HostingGetAccountHistory_EmailUpdated struct { 37 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#emailUpdated"` 38 + Email string `json:"email" cborgen:"email"` 39 + } 40 + 41 + // HostingGetAccountHistory_Event is a "event" in the tools.ozone.hosting.getAccountHistory schema. 42 + type HostingGetAccountHistory_Event struct { 43 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 44 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 45 + Details *HostingGetAccountHistory_Event_Details `json:"details" cborgen:"details"` 46 + } 47 + 48 + type HostingGetAccountHistory_Event_Details struct { 49 + HostingGetAccountHistory_AccountCreated *HostingGetAccountHistory_AccountCreated 50 + HostingGetAccountHistory_EmailUpdated *HostingGetAccountHistory_EmailUpdated 51 + HostingGetAccountHistory_EmailConfirmed *HostingGetAccountHistory_EmailConfirmed 52 + HostingGetAccountHistory_PasswordUpdated *HostingGetAccountHistory_PasswordUpdated 53 + HostingGetAccountHistory_HandleUpdated *HostingGetAccountHistory_HandleUpdated 54 + } 55 + 56 + func (t *HostingGetAccountHistory_Event_Details) MarshalJSON() ([]byte, error) { 57 + if t.HostingGetAccountHistory_AccountCreated != nil { 58 + t.HostingGetAccountHistory_AccountCreated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#accountCreated" 59 + return json.Marshal(t.HostingGetAccountHistory_AccountCreated) 60 + } 61 + if t.HostingGetAccountHistory_EmailUpdated != nil { 62 + t.HostingGetAccountHistory_EmailUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#emailUpdated" 63 + return json.Marshal(t.HostingGetAccountHistory_EmailUpdated) 64 + } 65 + if t.HostingGetAccountHistory_EmailConfirmed != nil { 66 + t.HostingGetAccountHistory_EmailConfirmed.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#emailConfirmed" 67 + return json.Marshal(t.HostingGetAccountHistory_EmailConfirmed) 68 + } 69 + if t.HostingGetAccountHistory_PasswordUpdated != nil { 70 + t.HostingGetAccountHistory_PasswordUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#passwordUpdated" 71 + return json.Marshal(t.HostingGetAccountHistory_PasswordUpdated) 72 + } 73 + if t.HostingGetAccountHistory_HandleUpdated != nil { 74 + t.HostingGetAccountHistory_HandleUpdated.LexiconTypeID = "tools.ozone.hosting.getAccountHistory#handleUpdated" 75 + return json.Marshal(t.HostingGetAccountHistory_HandleUpdated) 76 + } 77 + return nil, fmt.Errorf("cannot marshal empty enum") 78 + } 79 + func (t *HostingGetAccountHistory_Event_Details) UnmarshalJSON(b []byte) error { 80 + typ, err := util.TypeExtract(b) 81 + if err != nil { 82 + return err 83 + } 84 + 85 + switch typ { 86 + case "tools.ozone.hosting.getAccountHistory#accountCreated": 87 + t.HostingGetAccountHistory_AccountCreated = new(HostingGetAccountHistory_AccountCreated) 88 + return json.Unmarshal(b, t.HostingGetAccountHistory_AccountCreated) 89 + case "tools.ozone.hosting.getAccountHistory#emailUpdated": 90 + t.HostingGetAccountHistory_EmailUpdated = new(HostingGetAccountHistory_EmailUpdated) 91 + return json.Unmarshal(b, t.HostingGetAccountHistory_EmailUpdated) 92 + case "tools.ozone.hosting.getAccountHistory#emailConfirmed": 93 + t.HostingGetAccountHistory_EmailConfirmed = new(HostingGetAccountHistory_EmailConfirmed) 94 + return json.Unmarshal(b, t.HostingGetAccountHistory_EmailConfirmed) 95 + case "tools.ozone.hosting.getAccountHistory#passwordUpdated": 96 + t.HostingGetAccountHistory_PasswordUpdated = new(HostingGetAccountHistory_PasswordUpdated) 97 + return json.Unmarshal(b, t.HostingGetAccountHistory_PasswordUpdated) 98 + case "tools.ozone.hosting.getAccountHistory#handleUpdated": 99 + t.HostingGetAccountHistory_HandleUpdated = new(HostingGetAccountHistory_HandleUpdated) 100 + return json.Unmarshal(b, t.HostingGetAccountHistory_HandleUpdated) 101 + 102 + default: 103 + return nil 104 + } 105 + } 106 + 107 + // HostingGetAccountHistory_HandleUpdated is a "handleUpdated" in the tools.ozone.hosting.getAccountHistory schema. 108 + // 109 + // RECORDTYPE: HostingGetAccountHistory_HandleUpdated 110 + type HostingGetAccountHistory_HandleUpdated struct { 111 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#handleUpdated"` 112 + Handle string `json:"handle" cborgen:"handle"` 113 + } 114 + 115 + // HostingGetAccountHistory_Output is the output of a tools.ozone.hosting.getAccountHistory call. 116 + type HostingGetAccountHistory_Output struct { 117 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 118 + Events []*HostingGetAccountHistory_Event `json:"events" cborgen:"events"` 119 + } 120 + 121 + // HostingGetAccountHistory_PasswordUpdated is a "passwordUpdated" in the tools.ozone.hosting.getAccountHistory schema. 122 + // 123 + // RECORDTYPE: HostingGetAccountHistory_PasswordUpdated 124 + type HostingGetAccountHistory_PasswordUpdated struct { 125 + LexiconTypeID string `json:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated" cborgen:"$type,const=tools.ozone.hosting.getAccountHistory#passwordUpdated"` 126 + } 127 + 128 + // HostingGetAccountHistory calls the XRPC method "tools.ozone.hosting.getAccountHistory". 129 + func HostingGetAccountHistory(ctx context.Context, c *xrpc.Client, cursor string, did string, events []string, limit int64) (*HostingGetAccountHistory_Output, error) { 130 + var out HostingGetAccountHistory_Output 131 + 132 + params := map[string]interface{}{ 133 + "cursor": cursor, 134 + "did": did, 135 + "events": events, 136 + "limit": limit, 137 + } 138 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.hosting.getAccountHistory", params, nil, &out); err != nil { 139 + return nil, err 140 + } 141 + 142 + return &out, nil 143 + }
+1062
api/ozone/moderationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.defs 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 12 + chatbskytypes "github.com/bluesky-social/indigo/api/chat" 13 + "github.com/bluesky-social/indigo/lex/util" 14 + ) 15 + 16 + // ModerationDefs_AccountEvent is a "accountEvent" in the tools.ozone.moderation.defs schema. 17 + // 18 + // Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 19 + // 20 + // RECORDTYPE: ModerationDefs_AccountEvent 21 + type ModerationDefs_AccountEvent struct { 22 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountEvent" cborgen:"$type,const=tools.ozone.moderation.defs#accountEvent"` 23 + // active: Indicates that the account has a repository which can be fetched from the host that emitted this event. 24 + Active bool `json:"active" cborgen:"active"` 25 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 26 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 27 + Timestamp string `json:"timestamp" cborgen:"timestamp"` 28 + } 29 + 30 + // ModerationDefs_AccountHosting is a "accountHosting" in the tools.ozone.moderation.defs schema. 31 + // 32 + // RECORDTYPE: ModerationDefs_AccountHosting 33 + type ModerationDefs_AccountHosting struct { 34 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountHosting" cborgen:"$type,const=tools.ozone.moderation.defs#accountHosting"` 35 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 36 + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 37 + DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` 38 + ReactivatedAt *string `json:"reactivatedAt,omitempty" cborgen:"reactivatedAt,omitempty"` 39 + Status string `json:"status" cborgen:"status"` 40 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 41 + } 42 + 43 + // ModerationDefs_AccountStats is a "accountStats" in the tools.ozone.moderation.defs schema. 44 + // 45 + // Statistics about a particular account subject 46 + type ModerationDefs_AccountStats struct { 47 + // appealCount: Total number of appeals against a moderation action on the account 48 + AppealCount *int64 `json:"appealCount,omitempty" cborgen:"appealCount,omitempty"` 49 + // escalateCount: Number of times the account was escalated 50 + EscalateCount *int64 `json:"escalateCount,omitempty" cborgen:"escalateCount,omitempty"` 51 + // reportCount: Total number of reports on the account 52 + ReportCount *int64 `json:"reportCount,omitempty" cborgen:"reportCount,omitempty"` 53 + // suspendCount: Number of times the account was suspended 54 + SuspendCount *int64 `json:"suspendCount,omitempty" cborgen:"suspendCount,omitempty"` 55 + // takedownCount: Number of times the account was taken down 56 + TakedownCount *int64 `json:"takedownCount,omitempty" cborgen:"takedownCount,omitempty"` 57 + } 58 + 59 + // ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. 60 + type ModerationDefs_BlobView struct { 61 + Cid string `json:"cid" cborgen:"cid"` 62 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 63 + Details *ModerationDefs_BlobView_Details `json:"details,omitempty" cborgen:"details,omitempty"` 64 + MimeType string `json:"mimeType" cborgen:"mimeType"` 65 + Moderation *ModerationDefs_Moderation `json:"moderation,omitempty" cborgen:"moderation,omitempty"` 66 + Size int64 `json:"size" cborgen:"size"` 67 + } 68 + 69 + type ModerationDefs_BlobView_Details struct { 70 + ModerationDefs_ImageDetails *ModerationDefs_ImageDetails 71 + ModerationDefs_VideoDetails *ModerationDefs_VideoDetails 72 + } 73 + 74 + func (t *ModerationDefs_BlobView_Details) MarshalJSON() ([]byte, error) { 75 + if t.ModerationDefs_ImageDetails != nil { 76 + t.ModerationDefs_ImageDetails.LexiconTypeID = "tools.ozone.moderation.defs#imageDetails" 77 + return json.Marshal(t.ModerationDefs_ImageDetails) 78 + } 79 + if t.ModerationDefs_VideoDetails != nil { 80 + t.ModerationDefs_VideoDetails.LexiconTypeID = "tools.ozone.moderation.defs#videoDetails" 81 + return json.Marshal(t.ModerationDefs_VideoDetails) 82 + } 83 + return nil, fmt.Errorf("cannot marshal empty enum") 84 + } 85 + func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error { 86 + typ, err := util.TypeExtract(b) 87 + if err != nil { 88 + return err 89 + } 90 + 91 + switch typ { 92 + case "tools.ozone.moderation.defs#imageDetails": 93 + t.ModerationDefs_ImageDetails = new(ModerationDefs_ImageDetails) 94 + return json.Unmarshal(b, t.ModerationDefs_ImageDetails) 95 + case "tools.ozone.moderation.defs#videoDetails": 96 + t.ModerationDefs_VideoDetails = new(ModerationDefs_VideoDetails) 97 + return json.Unmarshal(b, t.ModerationDefs_VideoDetails) 98 + 99 + default: 100 + return nil 101 + } 102 + } 103 + 104 + // ModerationDefs_IdentityEvent is a "identityEvent" in the tools.ozone.moderation.defs schema. 105 + // 106 + // Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 107 + // 108 + // RECORDTYPE: ModerationDefs_IdentityEvent 109 + type ModerationDefs_IdentityEvent struct { 110 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#identityEvent" cborgen:"$type,const=tools.ozone.moderation.defs#identityEvent"` 111 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 112 + Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` 113 + PdsHost *string `json:"pdsHost,omitempty" cborgen:"pdsHost,omitempty"` 114 + Timestamp string `json:"timestamp" cborgen:"timestamp"` 115 + Tombstone *bool `json:"tombstone,omitempty" cborgen:"tombstone,omitempty"` 116 + } 117 + 118 + // ModerationDefs_ImageDetails is a "imageDetails" in the tools.ozone.moderation.defs schema. 119 + // 120 + // RECORDTYPE: ModerationDefs_ImageDetails 121 + type ModerationDefs_ImageDetails struct { 122 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#imageDetails" cborgen:"$type,const=tools.ozone.moderation.defs#imageDetails"` 123 + Height int64 `json:"height" cborgen:"height"` 124 + Width int64 `json:"width" cborgen:"width"` 125 + } 126 + 127 + // ModerationDefs_ModEventAcknowledge is a "modEventAcknowledge" in the tools.ozone.moderation.defs schema. 128 + // 129 + // RECORDTYPE: ModerationDefs_ModEventAcknowledge 130 + type ModerationDefs_ModEventAcknowledge struct { 131 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` 132 + // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). 133 + AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` 134 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 135 + } 136 + 137 + // ModerationDefs_ModEventComment is a "modEventComment" in the tools.ozone.moderation.defs schema. 138 + // 139 + // Add a comment to a subject. An empty comment will clear any previously set sticky comment. 140 + // 141 + // RECORDTYPE: ModerationDefs_ModEventComment 142 + type ModerationDefs_ModEventComment struct { 143 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventComment" cborgen:"$type,const=tools.ozone.moderation.defs#modEventComment"` 144 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 145 + // sticky: Make the comment persistent on the subject 146 + Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"` 147 + } 148 + 149 + // ModerationDefs_ModEventDivert is a "modEventDivert" in the tools.ozone.moderation.defs schema. 150 + // 151 + // Divert a record's blobs to a 3rd party service for further scanning/tagging 152 + // 153 + // RECORDTYPE: ModerationDefs_ModEventDivert 154 + type ModerationDefs_ModEventDivert struct { 155 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventDivert" cborgen:"$type,const=tools.ozone.moderation.defs#modEventDivert"` 156 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 157 + } 158 + 159 + // ModerationDefs_ModEventEmail is a "modEventEmail" in the tools.ozone.moderation.defs schema. 160 + // 161 + // # Keep a log of outgoing email to a user 162 + // 163 + // RECORDTYPE: ModerationDefs_ModEventEmail 164 + type ModerationDefs_ModEventEmail struct { 165 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEmail" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEmail"` 166 + // comment: Additional comment about the outgoing comm. 167 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 168 + // content: The content of the email sent to the user. 169 + Content *string `json:"content,omitempty" cborgen:"content,omitempty"` 170 + // subjectLine: The subject line of the email sent to the user. 171 + SubjectLine string `json:"subjectLine" cborgen:"subjectLine"` 172 + } 173 + 174 + // ModerationDefs_ModEventEscalate is a "modEventEscalate" in the tools.ozone.moderation.defs schema. 175 + // 176 + // RECORDTYPE: ModerationDefs_ModEventEscalate 177 + type ModerationDefs_ModEventEscalate struct { 178 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEscalate" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEscalate"` 179 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 180 + } 181 + 182 + // ModerationDefs_ModEventLabel is a "modEventLabel" in the tools.ozone.moderation.defs schema. 183 + // 184 + // Apply/Negate labels on a subject 185 + // 186 + // RECORDTYPE: ModerationDefs_ModEventLabel 187 + type ModerationDefs_ModEventLabel struct { 188 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventLabel" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"` 189 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 190 + CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"` 191 + // durationInHours: Indicates how long the label will remain on the subject. Only applies on labels that are being added. 192 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 193 + NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"` 194 + } 195 + 196 + // ModerationDefs_ModEventMute is a "modEventMute" in the tools.ozone.moderation.defs schema. 197 + // 198 + // # Mute incoming reports on a subject 199 + // 200 + // RECORDTYPE: ModerationDefs_ModEventMute 201 + type ModerationDefs_ModEventMute struct { 202 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMute"` 203 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 204 + // durationInHours: Indicates how long the subject should remain muted. 205 + DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"` 206 + } 207 + 208 + // ModerationDefs_ModEventMuteReporter is a "modEventMuteReporter" in the tools.ozone.moderation.defs schema. 209 + // 210 + // # Mute incoming reports from an account 211 + // 212 + // RECORDTYPE: ModerationDefs_ModEventMuteReporter 213 + type ModerationDefs_ModEventMuteReporter struct { 214 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter"` 215 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 216 + // durationInHours: Indicates how long the account should remain muted. Falsy value here means a permanent mute. 217 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 218 + } 219 + 220 + // ModerationDefs_ModEventPriorityScore is a "modEventPriorityScore" in the tools.ozone.moderation.defs schema. 221 + // 222 + // Set priority score of the subject. Higher score means higher priority. 223 + // 224 + // RECORDTYPE: ModerationDefs_ModEventPriorityScore 225 + type ModerationDefs_ModEventPriorityScore struct { 226 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore" cborgen:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore"` 227 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 228 + Score int64 `json:"score" cborgen:"score"` 229 + } 230 + 231 + // ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema. 232 + // 233 + // # Report a subject 234 + // 235 + // RECORDTYPE: ModerationDefs_ModEventReport 236 + type ModerationDefs_ModEventReport struct { 237 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReport" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReport"` 238 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 239 + // isReporterMuted: Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject. 240 + IsReporterMuted *bool `json:"isReporterMuted,omitempty" cborgen:"isReporterMuted,omitempty"` 241 + ReportType *string `json:"reportType" cborgen:"reportType"` 242 + } 243 + 244 + // ModerationDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the tools.ozone.moderation.defs schema. 245 + // 246 + // # Resolve appeal on a subject 247 + // 248 + // RECORDTYPE: ModerationDefs_ModEventResolveAppeal 249 + type ModerationDefs_ModEventResolveAppeal struct { 250 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal" cborgen:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal"` 251 + // comment: Describe resolution. 252 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 253 + } 254 + 255 + // ModerationDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the tools.ozone.moderation.defs schema. 256 + // 257 + // # Revert take down action on a subject 258 + // 259 + // RECORDTYPE: ModerationDefs_ModEventReverseTakedown 260 + type ModerationDefs_ModEventReverseTakedown struct { 261 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown"` 262 + // comment: Describe reasoning behind the reversal. 263 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 264 + } 265 + 266 + // ModerationDefs_ModEventTag is a "modEventTag" in the tools.ozone.moderation.defs schema. 267 + // 268 + // Add/Remove a tag on a subject 269 + // 270 + // RECORDTYPE: ModerationDefs_ModEventTag 271 + type ModerationDefs_ModEventTag struct { 272 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTag" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTag"` 273 + // add: Tags to be added to the subject. If already exists, won't be duplicated. 274 + Add []string `json:"add" cborgen:"add"` 275 + // comment: Additional comment about added/removed tags. 276 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 277 + // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. 278 + Remove []string `json:"remove" cborgen:"remove"` 279 + } 280 + 281 + // ModerationDefs_ModEventTakedown is a "modEventTakedown" in the tools.ozone.moderation.defs schema. 282 + // 283 + // # Take down a subject permanently or temporarily 284 + // 285 + // RECORDTYPE: ModerationDefs_ModEventTakedown 286 + type ModerationDefs_ModEventTakedown struct { 287 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTakedown"` 288 + // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). 289 + AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` 290 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 291 + // durationInHours: Indicates how long the takedown should be in effect before automatically expiring. 292 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 293 + // policies: Names/Keywords of the policies that drove the decision. 294 + Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"` 295 + } 296 + 297 + // ModerationDefs_ModEventUnmute is a "modEventUnmute" in the tools.ozone.moderation.defs schema. 298 + // 299 + // # Unmute action on a subject 300 + // 301 + // RECORDTYPE: ModerationDefs_ModEventUnmute 302 + type ModerationDefs_ModEventUnmute struct { 303 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmute"` 304 + // comment: Describe reasoning behind the reversal. 305 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 306 + } 307 + 308 + // ModerationDefs_ModEventUnmuteReporter is a "modEventUnmuteReporter" in the tools.ozone.moderation.defs schema. 309 + // 310 + // # Unmute incoming reports from an account 311 + // 312 + // RECORDTYPE: ModerationDefs_ModEventUnmuteReporter 313 + type ModerationDefs_ModEventUnmuteReporter struct { 314 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter"` 315 + // comment: Describe reasoning behind the reversal. 316 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 317 + } 318 + 319 + // ModerationDefs_ModEventView is a "modEventView" in the tools.ozone.moderation.defs schema. 320 + type ModerationDefs_ModEventView struct { 321 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 322 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 323 + CreatorHandle *string `json:"creatorHandle,omitempty" cborgen:"creatorHandle,omitempty"` 324 + Event *ModerationDefs_ModEventView_Event `json:"event" cborgen:"event"` 325 + Id int64 `json:"id" cborgen:"id"` 326 + Subject *ModerationDefs_ModEventView_Subject `json:"subject" cborgen:"subject"` 327 + SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"` 328 + SubjectHandle *string `json:"subjectHandle,omitempty" cborgen:"subjectHandle,omitempty"` 329 + } 330 + 331 + // ModerationDefs_ModEventViewDetail is a "modEventViewDetail" in the tools.ozone.moderation.defs schema. 332 + type ModerationDefs_ModEventViewDetail struct { 333 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 334 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 335 + Event *ModerationDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"` 336 + Id int64 `json:"id" cborgen:"id"` 337 + Subject *ModerationDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"` 338 + SubjectBlobs []*ModerationDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"` 339 + } 340 + 341 + type ModerationDefs_ModEventViewDetail_Event struct { 342 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 343 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 344 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 345 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 346 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 347 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 348 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 349 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 350 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 351 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 352 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 353 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 354 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 355 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 356 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 357 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 358 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 359 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 360 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 361 + } 362 + 363 + func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { 364 + if t.ModerationDefs_ModEventTakedown != nil { 365 + t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 366 + return json.Marshal(t.ModerationDefs_ModEventTakedown) 367 + } 368 + if t.ModerationDefs_ModEventReverseTakedown != nil { 369 + t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 370 + return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 371 + } 372 + if t.ModerationDefs_ModEventComment != nil { 373 + t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 374 + return json.Marshal(t.ModerationDefs_ModEventComment) 375 + } 376 + if t.ModerationDefs_ModEventReport != nil { 377 + t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 378 + return json.Marshal(t.ModerationDefs_ModEventReport) 379 + } 380 + if t.ModerationDefs_ModEventLabel != nil { 381 + t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 382 + return json.Marshal(t.ModerationDefs_ModEventLabel) 383 + } 384 + if t.ModerationDefs_ModEventAcknowledge != nil { 385 + t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 386 + return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 387 + } 388 + if t.ModerationDefs_ModEventEscalate != nil { 389 + t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 390 + return json.Marshal(t.ModerationDefs_ModEventEscalate) 391 + } 392 + if t.ModerationDefs_ModEventMute != nil { 393 + t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 394 + return json.Marshal(t.ModerationDefs_ModEventMute) 395 + } 396 + if t.ModerationDefs_ModEventUnmute != nil { 397 + t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" 398 + return json.Marshal(t.ModerationDefs_ModEventUnmute) 399 + } 400 + if t.ModerationDefs_ModEventMuteReporter != nil { 401 + t.ModerationDefs_ModEventMuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventMuteReporter" 402 + return json.Marshal(t.ModerationDefs_ModEventMuteReporter) 403 + } 404 + if t.ModerationDefs_ModEventUnmuteReporter != nil { 405 + t.ModerationDefs_ModEventUnmuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmuteReporter" 406 + return json.Marshal(t.ModerationDefs_ModEventUnmuteReporter) 407 + } 408 + if t.ModerationDefs_ModEventEmail != nil { 409 + t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 410 + return json.Marshal(t.ModerationDefs_ModEventEmail) 411 + } 412 + if t.ModerationDefs_ModEventResolveAppeal != nil { 413 + t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" 414 + return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) 415 + } 416 + if t.ModerationDefs_ModEventDivert != nil { 417 + t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" 418 + return json.Marshal(t.ModerationDefs_ModEventDivert) 419 + } 420 + if t.ModerationDefs_ModEventTag != nil { 421 + t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 422 + return json.Marshal(t.ModerationDefs_ModEventTag) 423 + } 424 + if t.ModerationDefs_AccountEvent != nil { 425 + t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 426 + return json.Marshal(t.ModerationDefs_AccountEvent) 427 + } 428 + if t.ModerationDefs_IdentityEvent != nil { 429 + t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 430 + return json.Marshal(t.ModerationDefs_IdentityEvent) 431 + } 432 + if t.ModerationDefs_RecordEvent != nil { 433 + t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 434 + return json.Marshal(t.ModerationDefs_RecordEvent) 435 + } 436 + if t.ModerationDefs_ModEventPriorityScore != nil { 437 + t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 438 + return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 439 + } 440 + return nil, fmt.Errorf("cannot marshal empty enum") 441 + } 442 + func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { 443 + typ, err := util.TypeExtract(b) 444 + if err != nil { 445 + return err 446 + } 447 + 448 + switch typ { 449 + case "tools.ozone.moderation.defs#modEventTakedown": 450 + t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 451 + return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 452 + case "tools.ozone.moderation.defs#modEventReverseTakedown": 453 + t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 454 + return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 455 + case "tools.ozone.moderation.defs#modEventComment": 456 + t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 457 + return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 458 + case "tools.ozone.moderation.defs#modEventReport": 459 + t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 460 + return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 461 + case "tools.ozone.moderation.defs#modEventLabel": 462 + t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 463 + return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 464 + case "tools.ozone.moderation.defs#modEventAcknowledge": 465 + t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 466 + return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 467 + case "tools.ozone.moderation.defs#modEventEscalate": 468 + t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 469 + return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 470 + case "tools.ozone.moderation.defs#modEventMute": 471 + t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 472 + return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 473 + case "tools.ozone.moderation.defs#modEventUnmute": 474 + t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) 475 + return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) 476 + case "tools.ozone.moderation.defs#modEventMuteReporter": 477 + t.ModerationDefs_ModEventMuteReporter = new(ModerationDefs_ModEventMuteReporter) 478 + return json.Unmarshal(b, t.ModerationDefs_ModEventMuteReporter) 479 + case "tools.ozone.moderation.defs#modEventUnmuteReporter": 480 + t.ModerationDefs_ModEventUnmuteReporter = new(ModerationDefs_ModEventUnmuteReporter) 481 + return json.Unmarshal(b, t.ModerationDefs_ModEventUnmuteReporter) 482 + case "tools.ozone.moderation.defs#modEventEmail": 483 + t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 484 + return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 485 + case "tools.ozone.moderation.defs#modEventResolveAppeal": 486 + t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) 487 + return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) 488 + case "tools.ozone.moderation.defs#modEventDivert": 489 + t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) 490 + return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) 491 + case "tools.ozone.moderation.defs#modEventTag": 492 + t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 493 + return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 494 + case "tools.ozone.moderation.defs#accountEvent": 495 + t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 496 + return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 497 + case "tools.ozone.moderation.defs#identityEvent": 498 + t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 499 + return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 500 + case "tools.ozone.moderation.defs#recordEvent": 501 + t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 502 + return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 503 + case "tools.ozone.moderation.defs#modEventPriorityScore": 504 + t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 505 + return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 506 + 507 + default: 508 + return nil 509 + } 510 + } 511 + 512 + type ModerationDefs_ModEventViewDetail_Subject struct { 513 + ModerationDefs_RepoView *ModerationDefs_RepoView 514 + ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 515 + ModerationDefs_RecordView *ModerationDefs_RecordView 516 + ModerationDefs_RecordViewNotFound *ModerationDefs_RecordViewNotFound 517 + } 518 + 519 + func (t *ModerationDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) { 520 + if t.ModerationDefs_RepoView != nil { 521 + t.ModerationDefs_RepoView.LexiconTypeID = "tools.ozone.moderation.defs#repoView" 522 + return json.Marshal(t.ModerationDefs_RepoView) 523 + } 524 + if t.ModerationDefs_RepoViewNotFound != nil { 525 + t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 526 + return json.Marshal(t.ModerationDefs_RepoViewNotFound) 527 + } 528 + if t.ModerationDefs_RecordView != nil { 529 + t.ModerationDefs_RecordView.LexiconTypeID = "tools.ozone.moderation.defs#recordView" 530 + return json.Marshal(t.ModerationDefs_RecordView) 531 + } 532 + if t.ModerationDefs_RecordViewNotFound != nil { 533 + t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" 534 + return json.Marshal(t.ModerationDefs_RecordViewNotFound) 535 + } 536 + return nil, fmt.Errorf("cannot marshal empty enum") 537 + } 538 + func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error { 539 + typ, err := util.TypeExtract(b) 540 + if err != nil { 541 + return err 542 + } 543 + 544 + switch typ { 545 + case "tools.ozone.moderation.defs#repoView": 546 + t.ModerationDefs_RepoView = new(ModerationDefs_RepoView) 547 + return json.Unmarshal(b, t.ModerationDefs_RepoView) 548 + case "tools.ozone.moderation.defs#repoViewNotFound": 549 + t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 550 + return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 551 + case "tools.ozone.moderation.defs#recordView": 552 + t.ModerationDefs_RecordView = new(ModerationDefs_RecordView) 553 + return json.Unmarshal(b, t.ModerationDefs_RecordView) 554 + case "tools.ozone.moderation.defs#recordViewNotFound": 555 + t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) 556 + return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) 557 + 558 + default: 559 + return nil 560 + } 561 + } 562 + 563 + type ModerationDefs_ModEventView_Event struct { 564 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 565 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 566 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 567 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 568 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 569 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 570 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 571 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 572 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 573 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 574 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 575 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 576 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 577 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 578 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 579 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 580 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 581 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 582 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 583 + } 584 + 585 + func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { 586 + if t.ModerationDefs_ModEventTakedown != nil { 587 + t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 588 + return json.Marshal(t.ModerationDefs_ModEventTakedown) 589 + } 590 + if t.ModerationDefs_ModEventReverseTakedown != nil { 591 + t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 592 + return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 593 + } 594 + if t.ModerationDefs_ModEventComment != nil { 595 + t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 596 + return json.Marshal(t.ModerationDefs_ModEventComment) 597 + } 598 + if t.ModerationDefs_ModEventReport != nil { 599 + t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 600 + return json.Marshal(t.ModerationDefs_ModEventReport) 601 + } 602 + if t.ModerationDefs_ModEventLabel != nil { 603 + t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 604 + return json.Marshal(t.ModerationDefs_ModEventLabel) 605 + } 606 + if t.ModerationDefs_ModEventAcknowledge != nil { 607 + t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 608 + return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 609 + } 610 + if t.ModerationDefs_ModEventEscalate != nil { 611 + t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 612 + return json.Marshal(t.ModerationDefs_ModEventEscalate) 613 + } 614 + if t.ModerationDefs_ModEventMute != nil { 615 + t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 616 + return json.Marshal(t.ModerationDefs_ModEventMute) 617 + } 618 + if t.ModerationDefs_ModEventUnmute != nil { 619 + t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" 620 + return json.Marshal(t.ModerationDefs_ModEventUnmute) 621 + } 622 + if t.ModerationDefs_ModEventMuteReporter != nil { 623 + t.ModerationDefs_ModEventMuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventMuteReporter" 624 + return json.Marshal(t.ModerationDefs_ModEventMuteReporter) 625 + } 626 + if t.ModerationDefs_ModEventUnmuteReporter != nil { 627 + t.ModerationDefs_ModEventUnmuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmuteReporter" 628 + return json.Marshal(t.ModerationDefs_ModEventUnmuteReporter) 629 + } 630 + if t.ModerationDefs_ModEventEmail != nil { 631 + t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 632 + return json.Marshal(t.ModerationDefs_ModEventEmail) 633 + } 634 + if t.ModerationDefs_ModEventResolveAppeal != nil { 635 + t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" 636 + return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) 637 + } 638 + if t.ModerationDefs_ModEventDivert != nil { 639 + t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" 640 + return json.Marshal(t.ModerationDefs_ModEventDivert) 641 + } 642 + if t.ModerationDefs_ModEventTag != nil { 643 + t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 644 + return json.Marshal(t.ModerationDefs_ModEventTag) 645 + } 646 + if t.ModerationDefs_AccountEvent != nil { 647 + t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 648 + return json.Marshal(t.ModerationDefs_AccountEvent) 649 + } 650 + if t.ModerationDefs_IdentityEvent != nil { 651 + t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 652 + return json.Marshal(t.ModerationDefs_IdentityEvent) 653 + } 654 + if t.ModerationDefs_RecordEvent != nil { 655 + t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 656 + return json.Marshal(t.ModerationDefs_RecordEvent) 657 + } 658 + if t.ModerationDefs_ModEventPriorityScore != nil { 659 + t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 660 + return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 661 + } 662 + return nil, fmt.Errorf("cannot marshal empty enum") 663 + } 664 + func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { 665 + typ, err := util.TypeExtract(b) 666 + if err != nil { 667 + return err 668 + } 669 + 670 + switch typ { 671 + case "tools.ozone.moderation.defs#modEventTakedown": 672 + t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 673 + return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 674 + case "tools.ozone.moderation.defs#modEventReverseTakedown": 675 + t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 676 + return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 677 + case "tools.ozone.moderation.defs#modEventComment": 678 + t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 679 + return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 680 + case "tools.ozone.moderation.defs#modEventReport": 681 + t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 682 + return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 683 + case "tools.ozone.moderation.defs#modEventLabel": 684 + t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 685 + return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 686 + case "tools.ozone.moderation.defs#modEventAcknowledge": 687 + t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 688 + return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 689 + case "tools.ozone.moderation.defs#modEventEscalate": 690 + t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 691 + return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 692 + case "tools.ozone.moderation.defs#modEventMute": 693 + t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 694 + return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 695 + case "tools.ozone.moderation.defs#modEventUnmute": 696 + t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) 697 + return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) 698 + case "tools.ozone.moderation.defs#modEventMuteReporter": 699 + t.ModerationDefs_ModEventMuteReporter = new(ModerationDefs_ModEventMuteReporter) 700 + return json.Unmarshal(b, t.ModerationDefs_ModEventMuteReporter) 701 + case "tools.ozone.moderation.defs#modEventUnmuteReporter": 702 + t.ModerationDefs_ModEventUnmuteReporter = new(ModerationDefs_ModEventUnmuteReporter) 703 + return json.Unmarshal(b, t.ModerationDefs_ModEventUnmuteReporter) 704 + case "tools.ozone.moderation.defs#modEventEmail": 705 + t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 706 + return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 707 + case "tools.ozone.moderation.defs#modEventResolveAppeal": 708 + t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) 709 + return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) 710 + case "tools.ozone.moderation.defs#modEventDivert": 711 + t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) 712 + return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) 713 + case "tools.ozone.moderation.defs#modEventTag": 714 + t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 715 + return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 716 + case "tools.ozone.moderation.defs#accountEvent": 717 + t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 718 + return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 719 + case "tools.ozone.moderation.defs#identityEvent": 720 + t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 721 + return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 722 + case "tools.ozone.moderation.defs#recordEvent": 723 + t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 724 + return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 725 + case "tools.ozone.moderation.defs#modEventPriorityScore": 726 + t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 727 + return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 728 + 729 + default: 730 + return nil 731 + } 732 + } 733 + 734 + type ModerationDefs_ModEventView_Subject struct { 735 + AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 736 + RepoStrongRef *comatprototypes.RepoStrongRef 737 + ConvoDefs_MessageRef *chatbskytypes.ConvoDefs_MessageRef 738 + } 739 + 740 + func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { 741 + if t.AdminDefs_RepoRef != nil { 742 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 743 + return json.Marshal(t.AdminDefs_RepoRef) 744 + } 745 + if t.RepoStrongRef != nil { 746 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 747 + return json.Marshal(t.RepoStrongRef) 748 + } 749 + if t.ConvoDefs_MessageRef != nil { 750 + t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" 751 + return json.Marshal(t.ConvoDefs_MessageRef) 752 + } 753 + return nil, fmt.Errorf("cannot marshal empty enum") 754 + } 755 + func (t *ModerationDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error { 756 + typ, err := util.TypeExtract(b) 757 + if err != nil { 758 + return err 759 + } 760 + 761 + switch typ { 762 + case "com.atproto.admin.defs#repoRef": 763 + t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 764 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 765 + case "com.atproto.repo.strongRef": 766 + t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 767 + return json.Unmarshal(b, t.RepoStrongRef) 768 + case "chat.bsky.convo.defs#messageRef": 769 + t.ConvoDefs_MessageRef = new(chatbskytypes.ConvoDefs_MessageRef) 770 + return json.Unmarshal(b, t.ConvoDefs_MessageRef) 771 + 772 + default: 773 + return nil 774 + } 775 + } 776 + 777 + // ModerationDefs_Moderation is a "moderation" in the tools.ozone.moderation.defs schema. 778 + type ModerationDefs_Moderation struct { 779 + SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 780 + } 781 + 782 + // ModerationDefs_ModerationDetail is a "moderationDetail" in the tools.ozone.moderation.defs schema. 783 + type ModerationDefs_ModerationDetail struct { 784 + SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 785 + } 786 + 787 + // ModerationDefs_RecordEvent is a "recordEvent" in the tools.ozone.moderation.defs schema. 788 + // 789 + // Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 790 + // 791 + // RECORDTYPE: ModerationDefs_RecordEvent 792 + type ModerationDefs_RecordEvent struct { 793 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordEvent" cborgen:"$type,const=tools.ozone.moderation.defs#recordEvent"` 794 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 795 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 796 + Op string `json:"op" cborgen:"op"` 797 + Timestamp string `json:"timestamp" cborgen:"timestamp"` 798 + } 799 + 800 + // ModerationDefs_RecordHosting is a "recordHosting" in the tools.ozone.moderation.defs schema. 801 + // 802 + // RECORDTYPE: ModerationDefs_RecordHosting 803 + type ModerationDefs_RecordHosting struct { 804 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordHosting" cborgen:"$type,const=tools.ozone.moderation.defs#recordHosting"` 805 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 806 + DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` 807 + Status string `json:"status" cborgen:"status"` 808 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 809 + } 810 + 811 + // ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema. 812 + // 813 + // RECORDTYPE: ModerationDefs_RecordView 814 + type ModerationDefs_RecordView struct { 815 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordView" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` 816 + BlobCids []string `json:"blobCids" cborgen:"blobCids"` 817 + Cid string `json:"cid" cborgen:"cid"` 818 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 819 + Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` 820 + Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` 821 + Uri string `json:"uri" cborgen:"uri"` 822 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 823 + } 824 + 825 + // ModerationDefs_RecordViewDetail is a "recordViewDetail" in the tools.ozone.moderation.defs schema. 826 + // 827 + // RECORDTYPE: ModerationDefs_RecordViewDetail 828 + type ModerationDefs_RecordViewDetail struct { 829 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewDetail" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewDetail"` 830 + Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"` 831 + Cid string `json:"cid" cborgen:"cid"` 832 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 833 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 834 + Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 835 + Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` 836 + Uri string `json:"uri" cborgen:"uri"` 837 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 838 + } 839 + 840 + // ModerationDefs_RecordViewNotFound is a "recordViewNotFound" in the tools.ozone.moderation.defs schema. 841 + // 842 + // RECORDTYPE: ModerationDefs_RecordViewNotFound 843 + type ModerationDefs_RecordViewNotFound struct { 844 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewNotFound"` 845 + Uri string `json:"uri" cborgen:"uri"` 846 + } 847 + 848 + // ModerationDefs_RecordsStats is a "recordsStats" in the tools.ozone.moderation.defs schema. 849 + // 850 + // Statistics about a set of record subject items 851 + type ModerationDefs_RecordsStats struct { 852 + // appealedCount: Number of items that were appealed at least once 853 + AppealedCount *int64 `json:"appealedCount,omitempty" cborgen:"appealedCount,omitempty"` 854 + // escalatedCount: Number of items that were escalated at least once 855 + EscalatedCount *int64 `json:"escalatedCount,omitempty" cborgen:"escalatedCount,omitempty"` 856 + // pendingCount: Number of item currently in "reviewOpen" or "reviewEscalated" state 857 + PendingCount *int64 `json:"pendingCount,omitempty" cborgen:"pendingCount,omitempty"` 858 + // processedCount: Number of item currently in "reviewNone" or "reviewClosed" state 859 + ProcessedCount *int64 `json:"processedCount,omitempty" cborgen:"processedCount,omitempty"` 860 + // reportedCount: Number of items that were reported at least once 861 + ReportedCount *int64 `json:"reportedCount,omitempty" cborgen:"reportedCount,omitempty"` 862 + // subjectCount: Total number of item in the set 863 + SubjectCount *int64 `json:"subjectCount,omitempty" cborgen:"subjectCount,omitempty"` 864 + // takendownCount: Number of item currently taken down 865 + TakendownCount *int64 `json:"takendownCount,omitempty" cborgen:"takendownCount,omitempty"` 866 + // totalReports: Cumulative sum of the number of reports on the items in the set 867 + TotalReports *int64 `json:"totalReports,omitempty" cborgen:"totalReports,omitempty"` 868 + } 869 + 870 + // ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema. 871 + // 872 + // RECORDTYPE: ModerationDefs_RepoView 873 + type ModerationDefs_RepoView struct { 874 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoView" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` 875 + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 876 + Did string `json:"did" cborgen:"did"` 877 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 878 + Handle string `json:"handle" cborgen:"handle"` 879 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 880 + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 881 + InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 882 + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 883 + Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` 884 + RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 885 + ThreatSignatures []*comatprototypes.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` 886 + } 887 + 888 + // ModerationDefs_RepoViewDetail is a "repoViewDetail" in the tools.ozone.moderation.defs schema. 889 + // 890 + // RECORDTYPE: ModerationDefs_RepoViewDetail 891 + type ModerationDefs_RepoViewDetail struct { 892 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewDetail" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewDetail"` 893 + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 894 + Did string `json:"did" cborgen:"did"` 895 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 896 + EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` 897 + Handle string `json:"handle" cborgen:"handle"` 898 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 899 + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 900 + InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 901 + Invites []*comatprototypes.ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` 902 + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 903 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 904 + Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 905 + RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 906 + ThreatSignatures []*comatprototypes.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` 907 + } 908 + 909 + // ModerationDefs_RepoViewNotFound is a "repoViewNotFound" in the tools.ozone.moderation.defs schema. 910 + // 911 + // RECORDTYPE: ModerationDefs_RepoViewNotFound 912 + type ModerationDefs_RepoViewNotFound struct { 913 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewNotFound"` 914 + Did string `json:"did" cborgen:"did"` 915 + } 916 + 917 + // ModerationDefs_ReporterStats is a "reporterStats" in the tools.ozone.moderation.defs schema. 918 + type ModerationDefs_ReporterStats struct { 919 + // accountReportCount: The total number of reports made by the user on accounts. 920 + AccountReportCount int64 `json:"accountReportCount" cborgen:"accountReportCount"` 921 + Did string `json:"did" cborgen:"did"` 922 + // labeledAccountCount: The total number of accounts labeled as a result of the user's reports. 923 + LabeledAccountCount int64 `json:"labeledAccountCount" cborgen:"labeledAccountCount"` 924 + // labeledRecordCount: The total number of records labeled as a result of the user's reports. 925 + LabeledRecordCount int64 `json:"labeledRecordCount" cborgen:"labeledRecordCount"` 926 + // recordReportCount: The total number of reports made by the user on records. 927 + RecordReportCount int64 `json:"recordReportCount" cborgen:"recordReportCount"` 928 + // reportedAccountCount: The total number of accounts reported by the user. 929 + ReportedAccountCount int64 `json:"reportedAccountCount" cborgen:"reportedAccountCount"` 930 + // reportedRecordCount: The total number of records reported by the user. 931 + ReportedRecordCount int64 `json:"reportedRecordCount" cborgen:"reportedRecordCount"` 932 + // takendownAccountCount: The total number of accounts taken down as a result of the user's reports. 933 + TakendownAccountCount int64 `json:"takendownAccountCount" cborgen:"takendownAccountCount"` 934 + // takendownRecordCount: The total number of records taken down as a result of the user's reports. 935 + TakendownRecordCount int64 `json:"takendownRecordCount" cborgen:"takendownRecordCount"` 936 + } 937 + 938 + // ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema. 939 + type ModerationDefs_SubjectStatusView struct { 940 + // accountStats: Statistics related to the account subject 941 + AccountStats *ModerationDefs_AccountStats `json:"accountStats,omitempty" cborgen:"accountStats,omitempty"` 942 + // appealed: True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. 943 + Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` 944 + // comment: Sticky comment on the subject. 945 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 946 + // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject 947 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 948 + Hosting *ModerationDefs_SubjectStatusView_Hosting `json:"hosting,omitempty" cborgen:"hosting,omitempty"` 949 + Id int64 `json:"id" cborgen:"id"` 950 + // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action 951 + LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` 952 + LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` 953 + LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"` 954 + LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` 955 + MuteReportingUntil *string `json:"muteReportingUntil,omitempty" cborgen:"muteReportingUntil,omitempty"` 956 + MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` 957 + // priorityScore: Numeric value representing the level of priority. Higher score means higher priority. 958 + PriorityScore *int64 `json:"priorityScore,omitempty" cborgen:"priorityScore,omitempty"` 959 + // recordsStats: Statistics related to the record subjects authored by the subject's account 960 + RecordsStats *ModerationDefs_RecordsStats `json:"recordsStats,omitempty" cborgen:"recordsStats,omitempty"` 961 + ReviewState *string `json:"reviewState" cborgen:"reviewState"` 962 + Subject *ModerationDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"` 963 + SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 964 + SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` 965 + SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"` 966 + Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 967 + Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` 968 + // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject 969 + UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 970 + } 971 + 972 + type ModerationDefs_SubjectStatusView_Hosting struct { 973 + ModerationDefs_AccountHosting *ModerationDefs_AccountHosting 974 + ModerationDefs_RecordHosting *ModerationDefs_RecordHosting 975 + } 976 + 977 + func (t *ModerationDefs_SubjectStatusView_Hosting) MarshalJSON() ([]byte, error) { 978 + if t.ModerationDefs_AccountHosting != nil { 979 + t.ModerationDefs_AccountHosting.LexiconTypeID = "tools.ozone.moderation.defs#accountHosting" 980 + return json.Marshal(t.ModerationDefs_AccountHosting) 981 + } 982 + if t.ModerationDefs_RecordHosting != nil { 983 + t.ModerationDefs_RecordHosting.LexiconTypeID = "tools.ozone.moderation.defs#recordHosting" 984 + return json.Marshal(t.ModerationDefs_RecordHosting) 985 + } 986 + return nil, fmt.Errorf("cannot marshal empty enum") 987 + } 988 + func (t *ModerationDefs_SubjectStatusView_Hosting) UnmarshalJSON(b []byte) error { 989 + typ, err := util.TypeExtract(b) 990 + if err != nil { 991 + return err 992 + } 993 + 994 + switch typ { 995 + case "tools.ozone.moderation.defs#accountHosting": 996 + t.ModerationDefs_AccountHosting = new(ModerationDefs_AccountHosting) 997 + return json.Unmarshal(b, t.ModerationDefs_AccountHosting) 998 + case "tools.ozone.moderation.defs#recordHosting": 999 + t.ModerationDefs_RecordHosting = new(ModerationDefs_RecordHosting) 1000 + return json.Unmarshal(b, t.ModerationDefs_RecordHosting) 1001 + 1002 + default: 1003 + return nil 1004 + } 1005 + } 1006 + 1007 + type ModerationDefs_SubjectStatusView_Subject struct { 1008 + AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 1009 + RepoStrongRef *comatprototypes.RepoStrongRef 1010 + } 1011 + 1012 + func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) { 1013 + if t.AdminDefs_RepoRef != nil { 1014 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 1015 + return json.Marshal(t.AdminDefs_RepoRef) 1016 + } 1017 + if t.RepoStrongRef != nil { 1018 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 1019 + return json.Marshal(t.RepoStrongRef) 1020 + } 1021 + return nil, fmt.Errorf("cannot marshal empty enum") 1022 + } 1023 + func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error { 1024 + typ, err := util.TypeExtract(b) 1025 + if err != nil { 1026 + return err 1027 + } 1028 + 1029 + switch typ { 1030 + case "com.atproto.admin.defs#repoRef": 1031 + t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 1032 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 1033 + case "com.atproto.repo.strongRef": 1034 + t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 1035 + return json.Unmarshal(b, t.RepoStrongRef) 1036 + 1037 + default: 1038 + return nil 1039 + } 1040 + } 1041 + 1042 + // ModerationDefs_SubjectView is a "subjectView" in the tools.ozone.moderation.defs schema. 1043 + // 1044 + // Detailed view of a subject. For record subjects, the author's repo and profile will be returned. 1045 + type ModerationDefs_SubjectView struct { 1046 + Profile *ModerationDefs_SubjectView_Profile `json:"profile,omitempty" cborgen:"profile,omitempty"` 1047 + Record *ModerationDefs_RecordViewDetail `json:"record,omitempty" cborgen:"record,omitempty"` 1048 + Repo *ModerationDefs_RepoViewDetail `json:"repo,omitempty" cborgen:"repo,omitempty"` 1049 + Status *ModerationDefs_SubjectStatusView `json:"status,omitempty" cborgen:"status,omitempty"` 1050 + Subject string `json:"subject" cborgen:"subject"` 1051 + Type *string `json:"type" cborgen:"type"` 1052 + } 1053 + 1054 + // ModerationDefs_VideoDetails is a "videoDetails" in the tools.ozone.moderation.defs schema. 1055 + // 1056 + // RECORDTYPE: ModerationDefs_VideoDetails 1057 + type ModerationDefs_VideoDetails struct { 1058 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#videoDetails" cborgen:"$type,const=tools.ozone.moderation.defs#videoDetails"` 1059 + Height int64 `json:"height" cborgen:"height"` 1060 + Length int64 `json:"length" cborgen:"length"` 1061 + Width int64 `json:"width" cborgen:"width"` 1062 + }
+239
api/ozone/moderationemitEvent.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.emitEvent 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 13 + "github.com/bluesky-social/indigo/lex/util" 14 + "github.com/bluesky-social/indigo/xrpc" 15 + ) 16 + 17 + // ModerationEmitEvent_Input is the input argument to a tools.ozone.moderation.emitEvent call. 18 + type ModerationEmitEvent_Input struct { 19 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 20 + Event *ModerationEmitEvent_Input_Event `json:"event" cborgen:"event"` 21 + Subject *ModerationEmitEvent_Input_Subject `json:"subject" cborgen:"subject"` 22 + SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 23 + } 24 + 25 + type ModerationEmitEvent_Input_Event struct { 26 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 27 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 28 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 29 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 30 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 31 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 32 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 33 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 34 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 35 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 36 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 37 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 38 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 39 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 40 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 41 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 42 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 43 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 44 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 45 + } 46 + 47 + func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { 48 + if t.ModerationDefs_ModEventTakedown != nil { 49 + t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 50 + return json.Marshal(t.ModerationDefs_ModEventTakedown) 51 + } 52 + if t.ModerationDefs_ModEventAcknowledge != nil { 53 + t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 54 + return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 55 + } 56 + if t.ModerationDefs_ModEventEscalate != nil { 57 + t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 58 + return json.Marshal(t.ModerationDefs_ModEventEscalate) 59 + } 60 + if t.ModerationDefs_ModEventComment != nil { 61 + t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 62 + return json.Marshal(t.ModerationDefs_ModEventComment) 63 + } 64 + if t.ModerationDefs_ModEventLabel != nil { 65 + t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 66 + return json.Marshal(t.ModerationDefs_ModEventLabel) 67 + } 68 + if t.ModerationDefs_ModEventReport != nil { 69 + t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 70 + return json.Marshal(t.ModerationDefs_ModEventReport) 71 + } 72 + if t.ModerationDefs_ModEventMute != nil { 73 + t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 74 + return json.Marshal(t.ModerationDefs_ModEventMute) 75 + } 76 + if t.ModerationDefs_ModEventUnmute != nil { 77 + t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" 78 + return json.Marshal(t.ModerationDefs_ModEventUnmute) 79 + } 80 + if t.ModerationDefs_ModEventMuteReporter != nil { 81 + t.ModerationDefs_ModEventMuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventMuteReporter" 82 + return json.Marshal(t.ModerationDefs_ModEventMuteReporter) 83 + } 84 + if t.ModerationDefs_ModEventUnmuteReporter != nil { 85 + t.ModerationDefs_ModEventUnmuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmuteReporter" 86 + return json.Marshal(t.ModerationDefs_ModEventUnmuteReporter) 87 + } 88 + if t.ModerationDefs_ModEventReverseTakedown != nil { 89 + t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 90 + return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 91 + } 92 + if t.ModerationDefs_ModEventResolveAppeal != nil { 93 + t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" 94 + return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) 95 + } 96 + if t.ModerationDefs_ModEventEmail != nil { 97 + t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 98 + return json.Marshal(t.ModerationDefs_ModEventEmail) 99 + } 100 + if t.ModerationDefs_ModEventDivert != nil { 101 + t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" 102 + return json.Marshal(t.ModerationDefs_ModEventDivert) 103 + } 104 + if t.ModerationDefs_ModEventTag != nil { 105 + t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 106 + return json.Marshal(t.ModerationDefs_ModEventTag) 107 + } 108 + if t.ModerationDefs_AccountEvent != nil { 109 + t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 110 + return json.Marshal(t.ModerationDefs_AccountEvent) 111 + } 112 + if t.ModerationDefs_IdentityEvent != nil { 113 + t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 114 + return json.Marshal(t.ModerationDefs_IdentityEvent) 115 + } 116 + if t.ModerationDefs_RecordEvent != nil { 117 + t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 118 + return json.Marshal(t.ModerationDefs_RecordEvent) 119 + } 120 + if t.ModerationDefs_ModEventPriorityScore != nil { 121 + t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 122 + return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 123 + } 124 + return nil, fmt.Errorf("cannot marshal empty enum") 125 + } 126 + func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { 127 + typ, err := util.TypeExtract(b) 128 + if err != nil { 129 + return err 130 + } 131 + 132 + switch typ { 133 + case "tools.ozone.moderation.defs#modEventTakedown": 134 + t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 135 + return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 136 + case "tools.ozone.moderation.defs#modEventAcknowledge": 137 + t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 138 + return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 139 + case "tools.ozone.moderation.defs#modEventEscalate": 140 + t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 141 + return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 142 + case "tools.ozone.moderation.defs#modEventComment": 143 + t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 144 + return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 145 + case "tools.ozone.moderation.defs#modEventLabel": 146 + t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 147 + return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 148 + case "tools.ozone.moderation.defs#modEventReport": 149 + t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 150 + return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 151 + case "tools.ozone.moderation.defs#modEventMute": 152 + t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 153 + return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 154 + case "tools.ozone.moderation.defs#modEventUnmute": 155 + t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) 156 + return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) 157 + case "tools.ozone.moderation.defs#modEventMuteReporter": 158 + t.ModerationDefs_ModEventMuteReporter = new(ModerationDefs_ModEventMuteReporter) 159 + return json.Unmarshal(b, t.ModerationDefs_ModEventMuteReporter) 160 + case "tools.ozone.moderation.defs#modEventUnmuteReporter": 161 + t.ModerationDefs_ModEventUnmuteReporter = new(ModerationDefs_ModEventUnmuteReporter) 162 + return json.Unmarshal(b, t.ModerationDefs_ModEventUnmuteReporter) 163 + case "tools.ozone.moderation.defs#modEventReverseTakedown": 164 + t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 165 + return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 166 + case "tools.ozone.moderation.defs#modEventResolveAppeal": 167 + t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) 168 + return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) 169 + case "tools.ozone.moderation.defs#modEventEmail": 170 + t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 171 + return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 172 + case "tools.ozone.moderation.defs#modEventDivert": 173 + t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) 174 + return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) 175 + case "tools.ozone.moderation.defs#modEventTag": 176 + t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 177 + return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 178 + case "tools.ozone.moderation.defs#accountEvent": 179 + t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 180 + return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 181 + case "tools.ozone.moderation.defs#identityEvent": 182 + t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 183 + return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 184 + case "tools.ozone.moderation.defs#recordEvent": 185 + t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 186 + return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 187 + case "tools.ozone.moderation.defs#modEventPriorityScore": 188 + t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 189 + return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 190 + 191 + default: 192 + return nil 193 + } 194 + } 195 + 196 + type ModerationEmitEvent_Input_Subject struct { 197 + AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 198 + RepoStrongRef *comatprototypes.RepoStrongRef 199 + } 200 + 201 + func (t *ModerationEmitEvent_Input_Subject) MarshalJSON() ([]byte, error) { 202 + if t.AdminDefs_RepoRef != nil { 203 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 204 + return json.Marshal(t.AdminDefs_RepoRef) 205 + } 206 + if t.RepoStrongRef != nil { 207 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 208 + return json.Marshal(t.RepoStrongRef) 209 + } 210 + return nil, fmt.Errorf("cannot marshal empty enum") 211 + } 212 + func (t *ModerationEmitEvent_Input_Subject) UnmarshalJSON(b []byte) error { 213 + typ, err := util.TypeExtract(b) 214 + if err != nil { 215 + return err 216 + } 217 + 218 + switch typ { 219 + case "com.atproto.admin.defs#repoRef": 220 + t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 221 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 222 + case "com.atproto.repo.strongRef": 223 + t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 224 + return json.Unmarshal(b, t.RepoStrongRef) 225 + 226 + default: 227 + return nil 228 + } 229 + } 230 + 231 + // ModerationEmitEvent calls the XRPC method "tools.ozone.moderation.emitEvent". 232 + func ModerationEmitEvent(ctx context.Context, c *xrpc.Client, input *ModerationEmitEvent_Input) (*ModerationDefs_ModEventView, error) { 233 + var out ModerationDefs_ModEventView 234 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.moderation.emitEvent", nil, input, &out); err != nil { 235 + return nil, err 236 + } 237 + 238 + return &out, nil 239 + }
+25
api/ozone/moderationgetEvent.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getEvent 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetEvent calls the XRPC method "tools.ozone.moderation.getEvent". 14 + func ModerationGetEvent(ctx context.Context, c *xrpc.Client, id int64) (*ModerationDefs_ModEventViewDetail, error) { 15 + var out ModerationDefs_ModEventViewDetail 16 + 17 + params := map[string]interface{}{ 18 + "id": id, 19 + } 20 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getEvent", params, nil, &out); err != nil { 21 + return nil, err 22 + } 23 + 24 + return &out, nil 25 + }
+26
api/ozone/moderationgetRecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getRecord 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetRecord calls the XRPC method "tools.ozone.moderation.getRecord". 14 + func ModerationGetRecord(ctx context.Context, c *xrpc.Client, cid string, uri string) (*ModerationDefs_RecordViewDetail, error) { 15 + var out ModerationDefs_RecordViewDetail 16 + 17 + params := map[string]interface{}{ 18 + "cid": cid, 19 + "uri": uri, 20 + } 21 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRecord", params, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+68
api/ozone/moderationgetRecords.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getRecords 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // ModerationGetRecords_Output is the output of a tools.ozone.moderation.getRecords call. 17 + type ModerationGetRecords_Output struct { 18 + Records []*ModerationGetRecords_Output_Records_Elem `json:"records" cborgen:"records"` 19 + } 20 + 21 + type ModerationGetRecords_Output_Records_Elem struct { 22 + ModerationDefs_RecordViewDetail *ModerationDefs_RecordViewDetail 23 + ModerationDefs_RecordViewNotFound *ModerationDefs_RecordViewNotFound 24 + } 25 + 26 + func (t *ModerationGetRecords_Output_Records_Elem) MarshalJSON() ([]byte, error) { 27 + if t.ModerationDefs_RecordViewDetail != nil { 28 + t.ModerationDefs_RecordViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#recordViewDetail" 29 + return json.Marshal(t.ModerationDefs_RecordViewDetail) 30 + } 31 + if t.ModerationDefs_RecordViewNotFound != nil { 32 + t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" 33 + return json.Marshal(t.ModerationDefs_RecordViewNotFound) 34 + } 35 + return nil, fmt.Errorf("cannot marshal empty enum") 36 + } 37 + func (t *ModerationGetRecords_Output_Records_Elem) UnmarshalJSON(b []byte) error { 38 + typ, err := util.TypeExtract(b) 39 + if err != nil { 40 + return err 41 + } 42 + 43 + switch typ { 44 + case "tools.ozone.moderation.defs#recordViewDetail": 45 + t.ModerationDefs_RecordViewDetail = new(ModerationDefs_RecordViewDetail) 46 + return json.Unmarshal(b, t.ModerationDefs_RecordViewDetail) 47 + case "tools.ozone.moderation.defs#recordViewNotFound": 48 + t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) 49 + return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) 50 + 51 + default: 52 + return nil 53 + } 54 + } 55 + 56 + // ModerationGetRecords calls the XRPC method "tools.ozone.moderation.getRecords". 57 + func ModerationGetRecords(ctx context.Context, c *xrpc.Client, uris []string) (*ModerationGetRecords_Output, error) { 58 + var out ModerationGetRecords_Output 59 + 60 + params := map[string]interface{}{ 61 + "uris": uris, 62 + } 63 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRecords", params, nil, &out); err != nil { 64 + return nil, err 65 + } 66 + 67 + return &out, nil 68 + }
+25
api/ozone/moderationgetRepo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getRepo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetRepo calls the XRPC method "tools.ozone.moderation.getRepo". 14 + func ModerationGetRepo(ctx context.Context, c *xrpc.Client, did string) (*ModerationDefs_RepoViewDetail, error) { 15 + var out ModerationDefs_RepoViewDetail 16 + 17 + params := map[string]interface{}{ 18 + "did": did, 19 + } 20 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRepo", params, nil, &out); err != nil { 21 + return nil, err 22 + } 23 + 24 + return &out, nil 25 + }
+30
api/ozone/moderationgetReporterStats.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getReporterStats 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetReporterStats_Output is the output of a tools.ozone.moderation.getReporterStats call. 14 + type ModerationGetReporterStats_Output struct { 15 + Stats []*ModerationDefs_ReporterStats `json:"stats" cborgen:"stats"` 16 + } 17 + 18 + // ModerationGetReporterStats calls the XRPC method "tools.ozone.moderation.getReporterStats". 19 + func ModerationGetReporterStats(ctx context.Context, c *xrpc.Client, dids []string) (*ModerationGetReporterStats_Output, error) { 20 + var out ModerationGetReporterStats_Output 21 + 22 + params := map[string]interface{}{ 23 + "dids": dids, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getReporterStats", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+68
api/ozone/moderationgetRepos.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getRepos 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + "github.com/bluesky-social/indigo/xrpc" 14 + ) 15 + 16 + // ModerationGetRepos_Output is the output of a tools.ozone.moderation.getRepos call. 17 + type ModerationGetRepos_Output struct { 18 + Repos []*ModerationGetRepos_Output_Repos_Elem `json:"repos" cborgen:"repos"` 19 + } 20 + 21 + type ModerationGetRepos_Output_Repos_Elem struct { 22 + ModerationDefs_RepoViewDetail *ModerationDefs_RepoViewDetail 23 + ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 24 + } 25 + 26 + func (t *ModerationGetRepos_Output_Repos_Elem) MarshalJSON() ([]byte, error) { 27 + if t.ModerationDefs_RepoViewDetail != nil { 28 + t.ModerationDefs_RepoViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#repoViewDetail" 29 + return json.Marshal(t.ModerationDefs_RepoViewDetail) 30 + } 31 + if t.ModerationDefs_RepoViewNotFound != nil { 32 + t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 33 + return json.Marshal(t.ModerationDefs_RepoViewNotFound) 34 + } 35 + return nil, fmt.Errorf("cannot marshal empty enum") 36 + } 37 + func (t *ModerationGetRepos_Output_Repos_Elem) UnmarshalJSON(b []byte) error { 38 + typ, err := util.TypeExtract(b) 39 + if err != nil { 40 + return err 41 + } 42 + 43 + switch typ { 44 + case "tools.ozone.moderation.defs#repoViewDetail": 45 + t.ModerationDefs_RepoViewDetail = new(ModerationDefs_RepoViewDetail) 46 + return json.Unmarshal(b, t.ModerationDefs_RepoViewDetail) 47 + case "tools.ozone.moderation.defs#repoViewNotFound": 48 + t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 49 + return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 50 + 51 + default: 52 + return nil 53 + } 54 + } 55 + 56 + // ModerationGetRepos calls the XRPC method "tools.ozone.moderation.getRepos". 57 + func ModerationGetRepos(ctx context.Context, c *xrpc.Client, dids []string) (*ModerationGetRepos_Output, error) { 58 + var out ModerationGetRepos_Output 59 + 60 + params := map[string]interface{}{ 61 + "dids": dids, 62 + } 63 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRepos", params, nil, &out); err != nil { 64 + return nil, err 65 + } 66 + 67 + return &out, nil 68 + }
+30
api/ozone/moderationgetSubjects.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getSubjects 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetSubjects_Output is the output of a tools.ozone.moderation.getSubjects call. 14 + type ModerationGetSubjects_Output struct { 15 + Subjects []*ModerationDefs_SubjectView `json:"subjects" cborgen:"subjects"` 16 + } 17 + 18 + // ModerationGetSubjects calls the XRPC method "tools.ozone.moderation.getSubjects". 19 + func ModerationGetSubjects(ctx context.Context, c *xrpc.Client, subjects []string) (*ModerationGetSubjects_Output, error) { 20 + var out ModerationGetSubjects_Output 21 + 22 + params := map[string]interface{}{ 23 + "subjects": subjects, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getSubjects", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+63
api/ozone/moderationqueryEvents.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.queryEvents 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationQueryEvents_Output is the output of a tools.ozone.moderation.queryEvents call. 14 + type ModerationQueryEvents_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Events []*ModerationDefs_ModEventView `json:"events" cborgen:"events"` 17 + } 18 + 19 + // ModerationQueryEvents calls the XRPC method "tools.ozone.moderation.queryEvents". 20 + // 21 + // addedLabels: If specified, only events where all of these labels were added are returned 22 + // addedTags: If specified, only events where all of these tags were added are returned 23 + // collections: If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. 24 + // comment: If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition. 25 + // createdAfter: Retrieve events created after a given timestamp 26 + // createdBefore: Retrieve events created before a given timestamp 27 + // hasComment: If true, only events with comments are returned 28 + // includeAllUserRecords: If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. 29 + // removedLabels: If specified, only events where all of these labels were removed are returned 30 + // removedTags: If specified, only events where all of these tags were removed are returned 31 + // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 32 + // subjectType: If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. 33 + // types: The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned. 34 + func ModerationQueryEvents(ctx context.Context, c *xrpc.Client, addedLabels []string, addedTags []string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) { 35 + var out ModerationQueryEvents_Output 36 + 37 + params := map[string]interface{}{ 38 + "addedLabels": addedLabels, 39 + "addedTags": addedTags, 40 + "collections": collections, 41 + "comment": comment, 42 + "createdAfter": createdAfter, 43 + "createdBefore": createdBefore, 44 + "createdBy": createdBy, 45 + "cursor": cursor, 46 + "hasComment": hasComment, 47 + "includeAllUserRecords": includeAllUserRecords, 48 + "limit": limit, 49 + "policies": policies, 50 + "removedLabels": removedLabels, 51 + "removedTags": removedTags, 52 + "reportTypes": reportTypes, 53 + "sortDirection": sortDirection, 54 + "subject": subject, 55 + "subjectType": subjectType, 56 + "types": types, 57 + } 58 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryEvents", params, nil, &out); err != nil { 59 + return nil, err 60 + } 61 + 62 + return &out, nil 63 + }
+92
api/ozone/moderationqueryStatuses.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.queryStatuses 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationQueryStatuses_Output is the output of a tools.ozone.moderation.queryStatuses call. 14 + type ModerationQueryStatuses_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + SubjectStatuses []*ModerationDefs_SubjectStatusView `json:"subjectStatuses" cborgen:"subjectStatuses"` 17 + } 18 + 19 + // ModerationQueryStatuses calls the XRPC method "tools.ozone.moderation.queryStatuses". 20 + // 21 + // appealed: Get subjects in unresolved appealed status 22 + // collections: If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. 23 + // comment: Search subjects by keyword from comments 24 + // hostingDeletedAfter: Search subjects where the associated record/account was deleted after a given timestamp 25 + // hostingDeletedBefore: Search subjects where the associated record/account was deleted before a given timestamp 26 + // hostingStatuses: Search subjects by the status of the associated record/account 27 + // hostingUpdatedAfter: Search subjects where the associated record/account was updated after a given timestamp 28 + // hostingUpdatedBefore: Search subjects where the associated record/account was updated before a given timestamp 29 + // includeAllUserRecords: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. 30 + // includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 31 + // lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 32 + // minAccountSuspendCount: If specified, only subjects that belong to an account that has at least this many suspensions will be returned. 33 + // minPriorityScore: If specified, only subjects that have priority score value above the given value will be returned. 34 + // minReportedRecordsCount: If specified, only subjects that belong to an account that has at least this many reported records will be returned. 35 + // minTakendownRecordsCount: If specified, only subjects that belong to an account that has at least this many taken down records will be returned. 36 + // onlyMuted: When set to true, only muted subjects and reporters will be returned. 37 + // queueCount: Number of queues being used by moderators. Subjects will be split among all queues. 38 + // queueIndex: Index of the queue to fetch subjects from. Works only when queueCount value is specified. 39 + // queueSeed: A seeder to shuffle/balance the queue items. 40 + // reportedAfter: Search subjects reported after a given timestamp 41 + // reportedBefore: Search subjects reported before a given timestamp 42 + // reviewState: Specify when fetching subjects in a certain state 43 + // reviewedAfter: Search subjects reviewed after a given timestamp 44 + // reviewedBefore: Search subjects reviewed before a given timestamp 45 + // subject: The subject to get the status for. 46 + // subjectType: If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. 47 + // takendown: Get subjects that were taken down 48 + func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minPriorityScore int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 49 + var out ModerationQueryStatuses_Output 50 + 51 + params := map[string]interface{}{ 52 + "appealed": appealed, 53 + "collections": collections, 54 + "comment": comment, 55 + "cursor": cursor, 56 + "excludeTags": excludeTags, 57 + "hostingDeletedAfter": hostingDeletedAfter, 58 + "hostingDeletedBefore": hostingDeletedBefore, 59 + "hostingStatuses": hostingStatuses, 60 + "hostingUpdatedAfter": hostingUpdatedAfter, 61 + "hostingUpdatedBefore": hostingUpdatedBefore, 62 + "ignoreSubjects": ignoreSubjects, 63 + "includeAllUserRecords": includeAllUserRecords, 64 + "includeMuted": includeMuted, 65 + "lastReviewedBy": lastReviewedBy, 66 + "limit": limit, 67 + "minAccountSuspendCount": minAccountSuspendCount, 68 + "minPriorityScore": minPriorityScore, 69 + "minReportedRecordsCount": minReportedRecordsCount, 70 + "minTakendownRecordsCount": minTakendownRecordsCount, 71 + "onlyMuted": onlyMuted, 72 + "queueCount": queueCount, 73 + "queueIndex": queueIndex, 74 + "queueSeed": queueSeed, 75 + "reportedAfter": reportedAfter, 76 + "reportedBefore": reportedBefore, 77 + "reviewState": reviewState, 78 + "reviewedAfter": reviewedAfter, 79 + "reviewedBefore": reviewedBefore, 80 + "sortDirection": sortDirection, 81 + "sortField": sortField, 82 + "subject": subject, 83 + "subjectType": subjectType, 84 + "tags": tags, 85 + "takendown": takendown, 86 + } 87 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil { 88 + return nil, err 89 + } 90 + 91 + return &out, nil 92 + }
+36
api/ozone/moderationsearchRepos.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.searchRepos 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationSearchRepos_Output is the output of a tools.ozone.moderation.searchRepos call. 14 + type ModerationSearchRepos_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Repos []*ModerationDefs_RepoView `json:"repos" cborgen:"repos"` 17 + } 18 + 19 + // ModerationSearchRepos calls the XRPC method "tools.ozone.moderation.searchRepos". 20 + // 21 + // term: DEPRECATED: use 'q' instead 22 + func ModerationSearchRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*ModerationSearchRepos_Output, error) { 23 + var out ModerationSearchRepos_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "limit": limit, 28 + "q": q, 29 + "term": term, 30 + } 31 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.searchRepos", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+42
api/ozone/servergetConfig.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.server.getConfig 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerGetConfig_Output is the output of a tools.ozone.server.getConfig call. 14 + type ServerGetConfig_Output struct { 15 + Appview *ServerGetConfig_ServiceConfig `json:"appview,omitempty" cborgen:"appview,omitempty"` 16 + BlobDivert *ServerGetConfig_ServiceConfig `json:"blobDivert,omitempty" cborgen:"blobDivert,omitempty"` 17 + Chat *ServerGetConfig_ServiceConfig `json:"chat,omitempty" cborgen:"chat,omitempty"` 18 + Pds *ServerGetConfig_ServiceConfig `json:"pds,omitempty" cborgen:"pds,omitempty"` 19 + // verifierDid: The did of the verifier used for verification. 20 + VerifierDid *string `json:"verifierDid,omitempty" cborgen:"verifierDid,omitempty"` 21 + Viewer *ServerGetConfig_ViewerConfig `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 22 + } 23 + 24 + // ServerGetConfig_ServiceConfig is a "serviceConfig" in the tools.ozone.server.getConfig schema. 25 + type ServerGetConfig_ServiceConfig struct { 26 + Url *string `json:"url,omitempty" cborgen:"url,omitempty"` 27 + } 28 + 29 + // ServerGetConfig_ViewerConfig is a "viewerConfig" in the tools.ozone.server.getConfig schema. 30 + type ServerGetConfig_ViewerConfig struct { 31 + Role *string `json:"role,omitempty" cborgen:"role,omitempty"` 32 + } 33 + 34 + // ServerGetConfig calls the XRPC method "tools.ozone.server.getConfig". 35 + func ServerGetConfig(ctx context.Context, c *xrpc.Client) (*ServerGetConfig_Output, error) { 36 + var out ServerGetConfig_Output 37 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.server.getConfig", nil, nil, &out); err != nil { 38 + return nil, err 39 + } 40 + 41 + return &out, nil 42 + }
+28
api/ozone/setaddValues.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.set.addValues 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SetAddValues_Input is the input argument to a tools.ozone.set.addValues call. 14 + type SetAddValues_Input struct { 15 + // name: Name of the set to add values to 16 + Name string `json:"name" cborgen:"name"` 17 + // values: Array of string values to add to the set 18 + Values []string `json:"values" cborgen:"values"` 19 + } 20 + 21 + // SetAddValues calls the XRPC method "tools.ozone.set.addValues". 22 + func SetAddValues(ctx context.Context, c *xrpc.Client, input *SetAddValues_Input) error { 23 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.set.addValues", nil, input, nil); err != nil { 24 + return err 25 + } 26 + 27 + return nil 28 + }
+20
api/ozone/setdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.set.defs 6 + 7 + // SetDefs_Set is a "set" in the tools.ozone.set.defs schema. 8 + type SetDefs_Set struct { 9 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 10 + Name string `json:"name" cborgen:"name"` 11 + } 12 + 13 + // SetDefs_SetView is a "setView" in the tools.ozone.set.defs schema. 14 + type SetDefs_SetView struct { 15 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 16 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 17 + Name string `json:"name" cborgen:"name"` 18 + SetSize int64 `json:"setSize" cborgen:"setSize"` 19 + UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 20 + }
+31
api/ozone/setdeleteSet.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.set.deleteSet 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SetDeleteSet_Input is the input argument to a tools.ozone.set.deleteSet call. 14 + type SetDeleteSet_Input struct { 15 + // name: Name of the set to delete 16 + Name string `json:"name" cborgen:"name"` 17 + } 18 + 19 + // SetDeleteSet_Output is the output of a tools.ozone.set.deleteSet call. 20 + type SetDeleteSet_Output struct { 21 + } 22 + 23 + // SetDeleteSet calls the XRPC method "tools.ozone.set.deleteSet". 24 + func SetDeleteSet(ctx context.Context, c *xrpc.Client, input *SetDeleteSet_Input) (*SetDeleteSet_Output, error) { 25 + var out SetDeleteSet_Output 26 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.set.deleteSet", nil, input, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+28
api/ozone/setdeleteValues.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.set.deleteValues 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SetDeleteValues_Input is the input argument to a tools.ozone.set.deleteValues call. 14 + type SetDeleteValues_Input struct { 15 + // name: Name of the set to delete values from 16 + Name string `json:"name" cborgen:"name"` 17 + // values: Array of string values to delete from the set 18 + Values []string `json:"values" cborgen:"values"` 19 + } 20 + 21 + // SetDeleteValues calls the XRPC method "tools.ozone.set.deleteValues". 22 + func SetDeleteValues(ctx context.Context, c *xrpc.Client, input *SetDeleteValues_Input) error { 23 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.set.deleteValues", nil, input, nil); err != nil { 24 + return err 25 + } 26 + 27 + return nil 28 + }
+34
api/ozone/setgetValues.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.set.getValues 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SetGetValues_Output is the output of a tools.ozone.set.getValues call. 14 + type SetGetValues_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Set *SetDefs_SetView `json:"set" cborgen:"set"` 17 + Values []string `json:"values" cborgen:"values"` 18 + } 19 + 20 + // SetGetValues calls the XRPC method "tools.ozone.set.getValues". 21 + func SetGetValues(ctx context.Context, c *xrpc.Client, cursor string, limit int64, name string) (*SetGetValues_Output, error) { 22 + var out SetGetValues_Output 23 + 24 + params := map[string]interface{}{ 25 + "cursor": cursor, 26 + "limit": limit, 27 + "name": name, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.set.getValues", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+37
api/ozone/setquerySets.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.set.querySets 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SetQuerySets_Output is the output of a tools.ozone.set.querySets call. 14 + type SetQuerySets_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Sets []*SetDefs_SetView `json:"sets" cborgen:"sets"` 17 + } 18 + 19 + // SetQuerySets calls the XRPC method "tools.ozone.set.querySets". 20 + // 21 + // sortDirection: Defaults to ascending order of name field. 22 + func SetQuerySets(ctx context.Context, c *xrpc.Client, cursor string, limit int64, namePrefix string, sortBy string, sortDirection string) (*SetQuerySets_Output, error) { 23 + var out SetQuerySets_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "limit": limit, 28 + "namePrefix": namePrefix, 29 + "sortBy": sortBy, 30 + "sortDirection": sortDirection, 31 + } 32 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.set.querySets", params, nil, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+23
api/ozone/settingdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.defs 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + // SettingDefs_Option is a "option" in the tools.ozone.setting.defs schema. 12 + type SettingDefs_Option struct { 13 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 14 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 15 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 16 + Did string `json:"did" cborgen:"did"` 17 + Key string `json:"key" cborgen:"key"` 18 + LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"` 19 + ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` 20 + Scope string `json:"scope" cborgen:"scope"` 21 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 22 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 23 + }
+38
api/ozone/settinglistOptions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.listOptions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SettingListOptions_Output is the output of a tools.ozone.setting.listOptions call. 14 + type SettingListOptions_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Options []*SettingDefs_Option `json:"options" cborgen:"options"` 17 + } 18 + 19 + // SettingListOptions calls the XRPC method "tools.ozone.setting.listOptions". 20 + // 21 + // keys: Filter for only the specified keys. Ignored if prefix is provided 22 + // prefix: Filter keys by prefix 23 + func SettingListOptions(ctx context.Context, c *xrpc.Client, cursor string, keys []string, limit int64, prefix string, scope string) (*SettingListOptions_Output, error) { 24 + var out SettingListOptions_Output 25 + 26 + params := map[string]interface{}{ 27 + "cursor": cursor, 28 + "keys": keys, 29 + "limit": limit, 30 + "prefix": prefix, 31 + "scope": scope, 32 + } 33 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.setting.listOptions", params, nil, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+31
api/ozone/settingremoveOptions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.removeOptions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SettingRemoveOptions_Input is the input argument to a tools.ozone.setting.removeOptions call. 14 + type SettingRemoveOptions_Input struct { 15 + Keys []string `json:"keys" cborgen:"keys"` 16 + Scope string `json:"scope" cborgen:"scope"` 17 + } 18 + 19 + // SettingRemoveOptions_Output is the output of a tools.ozone.setting.removeOptions call. 20 + type SettingRemoveOptions_Output struct { 21 + } 22 + 23 + // SettingRemoveOptions calls the XRPC method "tools.ozone.setting.removeOptions". 24 + func SettingRemoveOptions(ctx context.Context, c *xrpc.Client, input *SettingRemoveOptions_Input) (*SettingRemoveOptions_Output, error) { 25 + var out SettingRemoveOptions_Output 26 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.setting.removeOptions", nil, input, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+36
api/ozone/settingupsertOption.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.upsertOption 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SettingUpsertOption_Input is the input argument to a tools.ozone.setting.upsertOption call. 15 + type SettingUpsertOption_Input struct { 16 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 17 + Key string `json:"key" cborgen:"key"` 18 + ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` 19 + Scope string `json:"scope" cborgen:"scope"` 20 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 21 + } 22 + 23 + // SettingUpsertOption_Output is the output of a tools.ozone.setting.upsertOption call. 24 + type SettingUpsertOption_Output struct { 25 + Option *SettingDefs_Option `json:"option" cborgen:"option"` 26 + } 27 + 28 + // SettingUpsertOption calls the XRPC method "tools.ozone.setting.upsertOption". 29 + func SettingUpsertOption(ctx context.Context, c *xrpc.Client, input *SettingUpsertOption_Input) (*SettingUpsertOption_Output, error) { 30 + var out SettingUpsertOption_Output 31 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.setting.upsertOption", nil, input, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+21
api/ozone/setupsertSet.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.set.upsertSet 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SetUpsertSet calls the XRPC method "tools.ozone.set.upsertSet". 14 + func SetUpsertSet(ctx context.Context, c *xrpc.Client, input *SetDefs_Set) (*SetDefs_SetView, error) { 15 + var out SetDefs_SetView 16 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.set.upsertSet", nil, input, &out); err != nil { 17 + return nil, err 18 + } 19 + 20 + return &out, nil 21 + }
+11
api/ozone/signaturedefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.signature.defs 6 + 7 + // SignatureDefs_SigDetail is a "sigDetail" in the tools.ozone.signature.defs schema. 8 + type SignatureDefs_SigDetail struct { 9 + Property string `json:"property" cborgen:"property"` 10 + Value string `json:"value" cborgen:"value"` 11 + }
+30
api/ozone/signaturefindCorrelation.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.signature.findCorrelation 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SignatureFindCorrelation_Output is the output of a tools.ozone.signature.findCorrelation call. 14 + type SignatureFindCorrelation_Output struct { 15 + Details []*SignatureDefs_SigDetail `json:"details" cborgen:"details"` 16 + } 17 + 18 + // SignatureFindCorrelation calls the XRPC method "tools.ozone.signature.findCorrelation". 19 + func SignatureFindCorrelation(ctx context.Context, c *xrpc.Client, dids []string) (*SignatureFindCorrelation_Output, error) { 20 + var out SignatureFindCorrelation_Output 21 + 22 + params := map[string]interface{}{ 23 + "dids": dids, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.signature.findCorrelation", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+40
api/ozone/signaturefindRelatedAccounts.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.signature.findRelatedAccounts 6 + 7 + import ( 8 + "context" 9 + 10 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SignatureFindRelatedAccounts_Output is the output of a tools.ozone.signature.findRelatedAccounts call. 15 + type SignatureFindRelatedAccounts_Output struct { 16 + Accounts []*SignatureFindRelatedAccounts_RelatedAccount `json:"accounts" cborgen:"accounts"` 17 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 18 + } 19 + 20 + // SignatureFindRelatedAccounts_RelatedAccount is a "relatedAccount" in the tools.ozone.signature.findRelatedAccounts schema. 21 + type SignatureFindRelatedAccounts_RelatedAccount struct { 22 + Account *comatprototypes.AdminDefs_AccountView `json:"account" cborgen:"account"` 23 + Similarities []*SignatureDefs_SigDetail `json:"similarities,omitempty" cborgen:"similarities,omitempty"` 24 + } 25 + 26 + // SignatureFindRelatedAccounts calls the XRPC method "tools.ozone.signature.findRelatedAccounts". 27 + func SignatureFindRelatedAccounts(ctx context.Context, c *xrpc.Client, cursor string, did string, limit int64) (*SignatureFindRelatedAccounts_Output, error) { 28 + var out SignatureFindRelatedAccounts_Output 29 + 30 + params := map[string]interface{}{ 31 + "cursor": cursor, 32 + "did": did, 33 + "limit": limit, 34 + } 35 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.signature.findRelatedAccounts", params, nil, &out); err != nil { 36 + return nil, err 37 + } 38 + 39 + return &out, nil 40 + }
+34
api/ozone/signaturesearchAccounts.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.signature.searchAccounts 6 + 7 + import ( 8 + "context" 9 + 10 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SignatureSearchAccounts_Output is the output of a tools.ozone.signature.searchAccounts call. 15 + type SignatureSearchAccounts_Output struct { 16 + Accounts []*comatprototypes.AdminDefs_AccountView `json:"accounts" cborgen:"accounts"` 17 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 18 + } 19 + 20 + // SignatureSearchAccounts calls the XRPC method "tools.ozone.signature.searchAccounts". 21 + func SignatureSearchAccounts(ctx context.Context, c *xrpc.Client, cursor string, limit int64, values []string) (*SignatureSearchAccounts_Output, error) { 22 + var out SignatureSearchAccounts_Output 23 + 24 + params := map[string]interface{}{ 25 + "cursor": cursor, 26 + "limit": limit, 27 + "values": values, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.signature.searchAccounts", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+27
api/ozone/teamaddMember.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.team.addMember 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TeamAddMember_Input is the input argument to a tools.ozone.team.addMember call. 14 + type TeamAddMember_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + Role string `json:"role" cborgen:"role"` 17 + } 18 + 19 + // TeamAddMember calls the XRPC method "tools.ozone.team.addMember". 20 + func TeamAddMember(ctx context.Context, c *xrpc.Client, input *TeamAddMember_Input) (*TeamDefs_Member, error) { 21 + var out TeamDefs_Member 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.team.addMember", nil, input, &out); err != nil { 23 + return nil, err 24 + } 25 + 26 + return &out, nil 27 + }
+20
api/ozone/teamdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.team.defs 6 + 7 + import ( 8 + appbskytypes "github.com/bluesky-social/indigo/api/bsky" 9 + ) 10 + 11 + // TeamDefs_Member is a "member" in the tools.ozone.team.defs schema. 12 + type TeamDefs_Member struct { 13 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 14 + Did string `json:"did" cborgen:"did"` 15 + Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"` 16 + LastUpdatedBy *string `json:"lastUpdatedBy,omitempty" cborgen:"lastUpdatedBy,omitempty"` 17 + Profile *appbskytypes.ActorDefs_ProfileViewDetailed `json:"profile,omitempty" cborgen:"profile,omitempty"` 18 + Role string `json:"role" cborgen:"role"` 19 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 20 + }
+25
api/ozone/teamdeleteMember.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.team.deleteMember 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TeamDeleteMember_Input is the input argument to a tools.ozone.team.deleteMember call. 14 + type TeamDeleteMember_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + } 17 + 18 + // TeamDeleteMember calls the XRPC method "tools.ozone.team.deleteMember". 19 + func TeamDeleteMember(ctx context.Context, c *xrpc.Client, input *TeamDeleteMember_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.team.deleteMember", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+35
api/ozone/teamlistMembers.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.team.listMembers 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TeamListMembers_Output is the output of a tools.ozone.team.listMembers call. 14 + type TeamListMembers_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Members []*TeamDefs_Member `json:"members" cborgen:"members"` 17 + } 18 + 19 + // TeamListMembers calls the XRPC method "tools.ozone.team.listMembers". 20 + func TeamListMembers(ctx context.Context, c *xrpc.Client, cursor string, disabled bool, limit int64, q string, roles []string) (*TeamListMembers_Output, error) { 21 + var out TeamListMembers_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "disabled": disabled, 26 + "limit": limit, 27 + "q": q, 28 + "roles": roles, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.team.listMembers", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+28
api/ozone/teamupdateMember.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.team.updateMember 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TeamUpdateMember_Input is the input argument to a tools.ozone.team.updateMember call. 14 + type TeamUpdateMember_Input struct { 15 + Did string `json:"did" cborgen:"did"` 16 + Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"` 17 + Role *string `json:"role,omitempty" cborgen:"role,omitempty"` 18 + } 19 + 20 + // TeamUpdateMember calls the XRPC method "tools.ozone.team.updateMember". 21 + func TeamUpdateMember(ctx context.Context, c *xrpc.Client, input *TeamUpdateMember_Input) (*TeamDefs_Member, error) { 22 + var out TeamDefs_Member 23 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.team.updateMember", nil, input, &out); err != nil { 24 + return nil, err 25 + } 26 + 27 + return &out, nil 28 + }
+110
api/ozone/verificationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.defs 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + "github.com/bluesky-social/indigo/lex/util" 12 + ) 13 + 14 + // VerificationDefs_VerificationView is a "verificationView" in the tools.ozone.verification.defs schema. 15 + // 16 + // Verification data for the associated subject. 17 + type VerificationDefs_VerificationView struct { 18 + // createdAt: Timestamp when the verification was created. 19 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 20 + // displayName: Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. 21 + DisplayName string `json:"displayName" cborgen:"displayName"` 22 + // handle: Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. 23 + Handle string `json:"handle" cborgen:"handle"` 24 + // issuer: The user who issued this verification. 25 + Issuer string `json:"issuer" cborgen:"issuer"` 26 + IssuerProfile *VerificationDefs_VerificationView_IssuerProfile `json:"issuerProfile,omitempty" cborgen:"issuerProfile,omitempty"` 27 + IssuerRepo *VerificationDefs_VerificationView_IssuerRepo `json:"issuerRepo,omitempty" cborgen:"issuerRepo,omitempty"` 28 + // revokeReason: Describes the reason for revocation, also indicating that the verification is no longer valid. 29 + RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"` 30 + // revokedAt: Timestamp when the verification was revoked. 31 + RevokedAt *string `json:"revokedAt,omitempty" cborgen:"revokedAt,omitempty"` 32 + // revokedBy: The user who revoked this verification. 33 + RevokedBy *string `json:"revokedBy,omitempty" cborgen:"revokedBy,omitempty"` 34 + // subject: The subject of the verification. 35 + Subject string `json:"subject" cborgen:"subject"` 36 + SubjectProfile *VerificationDefs_VerificationView_SubjectProfile `json:"subjectProfile,omitempty" cborgen:"subjectProfile,omitempty"` 37 + SubjectRepo *VerificationDefs_VerificationView_SubjectRepo `json:"subjectRepo,omitempty" cborgen:"subjectRepo,omitempty"` 38 + // uri: The AT-URI of the verification record. 39 + Uri string `json:"uri" cborgen:"uri"` 40 + } 41 + 42 + type VerificationDefs_VerificationView_IssuerRepo struct { 43 + ModerationDefs_RepoViewDetail *ModerationDefs_RepoViewDetail 44 + ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 45 + } 46 + 47 + func (t *VerificationDefs_VerificationView_IssuerRepo) MarshalJSON() ([]byte, error) { 48 + if t.ModerationDefs_RepoViewDetail != nil { 49 + t.ModerationDefs_RepoViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#repoViewDetail" 50 + return json.Marshal(t.ModerationDefs_RepoViewDetail) 51 + } 52 + if t.ModerationDefs_RepoViewNotFound != nil { 53 + t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 54 + return json.Marshal(t.ModerationDefs_RepoViewNotFound) 55 + } 56 + return nil, fmt.Errorf("cannot marshal empty enum") 57 + } 58 + func (t *VerificationDefs_VerificationView_IssuerRepo) UnmarshalJSON(b []byte) error { 59 + typ, err := util.TypeExtract(b) 60 + if err != nil { 61 + return err 62 + } 63 + 64 + switch typ { 65 + case "tools.ozone.moderation.defs#repoViewDetail": 66 + t.ModerationDefs_RepoViewDetail = new(ModerationDefs_RepoViewDetail) 67 + return json.Unmarshal(b, t.ModerationDefs_RepoViewDetail) 68 + case "tools.ozone.moderation.defs#repoViewNotFound": 69 + t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 70 + return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 71 + 72 + default: 73 + return nil 74 + } 75 + } 76 + 77 + type VerificationDefs_VerificationView_SubjectRepo struct { 78 + ModerationDefs_RepoViewDetail *ModerationDefs_RepoViewDetail 79 + ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 80 + } 81 + 82 + func (t *VerificationDefs_VerificationView_SubjectRepo) MarshalJSON() ([]byte, error) { 83 + if t.ModerationDefs_RepoViewDetail != nil { 84 + t.ModerationDefs_RepoViewDetail.LexiconTypeID = "tools.ozone.moderation.defs#repoViewDetail" 85 + return json.Marshal(t.ModerationDefs_RepoViewDetail) 86 + } 87 + if t.ModerationDefs_RepoViewNotFound != nil { 88 + t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 89 + return json.Marshal(t.ModerationDefs_RepoViewNotFound) 90 + } 91 + return nil, fmt.Errorf("cannot marshal empty enum") 92 + } 93 + func (t *VerificationDefs_VerificationView_SubjectRepo) UnmarshalJSON(b []byte) error { 94 + typ, err := util.TypeExtract(b) 95 + if err != nil { 96 + return err 97 + } 98 + 99 + switch typ { 100 + case "tools.ozone.moderation.defs#repoViewDetail": 101 + t.ModerationDefs_RepoViewDetail = new(ModerationDefs_RepoViewDetail) 102 + return json.Unmarshal(b, t.ModerationDefs_RepoViewDetail) 103 + case "tools.ozone.moderation.defs#repoViewNotFound": 104 + t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 105 + return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 106 + 107 + default: 108 + return nil 109 + } 110 + }
+55
api/ozone/verificationgrantVerifications.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.grantVerifications 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VerificationGrantVerifications_GrantError is a "grantError" in the tools.ozone.verification.grantVerifications schema. 14 + // 15 + // Error object for failed verifications. 16 + type VerificationGrantVerifications_GrantError struct { 17 + // error: Error message describing the reason for failure. 18 + Error string `json:"error" cborgen:"error"` 19 + // subject: The did of the subject being verified 20 + Subject string `json:"subject" cborgen:"subject"` 21 + } 22 + 23 + // VerificationGrantVerifications_Input is the input argument to a tools.ozone.verification.grantVerifications call. 24 + type VerificationGrantVerifications_Input struct { 25 + // verifications: Array of verification requests to process 26 + Verifications []*VerificationGrantVerifications_VerificationInput `json:"verifications" cborgen:"verifications"` 27 + } 28 + 29 + // VerificationGrantVerifications_Output is the output of a tools.ozone.verification.grantVerifications call. 30 + type VerificationGrantVerifications_Output struct { 31 + FailedVerifications []*VerificationGrantVerifications_GrantError `json:"failedVerifications" cborgen:"failedVerifications"` 32 + Verifications []*VerificationDefs_VerificationView `json:"verifications" cborgen:"verifications"` 33 + } 34 + 35 + // VerificationGrantVerifications_VerificationInput is the input argument to a tools.ozone.verification.grantVerifications call. 36 + type VerificationGrantVerifications_VerificationInput struct { 37 + // createdAt: Timestamp for verification record. Defaults to current time when not specified. 38 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 39 + // displayName: Display name of the subject the verification applies to at the moment of verifying. 40 + DisplayName string `json:"displayName" cborgen:"displayName"` 41 + // handle: Handle of the subject the verification applies to at the moment of verifying. 42 + Handle string `json:"handle" cborgen:"handle"` 43 + // subject: The did of the subject being verified 44 + Subject string `json:"subject" cborgen:"subject"` 45 + } 46 + 47 + // VerificationGrantVerifications calls the XRPC method "tools.ozone.verification.grantVerifications". 48 + func VerificationGrantVerifications(ctx context.Context, c *xrpc.Client, input *VerificationGrantVerifications_Input) (*VerificationGrantVerifications_Output, error) { 49 + var out VerificationGrantVerifications_Output 50 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.verification.grantVerifications", nil, input, &out); err != nil { 51 + return nil, err 52 + } 53 + 54 + return &out, nil 55 + }
+47
api/ozone/verificationlistVerifications.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.listVerifications 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VerificationListVerifications_Output is the output of a tools.ozone.verification.listVerifications call. 14 + type VerificationListVerifications_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Verifications []*VerificationDefs_VerificationView `json:"verifications" cborgen:"verifications"` 17 + } 18 + 19 + // VerificationListVerifications calls the XRPC method "tools.ozone.verification.listVerifications". 20 + // 21 + // createdAfter: Filter to verifications created after this timestamp 22 + // createdBefore: Filter to verifications created before this timestamp 23 + // cursor: Pagination cursor 24 + // isRevoked: Filter to verifications that are revoked or not. By default, includes both. 25 + // issuers: Filter to verifications from specific issuers 26 + // limit: Maximum number of results to return 27 + // sortDirection: Sort direction for creation date 28 + // subjects: Filter to specific verified DIDs 29 + func VerificationListVerifications(ctx context.Context, c *xrpc.Client, createdAfter string, createdBefore string, cursor string, isRevoked bool, issuers []string, limit int64, sortDirection string, subjects []string) (*VerificationListVerifications_Output, error) { 30 + var out VerificationListVerifications_Output 31 + 32 + params := map[string]interface{}{ 33 + "createdAfter": createdAfter, 34 + "createdBefore": createdBefore, 35 + "cursor": cursor, 36 + "isRevoked": isRevoked, 37 + "issuers": issuers, 38 + "limit": limit, 39 + "sortDirection": sortDirection, 40 + "subjects": subjects, 41 + } 42 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.verification.listVerifications", params, nil, &out); err != nil { 43 + return nil, err 44 + } 45 + 46 + return &out, nil 47 + }
+47
api/ozone/verificationrevokeVerifications.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.verification.revokeVerifications 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // VerificationRevokeVerifications_Input is the input argument to a tools.ozone.verification.revokeVerifications call. 14 + type VerificationRevokeVerifications_Input struct { 15 + // revokeReason: Reason for revoking the verification. This is optional and can be omitted if not needed. 16 + RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"` 17 + // uris: Array of verification record uris to revoke 18 + Uris []string `json:"uris" cborgen:"uris"` 19 + } 20 + 21 + // VerificationRevokeVerifications_Output is the output of a tools.ozone.verification.revokeVerifications call. 22 + type VerificationRevokeVerifications_Output struct { 23 + // failedRevocations: List of verification uris that couldn't be revoked, including failure reasons 24 + FailedRevocations []*VerificationRevokeVerifications_RevokeError `json:"failedRevocations" cborgen:"failedRevocations"` 25 + // revokedVerifications: List of verification uris successfully revoked 26 + RevokedVerifications []string `json:"revokedVerifications" cborgen:"revokedVerifications"` 27 + } 28 + 29 + // VerificationRevokeVerifications_RevokeError is a "revokeError" in the tools.ozone.verification.revokeVerifications schema. 30 + // 31 + // Error object for failed revocations 32 + type VerificationRevokeVerifications_RevokeError struct { 33 + // error: Description of the error that occurred during revocation. 34 + Error string `json:"error" cborgen:"error"` 35 + // uri: The AT-URI of the verification record that failed to revoke. 36 + Uri string `json:"uri" cborgen:"uri"` 37 + } 38 + 39 + // VerificationRevokeVerifications calls the XRPC method "tools.ozone.verification.revokeVerifications". 40 + func VerificationRevokeVerifications(ctx context.Context, c *xrpc.Client, input *VerificationRevokeVerifications_Input) (*VerificationRevokeVerifications_Output, error) { 41 + var out VerificationRevokeVerifications_Output 42 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.verification.revokeVerifications", nil, input, &out); err != nil { 43 + return nil, err 44 + } 45 + 46 + return &out, nil 47 + }
+37
api/teal/actordefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.actor.defs 6 + 7 + import ( 8 + appbskytypes "github.com/bluesky-social/indigo/api/bsky" 9 + ) 10 + 11 + // AlphaActorDefs_MiniProfileView is a "miniProfileView" in the fm.teal.alpha.actor.defs schema. 12 + type AlphaActorDefs_MiniProfileView struct { 13 + // avatar: IPLD of the avatar 14 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 15 + // did: The decentralized identifier of the actor 16 + Did *string `json:"did,omitempty" cborgen:"did,omitempty"` 17 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 18 + Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` 19 + } 20 + 21 + // AlphaActorDefs_ProfileView is a "profileView" in the fm.teal.alpha.actor.defs schema. 22 + type AlphaActorDefs_ProfileView struct { 23 + // avatar: IPLD of the avatar 24 + Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 25 + // banner: IPLD of the banner image 26 + Banner *string `json:"banner,omitempty" cborgen:"banner,omitempty"` 27 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 28 + // description: Free-form profile description text. 29 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 30 + // descriptionFacets: Annotations of text in the profile description (mentions, URLs, hashtags, etc). May be changed to another (backwards compatible) lexicon. 31 + DescriptionFacets []*appbskytypes.RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 32 + // did: The decentralized identifier of the actor 33 + Did *string `json:"did,omitempty" cborgen:"did,omitempty"` 34 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 35 + // featuredItem: The user's most recent item featured on their profile. 36 + FeaturedItem *AlphaActorProfile_FeaturedItem `json:"featuredItem,omitempty" cborgen:"featuredItem,omitempty"` 37 + }
+32
api/teal/actorgetProfile.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.actor.getProfile 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AlphaActorGetProfile_Output is the output of a fm.teal.alpha.actor.getProfile call. 14 + type AlphaActorGetProfile_Output struct { 15 + Actor *AlphaActorDefs_ProfileView `json:"actor" cborgen:"actor"` 16 + } 17 + 18 + // AlphaActorGetProfile calls the XRPC method "fm.teal.alpha.actor.getProfile". 19 + // 20 + // actor: The author's DID 21 + func AlphaActorGetProfile(ctx context.Context, c *xrpc.Client, actor string) (*AlphaActorGetProfile_Output, error) { 22 + var out AlphaActorGetProfile_Output 23 + 24 + params := map[string]interface{}{ 25 + "actor": actor, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "fm.teal.alpha.actor.getProfile", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+32
api/teal/actorgetProfiles.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.actor.getProfiles 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AlphaActorGetProfiles_Output is the output of a fm.teal.alpha.actor.getProfiles call. 14 + type AlphaActorGetProfiles_Output struct { 15 + Actors []*AlphaActorDefs_MiniProfileView `json:"actors" cborgen:"actors"` 16 + } 17 + 18 + // AlphaActorGetProfiles calls the XRPC method "fm.teal.alpha.actor.getProfiles". 19 + // 20 + // actors: Array of actor DIDs 21 + func AlphaActorGetProfiles(ctx context.Context, c *xrpc.Client, actors []string) (*AlphaActorGetProfiles_Output, error) { 22 + var out AlphaActorGetProfiles_Output 23 + 24 + params := map[string]interface{}{ 25 + "actors": actors, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "fm.teal.alpha.actor.getProfiles", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+38
api/teal/actorprofile.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.actor.profile 6 + 7 + import ( 8 + appbskytypes "github.com/bluesky-social/indigo/api/bsky" 9 + "github.com/bluesky-social/indigo/lex/util" 10 + ) 11 + 12 + func init() { 13 + util.RegisterType("fm.teal.alpha.actor.profile", &AlphaActorProfile{}) 14 + } // 15 + // RECORDTYPE: AlphaActorProfile 16 + type AlphaActorProfile struct { 17 + LexiconTypeID string `json:"$type,const=fm.teal.alpha.actor.profile" cborgen:"$type,const=fm.teal.alpha.actor.profile"` 18 + // avatar: Small image to be displayed next to posts from account. AKA, 'profile picture' 19 + Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 20 + // banner: Larger horizontal image to display behind profile view. 21 + Banner *util.LexBlob `json:"banner,omitempty" cborgen:"banner,omitempty"` 22 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 23 + // description: Free-form profile description text. 24 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 25 + // descriptionFacets: Annotations of text in the profile description (mentions, URLs, hashtags, etc). 26 + DescriptionFacets []*appbskytypes.RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 27 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 28 + // featuredItem: The user's most recent item featured on their profile. 29 + FeaturedItem *AlphaActorProfile_FeaturedItem `json:"featuredItem,omitempty" cborgen:"featuredItem,omitempty"` 30 + } 31 + 32 + // AlphaActorProfile_FeaturedItem is a "featuredItem" in the fm.teal.alpha.actor.profile schema. 33 + type AlphaActorProfile_FeaturedItem struct { 34 + // mbid: The Musicbrainz ID of the item 35 + Mbid string `json:"mbid" cborgen:"mbid"` 36 + // type: The type of the item. Must be a valid Musicbrainz type, e.g. album, track, recording, etc. 37 + Type string `json:"type" cborgen:"type"` 38 + }
+38
api/teal/actorsearchActors.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.actor.searchActors 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AlphaActorSearchActors_Output is the output of a fm.teal.alpha.actor.searchActors call. 14 + type AlphaActorSearchActors_Output struct { 15 + Actors []*AlphaActorDefs_MiniProfileView `json:"actors" cborgen:"actors"` 16 + // cursor: Cursor for pagination 17 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 18 + } 19 + 20 + // AlphaActorSearchActors calls the XRPC method "fm.teal.alpha.actor.searchActors". 21 + // 22 + // cursor: Cursor for pagination 23 + // limit: The maximum number of actors to return 24 + // q: The search query 25 + func AlphaActorSearchActors(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string) (*AlphaActorSearchActors_Output, error) { 26 + var out AlphaActorSearchActors_Output 27 + 28 + params := map[string]interface{}{ 29 + "cursor": cursor, 30 + "limit": limit, 31 + "q": q, 32 + } 33 + if err := c.Do(ctx, xrpc.Query, "", "fm.teal.alpha.actor.searchActors", params, nil, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+22
api/teal/actorstatus.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.actor.status 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("fm.teal.alpha.actor.status", &AlphaActorStatus{}) 13 + } // 14 + // RECORDTYPE: AlphaActorStatus 15 + type AlphaActorStatus struct { 16 + LexiconTypeID string `json:"$type,const=fm.teal.alpha.actor.status" cborgen:"$type,const=fm.teal.alpha.actor.status"` 17 + // expiry: The unix timestamp of the expiry time of the item. If unavailable, default to 10 minutes past the start time. 18 + Expiry *string `json:"expiry,omitempty" cborgen:"expiry,omitempty"` 19 + Item *AlphaFeedDefs_PlayView `json:"item" cborgen:"item"` 20 + // time: The unix timestamp of when the item was recorded 21 + Time string `json:"time" cborgen:"time"` 22 + }
+35
api/teal/feeddefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.feed.defs 6 + 7 + // AlphaFeedDefs_PlayView is a "playView" in the fm.teal.alpha.feed.defs schema. 8 + type AlphaFeedDefs_PlayView struct { 9 + // artistMbIds: Array of Musicbrainz artist IDs 10 + ArtistMbIds []string `json:"artistMbIds,omitempty" cborgen:"artistMbIds,omitempty"` 11 + // artistNames: Array of artist names in order of original appearance. 12 + ArtistNames []string `json:"artistNames" cborgen:"artistNames"` 13 + // duration: The length of the track in seconds 14 + Duration *int64 `json:"duration,omitempty" cborgen:"duration,omitempty"` 15 + // isrc: The ISRC code associated with the recording 16 + Isrc *string `json:"isrc,omitempty" cborgen:"isrc,omitempty"` 17 + // musicServiceBaseDomain: The base domain of the music service. e.g. music.apple.com, tidal.com, spotify.com. Defaults to 'local' if not provided. 18 + MusicServiceBaseDomain *string `json:"musicServiceBaseDomain,omitempty" cborgen:"musicServiceBaseDomain,omitempty"` 19 + // originUrl: The URL associated with this track 20 + OriginUrl *string `json:"originUrl,omitempty" cborgen:"originUrl,omitempty"` 21 + // playedTime: The unix timestamp of when the track was played 22 + PlayedTime *string `json:"playedTime,omitempty" cborgen:"playedTime,omitempty"` 23 + // recordingMbId: The Musicbrainz recording ID of the track 24 + RecordingMbId *string `json:"recordingMbId,omitempty" cborgen:"recordingMbId,omitempty"` 25 + // releaseMbId: The Musicbrainz release ID 26 + ReleaseMbId *string `json:"releaseMbId,omitempty" cborgen:"releaseMbId,omitempty"` 27 + // releaseName: The name of the release/album 28 + ReleaseName *string `json:"releaseName,omitempty" cborgen:"releaseName,omitempty"` 29 + // submissionClientAgent: A user-agent style string specifying the user agent. e.g. tealtracker/0.0.1b (Linux; Android 13; SM-A715F). Defaults to 'manual/unknown' if not provided. 30 + SubmissionClientAgent *string `json:"submissionClientAgent,omitempty" cborgen:"submissionClientAgent,omitempty"` 31 + // trackMbId: The Musicbrainz ID of the track 32 + TrackMbId *string `json:"trackMbId,omitempty" cborgen:"trackMbId,omitempty"` 33 + // trackName: The name of the track 34 + TrackName string `json:"trackName" cborgen:"trackName"` 35 + }
+36
api/teal/feedgetActorFeed.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.feed.getActorFeed 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AlphaFeedGetActorFeed_Output is the output of a fm.teal.alpha.feed.getActorFeed call. 14 + type AlphaFeedGetActorFeed_Output struct { 15 + Plays []*AlphaFeedDefs_PlayView `json:"plays" cborgen:"plays"` 16 + } 17 + 18 + // AlphaFeedGetActorFeed calls the XRPC method "fm.teal.alpha.feed.getActorFeed". 19 + // 20 + // authorDID: The author's DID for the play 21 + // cursor: The cursor to start the query from 22 + // limit: The upper limit of tracks to get per request. Default is 20, max is 50. 23 + func AlphaFeedGetActorFeed(ctx context.Context, c *xrpc.Client, authorDID string, cursor string, limit int64) (*AlphaFeedGetActorFeed_Output, error) { 24 + var out AlphaFeedGetActorFeed_Output 25 + 26 + params := map[string]interface{}{ 27 + "authorDID": authorDID, 28 + "cursor": cursor, 29 + "limit": limit, 30 + } 31 + if err := c.Do(ctx, xrpc.Query, "", "fm.teal.alpha.feed.getActorFeed", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+34
api/teal/feedgetPlay.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.feed.getPlay 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // AlphaFeedGetPlay_Output is the output of a fm.teal.alpha.feed.getPlay call. 14 + type AlphaFeedGetPlay_Output struct { 15 + Play *AlphaFeedDefs_PlayView `json:"play" cborgen:"play"` 16 + } 17 + 18 + // AlphaFeedGetPlay calls the XRPC method "fm.teal.alpha.feed.getPlay". 19 + // 20 + // authorDID: The author's DID for the play 21 + // rkey: The record key of the play 22 + func AlphaFeedGetPlay(ctx context.Context, c *xrpc.Client, authorDID string, rkey string) (*AlphaFeedGetPlay_Output, error) { 23 + var out AlphaFeedGetPlay_Output 24 + 25 + params := map[string]interface{}{ 26 + "authorDID": authorDID, 27 + "rkey": rkey, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "fm.teal.alpha.feed.getPlay", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+43
api/teal/feedplay.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package teal 4 + 5 + // schema: fm.teal.alpha.feed.play 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("fm.teal.alpha.feed.play", &AlphaFeedPlay{}) 13 + } // 14 + // RECORDTYPE: AlphaFeedPlay 15 + type AlphaFeedPlay struct { 16 + LexiconTypeID string `json:"$type,const=fm.teal.alpha.feed.play" cborgen:"$type,const=fm.teal.alpha.feed.play"` 17 + // artistMbIds: Array of Musicbrainz artist IDs 18 + ArtistMbIds []string `json:"artistMbIds,omitempty" cborgen:"artistMbIds,omitempty"` 19 + // artistNames: Array of artist names in order of original appearance. 20 + ArtistNames []string `json:"artistNames" cborgen:"artistNames"` 21 + // duration: The length of the track in seconds 22 + Duration *int64 `json:"duration,omitempty" cborgen:"duration,omitempty"` 23 + // isrc: The ISRC code associated with the recording 24 + Isrc *string `json:"isrc,omitempty" cborgen:"isrc,omitempty"` 25 + // musicServiceBaseDomain: The base domain of the music service. e.g. music.apple.com, tidal.com, spotify.com. Defaults to 'local' if unavailable or not provided. 26 + MusicServiceBaseDomain *string `json:"musicServiceBaseDomain,omitempty" cborgen:"musicServiceBaseDomain,omitempty"` 27 + // originUrl: The URL associated with this track 28 + OriginUrl *string `json:"originUrl,omitempty" cborgen:"originUrl,omitempty"` 29 + // playedTime: The unix timestamp of when the track was played 30 + PlayedTime *string `json:"playedTime,omitempty" cborgen:"playedTime,omitempty"` 31 + // recordingMbId: The Musicbrainz recording ID of the track 32 + RecordingMbId *string `json:"recordingMbId,omitempty" cborgen:"recordingMbId,omitempty"` 33 + // releaseMbId: The Musicbrainz release ID 34 + ReleaseMbId *string `json:"releaseMbId,omitempty" cborgen:"releaseMbId,omitempty"` 35 + // releaseName: The name of the release/album 36 + ReleaseName *string `json:"releaseName,omitempty" cborgen:"releaseName,omitempty"` 37 + // submissionClientAgent: A metadata string specifying the user agent where the format is `<app-identifier>/<version> (<kernel/OS-base>; <platform/OS-version>; <device-model>)`. If string is provided, only `app-identifier` and `version` are required. `app-identifier` is recommended to be in reverse dns format. Defaults to 'manual/unknown' if unavailable or not provided. 38 + SubmissionClientAgent *string `json:"submissionClientAgent,omitempty" cborgen:"submissionClientAgent,omitempty"` 39 + // trackMbId: The Musicbrainz ID of the track 40 + TrackMbId *string `json:"trackMbId,omitempty" cborgen:"trackMbId,omitempty"` 41 + // trackName: The name of the track 42 + TrackName string `json:"trackName" cborgen:"trackName"` 43 + }