commonMain.sh.christian.ozone.XrpcBlueskyApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
package sh.christian.ozone
import app.bsky.actor.GetPreferencesResponse
import app.bsky.actor.GetProfileQueryParams
import app.bsky.actor.GetProfileResponse
import app.bsky.actor.GetProfilesQueryParams
import app.bsky.actor.GetProfilesResponse
import app.bsky.actor.GetSuggestionsQueryParams
import app.bsky.actor.GetSuggestionsResponse
import app.bsky.actor.SearchActorsQueryParams
import app.bsky.actor.SearchActorsResponse
import app.bsky.actor.SearchActorsTypeaheadQueryParams
import app.bsky.actor.SearchActorsTypeaheadResponse
import app.bsky.feed.DescribeFeedGeneratorResponse
import app.bsky.feed.GetActorFeedsQueryParams
import app.bsky.feed.GetActorFeedsResponse
import app.bsky.feed.GetActorLikesQueryParams
import app.bsky.feed.GetActorLikesResponse
import app.bsky.feed.GetAuthorFeedQueryParams
import app.bsky.feed.GetAuthorFeedResponse
import app.bsky.feed.GetFeedGeneratorQueryParams
import app.bsky.feed.GetFeedGeneratorResponse
import app.bsky.feed.GetFeedGeneratorsQueryParams
import app.bsky.feed.GetFeedGeneratorsResponse
import app.bsky.feed.GetFeedQueryParams
import app.bsky.feed.GetFeedResponse
import app.bsky.feed.GetFeedSkeletonQueryParams
import app.bsky.feed.GetFeedSkeletonResponse
import app.bsky.feed.GetLikesQueryParams
import app.bsky.feed.GetLikesResponse
import app.bsky.feed.GetListFeedQueryParams
import app.bsky.feed.GetListFeedResponse
import app.bsky.feed.GetPostThreadQueryParams
import app.bsky.feed.GetPostThreadResponse
import app.bsky.feed.GetPostsQueryParams
import app.bsky.feed.GetPostsResponse
import app.bsky.feed.GetQuotesQueryParams
import app.bsky.feed.GetQuotesResponse
import app.bsky.feed.GetRepostedByQueryParams
import app.bsky.feed.GetRepostedByResponse
import app.bsky.feed.GetSuggestedFeedsQueryParams
import app.bsky.feed.GetSuggestedFeedsResponse
import app.bsky.feed.GetTimelineQueryParams
import app.bsky.feed.GetTimelineResponse
import app.bsky.feed.SearchPostsQueryParams
import app.bsky.feed.SearchPostsResponse
import app.bsky.feed.SendInteractionsRequest
import app.bsky.feed.SendInteractionsResponse
import app.bsky.graph.GetActorStarterPacksQueryParams
import app.bsky.graph.GetActorStarterPacksResponse
import app.bsky.graph.GetBlocksResponse
import app.bsky.graph.GetFollowersQueryParams
import app.bsky.graph.GetFollowersResponse
import app.bsky.graph.GetFollowsQueryParams
import app.bsky.graph.GetFollowsResponse
import app.bsky.graph.GetKnownFollowersQueryParams
import app.bsky.graph.GetKnownFollowersResponse
import app.bsky.graph.GetListBlocksQueryParams
import app.bsky.graph.GetListBlocksResponse
import app.bsky.graph.GetListMutesQueryParams
import app.bsky.graph.GetListMutesResponse
import app.bsky.graph.GetListQueryParams
import app.bsky.graph.GetListResponse
import app.bsky.graph.GetListsQueryParams
import app.bsky.graph.GetListsResponse
import app.bsky.graph.GetMutesQueryParams
import app.bsky.graph.GetMutesResponse
import app.bsky.graph.GetRelationshipsQueryParams
import app.bsky.graph.GetRelationshipsResponse
import app.bsky.graph.GetStarterPackQueryParams
import app.bsky.graph.GetStarterPackResponse
import app.bsky.graph.GetStarterPacksQueryParams
import app.bsky.graph.GetStarterPacksResponse
import app.bsky.graph.GetSuggestedFollowsByActorQueryParams
import app.bsky.graph.GetSuggestedFollowsByActorResponse
import app.bsky.graph.MuteActorListRequest
import app.bsky.graph.MuteActorRequest
import app.bsky.graph.MuteThreadRequest
import app.bsky.graph.UnmuteActorListRequest
import app.bsky.graph.UnmuteActorRequest
import app.bsky.graph.UnmuteThreadRequest
import app.bsky.labeler.GetServicesQueryParams
import app.bsky.labeler.GetServicesResponse
import app.bsky.notification.GetUnreadCountQueryParams
import app.bsky.notification.GetUnreadCountResponse
import app.bsky.notification.ListNotificationsQueryParams
import app.bsky.notification.ListNotificationsResponse
import app.bsky.notification.RegisterPushRequest
import app.bsky.notification.UpdateSeenRequest
import app.bsky.video.GetJobStatusQueryParams
import app.bsky.video.GetJobStatusResponse
import app.bsky.video.GetUploadLimitsResponse
import app.bsky.video.UploadVideoResponse
import chat.bsky.actor.DeleteAccountResponse
import chat.bsky.convo.DeleteMessageForSelfRequest
import chat.bsky.convo.DeleteMessageForSelfResponse
import chat.bsky.convo.GetConvoForMembersQueryParams
import chat.bsky.convo.GetConvoForMembersResponse
import chat.bsky.convo.GetConvoQueryParams
import chat.bsky.convo.GetConvoResponse
import chat.bsky.convo.GetLogQueryParams
import chat.bsky.convo.GetLogResponse
import chat.bsky.convo.GetMessagesQueryParams
import chat.bsky.convo.GetMessagesResponse
import chat.bsky.convo.LeaveConvoRequest
import chat.bsky.convo.LeaveConvoResponse
import chat.bsky.convo.ListConvosQueryParams
import chat.bsky.convo.ListConvosResponse
import chat.bsky.convo.MuteConvoRequest
import chat.bsky.convo.MuteConvoResponse
import chat.bsky.convo.SendMessageBatchRequest
import chat.bsky.convo.SendMessageBatchResponse
import chat.bsky.convo.SendMessageRequest
import chat.bsky.convo.SendMessageResponse
import chat.bsky.convo.UnmuteConvoRequest
import chat.bsky.convo.UnmuteConvoResponse
import chat.bsky.convo.UpdateReadRequest
import chat.bsky.convo.UpdateReadResponse
import chat.bsky.moderation.GetActorMetadataQueryParams
import chat.bsky.moderation.GetActorMetadataResponse
import chat.bsky.moderation.GetMessageContextQueryParams
import chat.bsky.moderation.GetMessageContextResponse
import chat.bsky.moderation.UpdateActorAccessRequest
import com.atproto.admin.DisableAccountInvitesRequest
import com.atproto.admin.DisableInviteCodesRequest
import com.atproto.admin.EnableAccountInvitesRequest
import com.atproto.admin.GetAccountInfoQueryParams
import com.atproto.admin.GetAccountInfoResponse
import com.atproto.admin.GetAccountInfosQueryParams
import com.atproto.admin.GetAccountInfosResponse
import com.atproto.admin.GetInviteCodesQueryParams
import com.atproto.admin.GetInviteCodesResponse
import com.atproto.admin.GetSubjectStatusQueryParams
import com.atproto.admin.GetSubjectStatusResponse
import com.atproto.admin.SendEmailRequest
import com.atproto.admin.SendEmailResponse
import com.atproto.admin.UpdateAccountEmailRequest
import com.atproto.admin.UpdateAccountHandleRequest
import com.atproto.admin.UpdateAccountPasswordRequest
import com.atproto.admin.UpdateSubjectStatusRequest
import com.atproto.admin.UpdateSubjectStatusResponse
import com.atproto.identity.GetRecommendedDidCredentialsResponse
import com.atproto.identity.ResolveHandleQueryParams
import com.atproto.identity.ResolveHandleResponse
import com.atproto.identity.SignPlcOperationRequest
import com.atproto.identity.SignPlcOperationResponse
import com.atproto.identity.SubmitPlcOperationRequest
import com.atproto.identity.UpdateHandleRequest
import com.atproto.label.QueryLabelsQueryParams
import com.atproto.label.QueryLabelsResponse
import com.atproto.label.SubscribeLabelsMessage
import com.atproto.label.SubscribeLabelsQueryParams
import com.atproto.moderation.CreateReportRequest
import com.atproto.moderation.CreateReportResponse
import com.atproto.repo.ApplyWritesRequest
import com.atproto.repo.ApplyWritesResponse
import com.atproto.repo.CreateRecordRequest
import com.atproto.repo.CreateRecordResponse
import com.atproto.repo.DeleteRecordRequest
import com.atproto.repo.DeleteRecordResponse
import com.atproto.repo.DescribeRepoQueryParams
import com.atproto.repo.DescribeRepoResponse
import com.atproto.repo.ListMissingBlobsQueryParams
import com.atproto.repo.ListMissingBlobsResponse
import com.atproto.repo.ListRecordsQueryParams
import com.atproto.repo.ListRecordsResponse
import com.atproto.repo.PutRecordRequest
import com.atproto.repo.PutRecordResponse
import com.atproto.repo.UploadBlobResponse
import com.atproto.server.CheckAccountStatusResponse
import com.atproto.server.ConfirmEmailRequest
import com.atproto.server.CreateAccountRequest
import com.atproto.server.CreateAccountResponse
import com.atproto.server.CreateAppPasswordRequest
import com.atproto.server.CreateAppPasswordResponse
import com.atproto.server.CreateInviteCodeRequest
import com.atproto.server.CreateInviteCodeResponse
import com.atproto.server.CreateInviteCodesRequest
import com.atproto.server.CreateInviteCodesResponse
import com.atproto.server.CreateSessionRequest
import com.atproto.server.CreateSessionResponse
import com.atproto.server.DeactivateAccountRequest
import com.atproto.server.DescribeServerResponse
import com.atproto.server.GetAccountInviteCodesQueryParams
import com.atproto.server.GetAccountInviteCodesResponse
import com.atproto.server.GetServiceAuthQueryParams
import com.atproto.server.GetServiceAuthResponse
import com.atproto.server.GetSessionResponse
import com.atproto.server.ListAppPasswordsResponse
import com.atproto.server.RefreshSessionResponse
import com.atproto.server.RequestEmailUpdateResponse
import com.atproto.server.RequestPasswordResetRequest
import com.atproto.server.ReserveSigningKeyRequest
import com.atproto.server.ReserveSigningKeyResponse
import com.atproto.server.ResetPasswordRequest
import com.atproto.server.RevokeAppPasswordRequest
import com.atproto.server.UpdateEmailRequest
import com.atproto.sync.GetBlobQueryParams
import com.atproto.sync.GetCheckoutQueryParams
import com.atproto.sync.GetHeadQueryParams
import com.atproto.sync.GetHeadResponse
import com.atproto.sync.GetLatestCommitQueryParams
import com.atproto.sync.GetLatestCommitResponse
import com.atproto.sync.GetRepoStatusQueryParams
import com.atproto.sync.GetRepoStatusResponse
import com.atproto.sync.ListBlobsQueryParams
import com.atproto.sync.ListBlobsResponse
import com.atproto.sync.ListReposQueryParams
import com.atproto.sync.ListReposResponse
import com.atproto.sync.NotifyOfUpdateRequest
import com.atproto.sync.RequestCrawlRequest
import com.atproto.sync.SubscribeReposMessage
import com.atproto.sync.SubscribeReposQueryParams
import com.atproto.temp.CheckSignupQueueResponse
import com.atproto.temp.FetchLabelsQueryParams
import com.atproto.temp.FetchLabelsResponse
import com.atproto.temp.RequestPhoneVerificationRequest
import io.ktor.client.HttpClient
import kotlin.ByteArray
import kotlin.Deprecated
import kotlin.Unit
import kotlinx.coroutines.flow.Flow
import sh.christian.ozone.api.response.AtpResponse
import sh.christian.ozone.api.xrpc.defaultHttpClient
import sh.christian.ozone.api.xrpc.findSubscriptionSerializer
import sh.christian.ozone.api.xrpc.procedure
import sh.christian.ozone.api.xrpc.query
import sh.christian.ozone.api.xrpc.subscription
import sh.christian.ozone.api.xrpc.toAtpResponse
import sh.christian.ozone.api.xrpc.withXrpcConfiguration
import tools.ozone.`set`.AddValuesRequest
import tools.ozone.`set`.DeleteSetRequest
import tools.ozone.`set`.DeleteSetResponse
import tools.ozone.`set`.DeleteValuesRequest
import tools.ozone.`set`.GetValuesQueryParams
import tools.ozone.`set`.GetValuesResponse
import tools.ozone.`set`.QuerySetsQueryParams
import tools.ozone.`set`.QuerySetsResponse
import tools.ozone.`set`.UpsertSetRequest
import tools.ozone.`set`.UpsertSetResponse
import tools.ozone.communication.CreateTemplateRequest
import tools.ozone.communication.CreateTemplateResponse
import tools.ozone.communication.DeleteTemplateRequest
import tools.ozone.communication.ListTemplatesResponse
import tools.ozone.communication.UpdateTemplateRequest
import tools.ozone.communication.UpdateTemplateResponse
import tools.ozone.moderation.EmitEventRequest
import tools.ozone.moderation.EmitEventResponse
import tools.ozone.moderation.GetEventQueryParams
import tools.ozone.moderation.GetEventResponse
import tools.ozone.moderation.GetRecordsQueryParams
import tools.ozone.moderation.GetRecordsResponse
import tools.ozone.moderation.GetRepoResponse
import tools.ozone.moderation.GetReposQueryParams
import tools.ozone.moderation.GetReposResponse
import tools.ozone.moderation.QueryEventsQueryParams
import tools.ozone.moderation.QueryEventsResponse
import tools.ozone.moderation.QueryStatusesQueryParams
import tools.ozone.moderation.QueryStatusesResponse
import tools.ozone.moderation.SearchReposQueryParams
import tools.ozone.moderation.SearchReposResponse
import tools.ozone.server.GetConfigResponse
import tools.ozone.setting.ListOptionsQueryParams
import tools.ozone.setting.ListOptionsResponse
import tools.ozone.setting.RemoveOptionsRequest
import tools.ozone.setting.RemoveOptionsResponse
import tools.ozone.setting.UpsertOptionRequest
import tools.ozone.setting.UpsertOptionResponse
import tools.ozone.signature.FindCorrelationQueryParams
import tools.ozone.signature.FindCorrelationResponse
import tools.ozone.signature.FindRelatedAccountsQueryParams
import tools.ozone.signature.FindRelatedAccountsResponse
import tools.ozone.team.AddMemberRequest
import tools.ozone.team.AddMemberResponse
import tools.ozone.team.DeleteMemberRequest
import tools.ozone.team.ListMembersQueryParams
import tools.ozone.team.ListMembersResponse
import tools.ozone.team.UpdateMemberRequest
import tools.ozone.team.UpdateMemberResponse
import app.bsky.actor.PutPreferencesRequest as ActorPutPreferencesRequest
import app.bsky.graph.GetBlocksQueryParams as GraphGetBlocksQueryParams
import app.bsky.notification.PutPreferencesRequest as NotificationPutPreferencesRequest
import com.atproto.admin.DeleteAccountRequest as AdminDeleteAccountRequest
import com.atproto.admin.SearchAccountsQueryParams as AdminSearchAccountsQueryParams
import com.atproto.admin.SearchAccountsResponse as AdminSearchAccountsResponse
import com.atproto.repo.GetRecordQueryParams as RepoGetRecordQueryParams
import com.atproto.repo.GetRecordResponse as RepoGetRecordResponse
import com.atproto.server.DeleteAccountRequest as ServerDeleteAccountRequest
import com.atproto.sync.GetBlocksQueryParams as SyncGetBlocksQueryParams
import com.atproto.sync.GetRecordQueryParams as SyncGetRecordQueryParams
import com.atproto.sync.GetRepoQueryParams as SyncGetRepoQueryParams
import tools.ozone.moderation.GetRecordQueryParams as ModerationGetRecordQueryParams
import tools.ozone.moderation.GetRecordResponse as ModerationGetRecordResponse
import tools.ozone.moderation.GetRepoQueryParams as ModerationGetRepoQueryParams
import tools.ozone.signature.SearchAccountsQueryParams as SignatureSearchAccountsQueryParams
import tools.ozone.signature.SearchAccountsResponse as SignatureSearchAccountsResponse
public class XrpcBlueskyApi(
httpClient: HttpClient,
) : BlueskyApi {
private val client: HttpClient = httpClient.withXrpcConfiguration()
public constructor() : this(defaultHttpClient)
/**
* Activates a currently deactivated account. Used to finalize account migration after the
* account's repo is imported and identity is setup.
*/
override suspend fun activateAccount(): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.activateAccount",
).toAtpResponse()
}
/**
* Add a member to the ozone team. Requires admin role.
*/
override suspend fun addMember(request: AddMemberRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.team.addMember",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Add values to a specific set. Attempting to add values to a set that does not exist will result
* in an error.
*/
override suspend fun addValues(request: AddValuesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.set.addValues",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Apply a batch transaction of repository creates, updates, and deletes. Requires auth,
* implemented by PDS.
*/
override suspend fun applyWrites(request: ApplyWritesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.repo.applyWrites",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Returns the status of an account, especially as pertaining to import or recovery. Can be called
* many times over the course of an account migration. Requires auth and can only be called
* pertaining to oneself.
*/
override suspend fun checkAccountStatus(): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.server.checkAccountStatus",
).toAtpResponse()
}
/**
* Check accounts location in signup queue.
*/
override suspend fun checkSignupQueue(): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.temp.checkSignupQueue",
).toAtpResponse()
}
/**
* Confirm an email using a token from com.atproto.server.requestEmailConfirmation.
*/
override suspend fun confirmEmail(request: ConfirmEmailRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.confirmEmail",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Create an account. Implemented by PDS.
*/
override suspend fun createAccount(request: CreateAccountRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.createAccount",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Create an App Password.
*/
override suspend fun createAppPassword(request: CreateAppPasswordRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.createAppPassword",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Create an invite code.
*/
override suspend fun createInviteCode(request: CreateInviteCodeRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.createInviteCode",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Create invite codes.
*/
override suspend fun createInviteCodes(request: CreateInviteCodesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.createInviteCodes",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Create a single new repository record. Requires auth, implemented by PDS.
*/
override suspend fun createRecord(request: CreateRecordRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.repo.createRecord",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Submit a moderation report regarding an atproto account or record. Implemented by moderation
* services (with PDS proxying), and requires auth.
*/
override suspend fun createReport(request: CreateReportRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.moderation.createReport",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Create an authentication session.
*/
override suspend fun createSession(request: CreateSessionRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.createSession",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Administrative action to create a new, re-usable communication (email for now) template.
*/
override suspend fun createTemplate(request: CreateTemplateRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.communication.createTemplate",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Deactivates a currently active account. Stops serving of repo, and future writes to repo until
* reactivated. Used to finalize account migration with the old host after the account has been
* activated on the new host.
*/
override suspend fun deactivateAccount(request: DeactivateAccountRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.deactivateAccount",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Delete an actor's account with a token and password. Can only be called after requesting a
* deletion token. Requires auth.
*/
override suspend fun deleteAccount(request: ServerDeleteAccountRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.deleteAccount",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Delete a user account as an administrator.
*/
override suspend fun deleteAccount(request: AdminDeleteAccountRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.deleteAccount",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun deleteAccount(): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.actor.deleteAccount",
).toAtpResponse()
}
/**
* Delete a member from ozone team. Requires admin role.
*/
override suspend fun deleteMember(request: DeleteMemberRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.team.deleteMember",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun deleteMessageForSelf(request: DeleteMessageForSelfRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.convo.deleteMessageForSelf",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.
*/
override suspend fun deleteRecord(request: DeleteRecordRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.repo.deleteRecord",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Delete the current session. Requires auth.
*/
override suspend fun deleteSession(): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.deleteSession",
).toAtpResponse()
}
/**
* Delete an entire set. Attempting to delete a set that does not exist will result in an error.
*/
override suspend fun deleteSet(request: DeleteSetRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.set.deleteSet",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Delete a communication template.
*/
override suspend fun deleteTemplate(request: DeleteTemplateRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.communication.deleteTemplate",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Delete values from a specific set. Attempting to delete values that are not in the set will not
* result in an error
*/
override suspend fun deleteValues(request: DeleteValuesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.set.deleteValues",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Get information about a feed generator, including policies and offered feed URIs. Does not
* require auth; implemented by Feed Generator services (not App View).
*/
override suspend fun describeFeedGenerator(): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.describeFeedGenerator",
).toAtpResponse()
}
/**
* Get information about an account and repository, including the list of collections. Does not
* require auth.
*/
override suspend fun describeRepo(params: DescribeRepoQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.repo.describeRepo",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Describes the server's account creation requirements and capabilities. Implemented by PDS.
*/
override suspend fun describeServer(): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.server.describeServer",
).toAtpResponse()
}
/**
* Disable an account from receiving new invite codes, but does not invalidate existing codes.
*/
override suspend fun disableAccountInvites(request: DisableAccountInvitesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.disableAccountInvites",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Disable some set of codes and/or all codes associated with a set of users.
*/
override suspend fun disableInviteCodes(request: DisableInviteCodesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.disableInviteCodes",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Take a moderation action on an actor.
*/
override suspend fun emitEvent(request: EmitEventRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.moderation.emitEvent",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Re-enable an account's ability to receive invite codes.
*/
override suspend fun enableAccountInvites(request: EnableAccountInvitesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.enableAccountInvites",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun exportAccountData(): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.actor.exportAccountData",
).toAtpResponse()
}
@Deprecated("DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.")
override suspend fun fetchLabels(params: FetchLabelsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.temp.fetchLabels",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Find all correlated threat signatures between 2 or more accounts.
*/
override suspend fun findCorrelation(params: FindCorrelationQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.signature.findCorrelation",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get accounts that share some matching threat signatures with the root account.
*/
override suspend fun findRelatedAccounts(params: FindRelatedAccountsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.signature.findRelatedAccounts",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about an account.
*/
override suspend fun getAccountInfo(params: GetAccountInfoQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.admin.getAccountInfo",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about some accounts.
*/
override suspend fun getAccountInfos(params: GetAccountInfosQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.admin.getAccountInfos",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get all invite codes for the current account. Requires auth.
*/
override suspend fun getAccountInviteCodes(params: GetAccountInviteCodesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.server.getAccountInviteCodes",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a list of feeds (feed generator records) created by the actor (in the actor's repo).
*/
override suspend fun getActorFeeds(params: GetActorFeedsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getActorFeeds",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.
*/
override suspend fun getActorLikes(params: GetActorLikesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getActorLikes",
queryParams = params.asList(),
).toAtpResponse()
}
override suspend fun getActorMetadata(params: GetActorMetadataQueryParams): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.moderation.getActorMetadata",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a list of starter packs created by the actor.
*/
override suspend fun getActorStarterPacks(params: GetActorStarterPacksQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getActorStarterPacks",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.
*/
override suspend fun getAuthorFeed(params: GetAuthorFeedQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getAuthorFeed",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a blob associated with a given account. Returns the full blob as originally uploaded. Does
* not require auth; implemented by PDS.
*/
override suspend fun getBlob(params: GetBlobQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getBlob",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records.
* Does not require auth; implemented by PDS.
*/
override suspend fun getBlocks(params: SyncGetBlocksQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getBlocks",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates which accounts the requesting account is currently blocking. Requires auth.
*/
override suspend fun getBlocks(params: GraphGetBlocksQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getBlocks",
queryParams = params.asList(),
).toAtpResponse()
}
@Deprecated("DEPRECATED - please use com.atproto.sync.getRepo instead")
override suspend fun getCheckout(params: GetCheckoutQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getCheckout",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about ozone's server configuration.
*/
override suspend fun getConfig(): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.server.getConfig",
).toAtpResponse()
}
override suspend fun getConvo(params: GetConvoQueryParams): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.convo.getConvo",
queryParams = params.asList(),
).toAtpResponse()
}
override suspend fun getConvoForMembers(params: GetConvoForMembersQueryParams): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.convo.getConvoForMembers",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about a moderation event.
*/
override suspend fun getEvent(params: GetEventQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.getEvent",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a hydrated feed from an actor's selected feed generator. Implemented by App View.
*/
override suspend fun getFeed(params: GetFeedQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getFeed",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get information about a feed generator. Implemented by AppView.
*/
override suspend fun getFeedGenerator(params: GetFeedGeneratorQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getFeedGenerator",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get information about a list of feed generators.
*/
override suspend fun getFeedGenerators(params: GetFeedGeneratorsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getFeedGenerators",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider
* requirements, and provides the DID of the requester. Implemented by Feed Generator Service.
*/
override suspend fun getFeedSkeleton(params: GetFeedSkeletonQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getFeedSkeleton",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates accounts which follow a specified account (actor).
*/
override suspend fun getFollowers(params: GetFollowersQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getFollowers",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates accounts which a specified account (actor) follows.
*/
override suspend fun getFollows(params: GetFollowsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getFollows",
queryParams = params.asList(),
).toAtpResponse()
}
@Deprecated("DEPRECATED - please use com.atproto.sync.getLatestCommit instead")
override suspend fun getHead(params: GetHeadQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getHead",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get an admin view of invite codes.
*/
override suspend fun getInviteCodes(params: GetInviteCodesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.admin.getInviteCodes",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get status details for a video processing job.
*/
override suspend fun getJobStatus(params: GetJobStatusQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.video.getJobStatus",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates accounts which follow a specified account (actor) and are followed by the viewer.
*/
override suspend fun getKnownFollowers(params: GetKnownFollowersQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getKnownFollowers",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get the current commit CID & revision of the specified repo. Does not require auth.
*/
override suspend fun getLatestCommit(params: GetLatestCommitQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getLatestCommit",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get like records which reference a subject (by AT-URI and CID).
*/
override suspend fun getLikes(params: GetLikesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getLikes",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Gets a 'view' (with additional context) of a specified list.
*/
override suspend fun getList(params: GetListQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getList",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get mod lists that the requesting account (actor) is blocking. Requires auth.
*/
override suspend fun getListBlocks(params: GetListBlocksQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getListBlocks",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does
* not require auth.
*/
override suspend fun getListFeed(params: GetListFeedQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getListFeed",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.
*/
override suspend fun getListMutes(params: GetListMutesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getListMutes",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates the lists created by a specified account (actor).
*/
override suspend fun getLists(params: GetListsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getLists",
queryParams = params.asList(),
).toAtpResponse()
}
override suspend fun getLog(params: GetLogQueryParams): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.convo.getLog",
queryParams = params.asList(),
).toAtpResponse()
}
override suspend fun getMessageContext(params: GetMessageContextQueryParams): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.moderation.getMessageContext",
queryParams = params.asList(),
).toAtpResponse()
}
override suspend fun getMessages(params: GetMessagesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.convo.getMessages",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.
*/
override suspend fun getMutes(params: GetMutesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getMutes",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get posts in a thread. Does not require auth, but additional metadata and filtering will be
* applied for authed requests.
*/
override suspend fun getPostThread(params: GetPostThreadQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getPostThread",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as
* 'hydrating' a 'feed skeleton'.
*/
override suspend fun getPosts(params: GetPostsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getPosts",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get private preferences attached to the current account. Expected use is synchronization
* between multiple devices, and import/export during account migration. Requires auth.
*/
override suspend fun getPreferences(): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.actor.getPreferences",
).toAtpResponse()
}
/**
* Get detailed profile view of an actor. Does not require auth, but contains relevant metadata
* with auth.
*/
override suspend fun getProfile(params: GetProfileQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.actor.getProfile",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get detailed profile views of multiple actors.
*/
override suspend fun getProfiles(params: GetProfilesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.actor.getProfiles",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a list of quotes for a given post.
*/
override suspend fun getQuotes(params: GetQuotesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getQuotes",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Describe the credentials that should be included in the DID doc of an account that is migrating
* to this service.
*/
override suspend fun getRecommendedDidCredentials(): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.identity.getRecommendedDidCredentials",
).toAtpResponse()
}
/**
* Get a single record from a repository. Does not require auth.
*/
override suspend fun getRecord(params: RepoGetRecordQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.repo.getRecord",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get data blocks needed to prove the existence or non-existence of record in the current version
* of repo. Does not require auth.
*/
override suspend fun getRecord(params: SyncGetRecordQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getRecord",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about a record.
*/
override suspend fun getRecord(params: ModerationGetRecordQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.getRecord",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about some records.
*/
override suspend fun getRecords(params: GetRecordsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.getRecords",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates public relationships between one account, and a list of other accounts. Does not
* require auth.
*/
override suspend fun getRelationships(params: GetRelationshipsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getRelationships",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Download a repository export as CAR file. Optionally only a 'diff' since a previous revision.
* Does not require auth; implemented by PDS.
*/
override suspend fun getRepo(params: SyncGetRepoQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getRepo",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about a repository.
*/
override suspend fun getRepo(params: ModerationGetRepoQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.getRepo",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get the hosting status for a repository, on this server. Expected to be implemented by PDS and
* Relay.
*/
override suspend fun getRepoStatus(params: GetRepoStatusQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.getRepoStatus",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get details about some repositories.
*/
override suspend fun getRepos(params: GetReposQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.getRepos",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a list of reposts for a given post.
*/
override suspend fun getRepostedBy(params: GetRepostedByQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getRepostedBy",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a signed token on behalf of the requesting DID for the requested service.
*/
override suspend fun getServiceAuth(params: GetServiceAuthQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.server.getServiceAuth",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get information about a list of labeler services.
*/
override suspend fun getServices(params: GetServicesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.labeler.getServices",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get information about the current auth session. Requires auth.
*/
override suspend fun getSession(): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.server.getSession",
).toAtpResponse()
}
/**
* Gets a view of a starter pack.
*/
override suspend fun getStarterPack(params: GetStarterPackQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getStarterPack",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get views for a list of starter packs.
*/
override suspend fun getStarterPacks(params: GetStarterPacksQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getStarterPacks",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get the service-specific admin status of a subject (account, record, or blob).
*/
override suspend fun getSubjectStatus(params: GetSubjectStatusQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.admin.getSubjectStatus",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a list of suggested feeds (feed generators) for the requesting account.
*/
override suspend fun getSuggestedFeeds(params: GetSuggestedFeedsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getSuggestedFeeds",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates follows similar to a given account (actor). Expected use is to recommend additional
* accounts immediately after following one account.
*/
override suspend fun getSuggestedFollowsByActor(params: GetSuggestedFollowsByActorQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.graph.getSuggestedFollowsByActor",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a list of suggested actors. Expected use is discovery of accounts to follow during new
* account onboarding.
*/
override suspend fun getSuggestions(params: GetSuggestionsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.actor.getSuggestions",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get a view of the requesting account's home timeline. This is expected to be some form of
* reverse-chronological feed.
*/
override suspend fun getTimeline(params: GetTimelineQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.getTimeline",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Count the number of unread notifications for the requesting account. Requires auth.
*/
override suspend fun getUnreadCount(params: GetUnreadCountQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.notification.getUnreadCount",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get video upload limits for the authenticated user.
*/
override suspend fun getUploadLimits(): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.video.getUploadLimits",
).toAtpResponse()
}
/**
* Get a specific set and its values
*/
override suspend fun getValues(params: GetValuesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.set.getValues",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.
*/
override suspend fun importRepo(request: ByteArray): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.repo.importRepo",
body = request,
encoding = "application/vnd.ipld.car",
).toAtpResponse()
}
override suspend fun leaveConvo(request: LeaveConvoRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.convo.leaveConvo",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* List all App Passwords.
*/
override suspend fun listAppPasswords(): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.server.listAppPasswords",
).toAtpResponse()
}
/**
* List blob CIDs for an account, since some repo revision. Does not require auth; implemented by
* PDS.
*/
override suspend fun listBlobs(params: ListBlobsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.listBlobs",
queryParams = params.asList(),
).toAtpResponse()
}
override suspend fun listConvos(params: ListConvosQueryParams): AtpResponse {
return client.query(
path = "/xrpc/chat.bsky.convo.listConvos",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* List all members with access to the ozone service.
*/
override suspend fun listMembers(params: ListMembersQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.team.listMembers",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Returns a list of missing blobs for the requesting account. Intended to be used in the account
* migration flow.
*/
override suspend fun listMissingBlobs(params: ListMissingBlobsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.repo.listMissingBlobs",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerate notifications for the requesting account. Requires auth.
*/
override suspend fun listNotifications(params: ListNotificationsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.notification.listNotifications",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* List settings with optional filtering
*/
override suspend fun listOptions(params: ListOptionsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.setting.listOptions",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* List a range of records in a repository, matching a specific collection. Does not require auth.
*/
override suspend fun listRecords(params: ListRecordsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.repo.listRecords",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not
* require auth; implemented by PDS and Relay.
*/
override suspend fun listRepos(params: ListReposQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.sync.listRepos",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Get list of all communication templates.
*/
override suspend fun listTemplates(): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.communication.listTemplates",
).toAtpResponse()
}
/**
* Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires
* auth.
*/
override suspend fun muteActor(request: MuteActorRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.graph.muteActor",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky.
* Requires auth.
*/
override suspend fun muteActorList(request: MuteActorListRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.graph.muteActorList",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun muteConvo(request: MuteConvoRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.convo.muteConvo",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Mutes a thread preventing notifications from the thread and any of its children. Mutes are
* private in Bluesky. Requires auth.
*/
override suspend fun muteThread(request: MuteThreadRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.graph.muteThread",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Notify a crawling service of a recent update, and that crawling should resume. Intended use is
* after a gap between repo stream events caused the crawling service to disconnect. Does not require
* auth; implemented by Relay.
*/
override suspend fun notifyOfUpdate(request: NotifyOfUpdateRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.sync.notifyOfUpdate",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Set the private preferences attached to the account.
*/
override suspend fun putPreferences(request: ActorPutPreferencesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.actor.putPreferences",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Set notification-related preferences for an account. Requires auth.
*/
override suspend fun putPreferences(request: NotificationPutPreferencesRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.notification.putPreferences",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Write a repository record, creating or updating it as needed. Requires auth, implemented by
* PDS.
*/
override suspend fun putRecord(request: PutRecordRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.repo.putRecord",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* List moderation events related to a subject.
*/
override suspend fun queryEvents(params: QueryEventsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.queryEvents",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services,
* though may return different or additional results with auth.
*/
override suspend fun queryLabels(params: QueryLabelsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.label.queryLabels",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Query available sets
*/
override suspend fun querySets(params: QuerySetsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.set.querySets",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* View moderation statuses of subjects (record or repo).
*/
override suspend fun queryStatuses(params: QueryStatusesQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.queryStatuses",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').
*/
override suspend fun refreshSession(): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.refreshSession",
).toAtpResponse()
}
/**
* Register to receive push notifications, via a specified service, for the requesting account.
* Requires auth.
*/
override suspend fun registerPush(request: RegisterPushRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.notification.registerPush",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Delete settings by key
*/
override suspend fun removeOptions(request: RemoveOptionsRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.setting.removeOptions",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Initiate a user account deletion via email.
*/
override suspend fun requestAccountDelete(): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.requestAccountDelete",
).toAtpResponse()
}
/**
* Request a service to persistently crawl hosted repos. Expected use is new PDS instances
* declaring their existence to Relays. Does not require auth.
*/
override suspend fun requestCrawl(request: RequestCrawlRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.sync.requestCrawl",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Request an email with a code to confirm ownership of email.
*/
override suspend fun requestEmailConfirmation(): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.requestEmailConfirmation",
).toAtpResponse()
}
/**
* Request a token in order to update email.
*/
override suspend fun requestEmailUpdate(): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.requestEmailUpdate",
).toAtpResponse()
}
/**
* Initiate a user account password reset via email.
*/
override suspend fun requestPasswordReset(request: RequestPasswordResetRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.requestPasswordReset",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Request a verification code to be sent to the supplied phone number
*/
override suspend fun requestPhoneVerification(request: RequestPhoneVerificationRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.temp.requestPhoneVerification",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Request an email with a code to in order to request a signed PLC operation. Requires Auth.
*/
override suspend fun requestPlcOperationSignature(): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.identity.requestPlcOperationSignature",
).toAtpResponse()
}
/**
* Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update
* operation can be constructed during an account migraiton. Public and does not require auth;
* implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.
*/
override suspend fun reserveSigningKey(request: ReserveSigningKeyRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.reserveSigningKey",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Reset a user account password using a token.
*/
override suspend fun resetPassword(request: ResetPasswordRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.resetPassword",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Resolves a handle (domain name) to a DID.
*/
override suspend fun resolveHandle(params: ResolveHandleQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.identity.resolveHandle",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Revoke an App Password by name.
*/
override suspend fun revokeAppPassword(request: RevokeAppPasswordRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.revokeAppPassword",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Get list of accounts that matches your search query.
*/
override suspend fun searchAccounts(params: AdminSearchAccountsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/com.atproto.admin.searchAccounts",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Search for accounts that match one or more threat signature values.
*/
override suspend fun searchAccounts(params: SignatureSearchAccountsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.signature.searchAccounts",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Find actors (profiles) matching search criteria. Does not require auth.
*/
override suspend fun searchActors(params: SearchActorsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.actor.searchActors",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Find actor suggestions for a prefix search term. Expected use is for auto-completion during
* text field entry. Does not require auth.
*/
override suspend fun searchActorsTypeahead(params: SearchActorsTypeaheadQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.actor.searchActorsTypeahead",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Find posts matching search criteria, returning views of those posts.
*/
override suspend fun searchPosts(params: SearchPostsQueryParams): AtpResponse {
return client.query(
path = "/xrpc/app.bsky.feed.searchPosts",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Find repositories based on a search term.
*/
override suspend fun searchRepos(params: SearchReposQueryParams): AtpResponse {
return client.query(
path = "/xrpc/tools.ozone.moderation.searchRepos",
queryParams = params.asList(),
).toAtpResponse()
}
/**
* Send email to a user's account email address.
*/
override suspend fun sendEmail(request: SendEmailRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.sendEmail",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Send information about interactions with feed items back to the feed generator that served
* them.
*/
override suspend fun sendInteractions(request: SendInteractionsRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.feed.sendInteractions",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun sendMessage(request: SendMessageRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.convo.sendMessage",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun sendMessageBatch(request: SendMessageBatchRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.convo.sendMessageBatch",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Signs a PLC operation to update some value(s) in the requesting DID's document.
*/
override suspend fun signPlcOperation(request: SignPlcOperationRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.identity.signPlcOperation",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the
* identity into a bad state, then submits it to the PLC registry
*/
override suspend fun submitPlcOperation(request: SubmitPlcOperationRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.identity.submitPlcOperation",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Subscribe to stream of labels (and negations). Public endpoint implemented by mod services.
* Uses same sequencing scheme as repo event stream.
*/
override suspend fun subscribeLabels(params: SubscribeLabelsQueryParams): Flow> {
return client.subscription(
path = "/xrpc/com.atproto.label.subscribeLabels",
queryParams = params.asList(),
).toAtpResponse(::findSubscriptionSerializer)
}
/**
* Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and
* identity update events, for all repositories on the current server. See the atproto specifications
* for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does
* not require auth; implemented by PDS and Relay.
*/
override suspend fun subscribeRepos(params: SubscribeReposQueryParams): Flow> {
return client.subscription(
path = "/xrpc/com.atproto.sync.subscribeRepos",
queryParams = params.asList(),
).toAtpResponse(::findSubscriptionSerializer)
}
/**
* Unmutes the specified account. Requires auth.
*/
override suspend fun unmuteActor(request: UnmuteActorRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.graph.unmuteActor",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Unmutes the specified list of accounts. Requires auth.
*/
override suspend fun unmuteActorList(request: UnmuteActorListRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.graph.unmuteActorList",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun unmuteConvo(request: UnmuteConvoRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.convo.unmuteConvo",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Unmutes the specified thread. Requires auth.
*/
override suspend fun unmuteThread(request: UnmuteThreadRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.graph.unmuteThread",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Administrative action to update an account's email.
*/
override suspend fun updateAccountEmail(request: UpdateAccountEmailRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.updateAccountEmail",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Administrative action to update an account's handle.
*/
override suspend fun updateAccountHandle(request: UpdateAccountHandleRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.updateAccountHandle",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Update the password for a user account as an administrator.
*/
override suspend fun updateAccountPassword(request: UpdateAccountPasswordRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.updateAccountPassword",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun updateActorAccess(request: UpdateActorAccessRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.moderation.updateActorAccess",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Update an account's email.
*/
override suspend fun updateEmail(request: UpdateEmailRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.server.updateEmail",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Updates the current account's handle. Verifies handle validity, and updates did:plc document if
* necessary. Implemented by PDS, and requires auth.
*/
override suspend fun updateHandle(request: UpdateHandleRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.identity.updateHandle",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Update a member in the ozone service. Requires admin role.
*/
override suspend fun updateMember(request: UpdateMemberRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.team.updateMember",
body = request,
encoding = "application/json",
).toAtpResponse()
}
override suspend fun updateRead(request: UpdateReadRequest): AtpResponse {
return client.procedure(
path = "/xrpc/chat.bsky.convo.updateRead",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Notify server that the requesting account has seen notifications. Requires auth.
*/
override suspend fun updateSeen(request: UpdateSeenRequest): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.notification.updateSeen",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Update the service-specific admin status of a subject (account, record, or blob).
*/
override suspend fun updateSubjectStatus(request: UpdateSubjectStatusRequest): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.admin.updateSubjectStatus",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Administrative action to update an existing communication template. Allows passing partial
* fields to patch specific fields only.
*/
override suspend fun updateTemplate(request: UpdateTemplateRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.communication.updateTemplate",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is
* not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are
* enforced when the reference is created. Requires auth, implemented by PDS.
*/
override suspend fun uploadBlob(request: ByteArray): AtpResponse {
return client.procedure(
path = "/xrpc/com.atproto.repo.uploadBlob",
body = request,
encoding = "*/*",
).toAtpResponse()
}
/**
* Upload a video to be processed then stored on the PDS.
*/
override suspend fun uploadVideo(request: ByteArray): AtpResponse {
return client.procedure(
path = "/xrpc/app.bsky.video.uploadVideo",
body = request,
encoding = "video/mp4",
).toAtpResponse()
}
/**
* Create or update setting option
*/
override suspend fun upsertOption(request: UpsertOptionRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.setting.upsertOption",
body = request,
encoding = "application/json",
).toAtpResponse()
}
/**
* Create or update set metadata
*/
override suspend fun upsertSet(request: UpsertSetRequest): AtpResponse {
return client.procedure(
path = "/xrpc/tools.ozone.set.upsertSet",
body = request,
encoding = "application/json",
).toAtpResponse()
}
}