@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
103 lines • 4.25 kB
TypeScript
import { State } from '../shared/State';
import { IdObjectSkeletonInterface, PagedResult, PatchOperationInterface } from './ApiTypes';
export declare const DEFAULT_PAGE_SIZE: number;
/**
* Get managed object
* @param {string} type managed object type, e.g. alpha_user or user
* @param {string} id managed object id
* @param {string[]} id array of fields to include
* @param {State} state library state
* @returns {Promise<IdObjectSkeletonInterface>} a promise that resolves to an ObjectSkeletonInterface
*/
export declare function getManagedObject({ type, id, fields, state, }: {
type: string;
id: string;
fields: string[];
state: State;
}): Promise<IdObjectSkeletonInterface>;
/**
* Create managed object with server-generated id
* @param {string} moType managed object type
* @param {IdObjectSkeletonInterface} moData managed object data
* @param {State} state library state
* @returns {Promise<IdObjectSkeletonInterface>} a promise that resolves to an object containing a managed object
*/
export declare function createManagedObject({ moType, moData, state, }: {
moType: string;
moData: IdObjectSkeletonInterface;
state: State;
}): Promise<IdObjectSkeletonInterface>;
/**
* Create or update managed object
* @param {string} id managed object id
* @param {IdObjectSkeletonInterface} moData managed object
* @param {boolean} failIfExists fail if exists
* @param {State} state library state
* @returns {Promise<IdObjectSkeletonInterface>} a promise that resolves to an object containing a managed object
*/
export declare function putManagedObject({ type, id, moData, failIfExists, state, }: {
type: string;
id: string;
moData: IdObjectSkeletonInterface;
failIfExists?: boolean;
state: State;
}): Promise<IdObjectSkeletonInterface>;
/**
* Partially update a managed object, with an array of operations.
* @param {string} type managed object type
* @param {string} id managed object id
* @param {PatchOperationInterface[]} operations array of operations
* @param {string} rev revision
* @param {State} state library state
* @returns {Promise<IdObjectSkeletonInterface>} a promise that resolves to an object containing a managed object
*/
export declare function patchManagedObject({ type, id, operations: operations, rev, state, }: {
type: string;
id: string;
operations: PatchOperationInterface[];
rev?: string;
state: State;
}): Promise<IdObjectSkeletonInterface>;
/**
* Query managed object
* @param {string} type managed object type, e.g. alpha_user or user
* @param {string} filter CREST search filter
* @param {string[]} id array of fields to include
* @param {string} pageCookie paged results cookie
* @param {State} state library state
* @returns {Promise<IdObjectSkeletonInterface[]>} a promise that resolves to an ObjectSkeletonInterface
*/
export declare function queryManagedObjects({ type, filter, fields, pageSize, pageCookie, state, }: {
type: string;
filter: string;
fields?: string[];
pageSize?: number;
pageCookie?: string;
state: State;
}): Promise<PagedResult<IdObjectSkeletonInterface>>;
/**
* Query managed objects
* @param {string} type managed object type
* @param {string[]} fields fields to retrieve
* @param {string} pageCookie paged results cookie
* @returns {Promise<{result: any[]; resultCount: number; pagedResultsCookie: any; totalPagedResultsPolicy: string; totalPagedResults: number; remainingPagedResults: number;}>} a promise that resolves to managed objects of the desired type
*/
export declare function queryAllManagedObjectsByType({ type, fields, pageSize, pageCookie, state, }: {
type: string;
fields?: string[];
pageSize?: number;
pageCookie?: string;
state: State;
}): Promise<PagedResult<IdObjectSkeletonInterface>>;
/**
* Delete managed object
* @param {string} id managed object id
* @param {State} state library state
* @returns {Promise<IdObjectSkeletonInterface>} a promise that resolves to an object containing a managed object
*/
export declare function deleteManagedObject({ type, id, state, }: {
type: string;
id: string;
state: State;
}): Promise<IdObjectSkeletonInterface>;
//# sourceMappingURL=ManagedObjectApi.d.ts.map