diff --git a/pkg/fusionauth/Domain.go b/pkg/fusionauth/Domain.go index 01af919..b4b605a 100644 --- a/pkg/fusionauth/Domain.go +++ b/pkg/fusionauth/Domain.go @@ -2611,9 +2611,25 @@ func (b *FormResponse) SetStatus(status int) { * @author Daniel DeGroff */ type FormStep struct { - Fields []string `json:"fields,omitempty"` + Fields []string `json:"fields,omitempty"` + Type FormStepType `json:"type,omitempty"` } +/** + * Denotes the type of form step. This is used to configure different behavior on form steps in the registration flow. + */ +type FormStepType string + +func (e FormStepType) String() string { + return string(e) +} + +const ( + FormStepType_CollectData FormStepType = "collectData" + FormStepType_VerifyEmail FormStepType = "verifyEmail" + FormStepType_VerifyPhoneNumber FormStepType = "verifyPhoneNumber" +) + /** * @author Daniel DeGroff */ diff --git a/pkg/fusionauth/Domain_dynamic_test.go b/pkg/fusionauth/Domain_dynamic_test.go index 3799b34..59d760a 100644 --- a/pkg/fusionauth/Domain_dynamic_test.go +++ b/pkg/fusionauth/Domain_dynamic_test.go @@ -245,6 +245,13 @@ func Test_FormFieldAdminPolicyImplementsStringer(t *testing.T) { } } +func Test_FormStepTypeImplementsStringer(t *testing.T) { + var enum interface{} = FormStepType("Test") + if _, ok := enum.(fmt.Stringer); !ok { + t.Errorf("FormStepType does not implement stringer interface\n") + } +} + func Test_FormTypeImplementsStringer(t *testing.T) { var enum interface{} = FormType("Test") if _, ok := enum.(fmt.Stringer); !ok {