UNPKG

@rockcarver/frodo-lib

Version:

A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.

103 lines 4.52 kB
import { EngineConfigurationSkeleton, ScriptingContextSkeleton, ScriptTypeSkeleton } from '../api/ScriptTypeApi'; import { State } from '../shared/State'; import { ExportMetaData } from './OpsTypes'; export type ScriptType = { /** * Create an empty scriptType export template * @returns {ScriptTypeExportInterface} an empty scriptType export template */ createScriptTypeExportTemplate(): ScriptTypeExportInterface; /** * Read scriptType by id * @param {string} scriptTypeId ScriptType id * @returns {Promise<ScriptTypeSkeleton>} a promise that resolves to a scriptType object */ readScriptType(scriptTypeId: string): Promise<ScriptTypeSkeleton>; /** * Read all scriptTypes. * @returns {Promise<ScriptTypeSkeleton[]>} a promise that resolves to an array of scriptType objects */ readScriptTypes(): Promise<ScriptTypeSkeleton[]>; /** * Export all scriptTypes. The response can be saved to file as is. * @returns {Promise<ScriptTypeExportInterface>} Promise resolving to a ScriptTypeExportInterface object. */ exportScriptTypes(): Promise<ScriptTypeExportInterface>; /** * Update script type * @param {string} scriptTypeId script type id * @param {ScriptTypeSkeleton} scriptTypeData script type data * @returns {Promise<ScriptTypeSkeleton>} a promise resolving to a script type object */ updateScriptType(scriptTypeId: string, scriptTypeData: ScriptTypeSkeleton): Promise<ScriptTypeSkeleton>; /** * Import script types * @param {ScriptTypeExportInterface} importData script type import data * @param {string} scriptTypeId Optional script type id. If supplied, only the script type of that id is imported. Takes priority over scriptTypeUrl if both are provided. * @returns {Promise<ScriptTypeSkeleton[]>} the imported script types */ importScriptTypes(importData: ScriptTypeExportInterface, scriptTypeId?: string): Promise<ScriptTypeSkeleton[]>; }; declare const _default: (state: State) => ScriptType; export default _default; export type ScriptTypeExportSkeleton = ScriptTypeSkeleton & { engineConfiguration: EngineConfigurationSkeleton; context: ScriptingContextSkeleton; }; export interface ScriptTypeExportInterface { meta?: ExportMetaData; scripttype: Record<string, ScriptTypeExportSkeleton>; } /** * Create an empty scriptType export template * @returns {ScriptTypeExportInterface} an empty scriptType export template */ export declare function createScriptTypeExportTemplate({ state, }: { state: State; }): ScriptTypeExportInterface; /** * Read scriptType by id * @param {string} scriptTypeId ScriptType id * @returns {Promise<ScriptTypeSkeleton>} a promise that resolves to a scriptType object */ export declare function readScriptType({ scriptTypeId, state, }: { scriptTypeId: string; state: State; }): Promise<ScriptTypeSkeleton>; /** * Read all scriptTypes. * @returns {Promise<ScriptTypeSkeleton[]>} a promise that resolves to an array of scriptType objects */ export declare function readScriptTypes({ state, }: { state: State; }): Promise<ScriptTypeSkeleton[]>; /** * Export all scriptTypes. The response can be saved to file as is. * @returns {Promise<ScriptTypeExportInterface>} Promise resolving to a ScriptTypeExportInterface object. */ export declare function exportScriptTypes({ state, }: { state: State; }): Promise<ScriptTypeExportInterface>; /** * Update script type * @param {string} scriptTypeId script type id * @param {ScriptTypeSkeleton} scriptTypeData script type config object * @returns {Promise<ScriptTypeSkeleton>} a promise that resolves to a script type object */ export declare function updateScriptType({ scriptTypeId, scriptTypeData, state, }: { scriptTypeId: string; scriptTypeData: ScriptTypeSkeleton; state: State; }): Promise<ScriptTypeSkeleton>; /** * Import script types * @param {string} scriptTypeId Optional script type id. If supplied, only the script type of that id is imported. Takes priority over scriptTypeUrl if both are provided. * @param {ScriptTypeExportInterface} importData script type import data * @returns {Promise<ScriptTypeExportSkeleton[]>} the imported script types */ export declare function importScriptTypes({ scriptTypeId, importData, state, }: { scriptTypeId?: string; importData: ScriptTypeExportInterface; state: State; }): Promise<ScriptTypeExportSkeleton[]>; //# sourceMappingURL=ScriptTypeOps.d.ts.map