// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package org_tangled

// schema: org.tangled.temp.account.getSignup

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

const (
	TempAccountGetSignupNSID = "org.tangled.temp.account.getSignup"
)

// TempAccountGetSignup_Output is the output of a org.tangled.temp.account.getSignup call.
type TempAccountGetSignup_Output struct {
	// email: Email address the signup was started with.
	Email string `json:"email" cborgen:"email"`
	// pds: PDS the account will be created on, where the browser starts the OAuth request it passes to completeSignup.
	Pds string `json:"pds" cborgen:"pds"`
}

// TempAccountGetSignup calls the XRPC method "org.tangled.temp.account.getSignup".
//
// token: Verification token from the emailed link.
func TempAccountGetSignup(ctx context.Context, c util.LexClient, token string) (*TempAccountGetSignup_Output, error) {
	var out TempAccountGetSignup_Output

	params := map[string]interface{}{}
	params["token"] = token
	if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.account.getSignup", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
