@clioplaylists/clio 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.env +7 -0
- package/dist/api/com/clioplaylists/alpha/actor/getProfile.d.ts +0 -0
- package/dist/api/com/clioplaylists/alpha/actor/getProfile.js +37 -0
- package/dist/api/com/clioplaylists/alpha/feed/getSongs.d.ts +0 -0
- package/dist/api/com/clioplaylists/alpha/feed/getSongs.js +37 -0
- package/dist/api/health.d.ts +3 -0
- package/dist/api/health.js +25 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +6 -0
- package/dist/api/util.d.ts +9 -0
- package/dist/api/util.js +13 -0
- package/dist/auth-verifier.d.ts +92 -0
- package/dist/auth-verifier.js +365 -0
- package/dist/client.d.ts +9 -0
- package/dist/client.js +33 -0
- package/dist/config.d.ts +21 -0
- package/dist/config.js +49 -0
- package/dist/context.d.ts +11 -0
- package/dist/context.js +12 -0
- package/dist/dataplane/client.d.ts +27 -0
- package/dist/dataplane/client.js +120 -0
- package/dist/dataplane/index.d.ts +2 -0
- package/dist/dataplane/index.js +2 -0
- package/dist/dataplane/server/background.d.ts +13 -0
- package/dist/dataplane/server/background.js +30 -0
- package/dist/dataplane/server/db/database-schema.d.ts +13 -0
- package/dist/dataplane/server/db/database-schema.js +1 -0
- package/dist/dataplane/server/db/db.d.ts +32 -0
- package/dist/dataplane/server/db/db.js +152 -0
- package/dist/dataplane/server/db/index.d.ts +1 -0
- package/dist/dataplane/server/db/index.js +1 -0
- package/dist/dataplane/server/db/migrations/20230309T045948368Z-init.d.ts +3 -0
- package/dist/dataplane/server/db/migrations/20230309T045948368Z-init.js +113 -0
- package/dist/dataplane/server/db/migrations/20230420T211446071Z-did-cache.d.ts +3 -0
- package/dist/dataplane/server/db/migrations/20230420T211446071Z-did-cache.js +11 -0
- package/dist/dataplane/server/db/migrations/index.d.ts +2 -0
- package/dist/dataplane/server/db/migrations/index.js +5 -0
- package/dist/dataplane/server/db/migrations/provider.d.ts +11 -0
- package/dist/dataplane/server/db/migrations/provider.js +19 -0
- package/dist/dataplane/server/db/pagination.d.ts +86 -0
- package/dist/dataplane/server/db/pagination.js +128 -0
- package/dist/dataplane/server/db/tables/actor-sync.d.ts +9 -0
- package/dist/dataplane/server/db/tables/actor-sync.js +1 -0
- package/dist/dataplane/server/db/tables/actor.d.ts +11 -0
- package/dist/dataplane/server/db/tables/actor.js +1 -0
- package/dist/dataplane/server/db/tables/artist-list-item.d.ts +11 -0
- package/dist/dataplane/server/db/tables/artist-list-item.js +1 -0
- package/dist/dataplane/server/db/tables/artist.d.ts +10 -0
- package/dist/dataplane/server/db/tables/artist.js +1 -0
- package/dist/dataplane/server/db/tables/playlist-idea.d.ts +14 -0
- package/dist/dataplane/server/db/tables/playlist-idea.js +1 -0
- package/dist/dataplane/server/db/tables/playlist-item.d.ts +11 -0
- package/dist/dataplane/server/db/tables/playlist-item.js +1 -0
- package/dist/dataplane/server/db/tables/playlist.d.ts +10 -0
- package/dist/dataplane/server/db/tables/playlist.js +1 -0
- package/dist/dataplane/server/db/tables/profile.d.ts +15 -0
- package/dist/dataplane/server/db/tables/profile.js +1 -0
- package/dist/dataplane/server/db/tables/record.d.ts +12 -0
- package/dist/dataplane/server/db/tables/record.js +1 -0
- package/dist/dataplane/server/db/tables/song.d.ts +12 -0
- package/dist/dataplane/server/db/tables/song.js +1 -0
- package/dist/dataplane/server/db/types.d.ts +9 -0
- package/dist/dataplane/server/db/types.js +1 -0
- package/dist/dataplane/server/db/util.d.ts +20 -0
- package/dist/dataplane/server/db/util.js +40 -0
- package/dist/dataplane/server/index.d.ts +11 -0
- package/dist/dataplane/server/index.js +36 -0
- package/dist/dataplane/server/indexing/index.d.ts +32 -0
- package/dist/dataplane/server/indexing/index.js +271 -0
- package/dist/dataplane/server/indexing/plugins/playlist-idea.d.ts +14 -0
- package/dist/dataplane/server/indexing/plugins/playlist-idea.js +126 -0
- package/dist/dataplane/server/indexing/plugins/profile.d.ts +8 -0
- package/dist/dataplane/server/indexing/plugins/profile.js +44 -0
- package/dist/dataplane/server/indexing/processor.d.ts +22 -0
- package/dist/dataplane/server/indexing/processor.js +72 -0
- package/dist/dataplane/server/routes/identity.d.ts +6 -0
- package/dist/dataplane/server/routes/identity.js +54 -0
- package/dist/dataplane/server/routes/index.d.ts +5 -0
- package/dist/dataplane/server/routes/index.js +14 -0
- package/dist/dataplane/server/routes/profile.d.ts +5 -0
- package/dist/dataplane/server/routes/profile.js +59 -0
- package/dist/dataplane/server/routes/records.d.ts +11 -0
- package/dist/dataplane/server/routes/records.js +51 -0
- package/dist/dataplane/server/routes/sync.d.ts +5 -0
- package/dist/dataplane/server/routes/sync.js +12 -0
- package/dist/dataplane/server/subscription.d.ts +25 -0
- package/dist/dataplane/server/subscription.js +86 -0
- package/dist/error.d.ts +2 -0
- package/dist/error.js +10 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +55 -0
- package/dist/lexicons/index.d.ts +278 -0
- package/dist/lexicons/index.js +463 -0
- package/dist/lexicons/lexicons.d.ts +8466 -0
- package/dist/lexicons/lexicons.js +4548 -0
- package/dist/lexicons/types/com/atproto/admin/defs.d.ts +50 -0
- package/dist/lexicons/types/com/atproto/admin/defs.js +42 -0
- package/dist/lexicons/types/com/atproto/admin/deleteAccount.d.ts +29 -0
- package/dist/lexicons/types/com/atproto/admin/deleteAccount.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/disableAccountInvites.d.ts +31 -0
- package/dist/lexicons/types/com/atproto/admin/disableAccountInvites.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/disableInviteCodes.d.ts +30 -0
- package/dist/lexicons/types/com/atproto/admin/disableInviteCodes.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/enableAccountInvites.d.ts +31 -0
- package/dist/lexicons/types/com/atproto/admin/enableAccountInvites.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/getAccountInfo.d.ts +33 -0
- package/dist/lexicons/types/com/atproto/admin/getAccountInfo.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/getAccountInfos.d.ts +36 -0
- package/dist/lexicons/types/com/atproto/admin/getAccountInfos.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/getInviteCodes.d.ts +39 -0
- package/dist/lexicons/types/com/atproto/admin/getInviteCodes.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/getSubjectStatus.d.ts +44 -0
- package/dist/lexicons/types/com/atproto/admin/getSubjectStatus.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/searchAccounts.d.ts +39 -0
- package/dist/lexicons/types/com/atproto/admin/searchAccounts.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/sendEmail.d.ts +45 -0
- package/dist/lexicons/types/com/atproto/admin/sendEmail.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/updateAccountEmail.d.ts +31 -0
- package/dist/lexicons/types/com/atproto/admin/updateAccountEmail.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/updateAccountHandle.d.ts +30 -0
- package/dist/lexicons/types/com/atproto/admin/updateAccountHandle.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/updateAccountPassword.d.ts +30 -0
- package/dist/lexicons/types/com/atproto/admin/updateAccountPassword.js +1 -0
- package/dist/lexicons/types/com/atproto/admin/updateSubjectStatus.d.ts +51 -0
- package/dist/lexicons/types/com/atproto/admin/updateSubjectStatus.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/defs.d.ts +14 -0
- package/dist/lexicons/types/com/atproto/identity/defs.js +10 -0
- package/dist/lexicons/types/com/atproto/identity/getRecommendedDidCredentials.d.ts +38 -0
- package/dist/lexicons/types/com/atproto/identity/getRecommendedDidCredentials.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/refreshIdentity.d.ts +39 -0
- package/dist/lexicons/types/com/atproto/identity/refreshIdentity.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/requestPlcOperationSignature.d.ts +23 -0
- package/dist/lexicons/types/com/atproto/identity/requestPlcOperationSignature.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/resolveDid.d.ts +38 -0
- package/dist/lexicons/types/com/atproto/identity/resolveDid.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/resolveHandle.d.ts +37 -0
- package/dist/lexicons/types/com/atproto/identity/resolveHandle.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/resolveIdentity.d.ts +35 -0
- package/dist/lexicons/types/com/atproto/identity/resolveIdentity.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/signPlcOperation.d.ts +46 -0
- package/dist/lexicons/types/com/atproto/identity/signPlcOperation.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/submitPlcOperation.d.ts +29 -0
- package/dist/lexicons/types/com/atproto/identity/submitPlcOperation.js +1 -0
- package/dist/lexicons/types/com/atproto/identity/updateHandle.d.ts +30 -0
- package/dist/lexicons/types/com/atproto/identity/updateHandle.js +1 -0
- package/dist/lexicons/types/com/atproto/label/defs.d.ts +73 -0
- package/dist/lexicons/types/com/atproto/label/defs.js +42 -0
- package/dist/lexicons/types/com/atproto/label/queryLabels.d.ts +42 -0
- package/dist/lexicons/types/com/atproto/label/queryLabels.js +1 -0
- package/dist/lexicons/types/com/atproto/label/subscribeLabels.d.ts +38 -0
- package/dist/lexicons/types/com/atproto/label/subscribeLabels.js +18 -0
- package/dist/lexicons/types/com/atproto/lexicon/schema.d.ts +11 -0
- package/dist/lexicons/types/com/atproto/lexicon/schema.js +11 -0
- package/dist/lexicons/types/com/atproto/moderation/createReport.d.ts +57 -0
- package/dist/lexicons/types/com/atproto/moderation/createReport.js +1 -0
- package/dist/lexicons/types/com/atproto/moderation/defs.d.ts +20 -0
- package/dist/lexicons/types/com/atproto/moderation/defs.js +17 -0
- package/dist/lexicons/types/com/atproto/repo/applyWrites.d.ts +98 -0
- package/dist/lexicons/types/com/atproto/repo/applyWrites.js +50 -0
- package/dist/lexicons/types/com/atproto/repo/createRecord.d.ts +56 -0
- package/dist/lexicons/types/com/atproto/repo/createRecord.js +1 -0
- package/dist/lexicons/types/com/atproto/repo/defs.d.ts +11 -0
- package/dist/lexicons/types/com/atproto/repo/defs.js +10 -0
- package/dist/lexicons/types/com/atproto/repo/deleteRecord.d.ts +51 -0
- package/dist/lexicons/types/com/atproto/repo/deleteRecord.js +1 -0
- package/dist/lexicons/types/com/atproto/repo/describeRepo.d.ts +43 -0
- package/dist/lexicons/types/com/atproto/repo/describeRepo.js +1 -0
- package/dist/lexicons/types/com/atproto/repo/getRecord.d.ts +45 -0
- package/dist/lexicons/types/com/atproto/repo/getRecord.js +1 -0
- package/dist/lexicons/types/com/atproto/repo/importRepo.d.ts +27 -0
- package/dist/lexicons/types/com/atproto/repo/importRepo.js +1 -0
- package/dist/lexicons/types/com/atproto/repo/listMissingBlobs.d.ts +45 -0
- package/dist/lexicons/types/com/atproto/repo/listMissingBlobs.js +10 -0
- package/dist/lexicons/types/com/atproto/repo/listRecords.d.ts +53 -0
- package/dist/lexicons/types/com/atproto/repo/listRecords.js +10 -0
- package/dist/lexicons/types/com/atproto/repo/putRecord.d.ts +58 -0
- package/dist/lexicons/types/com/atproto/repo/putRecord.js +1 -0
- package/dist/lexicons/types/com/atproto/repo/strongRef.d.ts +11 -0
- package/dist/lexicons/types/com/atproto/repo/strongRef.js +11 -0
- package/dist/lexicons/types/com/atproto/repo/uploadBlob.d.ts +39 -0
- package/dist/lexicons/types/com/atproto/repo/uploadBlob.js +1 -0
- package/dist/lexicons/types/com/atproto/server/activateAccount.d.ts +23 -0
- package/dist/lexicons/types/com/atproto/server/activateAccount.js +1 -0
- package/dist/lexicons/types/com/atproto/server/checkAccountStatus.d.ts +42 -0
- package/dist/lexicons/types/com/atproto/server/checkAccountStatus.js +1 -0
- package/dist/lexicons/types/com/atproto/server/confirmEmail.d.ts +31 -0
- package/dist/lexicons/types/com/atproto/server/confirmEmail.js +1 -0
- package/dist/lexicons/types/com/atproto/server/createAccount.d.ts +61 -0
- package/dist/lexicons/types/com/atproto/server/createAccount.js +1 -0
- package/dist/lexicons/types/com/atproto/server/createAppPassword.d.ts +51 -0
- package/dist/lexicons/types/com/atproto/server/createAppPassword.js +10 -0
- package/dist/lexicons/types/com/atproto/server/createInviteCode.d.ts +41 -0
- package/dist/lexicons/types/com/atproto/server/createInviteCode.js +1 -0
- package/dist/lexicons/types/com/atproto/server/createInviteCodes.d.ts +50 -0
- package/dist/lexicons/types/com/atproto/server/createInviteCodes.js +10 -0
- package/dist/lexicons/types/com/atproto/server/createSession.d.ts +56 -0
- package/dist/lexicons/types/com/atproto/server/createSession.js +1 -0
- package/dist/lexicons/types/com/atproto/server/deactivateAccount.d.ts +30 -0
- package/dist/lexicons/types/com/atproto/server/deactivateAccount.js +1 -0
- package/dist/lexicons/types/com/atproto/server/defs.d.ts +23 -0
- package/dist/lexicons/types/com/atproto/server/defs.js +18 -0
- package/dist/lexicons/types/com/atproto/server/deleteAccount.d.ts +32 -0
- package/dist/lexicons/types/com/atproto/server/deleteAccount.js +1 -0
- package/dist/lexicons/types/com/atproto/server/deleteSession.d.ts +23 -0
- package/dist/lexicons/types/com/atproto/server/deleteSession.js +1 -0
- package/dist/lexicons/types/com/atproto/server/describeServer.d.ts +56 -0
- package/dist/lexicons/types/com/atproto/server/describeServer.js +18 -0
- package/dist/lexicons/types/com/atproto/server/getAccountInviteCodes.d.ts +39 -0
- package/dist/lexicons/types/com/atproto/server/getAccountInviteCodes.js +1 -0
- package/dist/lexicons/types/com/atproto/server/getServiceAuth.d.ts +41 -0
- package/dist/lexicons/types/com/atproto/server/getServiceAuth.js +1 -0
- package/dist/lexicons/types/com/atproto/server/getSession.d.ts +42 -0
- package/dist/lexicons/types/com/atproto/server/getSession.js +1 -0
- package/dist/lexicons/types/com/atproto/server/listAppPasswords.d.ts +44 -0
- package/dist/lexicons/types/com/atproto/server/listAppPasswords.js +10 -0
- package/dist/lexicons/types/com/atproto/server/refreshSession.d.ts +42 -0
- package/dist/lexicons/types/com/atproto/server/refreshSession.js +1 -0
- package/dist/lexicons/types/com/atproto/server/requestAccountDelete.d.ts +23 -0
- package/dist/lexicons/types/com/atproto/server/requestAccountDelete.js +1 -0
- package/dist/lexicons/types/com/atproto/server/requestEmailConfirmation.d.ts +23 -0
- package/dist/lexicons/types/com/atproto/server/requestEmailConfirmation.js +1 -0
- package/dist/lexicons/types/com/atproto/server/requestEmailUpdate.d.ts +34 -0
- package/dist/lexicons/types/com/atproto/server/requestEmailUpdate.js +1 -0
- package/dist/lexicons/types/com/atproto/server/requestPasswordReset.d.ts +29 -0
- package/dist/lexicons/types/com/atproto/server/requestPasswordReset.js +1 -0
- package/dist/lexicons/types/com/atproto/server/reserveSigningKey.d.ts +42 -0
- package/dist/lexicons/types/com/atproto/server/reserveSigningKey.js +1 -0
- package/dist/lexicons/types/com/atproto/server/resetPassword.d.ts +31 -0
- package/dist/lexicons/types/com/atproto/server/resetPassword.js +1 -0
- package/dist/lexicons/types/com/atproto/server/revokeAppPassword.d.ts +29 -0
- package/dist/lexicons/types/com/atproto/server/revokeAppPassword.js +1 -0
- package/dist/lexicons/types/com/atproto/server/updateEmail.d.ts +33 -0
- package/dist/lexicons/types/com/atproto/server/updateEmail.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getBlob.d.ts +36 -0
- package/dist/lexicons/types/com/atproto/sync/getBlob.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getBlocks.d.ts +35 -0
- package/dist/lexicons/types/com/atproto/sync/getBlocks.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getCheckout.d.ts +33 -0
- package/dist/lexicons/types/com/atproto/sync/getCheckout.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getHead.d.ts +37 -0
- package/dist/lexicons/types/com/atproto/sync/getHead.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getLatestCommit.d.ts +38 -0
- package/dist/lexicons/types/com/atproto/sync/getLatestCommit.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getRecord.d.ts +37 -0
- package/dist/lexicons/types/com/atproto/sync/getRecord.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getRepo.d.ts +36 -0
- package/dist/lexicons/types/com/atproto/sync/getRepo.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/getRepoStatus.d.ts +42 -0
- package/dist/lexicons/types/com/atproto/sync/getRepoStatus.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/listBlobs.d.ts +42 -0
- package/dist/lexicons/types/com/atproto/sync/listBlobs.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/listRepos.d.ts +50 -0
- package/dist/lexicons/types/com/atproto/sync/listRepos.js +10 -0
- package/dist/lexicons/types/com/atproto/sync/listReposByCollection.d.ts +46 -0
- package/dist/lexicons/types/com/atproto/sync/listReposByCollection.js +10 -0
- package/dist/lexicons/types/com/atproto/sync/notifyOfUpdate.d.ts +30 -0
- package/dist/lexicons/types/com/atproto/sync/notifyOfUpdate.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/requestCrawl.d.ts +30 -0
- package/dist/lexicons/types/com/atproto/sync/requestCrawl.js +1 -0
- package/dist/lexicons/types/com/atproto/sync/subscribeRepos.d.ts +111 -0
- package/dist/lexicons/types/com/atproto/sync/subscribeRepos.js +50 -0
- package/dist/lexicons/types/com/atproto/temp/addReservedHandle.d.ts +39 -0
- package/dist/lexicons/types/com/atproto/temp/addReservedHandle.js +1 -0
- package/dist/lexicons/types/com/atproto/temp/checkSignupQueue.d.ts +36 -0
- package/dist/lexicons/types/com/atproto/temp/checkSignupQueue.js +1 -0
- package/dist/lexicons/types/com/atproto/temp/fetchLabels.d.ts +37 -0
- package/dist/lexicons/types/com/atproto/temp/fetchLabels.js +1 -0
- package/dist/lexicons/types/com/atproto/temp/requestPhoneVerification.d.ts +29 -0
- package/dist/lexicons/types/com/atproto/temp/requestPhoneVerification.js +1 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/actor/profile.d.ts +19 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/actor/profile.js +11 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/defs.d.ts +32 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/defs.js +18 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/getSongs.d.ts +37 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/getSongs.js +1 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/playlistIdea.d.ts +32 -0
- package/dist/lexicons/types/com/clioplaylists/alpha/feed/playlistIdea.js +27 -0
- package/dist/lexicons/util.d.ts +5 -0
- package/dist/lexicons/util.js +9 -0
- package/dist/logger.d.ts +6 -0
- package/dist/logger.js +20 -0
- package/dist/rpc/clio_connect.d.ts +103 -0
- package/dist/rpc/clio_connect.js +107 -0
- package/dist/rpc/clio_pb.d.ts +457 -0
- package/dist/rpc/clio_pb.js +811 -0
- package/dist/start.d.ts +1 -0
- package/dist/util/retry.d.ts +2 -0
- package/dist/util/retry.js +13 -0
- package/dist/util/uris.d.ts +1 -0
- package/dist/util/uris.js +4 -0
- package/dist/util.d.ts +23 -0
- package/dist/util.js +76 -0
- package/package.json +7 -7
- /package/{start.js → dist/start.js} +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { keyBy } from '@atproto/common';
|
|
2
|
+
import { parseRecordBytes } from '../../../util';
|
|
3
|
+
import { getRecords } from './records';
|
|
4
|
+
export default (db) => ({
|
|
5
|
+
async getActors(req) {
|
|
6
|
+
const { dids } = req;
|
|
7
|
+
if (dids.length === 0) {
|
|
8
|
+
return { actors: [] };
|
|
9
|
+
}
|
|
10
|
+
const profileUris = dids.map((did) => `at://${did}/app.bsky.actor.profile/self`);
|
|
11
|
+
const chatDeclarationUris = dids.map((did) => `at://${did}/chat.bsky.actor.declaration/self`);
|
|
12
|
+
const [handlesRes, profiles, chatDeclarations] = await Promise.all([
|
|
13
|
+
db.db.selectFrom('actor').selectAll().execute(),
|
|
14
|
+
getRecords(db)({ uris: profileUris }),
|
|
15
|
+
getRecords(db)({ uris: chatDeclarationUris }),
|
|
16
|
+
]);
|
|
17
|
+
const byDid = keyBy(handlesRes, 'did');
|
|
18
|
+
const actors = dids.map((did, i) => {
|
|
19
|
+
const row = byDid.get(did);
|
|
20
|
+
const chatDeclaration = parseRecordBytes(chatDeclarations.records[i].record);
|
|
21
|
+
return {
|
|
22
|
+
exists: !!row,
|
|
23
|
+
handle: row?.handle ?? undefined,
|
|
24
|
+
profile: profiles.records[i],
|
|
25
|
+
takenDown: !!row?.takedownRef,
|
|
26
|
+
takedownRef: row?.takedownRef || undefined,
|
|
27
|
+
tombstonedAt: undefined, // in current implementation, tombstoned actors are deleted
|
|
28
|
+
allowIncomingChatsFrom: typeof chatDeclaration?.['allowIncoming'] === 'string'
|
|
29
|
+
? chatDeclaration['allowIncoming']
|
|
30
|
+
: undefined,
|
|
31
|
+
upstreamStatus: row?.upstreamStatus ?? '',
|
|
32
|
+
createdAt: profiles.records[i].createdAt, // @NOTE profile creation date not trusted in production
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
return { actors };
|
|
36
|
+
},
|
|
37
|
+
async getDidsByHandles(req) {
|
|
38
|
+
const { handles } = req;
|
|
39
|
+
if (handles.length === 0) {
|
|
40
|
+
return { dids: [] };
|
|
41
|
+
}
|
|
42
|
+
const res = await db.db
|
|
43
|
+
.selectFrom('actor')
|
|
44
|
+
.where('handle', 'in', handles)
|
|
45
|
+
.selectAll()
|
|
46
|
+
.execute();
|
|
47
|
+
const byHandle = keyBy(res, 'handle');
|
|
48
|
+
const dids = handles.map((handle) => byHandle.get(handle)?.did ?? '');
|
|
49
|
+
return { dids };
|
|
50
|
+
},
|
|
51
|
+
async updateActorUpstreamStatus(req) {
|
|
52
|
+
const { actorDid, upstreamStatus } = req;
|
|
53
|
+
await db.db
|
|
54
|
+
.updateTable('actor')
|
|
55
|
+
.set({ upstreamStatus })
|
|
56
|
+
.where('did', '=', actorDid)
|
|
57
|
+
.execute();
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ServiceImpl } from '@connectrpc/connect';
|
|
2
|
+
import { ClioService } from '../../../rpc/clio_connect';
|
|
3
|
+
import { Record } from '../../../rpc/clio_pb';
|
|
4
|
+
import { Database } from '../db';
|
|
5
|
+
declare const _default: (db: Database) => Partial<ServiceImpl<typeof ClioService>>;
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const getRecords: (db: Database, collection?: string) => (req: {
|
|
8
|
+
uris: string[];
|
|
9
|
+
}) => Promise<{
|
|
10
|
+
records: Record[];
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { keyBy } from '@atproto/common';
|
|
2
|
+
import { AtUri } from '@atproto/syntax';
|
|
3
|
+
import { Timestamp } from '@bufbuild/protobuf';
|
|
4
|
+
import * as ui8 from 'uint8arrays';
|
|
5
|
+
import { ids } from '../../../lexicons/lexicons';
|
|
6
|
+
import { Record } from '../../../rpc/clio_pb';
|
|
7
|
+
export default (db) => ({
|
|
8
|
+
getProfileRecords: getRecords(db, ids.ComClioplaylistsAlphaActorProfile),
|
|
9
|
+
});
|
|
10
|
+
export const getRecords = (db, collection) => async (req) => {
|
|
11
|
+
const validUris = collection
|
|
12
|
+
? req.uris.filter((uri) => new AtUri(uri).collection === collection)
|
|
13
|
+
: req.uris;
|
|
14
|
+
const res = validUris.length
|
|
15
|
+
? await db.db
|
|
16
|
+
.selectFrom('record')
|
|
17
|
+
.selectAll()
|
|
18
|
+
.where('uri', 'in', validUris)
|
|
19
|
+
.execute()
|
|
20
|
+
: [];
|
|
21
|
+
const byUri = keyBy(res, 'uri');
|
|
22
|
+
const records = req.uris.map((uri) => {
|
|
23
|
+
const row = byUri.get(uri);
|
|
24
|
+
const json = row ? row.json : JSON.stringify(null);
|
|
25
|
+
const createdAtRaw = new Date(JSON.parse(json)?.['createdAt']);
|
|
26
|
+
const createdAt = !isNaN(createdAtRaw.getTime())
|
|
27
|
+
? Timestamp.fromDate(createdAtRaw)
|
|
28
|
+
: undefined;
|
|
29
|
+
const indexedAt = row?.indexed_at
|
|
30
|
+
? Timestamp.fromDate(new Date(row?.indexed_at))
|
|
31
|
+
: undefined;
|
|
32
|
+
const recordBytes = ui8.fromString(json, 'utf8');
|
|
33
|
+
return new Record({
|
|
34
|
+
record: recordBytes,
|
|
35
|
+
cid: row?.cid,
|
|
36
|
+
createdAt,
|
|
37
|
+
indexedAt,
|
|
38
|
+
sortedAt: compositeTime(createdAt, indexedAt),
|
|
39
|
+
takenDown: !!row?.takedown_ref,
|
|
40
|
+
takedownRef: row?.takedown_ref ?? undefined,
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
return { records };
|
|
44
|
+
};
|
|
45
|
+
const compositeTime = (ts1, ts2) => {
|
|
46
|
+
if (!ts1)
|
|
47
|
+
return ts2;
|
|
48
|
+
if (!ts2)
|
|
49
|
+
return ts1;
|
|
50
|
+
return ts1.toDate() < ts2.toDate() ? ts1 : ts2;
|
|
51
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IdResolver } from '@atproto/identity';
|
|
2
|
+
import { Firehose, MemoryRunner } from '@atproto/sync';
|
|
3
|
+
import { BackgroundQueue } from './background';
|
|
4
|
+
import { Database } from './db';
|
|
5
|
+
import { IndexingService } from './indexing';
|
|
6
|
+
export declare class RepoSubscription {
|
|
7
|
+
opts: {
|
|
8
|
+
service: string;
|
|
9
|
+
db: Database;
|
|
10
|
+
idResolver: IdResolver;
|
|
11
|
+
};
|
|
12
|
+
firehose: Firehose;
|
|
13
|
+
runner: MemoryRunner;
|
|
14
|
+
background: BackgroundQueue;
|
|
15
|
+
indexingSvc: IndexingService;
|
|
16
|
+
constructor(opts: {
|
|
17
|
+
service: string;
|
|
18
|
+
db: Database;
|
|
19
|
+
idResolver: IdResolver;
|
|
20
|
+
});
|
|
21
|
+
start(): void;
|
|
22
|
+
restart(): Promise<void>;
|
|
23
|
+
processAll(): Promise<void>;
|
|
24
|
+
destroy(): Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { WriteOpAction } from '@atproto/repo';
|
|
2
|
+
import { Firehose, MemoryRunner } from '@atproto/sync';
|
|
3
|
+
import { subLogger as log } from '../../logger';
|
|
4
|
+
import { BackgroundQueue } from './background';
|
|
5
|
+
import { IndexingService } from './indexing';
|
|
6
|
+
export class RepoSubscription {
|
|
7
|
+
opts;
|
|
8
|
+
firehose;
|
|
9
|
+
runner;
|
|
10
|
+
background;
|
|
11
|
+
indexingSvc;
|
|
12
|
+
constructor(opts) {
|
|
13
|
+
this.opts = opts;
|
|
14
|
+
const { service, db, idResolver } = opts;
|
|
15
|
+
this.background = new BackgroundQueue(db);
|
|
16
|
+
this.indexingSvc = new IndexingService(db, idResolver);
|
|
17
|
+
const { runner, firehose } = createFirehose({
|
|
18
|
+
idResolver,
|
|
19
|
+
service,
|
|
20
|
+
indexingSvc: this.indexingSvc,
|
|
21
|
+
});
|
|
22
|
+
this.runner = runner;
|
|
23
|
+
this.firehose = firehose;
|
|
24
|
+
}
|
|
25
|
+
start() {
|
|
26
|
+
this.firehose.start();
|
|
27
|
+
}
|
|
28
|
+
async restart() {
|
|
29
|
+
await this.destroy();
|
|
30
|
+
const { runner, firehose } = createFirehose({
|
|
31
|
+
idResolver: this.opts.idResolver,
|
|
32
|
+
service: this.opts.service,
|
|
33
|
+
indexingSvc: this.indexingSvc,
|
|
34
|
+
});
|
|
35
|
+
this.runner = runner;
|
|
36
|
+
this.firehose = firehose;
|
|
37
|
+
this.start();
|
|
38
|
+
}
|
|
39
|
+
async processAll() {
|
|
40
|
+
await this.runner.processAll();
|
|
41
|
+
await this.background.processAll();
|
|
42
|
+
}
|
|
43
|
+
async destroy() {
|
|
44
|
+
await this.firehose.destroy();
|
|
45
|
+
await this.runner.destroy();
|
|
46
|
+
await this.background.processAll();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const createFirehose = (opts) => {
|
|
50
|
+
const { idResolver, service, indexingSvc } = opts;
|
|
51
|
+
const runner = new MemoryRunner({ startCursor: 0 });
|
|
52
|
+
const firehose = new Firehose({
|
|
53
|
+
idResolver,
|
|
54
|
+
runner,
|
|
55
|
+
service,
|
|
56
|
+
unauthenticatedHandles: true, // indexing service handles these
|
|
57
|
+
unauthenticatedCommits: true, // @TODO there seems to be a very rare issue where the authenticator thinks a block is missing in deletion ops
|
|
58
|
+
onError: (err) => log.error({ err }, 'error in subscription'),
|
|
59
|
+
handleEvent: async (evt) => {
|
|
60
|
+
if (evt.event === 'identity') {
|
|
61
|
+
await indexingSvc.indexHandle(evt.did, evt.time, true);
|
|
62
|
+
}
|
|
63
|
+
else if (evt.event === 'account') {
|
|
64
|
+
if (evt.active === false && evt.status === 'deleted') {
|
|
65
|
+
await indexingSvc.deleteActor(evt.did);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
await indexingSvc.updateActorStatus(evt.did, evt.active, evt.status);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const indexFn = evt.event === 'delete'
|
|
73
|
+
? indexingSvc.deleteRecord(evt.uri)
|
|
74
|
+
: indexingSvc.indexRecord(evt.uri, evt.cid, evt.record, evt.event === 'create'
|
|
75
|
+
? WriteOpAction.Create
|
|
76
|
+
: WriteOpAction.Update, evt.time);
|
|
77
|
+
await Promise.all([
|
|
78
|
+
indexFn,
|
|
79
|
+
indexingSvc.setCommitLastSeen(evt.did, evt.commit, evt.rev),
|
|
80
|
+
indexingSvc.indexHandle(evt.did, evt.time),
|
|
81
|
+
]);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
return { firehose, runner };
|
|
86
|
+
};
|
package/dist/error.d.ts
ADDED
package/dist/error.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { XRPCError } from '@atproto/xrpc-server';
|
|
2
|
+
import { httpLogger as log } from './logger';
|
|
3
|
+
export const handler = (err, _req, res, next) => {
|
|
4
|
+
log.error(err, 'unexpected internal server error');
|
|
5
|
+
if (res.headersSent) {
|
|
6
|
+
return next(err);
|
|
7
|
+
}
|
|
8
|
+
const serverError = XRPCError.fromError(err);
|
|
9
|
+
res.status(serverError.type).json(serverError.payload);
|
|
10
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { Server } from 'http';
|
|
3
|
+
import { ServerConfig } from './config';
|
|
4
|
+
import AppContext from './context';
|
|
5
|
+
export declare class ClioAppView {
|
|
6
|
+
ctx: AppContext;
|
|
7
|
+
app: express.Application;
|
|
8
|
+
server?: Server;
|
|
9
|
+
private terminator?;
|
|
10
|
+
constructor(opts: {
|
|
11
|
+
ctx: AppContext;
|
|
12
|
+
app: express.Application;
|
|
13
|
+
});
|
|
14
|
+
static create(opts: {
|
|
15
|
+
config: ServerConfig;
|
|
16
|
+
}): ClioAppView;
|
|
17
|
+
start(): Promise<Server>;
|
|
18
|
+
destroy(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export default ClioAppView;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DAY, SECOND } from '@atproto/common';
|
|
2
|
+
import cors from 'cors';
|
|
3
|
+
import { config } from 'dotenv';
|
|
4
|
+
import events from 'events';
|
|
5
|
+
import express from 'express';
|
|
6
|
+
import { createHttpTerminator } from 'http-terminator';
|
|
7
|
+
import API, { health } from './api';
|
|
8
|
+
import { createBaseClient } from './client';
|
|
9
|
+
import AppContext from './context';
|
|
10
|
+
import * as error from './error';
|
|
11
|
+
import { createServer } from './lexicons';
|
|
12
|
+
import { loggerMiddleware } from './logger';
|
|
13
|
+
config();
|
|
14
|
+
export class ClioAppView {
|
|
15
|
+
ctx;
|
|
16
|
+
app;
|
|
17
|
+
server;
|
|
18
|
+
terminator;
|
|
19
|
+
constructor(opts) {
|
|
20
|
+
this.ctx = opts.ctx;
|
|
21
|
+
this.app = opts.app;
|
|
22
|
+
}
|
|
23
|
+
static create(opts) {
|
|
24
|
+
const { config } = opts;
|
|
25
|
+
const app = express();
|
|
26
|
+
app.use(cors({ maxAge: DAY / SECOND }));
|
|
27
|
+
app.use(loggerMiddleware);
|
|
28
|
+
const dataplane = createBaseClient('http://localhost:4000', {});
|
|
29
|
+
const server = createServer();
|
|
30
|
+
const ctx = new AppContext({
|
|
31
|
+
cfg: config,
|
|
32
|
+
dataplane,
|
|
33
|
+
});
|
|
34
|
+
const api = API(server, ctx);
|
|
35
|
+
app.use(health.createRouter(ctx));
|
|
36
|
+
app.use(api.xrpc.router);
|
|
37
|
+
app.use(error.handler);
|
|
38
|
+
return new ClioAppView({ ctx, app });
|
|
39
|
+
}
|
|
40
|
+
async start() {
|
|
41
|
+
console.log('Starting Clio AppView...');
|
|
42
|
+
const server = this.app.listen(this.ctx.cfg.port);
|
|
43
|
+
this.server = server;
|
|
44
|
+
server.keepAliveTimeout = 90000;
|
|
45
|
+
this.terminator = createHttpTerminator({ server });
|
|
46
|
+
await events.once(server, 'listening');
|
|
47
|
+
const { port } = server.address();
|
|
48
|
+
this.ctx.cfg.assignPort(port);
|
|
49
|
+
return server;
|
|
50
|
+
}
|
|
51
|
+
async destroy() {
|
|
52
|
+
await this.terminator?.terminate();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export default ClioAppView;
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { AuthVerifier, StreamAuthVerifier, Options as XrpcOptions, Server as XrpcServer } from '@atproto/xrpc-server';
|
|
5
|
+
import * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount';
|
|
6
|
+
import * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites';
|
|
7
|
+
import * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes';
|
|
8
|
+
import * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites';
|
|
9
|
+
import * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAccountInfo';
|
|
10
|
+
import * as ComAtprotoAdminGetAccountInfos from './types/com/atproto/admin/getAccountInfos';
|
|
11
|
+
import * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes';
|
|
12
|
+
import * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus';
|
|
13
|
+
import * as ComAtprotoAdminSearchAccounts from './types/com/atproto/admin/searchAccounts';
|
|
14
|
+
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail';
|
|
15
|
+
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail';
|
|
16
|
+
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle';
|
|
17
|
+
import * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword';
|
|
18
|
+
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus';
|
|
19
|
+
import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials';
|
|
20
|
+
import * as ComAtprotoIdentityRefreshIdentity from './types/com/atproto/identity/refreshIdentity';
|
|
21
|
+
import * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature';
|
|
22
|
+
import * as ComAtprotoIdentityResolveDid from './types/com/atproto/identity/resolveDid';
|
|
23
|
+
import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle';
|
|
24
|
+
import * as ComAtprotoIdentityResolveIdentity from './types/com/atproto/identity/resolveIdentity';
|
|
25
|
+
import * as ComAtprotoIdentitySignPlcOperation from './types/com/atproto/identity/signPlcOperation';
|
|
26
|
+
import * as ComAtprotoIdentitySubmitPlcOperation from './types/com/atproto/identity/submitPlcOperation';
|
|
27
|
+
import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle';
|
|
28
|
+
import * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels';
|
|
29
|
+
import * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels';
|
|
30
|
+
import * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport';
|
|
31
|
+
import * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites';
|
|
32
|
+
import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord';
|
|
33
|
+
import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord';
|
|
34
|
+
import * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo';
|
|
35
|
+
import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord';
|
|
36
|
+
import * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo';
|
|
37
|
+
import * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs';
|
|
38
|
+
import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords';
|
|
39
|
+
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord';
|
|
40
|
+
import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob';
|
|
41
|
+
import * as ComAtprotoServerActivateAccount from './types/com/atproto/server/activateAccount';
|
|
42
|
+
import * as ComAtprotoServerCheckAccountStatus from './types/com/atproto/server/checkAccountStatus';
|
|
43
|
+
import * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail';
|
|
44
|
+
import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount';
|
|
45
|
+
import * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword';
|
|
46
|
+
import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode';
|
|
47
|
+
import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes';
|
|
48
|
+
import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession';
|
|
49
|
+
import * as ComAtprotoServerDeactivateAccount from './types/com/atproto/server/deactivateAccount';
|
|
50
|
+
import * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount';
|
|
51
|
+
import * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession';
|
|
52
|
+
import * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer';
|
|
53
|
+
import * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes';
|
|
54
|
+
import * as ComAtprotoServerGetServiceAuth from './types/com/atproto/server/getServiceAuth';
|
|
55
|
+
import * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession';
|
|
56
|
+
import * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords';
|
|
57
|
+
import * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession';
|
|
58
|
+
import * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete';
|
|
59
|
+
import * as ComAtprotoServerRequestEmailConfirmation from './types/com/atproto/server/requestEmailConfirmation';
|
|
60
|
+
import * as ComAtprotoServerRequestEmailUpdate from './types/com/atproto/server/requestEmailUpdate';
|
|
61
|
+
import * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset';
|
|
62
|
+
import * as ComAtprotoServerReserveSigningKey from './types/com/atproto/server/reserveSigningKey';
|
|
63
|
+
import * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword';
|
|
64
|
+
import * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword';
|
|
65
|
+
import * as ComAtprotoServerUpdateEmail from './types/com/atproto/server/updateEmail';
|
|
66
|
+
import * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob';
|
|
67
|
+
import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks';
|
|
68
|
+
import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout';
|
|
69
|
+
import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead';
|
|
70
|
+
import * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit';
|
|
71
|
+
import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord';
|
|
72
|
+
import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo';
|
|
73
|
+
import * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus';
|
|
74
|
+
import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs';
|
|
75
|
+
import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos';
|
|
76
|
+
import * as ComAtprotoSyncListReposByCollection from './types/com/atproto/sync/listReposByCollection';
|
|
77
|
+
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate';
|
|
78
|
+
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl';
|
|
79
|
+
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos';
|
|
80
|
+
import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle';
|
|
81
|
+
import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue';
|
|
82
|
+
import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels';
|
|
83
|
+
import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification';
|
|
84
|
+
import * as ComClioplaylistsAlphaFeedGetSongs from './types/com/clioplaylists/alpha/feed/getSongs';
|
|
85
|
+
export declare const COM_ATPROTO_MODERATION: {
|
|
86
|
+
DefsReasonSpam: string;
|
|
87
|
+
DefsReasonViolation: string;
|
|
88
|
+
DefsReasonMisleading: string;
|
|
89
|
+
DefsReasonSexual: string;
|
|
90
|
+
DefsReasonRude: string;
|
|
91
|
+
DefsReasonOther: string;
|
|
92
|
+
DefsReasonAppeal: string;
|
|
93
|
+
};
|
|
94
|
+
export declare function createServer(options?: XrpcOptions): Server;
|
|
95
|
+
export declare class Server {
|
|
96
|
+
xrpc: XrpcServer;
|
|
97
|
+
com: ComNS;
|
|
98
|
+
constructor(options?: XrpcOptions);
|
|
99
|
+
}
|
|
100
|
+
export declare class ComNS {
|
|
101
|
+
_server: Server;
|
|
102
|
+
clioplaylists: ComClioplaylistsNS;
|
|
103
|
+
atproto: ComAtprotoNS;
|
|
104
|
+
constructor(server: Server);
|
|
105
|
+
}
|
|
106
|
+
export declare class ComClioplaylistsNS {
|
|
107
|
+
_server: Server;
|
|
108
|
+
alpha: ComClioplaylistsAlphaNS;
|
|
109
|
+
constructor(server: Server);
|
|
110
|
+
}
|
|
111
|
+
export declare class ComClioplaylistsAlphaNS {
|
|
112
|
+
_server: Server;
|
|
113
|
+
actor: ComClioplaylistsAlphaActorNS;
|
|
114
|
+
feed: ComClioplaylistsAlphaFeedNS;
|
|
115
|
+
constructor(server: Server);
|
|
116
|
+
}
|
|
117
|
+
export declare class ComClioplaylistsAlphaActorNS {
|
|
118
|
+
_server: Server;
|
|
119
|
+
constructor(server: Server);
|
|
120
|
+
}
|
|
121
|
+
export declare class ComClioplaylistsAlphaFeedNS {
|
|
122
|
+
_server: Server;
|
|
123
|
+
constructor(server: Server);
|
|
124
|
+
getSongs<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComClioplaylistsAlphaFeedGetSongs.Handler<ExtractAuth<AV>>, ComClioplaylistsAlphaFeedGetSongs.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
125
|
+
}
|
|
126
|
+
export declare class ComAtprotoNS {
|
|
127
|
+
_server: Server;
|
|
128
|
+
admin: ComAtprotoAdminNS;
|
|
129
|
+
identity: ComAtprotoIdentityNS;
|
|
130
|
+
label: ComAtprotoLabelNS;
|
|
131
|
+
lexicon: ComAtprotoLexiconNS;
|
|
132
|
+
moderation: ComAtprotoModerationNS;
|
|
133
|
+
repo: ComAtprotoRepoNS;
|
|
134
|
+
server: ComAtprotoServerNS;
|
|
135
|
+
sync: ComAtprotoSyncNS;
|
|
136
|
+
temp: ComAtprotoTempNS;
|
|
137
|
+
constructor(server: Server);
|
|
138
|
+
}
|
|
139
|
+
export declare class ComAtprotoAdminNS {
|
|
140
|
+
_server: Server;
|
|
141
|
+
constructor(server: Server);
|
|
142
|
+
deleteAccount<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminDeleteAccount.Handler<ExtractAuth<AV>>, ComAtprotoAdminDeleteAccount.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
143
|
+
disableAccountInvites<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminDisableAccountInvites.Handler<ExtractAuth<AV>>, ComAtprotoAdminDisableAccountInvites.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
144
|
+
disableInviteCodes<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminDisableInviteCodes.Handler<ExtractAuth<AV>>, ComAtprotoAdminDisableInviteCodes.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
145
|
+
enableAccountInvites<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminEnableAccountInvites.Handler<ExtractAuth<AV>>, ComAtprotoAdminEnableAccountInvites.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
146
|
+
getAccountInfo<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminGetAccountInfo.Handler<ExtractAuth<AV>>, ComAtprotoAdminGetAccountInfo.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
147
|
+
getAccountInfos<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminGetAccountInfos.Handler<ExtractAuth<AV>>, ComAtprotoAdminGetAccountInfos.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
148
|
+
getInviteCodes<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminGetInviteCodes.Handler<ExtractAuth<AV>>, ComAtprotoAdminGetInviteCodes.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
149
|
+
getSubjectStatus<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminGetSubjectStatus.Handler<ExtractAuth<AV>>, ComAtprotoAdminGetSubjectStatus.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
150
|
+
searchAccounts<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminSearchAccounts.Handler<ExtractAuth<AV>>, ComAtprotoAdminSearchAccounts.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
151
|
+
sendEmail<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminSendEmail.Handler<ExtractAuth<AV>>, ComAtprotoAdminSendEmail.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
152
|
+
updateAccountEmail<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateAccountEmail.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateAccountEmail.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
153
|
+
updateAccountHandle<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateAccountHandle.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateAccountHandle.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
154
|
+
updateAccountPassword<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateAccountPassword.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateAccountPassword.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
155
|
+
updateSubjectStatus<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoAdminUpdateSubjectStatus.Handler<ExtractAuth<AV>>, ComAtprotoAdminUpdateSubjectStatus.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
156
|
+
}
|
|
157
|
+
export declare class ComAtprotoIdentityNS {
|
|
158
|
+
_server: Server;
|
|
159
|
+
constructor(server: Server);
|
|
160
|
+
getRecommendedDidCredentials<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentityGetRecommendedDidCredentials.Handler<ExtractAuth<AV>>, ComAtprotoIdentityGetRecommendedDidCredentials.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
161
|
+
refreshIdentity<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentityRefreshIdentity.Handler<ExtractAuth<AV>>, ComAtprotoIdentityRefreshIdentity.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
162
|
+
requestPlcOperationSignature<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentityRequestPlcOperationSignature.Handler<ExtractAuth<AV>>, ComAtprotoIdentityRequestPlcOperationSignature.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
163
|
+
resolveDid<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentityResolveDid.Handler<ExtractAuth<AV>>, ComAtprotoIdentityResolveDid.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
164
|
+
resolveHandle<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentityResolveHandle.Handler<ExtractAuth<AV>>, ComAtprotoIdentityResolveHandle.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
165
|
+
resolveIdentity<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentityResolveIdentity.Handler<ExtractAuth<AV>>, ComAtprotoIdentityResolveIdentity.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
166
|
+
signPlcOperation<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentitySignPlcOperation.Handler<ExtractAuth<AV>>, ComAtprotoIdentitySignPlcOperation.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
167
|
+
submitPlcOperation<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentitySubmitPlcOperation.Handler<ExtractAuth<AV>>, ComAtprotoIdentitySubmitPlcOperation.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
168
|
+
updateHandle<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoIdentityUpdateHandle.Handler<ExtractAuth<AV>>, ComAtprotoIdentityUpdateHandle.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
169
|
+
}
|
|
170
|
+
export declare class ComAtprotoLabelNS {
|
|
171
|
+
_server: Server;
|
|
172
|
+
constructor(server: Server);
|
|
173
|
+
queryLabels<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoLabelQueryLabels.Handler<ExtractAuth<AV>>, ComAtprotoLabelQueryLabels.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
174
|
+
subscribeLabels<AV extends StreamAuthVerifier>(cfg: ConfigOf<AV, ComAtprotoLabelSubscribeLabels.Handler<ExtractAuth<AV>>, ComAtprotoLabelSubscribeLabels.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
175
|
+
}
|
|
176
|
+
export declare class ComAtprotoLexiconNS {
|
|
177
|
+
_server: Server;
|
|
178
|
+
constructor(server: Server);
|
|
179
|
+
}
|
|
180
|
+
export declare class ComAtprotoModerationNS {
|
|
181
|
+
_server: Server;
|
|
182
|
+
constructor(server: Server);
|
|
183
|
+
createReport<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoModerationCreateReport.Handler<ExtractAuth<AV>>, ComAtprotoModerationCreateReport.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
184
|
+
}
|
|
185
|
+
export declare class ComAtprotoRepoNS {
|
|
186
|
+
_server: Server;
|
|
187
|
+
constructor(server: Server);
|
|
188
|
+
applyWrites<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoApplyWrites.Handler<ExtractAuth<AV>>, ComAtprotoRepoApplyWrites.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
189
|
+
createRecord<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoCreateRecord.Handler<ExtractAuth<AV>>, ComAtprotoRepoCreateRecord.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
190
|
+
deleteRecord<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoDeleteRecord.Handler<ExtractAuth<AV>>, ComAtprotoRepoDeleteRecord.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
191
|
+
describeRepo<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoDescribeRepo.Handler<ExtractAuth<AV>>, ComAtprotoRepoDescribeRepo.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
192
|
+
getRecord<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoGetRecord.Handler<ExtractAuth<AV>>, ComAtprotoRepoGetRecord.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
193
|
+
importRepo<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoImportRepo.Handler<ExtractAuth<AV>>, ComAtprotoRepoImportRepo.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
194
|
+
listMissingBlobs<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoListMissingBlobs.Handler<ExtractAuth<AV>>, ComAtprotoRepoListMissingBlobs.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
195
|
+
listRecords<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoListRecords.Handler<ExtractAuth<AV>>, ComAtprotoRepoListRecords.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
196
|
+
putRecord<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoPutRecord.Handler<ExtractAuth<AV>>, ComAtprotoRepoPutRecord.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
197
|
+
uploadBlob<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoRepoUploadBlob.Handler<ExtractAuth<AV>>, ComAtprotoRepoUploadBlob.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
198
|
+
}
|
|
199
|
+
export declare class ComAtprotoServerNS {
|
|
200
|
+
_server: Server;
|
|
201
|
+
constructor(server: Server);
|
|
202
|
+
activateAccount<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerActivateAccount.Handler<ExtractAuth<AV>>, ComAtprotoServerActivateAccount.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
203
|
+
checkAccountStatus<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerCheckAccountStatus.Handler<ExtractAuth<AV>>, ComAtprotoServerCheckAccountStatus.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
204
|
+
confirmEmail<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerConfirmEmail.Handler<ExtractAuth<AV>>, ComAtprotoServerConfirmEmail.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
205
|
+
createAccount<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerCreateAccount.Handler<ExtractAuth<AV>>, ComAtprotoServerCreateAccount.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
206
|
+
createAppPassword<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerCreateAppPassword.Handler<ExtractAuth<AV>>, ComAtprotoServerCreateAppPassword.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
207
|
+
createInviteCode<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerCreateInviteCode.Handler<ExtractAuth<AV>>, ComAtprotoServerCreateInviteCode.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
208
|
+
createInviteCodes<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerCreateInviteCodes.Handler<ExtractAuth<AV>>, ComAtprotoServerCreateInviteCodes.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
209
|
+
createSession<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerCreateSession.Handler<ExtractAuth<AV>>, ComAtprotoServerCreateSession.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
210
|
+
deactivateAccount<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerDeactivateAccount.Handler<ExtractAuth<AV>>, ComAtprotoServerDeactivateAccount.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
211
|
+
deleteAccount<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerDeleteAccount.Handler<ExtractAuth<AV>>, ComAtprotoServerDeleteAccount.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
212
|
+
deleteSession<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerDeleteSession.Handler<ExtractAuth<AV>>, ComAtprotoServerDeleteSession.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
213
|
+
describeServer<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerDescribeServer.Handler<ExtractAuth<AV>>, ComAtprotoServerDescribeServer.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
214
|
+
getAccountInviteCodes<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerGetAccountInviteCodes.Handler<ExtractAuth<AV>>, ComAtprotoServerGetAccountInviteCodes.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
215
|
+
getServiceAuth<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerGetServiceAuth.Handler<ExtractAuth<AV>>, ComAtprotoServerGetServiceAuth.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
216
|
+
getSession<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerGetSession.Handler<ExtractAuth<AV>>, ComAtprotoServerGetSession.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
217
|
+
listAppPasswords<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerListAppPasswords.Handler<ExtractAuth<AV>>, ComAtprotoServerListAppPasswords.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
218
|
+
refreshSession<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerRefreshSession.Handler<ExtractAuth<AV>>, ComAtprotoServerRefreshSession.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
219
|
+
requestAccountDelete<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerRequestAccountDelete.Handler<ExtractAuth<AV>>, ComAtprotoServerRequestAccountDelete.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
220
|
+
requestEmailConfirmation<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerRequestEmailConfirmation.Handler<ExtractAuth<AV>>, ComAtprotoServerRequestEmailConfirmation.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
221
|
+
requestEmailUpdate<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerRequestEmailUpdate.Handler<ExtractAuth<AV>>, ComAtprotoServerRequestEmailUpdate.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
222
|
+
requestPasswordReset<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerRequestPasswordReset.Handler<ExtractAuth<AV>>, ComAtprotoServerRequestPasswordReset.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
223
|
+
reserveSigningKey<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerReserveSigningKey.Handler<ExtractAuth<AV>>, ComAtprotoServerReserveSigningKey.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
224
|
+
resetPassword<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerResetPassword.Handler<ExtractAuth<AV>>, ComAtprotoServerResetPassword.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
225
|
+
revokeAppPassword<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerRevokeAppPassword.Handler<ExtractAuth<AV>>, ComAtprotoServerRevokeAppPassword.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
226
|
+
updateEmail<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoServerUpdateEmail.Handler<ExtractAuth<AV>>, ComAtprotoServerUpdateEmail.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
227
|
+
}
|
|
228
|
+
export declare class ComAtprotoSyncNS {
|
|
229
|
+
_server: Server;
|
|
230
|
+
constructor(server: Server);
|
|
231
|
+
getBlob<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetBlob.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetBlob.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
232
|
+
getBlocks<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetBlocks.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetBlocks.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
233
|
+
getCheckout<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetCheckout.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetCheckout.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
234
|
+
getHead<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetHead.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetHead.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
235
|
+
getLatestCommit<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetLatestCommit.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetLatestCommit.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
236
|
+
getRecord<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetRecord.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetRecord.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
237
|
+
getRepo<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetRepo.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetRepo.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
238
|
+
getRepoStatus<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncGetRepoStatus.Handler<ExtractAuth<AV>>, ComAtprotoSyncGetRepoStatus.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
239
|
+
listBlobs<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncListBlobs.Handler<ExtractAuth<AV>>, ComAtprotoSyncListBlobs.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
240
|
+
listRepos<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncListRepos.Handler<ExtractAuth<AV>>, ComAtprotoSyncListRepos.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
241
|
+
listReposByCollection<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncListReposByCollection.Handler<ExtractAuth<AV>>, ComAtprotoSyncListReposByCollection.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
242
|
+
notifyOfUpdate<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncNotifyOfUpdate.Handler<ExtractAuth<AV>>, ComAtprotoSyncNotifyOfUpdate.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
243
|
+
requestCrawl<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncRequestCrawl.Handler<ExtractAuth<AV>>, ComAtprotoSyncRequestCrawl.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
244
|
+
subscribeRepos<AV extends StreamAuthVerifier>(cfg: ConfigOf<AV, ComAtprotoSyncSubscribeRepos.Handler<ExtractAuth<AV>>, ComAtprotoSyncSubscribeRepos.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
245
|
+
}
|
|
246
|
+
export declare class ComAtprotoTempNS {
|
|
247
|
+
_server: Server;
|
|
248
|
+
constructor(server: Server);
|
|
249
|
+
addReservedHandle<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoTempAddReservedHandle.Handler<ExtractAuth<AV>>, ComAtprotoTempAddReservedHandle.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
250
|
+
checkSignupQueue<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoTempCheckSignupQueue.Handler<ExtractAuth<AV>>, ComAtprotoTempCheckSignupQueue.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
251
|
+
fetchLabels<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoTempFetchLabels.Handler<ExtractAuth<AV>>, ComAtprotoTempFetchLabels.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
252
|
+
requestPhoneVerification<AV extends AuthVerifier>(cfg: ConfigOf<AV, ComAtprotoTempRequestPhoneVerification.Handler<ExtractAuth<AV>>, ComAtprotoTempRequestPhoneVerification.HandlerReqCtx<ExtractAuth<AV>>>): void;
|
|
253
|
+
}
|
|
254
|
+
type SharedRateLimitOpts<T> = {
|
|
255
|
+
name: string;
|
|
256
|
+
calcKey?: (ctx: T) => string | null;
|
|
257
|
+
calcPoints?: (ctx: T) => number;
|
|
258
|
+
};
|
|
259
|
+
type RouteRateLimitOpts<T> = {
|
|
260
|
+
durationMs: number;
|
|
261
|
+
points: number;
|
|
262
|
+
calcKey?: (ctx: T) => string | null;
|
|
263
|
+
calcPoints?: (ctx: T) => number;
|
|
264
|
+
};
|
|
265
|
+
type HandlerOpts = {
|
|
266
|
+
blobLimit?: number;
|
|
267
|
+
};
|
|
268
|
+
type HandlerRateLimitOpts<T> = SharedRateLimitOpts<T> | RouteRateLimitOpts<T>;
|
|
269
|
+
type ConfigOf<Auth, Handler, ReqCtx> = Handler | {
|
|
270
|
+
auth?: Auth;
|
|
271
|
+
opts?: HandlerOpts;
|
|
272
|
+
rateLimit?: HandlerRateLimitOpts<ReqCtx> | HandlerRateLimitOpts<ReqCtx>[];
|
|
273
|
+
handler: Handler;
|
|
274
|
+
};
|
|
275
|
+
type ExtractAuth<AV extends AuthVerifier | StreamAuthVerifier> = Extract<Awaited<ReturnType<AV>>, {
|
|
276
|
+
credentials: unknown;
|
|
277
|
+
}>;
|
|
278
|
+
export {};
|