comAtprotoRepoApplyWrites function
Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.
Implementation
Future<XRPCResponse<RepoApplyWritesOutput>> comAtprotoRepoApplyWrites({
required String repo,
bool? validate,
required List<URepoApplyWritesWrites> writes,
String? swapCommit,
required ServiceContext $ctx,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.comAtprotoRepoApplyWrites,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
'repo': repo,
if (validate != null) 'validate': validate,
'writes': writes.map((e) => e.toJson()).toList(),
if (swapCommit != null) 'swapCommit': swapCommit,
},
to: const RepoApplyWritesOutputConverter().fromJson,
);