···20202121// AdminDefs_ActionView is a "actionView" in the com.atproto.admin.defs schema.
2222type AdminDefs_ActionView struct {
2323- Action *string `json:"action" cborgen:"action"`
2424- CreateLabelVals []string `json:"createLabelVals,omitempty" cborgen:"createLabelVals,omitempty"`
2525- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
2626- CreatedBy string `json:"createdBy" cborgen:"createdBy"`
2323+ Action *string `json:"action" cborgen:"action"`
2424+ CreateLabelVals []string `json:"createLabelVals,omitempty" cborgen:"createLabelVals,omitempty"`
2525+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
2626+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
2727+ // durationInHours: Indicates how long this action was meant to be in effect before automatically expiring.
2828+ DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"`
2729 Id int64 `json:"id" cborgen:"id"`
2830 NegateLabelVals []string `json:"negateLabelVals,omitempty" cborgen:"negateLabelVals,omitempty"`
2931 Reason string `json:"reason" cborgen:"reason"`
···3638// AdminDefs_ActionViewCurrent is a "actionViewCurrent" in the com.atproto.admin.defs schema.
3739type AdminDefs_ActionViewCurrent struct {
3840 Action *string `json:"action" cborgen:"action"`
3939- Id int64 `json:"id" cborgen:"id"`
4141+ // durationInHours: Indicates how long this action was meant to be in effect before automatically expiring.
4242+ DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"`
4343+ Id int64 `json:"id" cborgen:"id"`
4044}
41454246// AdminDefs_ActionViewDetail is a "actionViewDetail" in the com.atproto.admin.defs schema.
4347type AdminDefs_ActionViewDetail struct {
4444- Action *string `json:"action" cborgen:"action"`
4545- CreateLabelVals []string `json:"createLabelVals,omitempty" cborgen:"createLabelVals,omitempty"`
4646- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
4747- CreatedBy string `json:"createdBy" cborgen:"createdBy"`
4848+ Action *string `json:"action" cborgen:"action"`
4949+ CreateLabelVals []string `json:"createLabelVals,omitempty" cborgen:"createLabelVals,omitempty"`
5050+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
5151+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
5252+ // durationInHours: Indicates how long this action was meant to be in effect before automatically expiring.
5353+ DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"`
4854 Id int64 `json:"id" cborgen:"id"`
4955 NegateLabelVals []string `json:"negateLabelVals,omitempty" cborgen:"negateLabelVals,omitempty"`
5056 Reason string `json:"reason" cborgen:"reason"`
+5-3
api/atproto/admintakeModerationAction.go
···15151616// AdminTakeModerationAction_Input is the input argument to a com.atproto.admin.takeModerationAction call.
1717type AdminTakeModerationAction_Input struct {
1818- Action string `json:"action" cborgen:"action"`
1919- CreateLabelVals []string `json:"createLabelVals,omitempty" cborgen:"createLabelVals,omitempty"`
2020- CreatedBy string `json:"createdBy" cborgen:"createdBy"`
1818+ Action string `json:"action" cborgen:"action"`
1919+ CreateLabelVals []string `json:"createLabelVals,omitempty" cborgen:"createLabelVals,omitempty"`
2020+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
2121+ // durationInHours: Indicates how long this action was meant to be in effect before automatically expiring.
2222+ DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"`
2123 NegateLabelVals []string `json:"negateLabelVals,omitempty" cborgen:"negateLabelVals,omitempty"`
2224 Reason string `json:"reason" cborgen:"reason"`
2325 Subject *AdminTakeModerationAction_Input_Subject `json:"subject" cborgen:"subject"`
+87-3
api/atproto/cbor_gen.go
···194194195195 cw := cbg.NewCborWriter(w)
196196197197- if _, err := cw.Write([]byte{170}); err != nil {
197197+ if _, err := cw.Write([]byte{172}); err != nil {
198198 return err
199199 }
200200···221221 if err := v.MarshalCBOR(cw); err != nil {
222222 return err
223223 }
224224+ }
225225+226226+ // t.Rev (string) (string)
227227+ if len("rev") > cbg.MaxLength {
228228+ return xerrors.Errorf("Value in field \"rev\" was too long")
229229+ }
230230+231231+ if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("rev"))); err != nil {
232232+ return err
233233+ }
234234+ if _, err := cw.WriteString(string("rev")); err != nil {
235235+ return err
236236+ }
237237+238238+ if len(t.Rev) > cbg.MaxLength {
239239+ return xerrors.Errorf("Value in field t.Rev was too long")
240240+ }
241241+242242+ if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Rev))); err != nil {
243243+ return err
244244+ }
245245+ if _, err := cw.WriteString(string(t.Rev)); err != nil {
246246+ return err
224247 }
225248226249 // t.Seq (int64) (int64)
···332355 }
333356 }
334357358358+ // t.Since (string) (string)
359359+ if len("since") > cbg.MaxLength {
360360+ return xerrors.Errorf("Value in field \"since\" was too long")
361361+ }
362362+363363+ if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("since"))); err != nil {
364364+ return err
365365+ }
366366+ if _, err := cw.WriteString(string("since")); err != nil {
367367+ return err
368368+ }
369369+370370+ if t.Since == nil {
371371+ if _, err := cw.Write(cbg.CborNull); err != nil {
372372+ return err
373373+ }
374374+ } else {
375375+ if len(*t.Since) > cbg.MaxLength {
376376+ return xerrors.Errorf("Value in field t.Since was too long")
377377+ }
378378+379379+ if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Since))); err != nil {
380380+ return err
381381+ }
382382+ if _, err := cw.WriteString(string(*t.Since)); err != nil {
383383+ return err
384384+ }
385385+ }
386386+335387 // t.Blocks (util.LexBytes) (slice)
336388 if len("blocks") > cbg.MaxLength {
337389 return xerrors.Errorf("Value in field \"blocks\" was too long")
···474526 t.Ops[i] = &v
475527 }
476528529529+ // t.Rev (string) (string)
530530+ case "rev":
531531+532532+ {
533533+ sval, err := cbg.ReadString(cr)
534534+ if err != nil {
535535+ return err
536536+ }
537537+538538+ t.Rev = string(sval)
539539+ }
477540 // t.Seq (int64) (int64)
478541 case "seq":
479542 {
···572635 t.Blobs[i] = v
573636 }
574637638638+ // t.Since (string) (string)
639639+ case "since":
640640+641641+ {
642642+ b, err := cr.ReadByte()
643643+ if err != nil {
644644+ return err
645645+ }
646646+ if b != cbg.CborNull[0] {
647647+ if err := cr.UnreadByte(); err != nil {
648648+ return err
649649+ }
650650+651651+ sval, err := cbg.ReadString(cr)
652652+ if err != nil {
653653+ return err
654654+ }
655655+656656+ t.Since = (*string)(&sval)
657657+ }
658658+ }
575659 // t.Blocks (util.LexBytes) (slice)
576660 case "blocks":
577661···16061690 return err
16071691 }
1608169216091609- if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("com.atproto.label.defs"))); err != nil {
16931693+ if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("com.atproto.label.defs#selfLabels"))); err != nil {
16101694 return err
16111695 }
16121612- if _, err := cw.WriteString(string("com.atproto.label.defs")); err != nil {
16961696+ if _, err := cw.WriteString(string("com.atproto.label.defs#selfLabels")); err != nil {
16131697 return err
16141698 }
16151699
+1-1
api/atproto/repostrongRef.go
···1313} // RepoStrongRef is a "main" in the com.atproto.repo.strongRef schema.
1414// RECORDTYPE: RepoStrongRef
1515type RepoStrongRef struct {
1616- LexiconTypeID string `json:"$type,const=com.atproto.repo.strongRef#main,omitempty" cborgen:"$type,const=com.atproto.repo.strongRef#main,omitempty"`
1616+ LexiconTypeID string `json:"$type,const=com.atproto.repo.strongRef,omitempty" cborgen:"$type,const=com.atproto.repo.strongRef,omitempty"`
1717 Cid string `json:"cid" cborgen:"cid"`
1818 Uri string `json:"uri" cborgen:"uri"`
1919}
+2-4
api/atproto/syncgetCheckout.go
···13131414// SyncGetCheckout calls the XRPC method "com.atproto.sync.getCheckout".
1515//
1616-// commit: The commit to get the checkout from. Defaults to current HEAD.
1716// did: The DID of the repo.
1818-func SyncGetCheckout(ctx context.Context, c *xrpc.Client, commit string, did string) ([]byte, error) {
1717+func SyncGetCheckout(ctx context.Context, c *xrpc.Client, did string) ([]byte, error) {
1918 buf := new(bytes.Buffer)
20192120 params := map[string]interface{}{
2222- "commit": commit,
2323- "did": did,
2121+ "did": did,
2422 }
2523 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getCheckout", params, nil, buf); err != nil {
2624 return nil, err
+33
api/atproto/syncgetLatestCommit.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package atproto
44+55+// schema: com.atproto.sync.getLatestCommit
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// SyncGetLatestCommit_Output is the output of a com.atproto.sync.getLatestCommit call.
1414+type SyncGetLatestCommit_Output struct {
1515+ Cid string `json:"cid" cborgen:"cid"`
1616+ Rev string `json:"rev" cborgen:"rev"`
1717+}
1818+1919+// SyncGetLatestCommit calls the XRPC method "com.atproto.sync.getLatestCommit".
2020+//
2121+// did: The DID of the repo.
2222+func SyncGetLatestCommit(ctx context.Context, c *xrpc.Client, did string) (*SyncGetLatestCommit_Output, error) {
2323+ var out SyncGetLatestCommit_Output
2424+2525+ params := map[string]interface{}{
2626+ "did": did,
2727+ }
2828+ if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getLatestCommit", params, nil, &out); err != nil {
2929+ return nil, err
3030+ }
3131+3232+ return &out, nil
3333+}
+4-6
api/atproto/syncgetRepo.go
···1414// SyncGetRepo calls the XRPC method "com.atproto.sync.getRepo".
1515//
1616// did: The DID of the repo.
1717-// earliest: The earliest commit in the commit range (not inclusive)
1818-// latest: The latest commit in the commit range (inclusive)
1919-func SyncGetRepo(ctx context.Context, c *xrpc.Client, did string, earliest string, latest string) ([]byte, error) {
1717+// since: The revision of the repo to catch up from.
1818+func SyncGetRepo(ctx context.Context, c *xrpc.Client, did string, since string) ([]byte, error) {
2019 buf := new(bytes.Buffer)
21202221 params := map[string]interface{}{
2323- "did": did,
2424- "earliest": earliest,
2525- "latest": latest,
2222+ "did": did,
2323+ "since": since,
2624 }
2725 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getRepo", params, nil, buf); err != nil {
2826 return nil, err
+8-7
api/atproto/synclistBlobs.go
···12121313// SyncListBlobs_Output is the output of a com.atproto.sync.listBlobs call.
1414type SyncListBlobs_Output struct {
1515- Cids []string `json:"cids" cborgen:"cids"`
1515+ Cids []string `json:"cids" cborgen:"cids"`
1616+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1617}
17181819// SyncListBlobs calls the XRPC method "com.atproto.sync.listBlobs".
1920//
2021// did: The DID of the repo.
2121-// earliest: The earliest commit to start from
2222-// latest: The most recent commit
2323-func SyncListBlobs(ctx context.Context, c *xrpc.Client, did string, earliest string, latest string) (*SyncListBlobs_Output, error) {
2222+// since: Optional revision of the repo to list blobs since
2323+func SyncListBlobs(ctx context.Context, c *xrpc.Client, cursor string, did string, limit int64, since string) (*SyncListBlobs_Output, error) {
2424 var out SyncListBlobs_Output
25252626 params := map[string]interface{}{
2727- "did": did,
2828- "earliest": earliest,
2929- "latest": latest,
2727+ "cursor": cursor,
2828+ "did": did,
2929+ "limit": limit,
3030+ "since": since,
3031 }
3132 if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.listBlobs", params, nil, &out); err != nil {
3233 return nil, err
+9-3
api/atproto/syncsubscribeRepos.go
···1818 Prev *util.LexLink `json:"prev" cborgen:"prev"`
1919 Rebase bool `json:"rebase" cborgen:"rebase"`
2020 Repo string `json:"repo" cborgen:"repo"`
2121- Seq int64 `json:"seq" cborgen:"seq"`
2222- Time string `json:"time" cborgen:"time"`
2323- TooBig bool `json:"tooBig" cborgen:"tooBig"`
2121+ // rev: The rev of the emitted commit
2222+ Rev string `json:"rev" cborgen:"rev"`
2323+ Seq int64 `json:"seq" cborgen:"seq"`
2424+ // since: The rev of the last emitted commit from this repo
2525+ Since *string `json:"since" cborgen:"since"`
2626+ Time string `json:"time" cborgen:"time"`
2727+ TooBig bool `json:"tooBig" cborgen:"tooBig"`
2428}
25292630// SyncSubscribeRepos_Handle is a "handle" in the com.atproto.sync.subscribeRepos schema.
···4650}
47514852// SyncSubscribeRepos_RepoOp is a "repoOp" in the com.atproto.sync.subscribeRepos schema.
5353+//
5454+// 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.
4955type SyncSubscribeRepos_RepoOp struct {
5056 Action string `json:"action" cborgen:"action"`
5157 Cid *util.LexLink `json:"cid" cborgen:"cid"`
+25
api/atproto/tempupgradeRepoVersion.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package atproto
44+55+// schema: com.atproto.temp.upgradeRepoVersion
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// TempUpgradeRepoVersion_Input is the input argument to a com.atproto.temp.upgradeRepoVersion call.
1414+type TempUpgradeRepoVersion_Input struct {
1515+ Did string `json:"did" cborgen:"did"`
1616+}
1717+1818+// TempUpgradeRepoVersion calls the XRPC method "com.atproto.temp.upgradeRepoVersion".
1919+func TempUpgradeRepoVersion(ctx context.Context, c *xrpc.Client, input *TempUpgradeRepoVersion_Input) error {
2020+ if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.upgradeRepoVersion", nil, input, nil); err != nil {
2121+ return err
2222+ }
2323+2424+ return nil
2525+}