@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
73 lines • 3.07 kB
TypeScript
import { IdObjectSkeletonInterface } from '../../api/ApiTypes';
import { State } from '../../shared/State';
import { JwksInterface } from '../JoseOps';
export type ServiceAccount = {
/**
* Check if service accounts are available
* @returns {Promise<boolean>} true if service accounts are available, false otherwise
*/
isServiceAccountsFeatureAvailable(): Promise<boolean>;
/**
* Create service account
* @param {string} name Human-readable name of service account
* @param {string} description Description of service account
* @param {'Active' | 'Inactive'} accountStatus Service account status
* @param {string[]} scopes Scopes.
* @param {JwksInterface} jwks Java Web Key Set
* @returns {Promise<IdObjectSkeletonInterface>} A promise resolving to a service account object
*/
createServiceAccount(name: string, description: string, accountStatus: 'active' | 'inactive', scopes: string[], jwks: JwksInterface): Promise<IdObjectSkeletonInterface>;
/**
* Get service account
* @param {string} serviceAccountId service account id
* @returns {Promise<ServiceAccountType>} a promise resolving to a service account object
*/
getServiceAccount(serviceAccountId: string): Promise<ServiceAccountType>;
};
declare const _default: (state: State) => ServiceAccount;
export default _default;
export declare const SERVICE_ACCOUNT_ALLOWED_SCOPES: string[];
export declare const SERVICE_ACCOUNT_DEFAULT_SCOPES: string[];
export type ServiceAccountType = IdObjectSkeletonInterface & {
name: string;
description: string;
accountStatus: 'active' | 'inactive';
scopes: string[];
jwks: string;
};
/**
* Check if service accounts are available
* @returns {Promise<boolean>} true if service accounts are available, false otherwise
*/
export declare function isServiceAccountsFeatureAvailable({ state, }: {
state: State;
}): Promise<boolean>;
/**
* Create service account
* @param {string} name Human-readable name of service account
* @param {string} description Description of service account
* @param {'active' | 'inactive'} accountStatus Service account status
* @param {string[]} scopes Scopes.
* @param {JwksInterface} jwks Java Web Key Set
* @param {State} state library state
* @returns {Promise<ServiceAccountType>} A promise resolving to a service account object
*/
export declare function createServiceAccount({ name, description, accountStatus, scopes, jwks, state, }: {
name: string;
description: string;
accountStatus: 'active' | 'inactive';
scopes: string[];
jwks: JwksInterface;
state: State;
}): Promise<ServiceAccountType>;
/**
* Get service account
* @param {string} serviceAccountId service account id
* @param {State} state library state
* @returns {Promise} a promise resolving to a service account object
*/
export declare function getServiceAccount({ serviceAccountId, state, }: {
serviceAccountId: string;
state: State;
}): Promise<ServiceAccountType>;
//# sourceMappingURL=ServiceAccountOps.d.ts.map