@userfrosting/sprinkle-account
Version:
Account Sprinkle for UserFrosting
81 lines (80 loc) • 2.89 kB
TypeScript
import { Maybe } from '@regle/core';
import { Severity, AlertInterface } from '@userfrosting/sprinkle-core/interfaces';
import { RegisterRequest } from '../interfaces';
/**
* API Composable
*/
export declare function useRegisterApi(): {
submitRegistration: (data: RegisterRequest) => Promise<void>;
defaultRegistrationForm: () => RegisterRequest;
availableLocales: () => Record<string, string>;
suggestUsername: () => Promise<any>;
validateUsername: (user_name: Maybe<string>) => Promise<any>;
captchaUrl: () => string;
formData: import('vue').Ref<{
first_name: string;
last_name: string;
email: string;
user_name: string;
password: string;
passwordc: string;
locale: string;
captcha: string;
spiderbro: string;
}, RegisterRequest | {
first_name: string;
last_name: string;
email: string;
user_name: string;
password: string;
passwordc: string;
locale: string;
captcha: string;
spiderbro: string;
}>;
apiLoading: import('vue').Ref<boolean, boolean>;
apiError: import('vue').Ref<{
title?: string | undefined;
description?: string | undefined;
style?: (Severity | keyof typeof Severity) | undefined;
closeBtn?: boolean | undefined;
hideIcon?: boolean | undefined;
} | null, AlertInterface | {
title?: string | undefined;
description?: string | undefined;
style?: (Severity | keyof typeof Severity) | undefined;
closeBtn?: boolean | undefined;
hideIcon?: boolean | undefined;
} | null>;
r$: import('vue').Raw<import('@regle/core').RegleRoot<{
first_name: string;
last_name: string;
email: string;
user_name: string;
password: string;
passwordc: string;
locale: string;
captcha: string;
spiderbro: string;
}, Record<string, any>, Record<string, import('@regle/core').RegleValidationGroupEntry[]>, import('@regle/core').RegleShortcutDefinition<any>>>;
r$username: import('vue').Raw<import('@regle/core').RegleRoot<{
first_name: string;
last_name: string;
email: string;
user_name: string;
password: string;
passwordc: string;
locale: string;
captcha: string;
spiderbro: string;
}, {
user_name: {
usernameRule: import('@regle/core').RegleRuleDefinition<unknown, string, [], true, {
$valid: any;
$message: any;
}, string, string, false>;
};
}, Record<string, import('@regle/core').RegleValidationGroupEntry[]>, import('@regle/core').RegleShortcutDefinition<any>>>;
passwordMinLength: import('vue').Ref<number, number>;
passwordMaxLength: import('vue').Ref<number, number>;
};