deleteRecord method

Future<XRPCResponse<DeleteRecordOutput>> deleteRecord({
  1. String? repo,
  2. required NSID collection,
  3. required String rkey,
  4. String? swapRecord,
  5. String? swapCommit,
  6. Map<String, String>? $unknown,
  7. Map<String, String>? $headers,
  8. PostClient? $client,
})

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

https://atprotodart.com/docs/lexicons/com/atproto/repo/deleteRecord

Implementation

Future<XRPCResponse<DeleteRecordOutput>> deleteRecord({
  String? repo,
  required NSID collection,
  required String rkey,
  String? swapRecord,
  String? swapCommit,
  Map<String, String>? $unknown,
  Map<String, String>? $headers,
  PostClient? $client,
}) async =>
    await _ctx.post<DeleteRecordOutput>(
      ns.comAtprotoRepoDeleteRecord,
      headers: $headers,
      body: {
        'repo': repo ?? _ctx.repo,
        'collection': collection.toString(),
        'rkey': rkey,
        if (swapRecord != null) 'swapRecord': swapRecord,
        if (swapCommit != null) 'swapCommit': swapCommit,
        ...?$unknown,
      },
      to: const DeleteRecordOutputConverter().fromJson,
      client: $client,
    );