+143
api/atproto/cbor_gen.go
+143
api/atproto/cbor_gen.go
···
984
985
return nil
986
}
987
+
func (t *SyncSubscribeRepos_Identity) MarshalCBOR(w io.Writer) error {
988
+
if t == nil {
989
+
_, err := w.Write(cbg.CborNull)
990
+
return err
991
+
}
992
+
993
+
cw := cbg.NewCborWriter(w)
994
+
995
+
if _, err := cw.Write([]byte{162}); err != nil {
996
+
return err
997
+
}
998
+
999
+
// t.Did (string) (string)
1000
+
if uint64(len("did")) > cbg.MaxLength {
1001
+
return xerrors.Errorf("Value in field \"did\" was too long")
1002
+
}
1003
+
1004
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("did"))); err != nil {
1005
+
return err
1006
+
}
1007
+
if _, err := cw.WriteString(string("did")); err != nil {
1008
+
return err
1009
+
}
1010
+
1011
+
if uint64(len(t.Did)) > cbg.MaxLength {
1012
+
return xerrors.Errorf("Value in field t.Did was too long")
1013
+
}
1014
+
1015
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Did))); err != nil {
1016
+
return err
1017
+
}
1018
+
if _, err := cw.WriteString(string(t.Did)); err != nil {
1019
+
return err
1020
+
}
1021
+
1022
+
// t.Seq (int64) (int64)
1023
+
if uint64(len("seq")) > cbg.MaxLength {
1024
+
return xerrors.Errorf("Value in field \"seq\" was too long")
1025
+
}
1026
+
1027
+
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("seq"))); err != nil {
1028
+
return err
1029
+
}
1030
+
if _, err := cw.WriteString(string("seq")); err != nil {
1031
+
return err
1032
+
}
1033
+
1034
+
if t.Seq >= 0 {
1035
+
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Seq)); err != nil {
1036
+
return err
1037
+
}
1038
+
} else {
1039
+
if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Seq-1)); err != nil {
1040
+
return err
1041
+
}
1042
+
}
1043
+
return nil
1044
+
}
1045
+
1046
+
func (t *SyncSubscribeRepos_Identity) UnmarshalCBOR(r io.Reader) (err error) {
1047
+
*t = SyncSubscribeRepos_Identity{}
1048
+
1049
+
cr := cbg.NewCborReader(r)
1050
+
1051
+
maj, extra, err := cr.ReadHeader()
1052
+
if err != nil {
1053
+
return err
1054
+
}
1055
+
defer func() {
1056
+
if err == io.EOF {
1057
+
err = io.ErrUnexpectedEOF
1058
+
}
1059
+
}()
1060
+
1061
+
if maj != cbg.MajMap {
1062
+
return fmt.Errorf("cbor input should be of type map")
1063
+
}
1064
+
1065
+
if extra > cbg.MaxLength {
1066
+
return fmt.Errorf("SyncSubscribeRepos_Identity: map struct too large (%d)", extra)
1067
+
}
1068
+
1069
+
var name string
1070
+
n := extra
1071
+
1072
+
for i := uint64(0); i < n; i++ {
1073
+
1074
+
{
1075
+
sval, err := cbg.ReadString(cr)
1076
+
if err != nil {
1077
+
return err
1078
+
}
1079
+
1080
+
name = string(sval)
1081
+
}
1082
+
1083
+
switch name {
1084
+
// t.Did (string) (string)
1085
+
case "did":
1086
+
1087
+
{
1088
+
sval, err := cbg.ReadString(cr)
1089
+
if err != nil {
1090
+
return err
1091
+
}
1092
+
1093
+
t.Did = string(sval)
1094
+
}
1095
+
// t.Seq (int64) (int64)
1096
+
case "seq":
1097
+
{
1098
+
maj, extra, err := cr.ReadHeader()
1099
+
var extraI int64
1100
+
if err != nil {
1101
+
return err
1102
+
}
1103
+
switch maj {
1104
+
case cbg.MajUnsignedInt:
1105
+
extraI = int64(extra)
1106
+
if extraI < 0 {
1107
+
return fmt.Errorf("int64 positive overflow")
1108
+
}
1109
+
case cbg.MajNegativeInt:
1110
+
extraI = int64(extra)
1111
+
if extraI < 0 {
1112
+
return fmt.Errorf("int64 negative overflow")
1113
+
}
1114
+
extraI = -1 - extraI
1115
+
default:
1116
+
return fmt.Errorf("wrong type for int64 field: %d", maj)
1117
+
}
1118
+
1119
+
t.Seq = int64(extraI)
1120
+
}
1121
+
1122
+
default:
1123
+
// Field doesn't exist on this type, so ignore it
1124
+
cbg.ScanForLinks(r, func(cid.Cid) {})
1125
+
}
1126
+
}
1127
+
1128
+
return nil
1129
+
}
1130
func (t *SyncSubscribeRepos_Info) MarshalCBOR(w io.Writer) error {
1131
if t == nil {
1132
_, err := w.Write(cbg.CborNull)
+31
api/atproto/identitygetRecommendedDidCredentials.go
+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
+
}
+20
api/atproto/identityrequestPlcOperationSignature.go
+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
+
}
+38
api/atproto/identitysignPlcOperation.go
+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
+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
+
}
+1
api/atproto/identityupdateHandle.go
+1
api/atproto/identityupdateHandle.go
+3
-1
api/atproto/moderationcreateReport.go
+3
-1
api/atproto/moderationcreateReport.go
···
15
16
// ModerationCreateReport_Input is the input argument to a com.atproto.moderation.createReport call.
17
type ModerationCreateReport_Input struct {
18
-
Reason *string `json:"reason,omitempty" cborgen:"reason,omitempty"`
19
ReasonType *string `json:"reasonType" cborgen:"reasonType"`
20
Subject *ModerationCreateReport_Input_Subject `json:"subject" cborgen:"subject"`
21
}
···
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
}
+7
-6
api/atproto/repoapplyWrites.go
+7
-6
api/atproto/repoapplyWrites.go
···
15
16
// RepoApplyWrites_Create is a "create" in the com.atproto.repo.applyWrites schema.
17
//
18
-
// Create a new record.
19
//
20
// RECORDTYPE: RepoApplyWrites_Create
21
type RepoApplyWrites_Create struct {
···
27
28
// RepoApplyWrites_Delete is a "delete" in the com.atproto.repo.applyWrites schema.
29
//
30
-
// Delete an existing record.
31
//
32
// RECORDTYPE: RepoApplyWrites_Delete
33
type RepoApplyWrites_Delete struct {
···
38
39
// RepoApplyWrites_Input is the input argument to a com.atproto.repo.applyWrites call.
40
type RepoApplyWrites_Input struct {
41
-
// repo: The handle or DID of the repo.
42
-
Repo string `json:"repo" cborgen:"repo"`
43
SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"`
44
-
// validate: Flag for validating the records.
45
Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"`
46
Writes []*RepoApplyWrites_Input_Writes_Elem `json:"writes" cborgen:"writes"`
47
}
···
91
92
// RepoApplyWrites_Update is a "update" in the com.atproto.repo.applyWrites schema.
93
//
94
-
// Update an existing record.
95
//
96
// RECORDTYPE: RepoApplyWrites_Update
97
type RepoApplyWrites_Update struct {
···
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 {
···
27
28
// RepoApplyWrites_Delete is a "delete" in the com.atproto.repo.applyWrites schema.
29
//
30
+
// Operation which deletes an existing record.
31
//
32
// RECORDTYPE: RepoApplyWrites_Delete
33
type RepoApplyWrites_Delete struct {
···
38
39
// RepoApplyWrites_Input is the input argument to a com.atproto.repo.applyWrites call.
40
type RepoApplyWrites_Input struct {
41
+
// repo: The handle or DID of the repo (aka, current account).
42
+
Repo string `json:"repo" cborgen:"repo"`
43
+
// 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.
44
SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"`
45
+
// validate: Can be set to 'false' to skip Lexicon schema validation of record data, for all operations.
46
Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"`
47
Writes []*RepoApplyWrites_Input_Writes_Elem `json:"writes" cborgen:"writes"`
48
}
···
92
93
// RepoApplyWrites_Update is a "update" in the com.atproto.repo.applyWrites schema.
94
//
95
+
// Operation which updates an existing record.
96
//
97
// RECORDTYPE: RepoApplyWrites_Update
98
type RepoApplyWrites_Update struct {
+4
-4
api/atproto/repocreateRecord.go
+4
-4
api/atproto/repocreateRecord.go
···
15
type RepoCreateRecord_Input struct {
16
// collection: The NSID of the record collection.
17
Collection string `json:"collection" cborgen:"collection"`
18
-
// record: The record to create.
19
Record *util.LexiconTypeDecoder `json:"record" cborgen:"record"`
20
-
// repo: The handle or DID of the repo.
21
Repo string `json:"repo" cborgen:"repo"`
22
-
// rkey: The key of the record.
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: Flag for validating the record.
27
Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"`
28
}
29
···
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.
27
Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"`
28
}
29
+2
-2
api/atproto/repodeleteRecord.go
+2
-2
api/atproto/repodeleteRecord.go
···
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.
18
Repo string `json:"repo" cborgen:"repo"`
19
-
// rkey: The key of the record.
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"`
···
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"`
+8
-5
api/atproto/repodescribeRepo.go
+8
-5
api/atproto/repodescribeRepo.go
···
12
13
// RepoDescribeRepo_Output is the output of a com.atproto.repo.describeRepo call.
14
type RepoDescribeRepo_Output struct {
15
-
Collections []string `json:"collections" cborgen:"collections"`
16
-
Did string `json:"did" cborgen:"did"`
17
-
DidDoc interface{} `json:"didDoc" cborgen:"didDoc"`
18
-
Handle string `json:"handle" cborgen:"handle"`
19
-
HandleIsCorrect bool `json:"handleIsCorrect" cborgen:"handleIsCorrect"`
20
}
21
22
// RepoDescribeRepo calls the XRPC method "com.atproto.repo.describeRepo".
···
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".
+1
-1
api/atproto/repogetRecord.go
+1
-1
api/atproto/repogetRecord.go
···
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 key of the record.
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
···
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
+21
api/atproto/repoimportRepo.go
+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
+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
+
}
+4
-4
api/atproto/repoputRecord.go
+4
-4
api/atproto/repoputRecord.go
···
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.
21
Repo string `json:"repo" cborgen:"repo"`
22
-
// rkey: The key of the record.
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.
27
SwapRecord *string `json:"swapRecord" cborgen:"swapRecord"`
28
-
// validate: Flag for validating the record.
29
Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"`
30
}
31
···
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.
29
Validate *bool `json:"validate,omitempty" cborgen:"validate,omitempty"`
30
}
31
+20
api/atproto/serveractivateAccount.go
+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
+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
+
}
+20
-11
api/atproto/servercreateAccount.go
+20
-11
api/atproto/servercreateAccount.go
···
12
13
// ServerCreateAccount_Input is the input argument to a com.atproto.server.createAccount call.
14
type ServerCreateAccount_Input struct {
15
-
Did *string `json:"did,omitempty" cborgen:"did,omitempty"`
16
-
Email *string `json:"email,omitempty" cborgen:"email,omitempty"`
17
-
Handle string `json:"handle" cborgen:"handle"`
18
-
InviteCode *string `json:"inviteCode,omitempty" cborgen:"inviteCode,omitempty"`
19
-
Password *string `json:"password,omitempty" cborgen:"password,omitempty"`
20
-
PlcOp *interface{} `json:"plcOp,omitempty" cborgen:"plcOp,omitempty"`
21
-
RecoveryKey *string `json:"recoveryKey,omitempty" cborgen:"recoveryKey,omitempty"`
22
-
VerificationCode *string `json:"verificationCode,omitempty" cborgen:"verificationCode,omitempty"`
23
-
VerificationPhone *string `json:"verificationPhone,omitempty" cborgen:"verificationPhone,omitempty"`
24
}
25
26
// ServerCreateAccount_Output is the output of a com.atproto.server.createAccount call.
27
type ServerCreateAccount_Output struct {
28
-
AccessJwt string `json:"accessJwt" cborgen:"accessJwt"`
29
-
Did string `json:"did" cborgen:"did"`
30
DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"`
31
Handle string `json:"handle" cborgen:"handle"`
32
RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"`
···
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"`
+1
api/atproto/servercreateAppPassword.go
+1
api/atproto/servercreateAppPassword.go
+26
api/atproto/serverdeactivateAccount.go
+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
+
}
+9
-4
api/atproto/serverdescribeServer.go
+9
-4
api/atproto/serverdescribeServer.go
···
18
19
// ServerDescribeServer_Output is the output of a com.atproto.server.describeServer call.
20
type ServerDescribeServer_Output struct {
21
-
AvailableUserDomains []string `json:"availableUserDomains" cborgen:"availableUserDomains"`
22
-
InviteCodeRequired *bool `json:"inviteCodeRequired,omitempty" cborgen:"inviteCodeRequired,omitempty"`
23
-
Links *ServerDescribeServer_Links `json:"links,omitempty" cborgen:"links,omitempty"`
24
-
PhoneVerificationRequired *bool `json:"phoneVerificationRequired,omitempty" cborgen:"phoneVerificationRequired,omitempty"`
25
}
26
27
// ServerDescribeServer calls the XRPC method "com.atproto.server.describeServer".
···
18
19
// ServerDescribeServer_Output is the output of a com.atproto.server.describeServer call.
20
type ServerDescribeServer_Output struct {
21
+
// availableUserDomains: List of domain suffixes that can be used in account handles.
22
+
AvailableUserDomains []string `json:"availableUserDomains" cborgen:"availableUserDomains"`
23
+
Did string `json:"did" cborgen:"did"`
24
+
// inviteCodeRequired: If true, an invite code must be supplied to create an account on this instance.
25
+
InviteCodeRequired *bool `json:"inviteCodeRequired,omitempty" cborgen:"inviteCodeRequired,omitempty"`
26
+
// links: URLs of service policy documents.
27
+
Links *ServerDescribeServer_Links `json:"links,omitempty" cborgen:"links,omitempty"`
28
+
// phoneVerificationRequired: If true, a phone verification token must be supplied to create an account on this instance.
29
+
PhoneVerificationRequired *bool `json:"phoneVerificationRequired,omitempty" cborgen:"phoneVerificationRequired,omitempty"`
30
}
31
32
// ServerDescribeServer calls the XRPC method "com.atproto.server.describeServer".
+2
api/atproto/servergetAccountInviteCodes.go
+2
api/atproto/servergetAccountInviteCodes.go
···
16
}
17
18
// ServerGetAccountInviteCodes calls the XRPC method "com.atproto.server.getAccountInviteCodes".
19
func ServerGetAccountInviteCodes(ctx context.Context, c *xrpc.Client, createAvailable bool, includeUsed bool) (*ServerGetAccountInviteCodes_Output, error) {
20
var out ServerGetAccountInviteCodes_Output
21
···
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
+32
api/atproto/servergetServiceAuth.go
+32
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
+
func ServerGetServiceAuth(ctx context.Context, c *xrpc.Client, aud string) (*ServerGetServiceAuth_Output, error) {
22
+
var out ServerGetServiceAuth_Output
23
+
24
+
params := map[string]interface{}{
25
+
"aud": aud,
26
+
}
27
+
if err := c.Do(ctx, xrpc.Query, "", "com.atproto.server.getServiceAuth", params, nil, &out); err != nil {
28
+
return nil, err
29
+
}
30
+
31
+
return &out, nil
32
+
}
+2
-2
api/atproto/serverreserveSigningKey.go
+2
-2
api/atproto/serverreserveSigningKey.go
···
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 new did: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: Public signing key in the form of a did:key.
22
SigningKey string `json:"signingKey" cborgen:"signingKey"`
23
}
24
···
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
+1
-1
api/atproto/syncgetBlob.go
+1
-1
api/atproto/syncgetBlob.go
+1
api/atproto/syncgetRecord.go
+1
api/atproto/syncgetRecord.go
+1
-1
api/atproto/syncgetRepo.go
+1
-1
api/atproto/syncgetRepo.go
···
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
+2
-1
api/atproto/synclistRepos.go
+2
-1
api/atproto/synclistRepos.go
+1
-1
api/atproto/syncnotifyOfUpdate.go
+1
-1
api/atproto/syncnotifyOfUpdate.go
···
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
+1
-1
api/atproto/syncrequestCrawl.go
+1
-1
api/atproto/syncrequestCrawl.go
+39
-15
api/atproto/syncsubscribeRepos.go
+39
-15
api/atproto/syncsubscribeRepos.go
···
9
)
10
11
// SyncSubscribeRepos_Commit is a "commit" in the com.atproto.sync.subscribeRepos schema.
12
type SyncSubscribeRepos_Commit struct {
13
Blobs []util.LexLink `json:"blobs" cborgen:"blobs"`
14
-
// blocks: CAR file containing relevant blocks.
15
-
Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"`
16
Commit util.LexLink `json:"commit" cborgen:"commit"`
17
Ops []*SyncSubscribeRepos_RepoOp `json:"ops" cborgen:"ops"`
18
-
Prev *util.LexLink `json:"prev" cborgen:"prev"`
19
-
Rebase bool `json:"rebase" cborgen:"rebase"`
20
-
Repo string `json:"repo" cborgen:"repo"`
21
-
// rev: The rev of the emitted commit.
22
Rev string `json:"rev" cborgen:"rev"`
23
-
Seq int64 `json:"seq" cborgen:"seq"`
24
-
// since: The rev of the last emitted commit from this repo.
25
-
Since *string `json:"since" cborgen:"since"`
26
-
Time string `json:"time" cborgen:"time"`
27
-
TooBig bool `json:"tooBig" cborgen:"tooBig"`
28
}
29
30
// SyncSubscribeRepos_Handle is a "handle" in the com.atproto.sync.subscribeRepos schema.
31
type SyncSubscribeRepos_Handle struct {
32
Did string `json:"did" cborgen:"did"`
33
Handle string `json:"handle" cborgen:"handle"`
34
Seq int64 `json:"seq" cborgen:"seq"`
35
Time string `json:"time" cborgen:"time"`
36
}
37
38
// SyncSubscribeRepos_Info is a "info" in the com.atproto.sync.subscribeRepos schema.
···
42
}
43
44
// SyncSubscribeRepos_Migrate is a "migrate" in the com.atproto.sync.subscribeRepos schema.
45
type SyncSubscribeRepos_Migrate struct {
46
Did string `json:"did" cborgen:"did"`
47
MigrateTo *string `json:"migrateTo" cborgen:"migrateTo"`
···
51
52
// SyncSubscribeRepos_RepoOp is a "repoOp" in the com.atproto.sync.subscribeRepos schema.
53
//
54
-
// A repo operation, ie a write of a single record. For creates and updates, CID is the record's CID as of this operation. For deletes, it's null.
55
type SyncSubscribeRepos_RepoOp struct {
56
-
Action string `json:"action" cborgen:"action"`
57
-
Cid *util.LexLink `json:"cid" cborgen:"cid"`
58
-
Path string `json:"path" cborgen:"path"`
59
}
60
61
// SyncSubscribeRepos_Tombstone is a "tombstone" in the com.atproto.sync.subscribeRepos schema.
62
type SyncSubscribeRepos_Tombstone struct {
63
Did string `json:"did" cborgen:"did"`
64
Seq int64 `json:"seq" cborgen:"seq"`
···
9
)
10
11
// SyncSubscribeRepos_Commit is a "commit" in the com.atproto.sync.subscribeRepos schema.
12
+
//
13
+
// 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.
14
type SyncSubscribeRepos_Commit struct {
15
Blobs []util.LexLink `json:"blobs" cborgen:"blobs"`
16
+
// blocks: CAR file containing relevant blocks, as a diff since the previous repo state.
17
+
Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"`
18
+
// commit: Repo commit object CID.
19
Commit util.LexLink `json:"commit" cborgen:"commit"`
20
Ops []*SyncSubscribeRepos_RepoOp `json:"ops" cborgen:"ops"`
21
+
// prev: DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability.
22
+
Prev *util.LexLink `json:"prev" cborgen:"prev"`
23
+
// rebase: DEPRECATED -- unused
24
+
Rebase bool `json:"rebase" cborgen:"rebase"`
25
+
// repo: The repo this event comes from.
26
+
Repo string `json:"repo" cborgen:"repo"`
27
+
// 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.
28
Rev string `json:"rev" cborgen:"rev"`
29
+
// seq: The stream sequence number of this message.
30
+
Seq int64 `json:"seq" cborgen:"seq"`
31
+
// since: The rev of the last emitted commit from this repo (if any).
32
+
Since *string `json:"since" cborgen:"since"`
33
+
// time: Timestamp of when this message was originally broadcast.
34
+
Time string `json:"time" cborgen:"time"`
35
+
// tooBig: 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.
36
+
TooBig bool `json:"tooBig" cborgen:"tooBig"`
37
}
38
39
// SyncSubscribeRepos_Handle is a "handle" in the com.atproto.sync.subscribeRepos schema.
40
+
//
41
+
// Represents an update of the account's handle, or transition to/from invalid state. NOTE: Will be deprecated in favor of #identity.
42
type SyncSubscribeRepos_Handle struct {
43
Did string `json:"did" cborgen:"did"`
44
Handle string `json:"handle" cborgen:"handle"`
45
Seq int64 `json:"seq" cborgen:"seq"`
46
Time string `json:"time" cborgen:"time"`
47
+
}
48
+
49
+
// SyncSubscribeRepos_Identity is a "identity" in the com.atproto.sync.subscribeRepos schema.
50
+
//
51
+
// 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.
52
+
type SyncSubscribeRepos_Identity struct {
53
+
Did string `json:"did" cborgen:"did"`
54
+
Seq int64 `json:"seq" cborgen:"seq"`
55
}
56
57
// SyncSubscribeRepos_Info is a "info" in the com.atproto.sync.subscribeRepos schema.
···
61
}
62
63
// SyncSubscribeRepos_Migrate is a "migrate" in the com.atproto.sync.subscribeRepos schema.
64
+
//
65
+
// Represents an account moving from one PDS instance to another. NOTE: not implemented; account migration uses #identity instead
66
type SyncSubscribeRepos_Migrate struct {
67
Did string `json:"did" cborgen:"did"`
68
MigrateTo *string `json:"migrateTo" cborgen:"migrateTo"`
···
72
73
// SyncSubscribeRepos_RepoOp is a "repoOp" in the com.atproto.sync.subscribeRepos schema.
74
//
75
+
// A repo operation, ie a mutation of a single record.
76
type SyncSubscribeRepos_RepoOp struct {
77
+
Action string `json:"action" cborgen:"action"`
78
+
// cid: For creates and updates, the new record CID. For deletions, null.
79
+
Cid *util.LexLink `json:"cid" cborgen:"cid"`
80
+
Path string `json:"path" cborgen:"path"`
81
}
82
83
// SyncSubscribeRepos_Tombstone is a "tombstone" in the com.atproto.sync.subscribeRepos schema.
84
+
//
85
+
// Indicates that an account has been deleted. NOTE: may be deprecated in favor of #identity or a future #account event
86
type SyncSubscribeRepos_Tombstone struct {
87
Did string `json:"did" cborgen:"did"`
88
Seq int64 `json:"seq" cborgen:"seq"`
+3
api/bsky/actordefs.go
+3
api/bsky/actordefs.go
···
186
LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPref" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"`
187
Pinned []string `json:"pinned" cborgen:"pinned"`
188
Saved []string `json:"saved" cborgen:"saved"`
189
}
190
191
// ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema.
···
200
}
201
202
// ActorDefs_ViewerState is a "viewerState" in the app.bsky.actor.defs schema.
203
type ActorDefs_ViewerState struct {
204
BlockedBy *bool `json:"blockedBy,omitempty" cborgen:"blockedBy,omitempty"`
205
Blocking *string `json:"blocking,omitempty" cborgen:"blocking,omitempty"`
···
186
LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPref" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"`
187
Pinned []string `json:"pinned" cborgen:"pinned"`
188
Saved []string `json:"saved" cborgen:"saved"`
189
+
TimelineIndex *int64 `json:"timelineIndex,omitempty" cborgen:"timelineIndex,omitempty"`
190
}
191
192
// ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema.
···
201
}
202
203
// ActorDefs_ViewerState is a "viewerState" in the app.bsky.actor.defs schema.
204
+
//
205
+
// Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
206
type ActorDefs_ViewerState struct {
207
BlockedBy *bool `json:"blockedBy,omitempty" cborgen:"blockedBy,omitempty"`
208
Blocking *string `json:"blocking,omitempty" cborgen:"blocking,omitempty"`
+2
api/bsky/actorgetProfile.go
+2
api/bsky/actorgetProfile.go
···
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
+11
-6
api/bsky/actorprofile.go
+11
-6
api/bsky/actorprofile.go
···
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 *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"`
25
-
Banner *util.LexBlob `json:"banner,omitempty" cborgen:"banner,omitempty"`
26
-
Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
27
-
DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"`
28
-
Labels *ActorProfile_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"`
29
}
30
31
type ActorProfile_Labels struct {
32
LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels
33
}
···
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
+
// description: Free-form profile description text.
29
+
Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
30
+
DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"`
31
+
// labels: Self-label values, specific to the Bluesky application, on the overall account.
32
+
Labels *ActorProfile_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"`
33
}
34
35
+
// Self-label values, specific to the Bluesky application, on the overall account.
36
type ActorProfile_Labels struct {
37
LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels
38
}
+2
api/bsky/embedexternal.go
+2
api/bsky/embedexternal.go
···
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
// RECORDTYPE: EmbedExternal
15
type EmbedExternal struct {
16
LexiconTypeID string `json:"$type,const=app.bsky.embed.external" cborgen:"$type,const=app.bsky.embed.external"`
···
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"`
+6
-2
api/bsky/embedimages.go
+6
-2
api/bsky/embedimages.go
···
27
28
// EmbedImages_Image is a "image" in the app.bsky.embed.images schema.
29
type EmbedImages_Image struct {
30
Alt string `json:"alt" cborgen:"alt"`
31
AspectRatio *EmbedImages_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"`
32
Image *util.LexBlob `json:"image" cborgen:"image"`
···
42
43
// EmbedImages_ViewImage is a "viewImage" in the app.bsky.embed.images schema.
44
type EmbedImages_ViewImage struct {
45
Alt string `json:"alt" cborgen:"alt"`
46
AspectRatio *EmbedImages_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"`
47
-
Fullsize string `json:"fullsize" cborgen:"fullsize"`
48
-
Thumb string `json:"thumb" cborgen:"thumb"`
49
}
···
27
28
// EmbedImages_Image is a "image" in the app.bsky.embed.images schema.
29
type EmbedImages_Image struct {
30
+
// alt: Alt text description of the image, for accessibility.
31
Alt string `json:"alt" cborgen:"alt"`
32
AspectRatio *EmbedImages_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"`
33
Image *util.LexBlob `json:"image" cborgen:"image"`
···
43
44
// EmbedImages_ViewImage is a "viewImage" in the app.bsky.embed.images schema.
45
type EmbedImages_ViewImage struct {
46
+
// alt: Alt text description of the image, for accessibility.
47
Alt string `json:"alt" cborgen:"alt"`
48
AspectRatio *EmbedImages_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"`
49
+
// 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.
50
+
Fullsize string `json:"fullsize" cborgen:"fullsize"`
51
+
// thumb: Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.
52
+
Thumb string `json:"thumb" cborgen:"thumb"`
53
}
+2
-1
api/bsky/embedrecord.go
+2
-1
api/bsky/embedrecord.go
···
59
IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
60
Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
61
Uri string `json:"uri" cborgen:"uri"`
62
-
Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
63
}
64
65
type EmbedRecord_ViewRecord_Embeds_Elem struct {
···
59
IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
60
Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
61
Uri string `json:"uri" cborgen:"uri"`
62
+
// value: The record data itself.
63
+
Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
64
}
65
66
type EmbedRecord_ViewRecord_Embeds_Elem struct {
+2
api/bsky/feeddefs.go
+2
api/bsky/feeddefs.go
···
411
}
412
413
// FeedDefs_ViewerState is a "viewerState" in the app.bsky.feed.defs schema.
414
+
//
415
+
// Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.
416
type FeedDefs_ViewerState struct {
417
Like *string `json:"like,omitempty" cborgen:"like,omitempty"`
418
ReplyDisabled *bool `json:"replyDisabled,omitempty" cborgen:"replyDisabled,omitempty"`
+10
-8
api/bsky/feedgenerator.go
+10
-8
api/bsky/feedgenerator.go
···
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
-
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
-
Did string `json:"did" cborgen:"did"`
29
-
DisplayName string `json:"displayName" cborgen:"displayName"`
30
-
Labels *FeedGenerator_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"`
31
}
32
33
type FeedGenerator_Labels struct {
34
LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels
35
}
···
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
+
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
+
Did string `json:"did" cborgen:"did"`
29
+
DisplayName string `json:"displayName" cborgen:"displayName"`
30
+
// labels: Self-label values
31
+
Labels *FeedGenerator_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"`
32
}
33
34
+
// Self-label values
35
type FeedGenerator_Labels struct {
36
LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels
37
}
+2
api/bsky/feedgetAuthorFeed.go
+2
api/bsky/feedgetAuthorFeed.go
···
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, limit int64) (*FeedGetAuthorFeed_Output, error) {
23
var out FeedGetAuthorFeed_Output
24
+7
-3
api/bsky/feedgetFeedGenerator.go
+7
-3
api/bsky/feedgetFeedGenerator.go
···
12
13
// FeedGetFeedGenerator_Output is the output of a app.bsky.feed.getFeedGenerator call.
14
type FeedGetFeedGenerator_Output struct {
15
-
IsOnline bool `json:"isOnline" cborgen:"isOnline"`
16
-
IsValid bool `json:"isValid" cborgen:"isValid"`
17
-
View *FeedDefs_GeneratorView `json:"view" cborgen:"view"`
18
}
19
20
// FeedGetFeedGenerator calls the XRPC method "app.bsky.feed.getFeedGenerator".
21
func FeedGetFeedGenerator(ctx context.Context, c *xrpc.Client, feed string) (*FeedGetFeedGenerator_Output, error) {
22
var out FeedGetFeedGenerator_Output
23
···
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
+2
api/bsky/feedgetFeedSkeleton.go
+2
api/bsky/feedgetFeedSkeleton.go
···
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
+3
api/bsky/feedgetLikes.go
+3
api/bsky/feedgetLikes.go
···
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
+2
api/bsky/feedgetListFeed.go
+2
api/bsky/feedgetListFeed.go
···
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
+4
api/bsky/feedgetPostThread.go
+4
api/bsky/feedgetPostThread.go
···
62
}
63
64
// FeedGetPostThread calls the XRPC method "app.bsky.feed.getPostThread".
65
+
//
66
+
// depth: How many levels of reply depth should be included in response.
67
+
// parentHeight: How many levels of parent (and grandparent, etc) post to include.
68
+
// uri: Reference (AT-URI) to post record.
69
func FeedGetPostThread(ctx context.Context, c *xrpc.Client, depth int64, parentHeight int64, uri string) (*FeedGetPostThread_Output, error) {
70
var out FeedGetPostThread_Output
71
+2
api/bsky/feedgetPosts.go
+2
api/bsky/feedgetPosts.go
+3
api/bsky/feedgetRepostedBy.go
+3
api/bsky/feedgetRepostedBy.go
···
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
+2
api/bsky/feedgetTimeline.go
+2
api/bsky/feedgetTimeline.go
···
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
+16
-10
api/bsky/feedpost.go
+16
-10
api/bsky/feedpost.go
···
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 string `json:"createdAt" cborgen:"createdAt"`
25
-
Embed *FeedPost_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"`
26
-
// entities: Deprecated: replaced by app.bsky.richtext.facet.
27
Entities []*FeedPost_Entity `json:"entities,omitempty" cborgen:"entities,omitempty"`
28
-
Facets []*RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"`
29
-
Labels *FeedPost_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"`
30
-
Langs []string `json:"langs,omitempty" cborgen:"langs,omitempty"`
31
-
Reply *FeedPost_ReplyRef `json:"reply,omitempty" cborgen:"reply,omitempty"`
32
-
// tags: Additional non-inline tags describing this post.
33
Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"`
34
-
Text string `json:"text" cborgen:"text"`
35
}
36
37
type FeedPost_Embed struct {
···
140
Value string `json:"value" cborgen:"value"`
141
}
142
143
type FeedPost_Labels struct {
144
LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels
145
}
···
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 {
···
145
Value string `json:"value" cborgen:"value"`
146
}
147
148
+
// Self-label values for this post. Effectively content warnings.
149
type FeedPost_Labels struct {
150
LabelDefs_SelfLabels *comatprototypes.LabelDefs_SelfLabels
151
}
+2
-1
api/bsky/feedthreadgate.go
+2
-1
api/bsky/feedthreadgate.go
···
22
LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate" cborgen:"$type,const=app.bsky.feed.threadgate"`
23
Allow []*FeedThreadgate_Allow_Elem `json:"allow,omitempty" cborgen:"allow,omitempty"`
24
CreatedAt string `json:"createdAt" cborgen:"createdAt"`
25
-
Post string `json:"post" cborgen:"post"`
26
}
27
28
type FeedThreadgate_Allow_Elem struct {
···
22
LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate" cborgen:"$type,const=app.bsky.feed.threadgate"`
23
Allow []*FeedThreadgate_Allow_Elem `json:"allow,omitempty" cborgen:"allow,omitempty"`
24
CreatedAt string `json:"createdAt" cborgen:"createdAt"`
25
+
// post: Reference (AT-URI) to the post record.
26
+
Post string `json:"post" cborgen:"post"`
27
}
28
29
type FeedThreadgate_Allow_Elem struct {
+2
-1
api/bsky/graphblock.go
+2
-1
api/bsky/graphblock.go
···
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
}
+2
api/bsky/graphgetList.go
+2
api/bsky/graphgetList.go
···
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
+2
api/bsky/graphgetLists.go
+2
api/bsky/graphgetLists.go
···
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
+3
api/bsky/graphgetRelationships.go
+3
api/bsky/graphgetRelationships.go
···
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
+4
-2
api/bsky/graphlist.go
+4
-2
api/bsky/graphlist.go
···
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 string `json:"name" cborgen:"name"`
30
-
Purpose *string `json:"purpose" cborgen:"purpose"`
31
}
32
33
type GraphList_Labels struct {
···
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 {
+2
-1
api/bsky/graphlistblock.go
+2
-1
api/bsky/graphlistblock.go
···
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
}
+4
-2
api/bsky/graphlistitem.go
+4
-2
api/bsky/graphlistitem.go
···
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 string `json:"list" cborgen:"list"`
19
-
Subject string `json:"subject" cborgen:"subject"`
20
}
···
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
}
+6
-4
api/bsky/richtextfacet.go
+6
-4
api/bsky/richtextfacet.go
···
15
)
16
17
// RichtextFacet is a "main" in the app.bsky.richtext.facet schema.
18
type RichtextFacet struct {
19
Features []*RichtextFacet_Features_Elem `json:"features" cborgen:"features"`
20
Index *RichtextFacet_ByteSlice `json:"index" cborgen:"index"`
···
22
23
// RichtextFacet_ByteSlice is a "byteSlice" in the app.bsky.richtext.facet schema.
24
//
25
-
// A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings.
26
type RichtextFacet_ByteSlice struct {
27
ByteEnd int64 `json:"byteEnd" cborgen:"byteEnd"`
28
ByteStart int64 `json:"byteStart" cborgen:"byteStart"`
···
112
113
// RichtextFacet_Link is a "link" in the app.bsky.richtext.facet schema.
114
//
115
-
// A facet feature for links.
116
//
117
// RECORDTYPE: RichtextFacet_Link
118
type RichtextFacet_Link struct {
···
122
123
// RichtextFacet_Mention is a "mention" in the app.bsky.richtext.facet schema.
124
//
125
-
// A facet feature for actor mentions.
126
//
127
// RECORDTYPE: RichtextFacet_Mention
128
type RichtextFacet_Mention struct {
···
132
133
// RichtextFacet_Tag is a "tag" in the app.bsky.richtext.facet schema.
134
//
135
-
// A hashtag.
136
//
137
// RECORDTYPE: RichtextFacet_Tag
138
type RichtextFacet_Tag struct {
···
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"`
···
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"`
···
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 {
···
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 {
···
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 {
+11
-1
automod/engine/persisthelpers.go
+11
-1
automod/engine/persisthelpers.go
···
118
// NOTE: this is running in an inner loop (if there are multiple reports), which is a bit inefficient, but seems acceptable
119
120
// AdminQueryModerationEvents(ctx context.Context, c *xrpc.Client, createdBy string, cursor string, inc ludeAllUserRecords bool, limit int64, sortDirection string, subject string, types []string)
121
-
resp, err := comatproto.AdminQueryModerationEvents(ctx, xrpcc, xrpcc.Auth.Did, "", false, 5, "", did.String(), []string{"com.atproto.admin.defs#modEventReport"})
122
if err != nil {
123
return false, err
124
}
···
118
// NOTE: this is running in an inner loop (if there are multiple reports), which is a bit inefficient, but seems acceptable
119
120
// AdminQueryModerationEvents(ctx context.Context, c *xrpc.Client, createdBy string, cursor string, inc ludeAllUserRecords bool, limit int64, sortDirection string, subject string, types []string)
121
+
resp, err := comatproto.AdminQueryModerationEvents(
122
+
ctx,
123
+
xrpcc,
124
+
xrpcc.Auth.Did,
125
+
"",
126
+
false,
127
+
5,
128
+
"",
129
+
did.String(),
130
+
[]string{"com.atproto.admin.defs#modEventReport"},
131
+
)
132
if err != nil {
133
return false, err
134
}
+24
bgs/bgs.go
+24
bgs/bgs.go
···
932
}
933
934
return nil
935
+
case env.Identity != nil:
936
+
log.Infow("bgs got identity event", "did", env.Identity.Did)
937
+
// Flush any cached DID documents for this user
938
+
bgs.didr.FlushCacheFor(env.Identity.Did)
939
+
940
+
// Refetch the DID doc and update our cached keys and handle etc.
941
+
_, err := bgs.createExternalUser(ctx, env.Identity.Did)
942
+
if err != nil {
943
+
return err
944
+
}
945
+
946
+
// Broadcast the identity event to all consumers
947
+
err = bgs.events.AddEvent(ctx, &events.XRPCStreamEvent{
948
+
Identity: &comatproto.SyncSubscribeRepos_Identity{
949
+
Did: env.Identity.Did,
950
+
Seq: env.Identity.Seq,
951
+
},
952
+
})
953
+
if err != nil {
954
+
log.Errorw("failed to broadcast Identity event", "error", err, "did", env.Identity.Did)
955
+
return fmt.Errorf("failed to broadcast Identity event: %w", err)
956
+
}
957
+
958
+
return nil
959
case env.RepoMigrate != nil:
960
if _, err := bgs.createExternalUser(ctx, env.RepoMigrate.Did); err != nil {
961
return err
+19
events/consumer.go
+19
events/consumer.go
···
17
type RepoStreamCallbacks struct {
18
RepoCommit func(evt *comatproto.SyncSubscribeRepos_Commit) error
19
RepoHandle func(evt *comatproto.SyncSubscribeRepos_Handle) error
20
RepoInfo func(evt *comatproto.SyncSubscribeRepos_Info) error
21
RepoMigrate func(evt *comatproto.SyncSubscribeRepos_Migrate) error
22
RepoTombstone func(evt *comatproto.SyncSubscribeRepos_Tombstone) error
···
35
return rsc.RepoInfo(xev.RepoInfo)
36
case xev.RepoMigrate != nil && rsc.RepoMigrate != nil:
37
return rsc.RepoMigrate(xev.RepoMigrate)
38
case xev.RepoTombstone != nil && rsc.RepoTombstone != nil:
39
return rsc.RepoTombstone(xev.RepoTombstone)
40
case xev.LabelLabels != nil && rsc.LabelLabels != nil:
···
211
212
if err := sched.AddWork(ctx, evt.Did, &XRPCStreamEvent{
213
RepoHandle: &evt,
214
}); err != nil {
215
return err
216
}
···
17
type RepoStreamCallbacks struct {
18
RepoCommit func(evt *comatproto.SyncSubscribeRepos_Commit) error
19
RepoHandle func(evt *comatproto.SyncSubscribeRepos_Handle) error
20
+
Identity func(evt *comatproto.SyncSubscribeRepos_Identity) error
21
RepoInfo func(evt *comatproto.SyncSubscribeRepos_Info) error
22
RepoMigrate func(evt *comatproto.SyncSubscribeRepos_Migrate) error
23
RepoTombstone func(evt *comatproto.SyncSubscribeRepos_Tombstone) error
···
36
return rsc.RepoInfo(xev.RepoInfo)
37
case xev.RepoMigrate != nil && rsc.RepoMigrate != nil:
38
return rsc.RepoMigrate(xev.RepoMigrate)
39
+
case xev.Identity != nil && rsc.Identity != nil:
40
+
return rsc.Identity(xev.Identity)
41
case xev.RepoTombstone != nil && rsc.RepoTombstone != nil:
42
return rsc.RepoTombstone(xev.RepoTombstone)
43
case xev.LabelLabels != nil && rsc.LabelLabels != nil:
···
214
215
if err := sched.AddWork(ctx, evt.Did, &XRPCStreamEvent{
216
RepoHandle: &evt,
217
+
}); err != nil {
218
+
return err
219
+
}
220
+
case "#identity":
221
+
var evt comatproto.SyncSubscribeRepos_Identity
222
+
if err := evt.UnmarshalCBOR(r); err != nil {
223
+
return err
224
+
}
225
+
226
+
if evt.Seq < lastSeq {
227
+
log.Errorf("Got events out of order from stream (seq = %d, prev = %d)", evt.Seq, lastSeq)
228
+
}
229
+
lastSeq = evt.Seq
230
+
231
+
if err := sched.AddWork(ctx, evt.Did, &XRPCStreamEvent{
232
+
Identity: &evt,
233
}); err != nil {
234
return err
235
}
+3
events/events.go
+3
events/events.go
···
137
Error *ErrorFrame
138
RepoCommit *comatproto.SyncSubscribeRepos_Commit
139
RepoHandle *comatproto.SyncSubscribeRepos_Handle
140
RepoInfo *comatproto.SyncSubscribeRepos_Info
141
RepoMigrate *comatproto.SyncSubscribeRepos_Migrate
142
RepoTombstone *comatproto.SyncSubscribeRepos_Tombstone
···
279
return evt.RepoMigrate.Seq
280
case evt.RepoTombstone != nil:
281
return evt.RepoTombstone.Seq
282
case evt.RepoInfo != nil:
283
return -1
284
case evt.Error != nil:
···
137
Error *ErrorFrame
138
RepoCommit *comatproto.SyncSubscribeRepos_Commit
139
RepoHandle *comatproto.SyncSubscribeRepos_Handle
140
+
Identity *comatproto.SyncSubscribeRepos_Identity
141
RepoInfo *comatproto.SyncSubscribeRepos_Info
142
RepoMigrate *comatproto.SyncSubscribeRepos_Migrate
143
RepoTombstone *comatproto.SyncSubscribeRepos_Tombstone
···
280
return evt.RepoMigrate.Seq
281
case evt.RepoTombstone != nil:
282
return evt.RepoTombstone.Seq
283
+
case evt.Identity != nil:
284
+
return evt.Identity.Seq
285
case evt.RepoInfo != nil:
286
return -1
287
case evt.Error != nil:
+2
events/persist.go
+2
events/persist.go
+2
events/yolopersist.go
+2
events/yolopersist.go
+1
gen/main.go
+1
gen/main.go
+1
-1
lex/gen.go
+1
-1
lex/gen.go
+7
sonar/sonar.go
+7
sonar/sonar.go
···
126
lastEvtProcessedAtGauge.WithLabelValues(s.SocketURL).Set(float64(now.UnixNano()))
127
lastEvtCreatedEvtProcessedGapGauge.WithLabelValues(s.SocketURL).Set(float64(now.Sub(t).Seconds()))
128
lastSeqGauge.WithLabelValues(s.SocketURL).Set(float64(xe.RepoHandle.Seq))
129
case xe.RepoInfo != nil:
130
eventsProcessedCounter.WithLabelValues("repo_info", s.SocketURL).Inc()
131
case xe.RepoMigrate != nil:
···
126
lastEvtProcessedAtGauge.WithLabelValues(s.SocketURL).Set(float64(now.UnixNano()))
127
lastEvtCreatedEvtProcessedGapGauge.WithLabelValues(s.SocketURL).Set(float64(now.Sub(t).Seconds()))
128
lastSeqGauge.WithLabelValues(s.SocketURL).Set(float64(xe.RepoHandle.Seq))
129
+
case xe.Identity != nil:
130
+
eventsProcessedCounter.WithLabelValues("identity", s.SocketURL).Inc()
131
+
now := time.Now()
132
+
s.ProgMux.Lock()
133
+
s.Progress.LastSeq = xe.RepoHandle.Seq
134
+
s.Progress.LastSeqProcessedAt = now
135
+
s.ProgMux.Unlock()
136
case xe.RepoInfo != nil:
137
eventsProcessedCounter.WithLabelValues("repo_info", s.SocketURL).Inc()
138
case xe.RepoMigrate != nil: