comAtprotoSpaceAuthorizeSpaceSync function
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.
Implementation
Future<XRPCResponse<SpaceAuthorizeSpaceSyncOutput>>
comAtprotoSpaceAuthorizeSpaceSync({
required String space,
required String credentialKey,
String? delegationToken,
String? clientAttestation,
Notify? notify,
required ServiceContext $ctx,
String? $service,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.comAtprotoSpaceAuthorizeSpaceSync,
service: $service,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
'space': space,
'credentialKey': credentialKey,
if (delegationToken != null) 'delegationToken': delegationToken,
if (clientAttestation != null) 'clientAttestation': clientAttestation,
if (notify != null) 'notify': const NotifyConverter().toJson(notify),
},
to: const SpaceAuthorizeSpaceSyncOutputConverter().fromJson,
);