1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package atproto
4
5// schema: com.atproto.server.updateEmail
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13// ServerUpdateEmail_Input is the input argument to a com.atproto.server.updateEmail call.
14type ServerUpdateEmail_Input struct {
15 Email string `json:"email" cborgen:"email"`
16 EmailAuthFactor *bool `json:"emailAuthFactor,omitempty" cborgen:"emailAuthFactor,omitempty"`
17 // token: Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed.
18 Token *string `json:"token,omitempty" cborgen:"token,omitempty"`
19}
20
21// ServerUpdateEmail calls the XRPC method "com.atproto.server.updateEmail".
22func ServerUpdateEmail(ctx context.Context, c util.LexClient, input *ServerUpdateEmail_Input) error {
23 if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.server.updateEmail", nil, input, nil); err != nil {
24 return err
25 }
26
27 return nil
28}