@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
130 lines • 4.35 kB
TypeScript
import { State } from '../shared/State';
import { IdObjectSkeletonInterface, PagedResult } from './ApiTypes';
export type UserSkeleton = IdObjectSkeletonInterface & {
realm: string;
username: string;
mail: string[];
givenName: string[];
objectClass: string[];
dn: string[];
cn: string[];
createTimestamp: string[];
employeeNumber: string[];
uid: string[];
universalid: string[];
inetUserStatus: string[];
sn: string[];
telephoneNumber?: string[];
modifyTimestamp?: string[];
postalAddress?: string[];
};
export type UserConfigSkeleton = {
devices: {
profile: Record<string, IdObjectSkeletonInterface>;
trusted: Record<string, IdObjectSkeletonInterface>;
'2fa': {
binding: Record<string, IdObjectSkeletonInterface>;
oath: Record<string, IdObjectSkeletonInterface>;
push: Record<string, IdObjectSkeletonInterface>;
webauthn: Record<string, IdObjectSkeletonInterface>;
};
};
groups: Record<string, IdObjectSkeletonInterface>;
oauth2: {
applications: Record<string, IdObjectSkeletonInterface>;
resources: {
labels: Record<string, IdObjectSkeletonInterface>;
sets: Record<string, IdObjectSkeletonInterface>;
};
};
policies: Record<string, IdObjectSkeletonInterface>;
services: Record<string, IdObjectSkeletonInterface>;
uma: {
auditHistory: Record<string, IdObjectSkeletonInterface>;
pendingrequests: Record<string, IdObjectSkeletonInterface>;
policies: Record<string, IdObjectSkeletonInterface>;
};
};
export type UserGroupSkeleton = IdObjectSkeletonInterface & {
username: string;
realm: string;
universalid: string[];
members: {
uniqueMember: string[];
};
dn: string[];
cn: string[];
objectclass: string[];
privileges: Record<string, boolean>[];
};
/**
* Get user by id
* @param {string} userId the user id
* @returns {Promise<UserSkeleton>} a promise that resolves to a user object
*/
export declare function getUser({ userId, state, }: {
userId: string;
state: State;
}): Promise<UserSkeleton>;
/**
* Get all users
* @returns {Promise<PagedResult<UserSkeleton>>} a promise that resolves to an array of user objects
*/
export declare function getUsers({ state, }: {
state: State;
}): Promise<PagedResult<UserSkeleton>>;
/**
* Get user configurations
* @param {string} userId the user id
* @returns {Promise<UserConfigSkeleton>} a promise that resolves to an object containing all the user configuration
*/
export declare function getUserConfig({ userId, state, }: {
userId: string;
state: State;
}): Promise<UserConfigSkeleton>;
/**
* Get user group by id
* @param {string} groupId the group id
* @returns {Promise<UserGroupSkeleton>} a promise that resolves to a group object
*/
export declare function getUserGroup({ groupId, state, }: {
groupId: string;
state: State;
}): Promise<UserGroupSkeleton>;
/**
* Get all user groups
* @returns {Promise<PagedResult<UserGroupSkeleton>>} a promise that resolves to an array of group objects
*/
export declare function getUserGroups({ state, }: {
state: State;
}): Promise<PagedResult<UserGroupSkeleton>>;
/**
* Put user
* @param {UserSkeleton} userData the user data
* @returns {Promise<UserSkeleton>} a promise that resolves to a user object
*/
export declare function putUser({ userData, state, }: {
userData: UserSkeleton;
state: State;
}): Promise<UserSkeleton>;
/**
* Put user configurations
* @param {string} userId the user id
* @param {UserConfigSkeleton} configData the user config data
* @returns {Promise<UserConfigSkeleton>} a promise that resolves to an object containing all the user configuration
*/
export declare function putUserConfig({ userId, configData, state, }: {
userId: string;
configData: UserConfigSkeleton;
state: State;
}): Promise<UserConfigSkeleton>;
/**
* Put user group by id
* @param {UserGroupSkeleton} groupData the group data
* @returns {Promise<UserGroupSkeleton>} a promise that resolves to a group object
*/
export declare function putUserGroup({ groupData, state, }: {
groupData: UserGroupSkeleton;
state: State;
}): Promise<UserGroupSkeleton>;
//# sourceMappingURL=UserApi.d.ts.map