@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
224 lines • 9.3 kB
TypeScript
import { type CircleOfTrustSkeleton } from '../api/CirclesOfTrustApi';
import { type Saml2ProviderSkeleton } from '../api/Saml2Api';
import { type ScriptSkeleton } from '../api/ScriptApi';
import { State } from '../shared/State';
import { type ExportMetaData } from './OpsTypes';
export type CirclesOfTrust = {
/**
* Create an empty agent export template
* @returns {CirclesOfTrustExportInterface} an empty agent export template
*/
createCirclesOfTrustExportTemplate(): CirclesOfTrustExportInterface;
/**
* Read all circles of trust
* @param {string[]} entityProviders filter by entity providers
*/
readCirclesOfTrust(entityProviders?: string[]): Promise<CircleOfTrustSkeleton[]>;
/**
* Read circle of trust
* @param {string} cotId circle of trust id/name
*/
readCircleOfTrust(cotId: string): Promise<CircleOfTrustSkeleton>;
/**
* Create circle of trust
* @param {string} cotId circle of trust id/name
* @param {CircleOfTrustSkeleton} cotData circle of trust data
*/
createCircleOfTrust(cotId?: string, cotData?: CircleOfTrustSkeleton): Promise<CircleOfTrustSkeleton>;
/**
* Update circle of trust
* @param {string} cotId circle of trust id/name
* @param cotData circle of trust data
*/
updateCircleOfTrust(cotId: string, cotData: CircleOfTrustSkeleton): Promise<CircleOfTrustSkeleton>;
/**
* Delete circle of trust
* @param {string} cotId circle of trust id/name
*/
deleteCircleOfTrust(cotId: string): Promise<CircleOfTrustSkeleton>;
/**
* Delete circles of trust
* @param {string[]} entityProviders filter by entity providers
*/
deleteCirclesOfTrust(entityProviders?: string[]): Promise<CircleOfTrustSkeleton[]>;
/**
* Export circle of trust
* @param {string} cotId circle of trust id/name
*/
exportCircleOfTrust(cotId: string): Promise<CirclesOfTrustExportInterface>;
/**
* Export all circles of trust
* @param {string[]} entityProviders filter by entity providers
*/
exportCirclesOfTrust(entityProviders?: string[]): Promise<CirclesOfTrustExportInterface>;
/**
* Import a circle of trust by id/name from file
* @param {string} cotId Circle of trust id/name
* @param {CirclesOfTrustExportInterface} importData Import data
* @returns {Promise<CircleOfTrustSkeleton[]>} a promise resolving to the circle of trust object that was created or updated. Note: If the circle of trust already exists and does not need updating, null is returned.
*/
importCircleOfTrust(cotId: string, importData: CirclesOfTrustExportInterface): Promise<CircleOfTrustSkeleton>;
/**
* Import first circle of trust
* @param {CirclesOfTrustExportInterface} importData Import data
* @returns {Promise<CircleOfTrustSkeleton[]>} a promise resolving to the circle of trust object that was created or updated. Note: If the circle of trust already exists and does not need updating, null is returned.
*/
importFirstCircleOfTrust(importData: CirclesOfTrustExportInterface): Promise<CircleOfTrustSkeleton>;
/**
* Import all circles of trust
* @param {string[]} entityProviders filter by entity providers
* @param {CirclesOfTrustExportInterface} importData Import data
* @returns {Promise<CircleOfTrustSkeleton[]>} a promise resolving to an array of circle of trust objects that were created or updated. Note: If a circle of trust already exists and does not need updating, it is omitted from the response array.
*/
importCirclesOfTrust(importData: CirclesOfTrustExportInterface, entityProviders?: string[]): Promise<CircleOfTrustSkeleton[]>;
/**
* Get all circles of trust
* @returns {Promise<CircleOfTrustSkeleton[]>} a promise resolving to an array of circle of trust objects
* @deprecated since v2.0.0 use {@link CirclesOfTrust.readCirclesOfTrust | readCirclesOfTrust} instead
* ```javascript
* readCirclesOfTrust(): Promise<CircleOfTrustSkeleton[]>
* ```
* @group Deprecated
*/
getCirclesOfTrust(): Promise<CircleOfTrustSkeleton[]>;
/**
* Get circle of trust
* @param {string} cotId circle of trust id/name
* @returns {Promise<CircleOfTrustSkeleton>} a promise resolving to a circle of trust object
* @deprecated since v2.0.0 use {@link CirclesOfTrust.readCircleOfTrust | readCircleOfTrust} instead
* ```javascript
* readCircleOfTrust(cotId: string): Promise<CircleOfTrustSkeleton>
* ```
* @group Deprecated
*/
getCircleOfTrust(cotId: string): Promise<CircleOfTrustSkeleton>;
};
declare const _default: (state: State) => CirclesOfTrust;
export default _default;
export interface CirclesOfTrustExportInterface {
meta?: ExportMetaData;
script: Record<string, ScriptSkeleton>;
saml: {
hosted: Record<string, Saml2ProviderSkeleton>;
remote: Record<string, Saml2ProviderSkeleton>;
metadata: Record<string, string[]>;
cot: Record<string, CircleOfTrustSkeleton>;
};
}
/**
* Create an empty agent export template
* @returns {CirclesOfTrustExportInterface} an empty agent export template
*/
export declare function createCirclesOfTrustExportTemplate({ state, }: {
state: State;
}): CirclesOfTrustExportInterface;
/**
* Get circles of trust
*/
export declare function readCirclesOfTrust({ entityProviders, state, }: {
entityProviders?: string[];
state: State;
}): Promise<CircleOfTrustSkeleton[]>;
/**
* Get circle of trust
* @param {string} cotId circle of trust id/name
* @returns {Promise<CirclesOfTrustExportInterface>} a promise that resolves to an CirclesOfTrustExportInterface object
*/
export declare function readCircleOfTrust({ cotId, state, }: {
cotId: string;
state: State;
}): Promise<CircleOfTrustSkeleton>;
/**
* Create circle of trust
* @param {string} cotId circle of trust id/name
* @param {CircleOfTrustSkeleton} cotData circle of trust data
* @returns {Promise<CirclesOfTrustExportInterface>} a promise that resolves to an CirclesOfTrustExportInterface object
*/
export declare function createCircleOfTrust({ cotId, cotData, state, }: {
cotId?: string;
cotData?: CircleOfTrustSkeleton;
state: State;
}): Promise<CircleOfTrustSkeleton>;
/**
* Update circle of trust
* @param {string} cotId circle of trust id/name
* @param {CircleOfTrustSkeleton} cotData circle of trust data
* @returns {Promise<CircleOfTrustSkeleton>} a promise that resolves to an CircleOfTrustSkeleton object
*/
export declare function updateCircleOfTrust({ cotId, cotData, state, }: {
cotId: string;
cotData: CircleOfTrustSkeleton;
state: State;
}): Promise<CircleOfTrustSkeleton>;
/**
* Delete circle of trust
* @param {string} cotId circle of trust id/name
* @returns {Promise<CirclesOfTrustExportInterface>} a promise that resolves to an CirclesOfTrustExportInterface object
*/
export declare function deleteCircleOfTrust({ cotId, state, }: {
cotId: string;
state: State;
}): Promise<CircleOfTrustSkeleton>;
/**
* Delete circles of trust
* @returns {Promise<CirclesOfTrustExportInterface>} a promise that resolves to an CirclesOfTrustExportInterface object
*/
export declare function deleteCirclesOfTrust({ entityProviders, state, }: {
entityProviders?: string[];
state: State;
}): Promise<CircleOfTrustSkeleton[]>;
/**
* Export circle of trust
* @param {string} cotId circle of trust id/name
* @returns {Promise<CirclesOfTrustExportInterface>} a promise that resolves to an CirclesOfTrustExportInterface object
*/
export declare function exportCircleOfTrust({ cotId, state, }: {
cotId: string;
state: State;
}): Promise<CirclesOfTrustExportInterface>;
/**
* Application export options
*/
export type CircleOfTrustExportOptions = {
/**
* Indicate progress
*/
indicateProgress: boolean;
};
/**
* Export circles of trust
* @returns {Promise<CirclesOfTrustExportInterface>} a promise that resolves to an CirclesOfTrustExportInterface object
*/
export declare function exportCirclesOfTrust({ entityProviders, options, state, }: {
entityProviders?: string[];
options?: CircleOfTrustExportOptions;
state: State;
}): Promise<CirclesOfTrustExportInterface>;
/**
* Import a circle of trust by id/name from file
* @param {String} cotId Circle of trust id/name
* @param {CirclesOfTrustExportInterface} importData import data
*/
export declare function importCircleOfTrust({ cotId, importData, state, }: {
cotId: string;
importData: CirclesOfTrustExportInterface;
state: State;
}): Promise<any>;
/**
* Import first circle of trust
* @param {CirclesOfTrustExportInterface} importData import data
*/
export declare function importFirstCircleOfTrust({ importData, state, }: {
importData: CirclesOfTrustExportInterface;
state: State;
}): Promise<CircleOfTrustSkeleton>;
/**
* Import circles of trust
* @param {CirclesOfTrustExportInterface} importData import data
*/
export declare function importCirclesOfTrust({ entityProviders, importData, state, }: {
entityProviders?: string[];
importData: CirclesOfTrustExportInterface;
state: State;
}): Promise<CircleOfTrustSkeleton[]>;
//# sourceMappingURL=CirclesOfTrustOps.d.ts.map