@dbs-portal/module-account
v1.0.0
Published
Account management and authentication UI module
Readme
@dbs-portal/module-account
Account management and authentication UI module
Installation
yarn add @dbs-portal/module-accountUsage
import { Account, createAccount } from '@dbs-portal/module-account'
// Use the default instance
const result = await defaultAccount.process(data)
// Or create a custom instance
const customAccount = createAccount({
enabled: true,
debug: true,
})
const customResult = await customAccount.process(data)API Reference
Classes
Account
Main class for @dbs-portal/module-account functionality.
Constructor:
new Account(config?: AccountConfig)
Methods:
getConfig(): AccountConfig- Get current configurationprocess<T>(data: T): Promise<AccountResult<T>>- Process data
Functions
createAccount(config?)
Factory function to create a new Account instance.
Development
# Build the package
yarn build
# Run tests
yarn test
# Type checking
yarn type-check
# Linting
yarn lint