comAtprotoRepoCreateRecord function
Create a single new repository record. Requires auth, implemented by PDS.
Implementation
Future<XRPCResponse<RepoCreateRecordOutput>> comAtprotoRepoCreateRecord({
required String repo,
required String collection,
String? rkey,
bool? validate,
required Map<String, dynamic> record,
String? swapCommit,
required ServiceContext $ctx,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.comAtprotoRepoCreateRecord,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
'repo': repo,
'collection': collection,
if (rkey != null) 'rkey': rkey,
if (validate != null) 'validate': validate,
'record': record,
if (swapCommit != null) 'swapCommit': swapCommit,
},
to: const RepoCreateRecordOutputConverter().fromJson,
);