Skip to content

Commit

Permalink
remove deprecated sync fields (#2506)
Browse files Browse the repository at this point in the history
* lex: remove deprecated sync fields

* codegen field removals

* remove deprecated fields from code

* changeset
  • Loading branch information
bnewbold authored Feb 25, 2025
1 parent d4e14b7 commit 27b0a7b
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 93 deletions.
6 changes: 6 additions & 0 deletions .changeset/orange-chairs-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@atproto/api": patch
"@atproto/pds": patch
---

remove some deprecated fields from com.atproto Lexicons
8 changes: 0 additions & 8 deletions lexicons/com/atproto/repo/listRecords.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
"description": "The number of records to return."
},
"cursor": { "type": "string" },
"rkeyStart": {
"type": "string",
"description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)"
},
"rkeyEnd": {
"type": "string",
"description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)"
},
"reverse": {
"type": "boolean",
"description": "Flag to reverse the order of the returned records."
Expand Down
5 changes: 0 additions & 5 deletions lexicons/com/atproto/sync/getRecord.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
"type": "string",
"description": "Record Key",
"format": "record-key"
},
"commit": {
"type": "string",
"format": "cid",
"description": "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit"
}
}
},
Expand Down
16 changes: 0 additions & 16 deletions packages/api/src/client/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1860,16 +1860,6 @@ export const schemaDict = {
cursor: {
type: 'string',
},
rkeyStart: {
type: 'string',
description:
'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
},
rkeyEnd: {
type: 'string',
description:
'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
},
reverse: {
type: 'boolean',
description: 'Flag to reverse the order of the returned records.',
Expand Down Expand Up @@ -3410,12 +3400,6 @@ export const schemaDict = {
description: 'Record Key',
format: 'record-key',
},
commit: {
type: 'string',
format: 'cid',
description:
'DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit',
},
},
},
output: {
Expand Down
4 changes: 0 additions & 4 deletions packages/api/src/client/types/com/atproto/repo/listRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ export interface QueryParams {
/** The number of records to return. */
limit?: number
cursor?: string
/** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
rkeyStart?: string
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
rkeyEnd?: string
/** Flag to reverse the order of the returned records. */
reverse?: boolean
}
Expand Down
2 changes: 0 additions & 2 deletions packages/api/src/client/types/com/atproto/sync/getRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export interface QueryParams {
collection: string
/** Record Key */
rkey: string
/** DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit */
commit?: string
}

export type InputSchema = undefined
Expand Down
16 changes: 0 additions & 16 deletions packages/ozone/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1860,16 +1860,6 @@ export const schemaDict = {
cursor: {
type: 'string',
},
rkeyStart: {
type: 'string',
description:
'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
},
rkeyEnd: {
type: 'string',
description:
'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
},
reverse: {
type: 'boolean',
description: 'Flag to reverse the order of the returned records.',
Expand Down Expand Up @@ -3410,12 +3400,6 @@ export const schemaDict = {
description: 'Record Key',
format: 'record-key',
},
commit: {
type: 'string',
format: 'cid',
description:
'DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit',
},
},
},
output: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export interface QueryParams {
/** The number of records to return. */
limit: number
cursor?: string
/** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
rkeyStart?: string
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
rkeyEnd?: string
/** Flag to reverse the order of the returned records. */
reverse?: boolean
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export interface QueryParams {
collection: string
/** Record Key */
rkey: string
/** DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit */
commit?: string
}

export type InputSchema = undefined
Expand Down
12 changes: 1 addition & 11 deletions packages/pds/src/api/com/atproto/repo/listRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@ import { Server } from '../../../../lexicon'

export default function (server: Server, ctx: AppContext) {
server.com.atproto.repo.listRecords(async ({ params }) => {
const {
repo,
collection,
limit = 50,
cursor,
rkeyStart,
rkeyEnd,
reverse = false,
} = params
const { repo, collection, limit = 50, cursor, reverse = false } = params

const did = await ctx.accountManager.getDidForActor(repo)
if (!did) {
Expand All @@ -26,8 +18,6 @@ export default function (server: Server, ctx: AppContext) {
limit,
reverse,
cursor,
rkeyStart,
rkeyEnd,
}),
)

Expand Down
4 changes: 1 addition & 3 deletions packages/pds/src/api/com/atproto/sync/getRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export default function (server: Server, ctx: AppContext) {
let carStream: stream.Readable
try {
const storage = new SqlRepoReader(actorDb)
const commit = params.commit
? CID.parse(params.commit)
: await storage.getRoot()
const commit = await storage.getRoot()

if (!commit) {
throw new InvalidRequestError(`Could not find repo for DID: ${did}`)
Expand Down
16 changes: 0 additions & 16 deletions packages/pds/src/lexicon/lexicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1860,16 +1860,6 @@ export const schemaDict = {
cursor: {
type: 'string',
},
rkeyStart: {
type: 'string',
description:
'DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)',
},
rkeyEnd: {
type: 'string',
description:
'DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)',
},
reverse: {
type: 'boolean',
description: 'Flag to reverse the order of the returned records.',
Expand Down Expand Up @@ -3410,12 +3400,6 @@ export const schemaDict = {
description: 'Record Key',
format: 'record-key',
},
commit: {
type: 'string',
format: 'cid',
description:
'DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit',
},
},
},
output: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ export interface QueryParams {
/** The number of records to return. */
limit: number
cursor?: string
/** DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) */
rkeyStart?: string
/** DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) */
rkeyEnd?: string
/** Flag to reverse the order of the returned records. */
reverse?: boolean
}
Expand Down
2 changes: 0 additions & 2 deletions packages/pds/src/lexicon/types/com/atproto/sync/getRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export interface QueryParams {
collection: string
/** Record Key */
rkey: string
/** DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit */
commit?: string
}

export type InputSchema = undefined
Expand Down

0 comments on commit 27b0a7b

Please sign in to comment.