@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
177 lines • 9.6 kB
TypeScript
import { SecretStoreMappingSkeleton, SecretStoreSkeleton } from '../../api/classic/SecretStoreApi';
import { State } from '../../shared/State';
import { ExportMetaData } from '../OpsTypes';
export type SecretStore = {
/**
* Create an empty secret store export template
* @returns {SecretStoreExportInterface} an empty secret store export template
*/
createSecretStoreExportTemplate(): SecretStoreExportInterface;
/**
* Read secret store by id
* @param {string} secretStoreId Secret store id
* @param {boolean} globalConfig true if global secret store is the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreSkeleton>} a promise that resolves to a secret store object
*/
readSecretStore(secretStoreId: string, globalConfig: boolean): Promise<SecretStoreSkeleton>;
/**
* Read all secret stores.
* @param {boolean} globalConfig true if global secret stores are the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreSkeleton[]>} a promise that resolves to an array of secret store objects
*/
readSecretStores(globalConfig: boolean): Promise<SecretStoreSkeleton[]>;
/**
* Read secret store mappings
* @param {string} secretStoreId Secret store id
* @param {string} secretStoreTypeId Secret store type id
* @param {boolean} globalConfig true if the secret store is global, false otherwise. Default: false.
* @returns {Promise<SecretStoreMappingSkeleton[]>} a promise that resolves to an array of secret store mapping objects
*/
readSecretStoreMappings(secretStoreId: string, secretStoreTypeId: string, globalConfig: boolean): Promise<SecretStoreMappingSkeleton[]>;
/**
* Export a single secret store by id. The response can be saved to file as is.
* @param {string} secretStoreId Secret store id
* @param {boolean} globalConfig true if global secret store is the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreExportInterface>} Promise resolving to a SecretStoreExportInterface object.
*/
exportSecretStore(secretStoreId: string, globalConfig: boolean): Promise<SecretStoreExportInterface>;
/**
* Export all secret stores. The response can be saved to file as is.
* @param {boolean} globalConfig true if global secret stores are the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreExportInterface>} Promise resolving to a SecretStoreExportInterface object.
*/
exportSecretStores(globalConfig: boolean): Promise<SecretStoreExportInterface>;
/**
* Update secret store
* @param {SecretStoreSkeleton} secretStoreData secret store to import
* @param {boolean} globalConfig true if the secret store is global, false otherwise. Default: false.
* @returns {Promise<SecretStoreSkeleton>} a promise that resolves to a secret store object
*/
updateSecretStore(secretStoreData: SecretStoreSkeleton, globalConfig: boolean): Promise<SecretStoreSkeleton>;
/**
* Update secret store mapping
* @param {string} secretStoreId Secret store id
* @param {string} secretStoreTypeId Secret store type id
* @param {SecretStoreMappingSkeleton} secretStoreMappingData secret store mapping to import
* @param {boolean} globalConfig true if the secret store mapping is global, false otherwise. Default: false.
* @returns {Promise<SecretStoreMappingSkeleton>} a promise that resolves to a secret store mapping object
*/
updateSecretStoreMapping(secretStoreId: string, secretStoreTypeId: string, secretStoreMappingData: SecretStoreMappingSkeleton, globalConfig: boolean): Promise<SecretStoreMappingSkeleton>;
/**
* Import secret stores and mappings
* @param {SecretStoreExportInterface} importData secret store import data
* @param {boolean} globalConfig true if the secret store mapping is global, false otherwise. Default: false.
* @param {string} secretStoreId optional secret store id. If supplied, only the secret store of that id is imported.
* @returns {Promise<SecretStoreExportSkeleton[]>} the imported secret stores and mappings
*/
importSecretStores(importData: SecretStoreExportInterface, globalConfig: boolean, secretStoreId?: string): Promise<SecretStoreExportSkeleton[]>;
};
declare const _default: (state: State) => SecretStore;
export default _default;
export type SecretStoreExportSkeleton = SecretStoreSkeleton & {
mappings: SecretStoreMappingSkeleton[];
};
export interface SecretStoreExportInterface {
meta?: ExportMetaData;
secretstore: Record<string, SecretStoreExportSkeleton>;
}
/**
* Create an empty secret store export template
* @returns {SecretStoreExportInterface} an empty secret store export template
*/
export declare function createSecretStoreExportTemplate({ state, }: {
state: State;
}): SecretStoreExportInterface;
/**
* Read secret store by id
* @param {string} secretStoreId Secret store id
* @param {boolean} globalConfig true if global secret store is the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreSkeleton>} a promise that resolves to a secret store object
*/
export declare function readSecretStore({ secretStoreId, globalConfig, state, }: {
secretStoreId: string;
globalConfig: boolean;
state: State;
}): Promise<SecretStoreSkeleton>;
/**
* Read all secret stores.
* @param {boolean} globalConfig true if global secret stores are the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreSkeleton[]>} a promise that resolves to an array of secret store objects
*/
export declare function readSecretStores({ globalConfig, state, }: {
globalConfig: boolean;
state: State;
}): Promise<SecretStoreSkeleton[]>;
/**
* Read secret store mappings
* @param {string} secretStoreId Secret store id
* @param {string} secretStoreTypeId Secret store type id
* @param {boolean} globalConfig true if the secret store is global, false otherwise. Default: false.
* @returns {Promise<SecretStoreMappingSkeleton[]>} a promise that resolves to an array of secret store mapping objects
*/
export declare function readSecretStoreMappings({ secretStoreId, secretStoreTypeId, globalConfig, state, }: {
secretStoreId: string;
secretStoreTypeId: string;
globalConfig: boolean;
state: State;
}): Promise<SecretStoreMappingSkeleton[]>;
/**
* Export a single secret store by id. The response can be saved to file as is.
* @param {string} secretStoreId Secret store id
* @param {boolean} globalConfig true if global secret store is the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreExportInterface>} Promise resolving to a SecretStoreExportInterface object.
*/
export declare function exportSecretStore({ secretStoreId, globalConfig, state, }: {
secretStoreId: string;
globalConfig: boolean;
state: State;
}): Promise<SecretStoreExportInterface>;
/**
* Export all secret stores. The response can be saved to file as is.
* @param {boolean} globalConfig true if global secret stores are the target of the operation, false otherwise. Default: false.
* @returns {Promise<SecretStoreExportInterface>} Promise resolving to a SecretStoreExportInterface object.
*/
export declare function exportSecretStores({ globalConfig, state, }: {
globalConfig: boolean;
state: State;
}): Promise<SecretStoreExportInterface>;
/**
* Update secret store
* @param {SecretStoreSkeleton} secretStoreData secret store to import
* @param {boolean} globalConfig true if the secret store is global, false otherwise. Default: false.
* @returns {Promise<SecretStoreSkeleton>} a promise that resolves to a secret store object
*/
export declare function updateSecretStore({ secretStoreData, globalConfig, state, }: {
secretStoreData: SecretStoreSkeleton;
globalConfig: boolean;
state: State;
}): Promise<SecretStoreSkeleton>;
/**
* Update secret store mapping
* @param {string} secretStoreId Secret store id
* @param {string} secretStoreTypeId Secret store type id
* @param {SecretStoreMappingSkeleton} secretStoreMappingData secret store mapping to import
* @param {boolean} globalConfig true if the secret store mapping is global, false otherwise. Default: false.
* @returns {Promise<SecretStoreMappingSkeleton>} a promise that resolves to a secret store mapping object
*/
export declare function updateSecretStoreMapping({ secretStoreId, secretStoreTypeId, secretStoreMappingData, globalConfig, state, }: {
secretStoreId: string;
secretStoreTypeId: string;
secretStoreMappingData: SecretStoreMappingSkeleton;
globalConfig: boolean;
state: State;
}): Promise<SecretStoreMappingSkeleton>;
/**
* Import secret stores and mappings
* @param {SecretStoreExportInterface} importData secret store import data
* @param {boolean} globalConfig true if the secret store mapping is global, false otherwise. Default: false.
* @param {string} secretStoreId optional secret store id. If supplied, only the secret store of that id is imported.
* @returns {Promise<SecretStoreExportSkeleton[]>} the imported secret stores and mappings
*/
export declare function importSecretStores({ importData, globalConfig, secretStoreId, state, }: {
importData: SecretStoreExportInterface;
globalConfig: boolean;
secretStoreId?: string;
state: State;
}): Promise<SecretStoreExportSkeleton[]>;
//# sourceMappingURL=SecretStoreOps.d.ts.map