import { State } from '../shared/State'; import { IdObjectSkeletonInterface, PagedResult } from './ApiTypes'; export declare const DEFAULT_PAGE_SIZE: number; /** * See {@link https://backstage.forgerock.com/docs/idm/7/rest-api-reference/sec-about-crest.html#about-crest-patch}. */ export interface ManagedObjectPatchOperationInterface { operation: 'add' | 'copy' | 'increment' | 'move' | 'remove' | 'replace' | 'transform'; field: string; value?: any; from?: string; } /** * 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} a promise that resolves to an ObjectSkeletonInterface */ export declare function getManagedObject({ type, id, fields, state, }: { type: string; id: string; fields: string[]; state: State; }): Promise; /** * 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} 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; /** * 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} 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; /** * Partially update a managed object, with an array of operations. * @param {string} type managed object type * @param {string} id managed object id * @param {ManagedObjectPatchOperationInterface[]} operations array of operations * @param {string} rev revision * @param {State} state library state * @returns {Promise} 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: ManagedObjectPatchOperationInterface[]; rev?: string; state: State; }): Promise; /** * 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} 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>; /** * 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>; /** * Delete managed object * @param {string} id managed object id * @param {State} state library state * @returns {Promise} 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; //# sourceMappingURL=ManagedObjectApi.d.ts.map