comAtprotoServerCreateAccount function

Future<XRPCResponse<ServerCreateAccountOutput>> comAtprotoServerCreateAccount({
  1. String? email,
  2. required String handle,
  3. String? did,
  4. String? inviteCode,
  5. String? verificationCode,
  6. String? verificationPhone,
  7. String? password,
  8. String? recoveryKey,
  9. Map<String, dynamic>? plcOp,
  10. required ServiceContext $ctx,
  11. Map<String, String>? $headers,
  12. Map<String, String>? $unknown,
})

Create an account. Implemented by PDS.

Implementation

Future<XRPCResponse<ServerCreateAccountOutput>> comAtprotoServerCreateAccount({
  String? email,
  required String handle,
  String? did,
  String? inviteCode,
  String? verificationCode,
  String? verificationPhone,
  String? password,
  String? recoveryKey,
  Map<String, dynamic>? plcOp,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.comAtprotoServerCreateAccount,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    if (email != null) 'email': email,
    'handle': handle,
    if (did != null) 'did': did,
    if (inviteCode != null) 'inviteCode': inviteCode,
    if (verificationCode != null) 'verificationCode': verificationCode,
    if (verificationPhone != null) 'verificationPhone': verificationPhone,
    if (password != null) 'password': password,
    if (recoveryKey != null) 'recoveryKey': recoveryKey,
    if (plcOp != null) 'plcOp': plcOp,
  },
  to: const ServerCreateAccountOutputConverter().fromJson,
);