@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
264 lines • 11 kB
TypeScript
import { type NoIdObjectSkeletonInterface } from '../api/ApiTypes';
import { type OAuth2ClientSkeleton } from '../api/OAuth2ClientApi';
import { type ScriptSkeleton } from '../api/ScriptApi';
import { State } from '../shared/State';
import { ExportMetaData } from './OpsTypes';
export type OAuth2Client = {
/**
* Create an empty OAuth2 client export template
* @returns {OAuth2ClientExportInterface} an empty OAuth2 client export template
*/
createOAuth2ClientExportTemplate(): OAuth2ClientExportInterface;
/**
* Read all OAuth2 clients
* @returns {Promise<OAuth2ClientSkeleton[]>} a promise that resolves to an array of oauth2client objects
*/
readOAuth2Clients(): Promise<OAuth2ClientSkeleton[]>;
/**
* Read OAuth2 client
* @param {string} clientId client id
* @returns {Promise<OAuth2ClientSkeleton>} a promise that resolves to an oauth2client object
*/
readOAuth2Client(clientId: string): Promise<OAuth2ClientSkeleton>;
/**
* Create OAuth2 client
* @param {string} clientId client id
* @param {any} clientData oauth2client object
* @returns {Promise<OAuth2ClientSkeleton>} a promise that resolves to an oauth2client object
*/
createOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise<OAuth2ClientSkeleton>;
/**
* Update or create OAuth2 client
* @param {string} clientId client id
* @param {any} clientData oauth2client object
* @returns {Promise<any>} a promise that resolves to an oauth2client object
*/
updateOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise<OAuth2ClientSkeleton>;
/**
* Delete all OAuth2 clients
* @returns {Promise<OAuth2ClientSkeleton[]>} a promise that resolves to an array of oauth2client objects
*/
deleteOAuth2Clients(): Promise<OAuth2ClientSkeleton[]>;
/**
* Delete OAuth2 client
* @param {string} clientId client id
* @returns {Promise<OAuth2ClientSkeleton>} a promise that resolves to an oauth2client object
*/
deleteOAuth2Client(clientId: string): Promise<OAuth2ClientSkeleton>;
/**
* Export all OAuth2 clients
* @param {OAuth2ClientExportOptions} options export options
* @returns {OAuth2ClientExportInterface} export data
*/
exportOAuth2Clients(options?: OAuth2ClientExportOptions): Promise<OAuth2ClientExportInterface>;
/**
* Export OAuth2 client by ID
* @param {string} clientId oauth2 client id
* @param {OAuth2ClientExportOptions} options export options
* @returns {OAuth2ClientExportInterface} export data
*/
exportOAuth2Client(clientId: string, options?: OAuth2ClientExportOptions): Promise<OAuth2ClientExportInterface>;
/**
* Import OAuth2 Client by ID
* @param {string} clientId client id
* @param {OAuth2ClientExportInterface} importData import data
* @param {OAuth2ClientImportOptions} options import options
* @returns {Promise<OAuth2ClientSkeleton>} a promise resolving to an oauth2 client
*/
importOAuth2Client(clientId: string, importData: OAuth2ClientExportInterface, options?: OAuth2ClientImportOptions): Promise<OAuth2ClientSkeleton>;
/**
* Import first OAuth2 Client
* @param {OAuth2ClientExportInterface} importData import data
* @param {OAuth2ClientImportOptions} options import options
* @returns {Promise<OAuth2ClientSkeleton>} a promise resolving to an oauth2 client
*/
importFirstOAuth2Client(importData: OAuth2ClientExportInterface, options?: OAuth2ClientImportOptions): Promise<OAuth2ClientSkeleton>;
/**
* Import OAuth2 Clients
* @param {OAuth2ClientExportInterface} importData import data
* @param {OAuth2ClientImportOptions} options import options
* @returns {Promise<OAuth2ClientSkeleton[]>} a promise resolving to an array of oauth2 clients
*/
importOAuth2Clients(importData: OAuth2ClientExportInterface, options?: OAuth2ClientImportOptions): Promise<OAuth2ClientSkeleton[]>;
/**
* Get all OAuth2 clients
* @returns {Promise<OAuth2ClientSkeleton[]>} a promise that resolves to an array of oauth2client objects
* @deprecated since v2.0.0 use {@link OAuth2Client.readOAuth2Clients | readOAuth2Clients} instead
* ```javascript
* readOAuth2Clients(): Promise<OAuth2ClientSkeleton[]>
* ```
* @group Deprecated
*/
getOAuth2Clients(): Promise<OAuth2ClientSkeleton[]>;
/**
* Get OAuth2 client
* @param {string} clientId client id
* @returns {Promise<OAuth2ClientSkeleton>} a promise that resolves to an oauth2client object
* @deprecated since v2.0.0 use {@link OAuth2Client.readOAuth2Client | readOAuth2Client} instead
* ```javascript
* readOAuth2Client(clientId: string): Promise<OAuth2ClientSkeleton>
* ```
* @group Deprecated
*/
getOAuth2Client(clientId: string): Promise<OAuth2ClientSkeleton>;
/**
* Put OAuth2 client
* @param {string} clientId client id
* @param {OAuth2ClientSkeleton} clientData oauth2client object
* @returns {Promise<any>} a promise that resolves to an oauth2client object
* @deprecated since v2.0.0 use {@link OAuth2Client.updateOAuth2Client | updateOAuth2Client} or {@link OAuth2Client.createOAuth2Client | createOAuth2Client} instead
* ```javascript
* updateOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise<OAuth2ClientSkeleton>
* createOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise<OAuth2ClientSkeleton>
* ```
* @group Deprecated
*/
putOAuth2Client(clientId: string, clientData: OAuth2ClientSkeleton): Promise<OAuth2ClientSkeleton>;
};
declare const _default: (state: State) => OAuth2Client;
export default _default;
/**
* OAuth2 client export options
*/
export interface OAuth2ClientExportOptions {
/**
* Use string arrays to store multi-line text in scripts.
*/
useStringArrays: boolean;
/**
* Include any dependencies (scripts).
*/
deps: boolean;
}
/**
* OAuth2 client import options
*/
export interface OAuth2ClientImportOptions {
/**
* Include any dependencies (scripts).
*/
deps: boolean;
}
export interface OAuth2ClientExportInterface {
meta?: ExportMetaData;
script?: Record<string, ScriptSkeleton>;
application: Record<string, OAuth2ClientSkeleton>;
}
/**
* Create an empty OAuth2 client export template
* @returns {OAuth2ClientExportInterface} an empty OAuth2 client export template
*/
export declare function createOAuth2ClientExportTemplate({ state, }: {
state: State;
}): OAuth2ClientExportInterface;
/**
* Get all OAuth2 clients
* @returns {Promise<OAuth2ClientSkeleton[]>} a promise that resolves to an array of oauth2client objects
*/
export declare function readOAuth2Clients({ state, }: {
state: State;
}): Promise<OAuth2ClientSkeleton[]>;
/**
* Get OAuth2 client
* @param {string} clientId client id
* @returns {Promise<any>} a promise that resolves to an oauth2client object
*/
export declare function readOAuth2Client({ clientId, state, }: {
clientId: string;
state: State;
}): Promise<OAuth2ClientSkeleton>;
/**
* Create OAuth2 client
* @param {string} clientId client id
* @param {any} clientData oauth2client object
* @returns {Promise<OAuth2ClientSkeleton>} a promise that resolves to an oauth2client object
*/
export declare function createOAuth2Client({ clientId, clientData, state, }: {
clientId: string;
clientData: OAuth2ClientSkeleton | NoIdObjectSkeletonInterface;
state: State;
}): Promise<OAuth2ClientSkeleton>;
/**
* Update or create OAuth2 client
* @param {string} clientId client id
* @param {any} clientData oauth2client object
* @returns {Promise<OAuth2ClientSkeleton>} a promise that resolves to an oauth2client object
*/
export declare function updateOAuth2Client({ clientId, clientData, state, }: {
clientId: string;
clientData: OAuth2ClientSkeleton | NoIdObjectSkeletonInterface;
state: State;
}): Promise<OAuth2ClientSkeleton>;
/**
* Delete all OAuth2 clients
* @param {string} clientId client id
* @returns {Promise<OAuth2ClientSkeleton[]>} a promise that resolves to an oauth2client object
*/
export declare function deleteOAuth2Clients({ state, }: {
state: State;
}): Promise<OAuth2ClientSkeleton[]>;
/**
* Delete OAuth2 client
* @param {string} clientId client id
* @returns {Promise<OAuth2ClientSkeleton>} a promise that resolves to an oauth2client object
*/
export declare function deleteOAuth2Client({ clientId, state, }: {
clientId: string;
state: State;
}): Promise<OAuth2ClientSkeleton>;
/**
* Export all OAuth2 clients
* @param {OAuth2ClientExportOptions} options export options
* @returns {Promise<OAuth2ClientExportInterface>} export data
*/
export declare function exportOAuth2Clients({ options, state, }: {
options?: OAuth2ClientExportOptions;
state: State;
}): Promise<OAuth2ClientExportInterface>;
/**
* Export OAuth2 client by ID
* @param {string} clientId oauth2 client id
* @param {OAuth2ClientExportOptions} options export options
* @returns {Promise<OAuth2ClientExportInterface>} export data
*/
export declare function exportOAuth2Client({ clientId, options, state, }: {
clientId: string;
options?: OAuth2ClientExportOptions;
state: State;
}): Promise<OAuth2ClientExportInterface>;
/**
* Import OAuth2 Client by ID
* @param {string} clientId client id
* @param {OAuth2ClientExportInterface} importData import data
* @param {OAuth2ClientImportOptions} options import options
* @returns {Promise<OAuth2ClientSkeleton>} a promise resolving to an oauth2 client
*/
export declare function importOAuth2Client({ clientId, importData, options, state, }: {
clientId: string;
importData: OAuth2ClientExportInterface;
options?: OAuth2ClientImportOptions;
state: State;
}): Promise<OAuth2ClientSkeleton>;
/**
* Import first OAuth2 Client
* @param {OAuth2ClientExportInterface} importData import data
* @param {OAuth2ClientImportOptions} options import options
* @returns {Promise<OAuth2ClientSkeleton>} a promise resolving to an oauth2 client
*/
export declare function importFirstOAuth2Client({ importData, options, state, }: {
importData: OAuth2ClientExportInterface;
options?: OAuth2ClientImportOptions;
state: State;
}): Promise<OAuth2ClientSkeleton>;
/**
* Import OAuth2 Clients
* @param {OAuth2ClientExportInterface} importData import data
* @param {OAuth2ClientImportOptions} options import options
* @returns {Promise<OAuth2ClientSkeleton[]>} a promise resolving to an array of oauth2 clients
*/
export declare function importOAuth2Clients({ importData, options, state, }: {
importData: OAuth2ClientExportInterface;
options?: OAuth2ClientImportOptions;
state: State;
}): Promise<OAuth2ClientSkeleton[]>;
//# sourceMappingURL=OAuth2ClientOps.d.ts.map