create method

Future<XRPCResponse<CreateRecordOutput>> create({
  1. String? rkey,
  2. required UDeclarationAllowIncoming allowIncoming,
  3. Map<String, dynamic>? $unknown,
  4. Map<String, String>? $headers,
  5. PostClient? $client,
})

Creates declaration record.

Implementation

Future<XRPCResponse<CreateRecordOutput>> create({
  String? rkey,
  required UDeclarationAllowIncoming allowIncoming,
  Map<String, dynamic>? $unknown,
  Map<String, String>? $headers,
  PostClient? $client,
}) async =>
    await _ctx.atproto.repo.createRecord(
      repo: _ctx.repo,
      collection: ns.chatBskyActorDeclaration,
      rkey: rkey ?? 'self',
      record: {
        r'$type': 'chat.bsky.actor.declaration',
        'allowIncoming': allowIncoming.toJson(),
        ...?$unknown,
      },
      $headers: $headers,
      $client: $client,
    );