comAtprotoSpaceApplyWrites function

Future<XRPCResponse<SpaceApplyWritesOutput>> comAtprotoSpaceApplyWrites({
  1. required String space,
  2. required String repo,
  3. bool? validate,
  4. required List<USpaceApplyWritesWrites> writes,
  5. required ServiceContext $ctx,
  6. String? $service,
  7. Map<String, String>? $headers,
  8. Map<String, String>? $unknown,
})

Apply a batch transaction of creates, updates, and deletes to a space repo. Requires auth, implemented by PDS.

Implementation

Future<XRPCResponse<SpaceApplyWritesOutput>> comAtprotoSpaceApplyWrites({
  required String space,
  required String repo,
  bool? validate,
  required List<USpaceApplyWritesWrites> writes,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoSpaceApplyWrites,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'space': space,
    'repo': repo,
    if (validate != null) 'validate': validate,
    'writes': writes.map((e) => e.toJson()).toList(),
  },
  to: const SpaceApplyWritesOutputConverter().fromJson,
);