SpaceService class base

com.atproto.space.*

Constructors

SpaceService(ServiceContext ctx)

Properties

ctx → ServiceContext
final
hashCode → int
The hash code for this object.
no setterinherited
policy → SpacePolicyRecordAccessor
A published copy of a space's policy. Only authoritative in the space authority's repo.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyWrites({required String space, required String repo, bool? validate, required List<USpaceApplyWritesWrites> writes, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceApplyWritesOutput>>
Apply a batch transaction of creates, updates, and deletes to a space repo. Requires auth, implemented by PDS.
authorizeSpaceSync({required String space, required String credentialKey, String? delegationToken, String? clientAttestation, Notify? notify, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceAuthorizeSpaceSyncOutput>>
Authorize syncing a space, returning a new credential for reading data across it and the space's current revision, and optionally registering for notifications of updates to it. Depending on the space's policy, a delegation token and/or client attestation may be required. Implemented by the space host.
clearRecords({required String space, required String repo, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Delete all records in the authenticated account's space repo. In the space authority's repo, records published from the space's configuration (such as its policy) are kept. Requires auth, implemented by PDS.
confirmRegistration({required String space, required String token, required String challenge, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceConfirmRegistrationOutput>>
Confirm a new notification registration. Called by the space host on an endpoint passed to authorizeSpaceSync, before registering it. The syncing service checks that it issued the token for the space, and echoes back the challenge.
createRecord({required String space, required String repo, required String collection, String? rkey, bool? validate, required Map<String, dynamic> record, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceCreateRecordOutput>>
Create a single new record in a space repo. Requires auth, implemented by PDS.
createSpace({required String spaceType, String? skey, required USpaceCreateSpacePolicy policy, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceCreateSpaceOutput>>
Create a new space, with the authenticated account as its authority. Requires auth, implemented by PDS.
deleteRecord({required String space, required String repo, required String collection, required String rkey, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Delete a record from a space repo, or ensure it doesn't exist. Requires auth, implemented by PDS.
deleteSpace({required String space, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Delete a space, along with the authority's space repo. Requires auth as the space authority, implemented by PDS.
exportSpaceMeta({required String space, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<Uint8List>>
Export a space's state, such as its policy and member list, as a STAR file for account migration. Requires auth as the space authority, implemented by PDS.
getBlob({required String space, required String repo, required String cid, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<Uint8List>>
Get a blob referenced by a record in a space repo. Returns the full blob as originally uploaded. Requires auth as the repo's account or with a space credential; implemented by PDS.
getDelegationToken({required String space, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceGetDelegationTokenOutput>>
Get a delegation token for a space, to exchange with the space host for a space credential. Requires auth, implemented by PDS.
getLatestCommit({required String space, required String repo, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceGetLatestCommitOutput>>
Get the current commit of a space repo. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.
getRecord({required String space, required String repo, required String collection, required String rkey, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceGetRecordOutput>>
Get a single record from a space repo. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.
getRepo({required String space, required String repo, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<Uint8List>>
Download a space repo as a STAR file. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.
getSpace({required String space, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceGetSpaceOutput>>
Get a space and its policy. Requires auth as the space authority, implemented by PDS.
importRepo({required Uint8List bytes, String? $service, Map<String, String>? $headers, Map<String, String>? $parameters}) → Future<XRPCResponse<EmptyData>>
Import the authenticated account's space repo from a STAR file, for account migration. If the account is the space's authority, the space must first be imported with importSpaceMeta. Requires auth, implemented by PDS.
importSpaceMeta({required Uint8List bytes, String? $service, Map<String, String>? $headers, Map<String, String>? $parameters}) → Future<XRPCResponse<EmptyData>>
Import a space's state from an archive produced by exportSpaceMeta, for account migration. Must be called before importing the authority's space repo with importRepo. Requires auth as the space authority, implemented by PDS.
listBlobs({required String space, required String repo, int? limit, String? cursor, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceListBlobsOutput>>
List blob CIDs referenced by records in a space repo. Requires auth as the repo's account or with a space credential; implemented by PDS.
listRecords({required String space, required String repo, String? collection, int? limit, String? cursor, bool? excludeValues, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceListRecordsOutput>>
List records in a space repo, optionally filtered by collection. Requires auth as the repo's account or with a space credential; implemented by PDS.
listRepoOps({required String space, required String repo, String? since, int? limit, String? cursor, bool? excludeValues, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceListRepoOpsOutput>>
List operations on a space repo after a given revision. Used for incremental sync. Hosts may truncate the log, so use getRepo for a full sync. Responses are authenticated with a MAC. Requires auth as the repo's account or with a space credential; implemented by PDS.
listSpaces({String? spaceDid, String? spaceType, int? limit, String? cursor, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceListSpacesOutput>>
List spaces that the authenticated account has written to or is the authority for. Requires auth, implemented by PDS.
listWriters({required String space, int? limit, String? cursor, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpaceListWritersOutput>>
List the repos in a space's writer set, with the latest known state of each: its current revision, or its removal from the writer set. Requires a space credential, implemented by the space host.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyCredentialsRevoked({required String space, required List<String> credentials, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Notify a repo host that space credentials have been revoked. Sent by the space host. Requires service auth, implemented by PDS.
notifyRepoUpdate({required String space, required String repo, required String repoRev, required Map<String, dynamic> data, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Notify the space host that a space repo has been updated. Sent by repo hosts, with service auth.
notifySpaceUpdate({required String space, required String token, required USpaceNotifySpaceUpdateUpdate update, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Notify a syncing service of an update to a space. Sent by the space host to the notification endpoint registered through authorizeSpaceSync.
putRecord({required String space, required String repo, required String collection, required String rkey, bool? validate, required Map<String, dynamic> record, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<SpacePutRecordOutput>>
Write a record in a space repo, creating or updating it as needed. Requires auth, implemented by PDS.
removeWriter({required String space, required String repo, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Remove an account from a space's writer set, as returned by listWriters. The removal is sent to registered syncers. The account is added back if it makes another authorized write to the space. Does nothing if the account is not in the writer set. Requires auth as the space authority, implemented by PDS.
toString() → String
A string representation of this object.
inherited
updateSpace({required String space, required USpaceUpdateSpacePolicy policy, String? $service, Map<String, String>? $headers, Map<String, String>? $unknown}) → Future<XRPCResponse<EmptyData>>
Replace the policy of a space. Changing to a different policy type discards state held by the previous policy, such as a member list. Requires auth as the space authority, implemented by PDS.

Operators

operator ==(Object other) → bool
The equality operator.
inherited