/** * The NSIDs of the `com.atproto` XRPC methods these libraries call and the * PDS in `packages/pds` serves, named by their namespace and method, since * `com.atproto.repo.getRecord` and `com.atproto.sync.getRecord` share a * method name. Their lexicons are atproto's own, in * https://github.com/bluesky-social/atproto/tree/main/lexicons/com/atproto. */ export let IDENTITY_RESOLVE_HANDLE = 'com.atproto.identity.resolveHandle'; export let REPO_APPLY_WRITES = 'com.atproto.repo.applyWrites'; export let REPO_DELETE_RECORD = 'com.atproto.repo.deleteRecord'; export let REPO_DESCRIBE_REPO = 'com.atproto.repo.describeRepo'; export let REPO_GET_RECORD = 'com.atproto.repo.getRecord'; export let REPO_LIST_RECORDS = 'com.atproto.repo.listRecords'; export let REPO_PUT_RECORD = 'com.atproto.repo.putRecord'; export let REPO_UPLOAD_BLOB = 'com.atproto.repo.uploadBlob'; export let SERVER_CREATE_ACCOUNT = 'com.atproto.server.createAccount'; export let SERVER_CREATE_SESSION = 'com.atproto.server.createSession'; export let SERVER_DELETE_SESSION = 'com.atproto.server.deleteSession'; export let SERVER_DESCRIBE_SERVER = 'com.atproto.server.describeServer'; export let SERVER_GET_SERVICE_AUTH = 'com.atproto.server.getServiceAuth'; export let SERVER_GET_SESSION = 'com.atproto.server.getSession'; export let SERVER_REFRESH_SESSION = 'com.atproto.server.refreshSession'; export let SERVER_RESERVE_SIGNING_KEY = 'com.atproto.server.reserveSigningKey'; export let SYNC_GET_BLOB = 'com.atproto.sync.getBlob'; export let SYNC_GET_LATEST_COMMIT = 'com.atproto.sync.getLatestCommit'; export let SYNC_GET_RECORD = 'com.atproto.sync.getRecord'; export let SYNC_GET_REPO = 'com.atproto.sync.getRepo'; /** Every method above. */ export let ATPROTO_METHODS: Array = [ IDENTITY_RESOLVE_HANDLE, REPO_APPLY_WRITES, REPO_DELETE_RECORD, REPO_DESCRIBE_REPO, REPO_GET_RECORD, REPO_LIST_RECORDS, REPO_PUT_RECORD, REPO_UPLOAD_BLOB, SERVER_CREATE_ACCOUNT, SERVER_CREATE_SESSION, SERVER_DELETE_SESSION, SERVER_DESCRIBE_SERVER, SERVER_GET_SERVICE_AUTH, SERVER_GET_SESSION, SERVER_REFRESH_SESSION, SERVER_RESERVE_SIGNING_KEY, SYNC_GET_BLOB, SYNC_GET_LATEST_COMMIT, SYNC_GET_RECORD, SYNC_GET_REPO ]; /** The path of the XRPC method `method` on a server: `/xrpc/`. */ export function xrpcPath(method: String): String { return `/xrpc/${method}`; }