spectramicro-user-management
v1.0.5
Published
```jsx import UserManagement from "spectramicro-user-management";
Downloads
12
Readme
Usage
import UserManagement from "spectramicro-user-management";
// Configuration
const config = {
baseUrl: "https://apigateway.mareana.com",
usersInitialRequest: {
// To fetch users using registered table
appId: "AUTHENTICATION",
resultsetId: "users_data_um",
filters: [],
metadata: true,
pageSize: 10,
},
rolesInitialRequest: {
// To fetch roles using registered filter
appId: "AUTHENTICATION",
filterId: "roles_id_filter",
filters: [],
q: "",
},
};
// Invoked on API request
const onRequest = () => {
console.log("onrequest");
};
// Invoked on API success
const onRequestSuccess = (data) => {
console.log("data", data);
};
// Invoked on API failure
const onRequestFailure = (err) => {
console.log("error", err);
};
// Usage
<UserManagement
config={config}
onRequest={onRequest}
onRequestSuccess={onRequestSuccess}
onRequestFailure={onRequestFailure}
/>;