comAtprotoRepoDeleteRecord function

Future<XRPCResponse<RepoDeleteRecordOutput>> comAtprotoRepoDeleteRecord({
  1. required String repo,
  2. required String collection,
  3. required String rkey,
  4. String? swapRecord,
  5. String? swapCommit,
  6. required ServiceContext $ctx,
  7. Map<String, String>? $headers,
  8. Map<String, String>? $unknown,
})

Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.

Implementation

Future<XRPCResponse<RepoDeleteRecordOutput>> comAtprotoRepoDeleteRecord({
  required String repo,
  required String collection,
  required String rkey,
  String? swapRecord,
  String? swapCommit,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoRepoDeleteRecord,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'repo': repo,
    'collection': collection,
    'rkey': rkey,
    if (swapRecord != null) 'swapRecord': swapRecord,
    if (swapCommit != null) 'swapCommit': swapCommit,
  },
  to: const RepoDeleteRecordOutputConverter().fromJson,
);