import { type IdObjectSkeletonInterface } from '../api/ApiTypes'; import { CircleOfTrustSkeleton } from '../api/CirclesOfTrustApi'; import { type OAuth2ClientSkeleton } from '../api/OAuth2ClientApi'; import { Saml2ProviderSkeleton } from '../api/Saml2Api'; import { type ScriptSkeleton } from '../api/ScriptApi'; import { State } from '../shared/State'; import { ConnectorSkeleton } from './ConnectorOps'; import { MappingSkeleton } from './MappingOps'; import { type ExportMetaData } from './OpsTypes'; export type Application = { /** * Create an empty application export template * @returns {ApplicationExportInterface} an empty application export template */ createApplicationExportTemplate(): ApplicationExportInterface; /** * Get application managed object type * @returns {String} application managed object type in this realm */ getRealmManagedApplication(): string; /** * Create application * @param {string} applicationId application id/name * @param {ApplicationSkeleton} applicationData application data * @returns {Promise} a promise that resolves to an application object */ createApplication(applicationId: string, applicationData: ApplicationSkeleton): Promise; /** * Read application * @param {string} applicationId application uuid * @returns {Promise} a promise that resolves to an application object */ readApplication(applicationId: string): Promise; /** * Read application by name * @param {string} applicationName application name * @returns {Promise} a promise that resolves to an application object */ readApplicationByName(applicationName: string): Promise; /** * Read all applications. Results are sorted aphabetically. * @returns {Promise} a promise that resolves to an array of application objects */ readApplications(): Promise; /** * Update application * @param {string} applicationId application uuid * @param {ApplicationSkeleton} applicationData application data * @returns {Promise} a promise that resolves to an application object */ updateApplication(applicationId: string, applicationData: ApplicationSkeleton): Promise; /** * Delete application * @param {string} applicationId application uuid * @param {boolean} deep deep delete (remove dependencies) * @returns {Promise} a promise that resolves to an application object */ deleteApplication(applicationId: string, deep?: boolean): Promise; /** * Delete application by name * @param {string} applicationName application name * @param {boolean} deep deep delete (remove dependencies) * @returns {Promise} a promise that resolves to an application object */ deleteApplicationByName(applicationName: string, deep?: boolean): Promise; /** * Delete all applications * @param {boolean} deep deep delete (remove dependencies) * @returns {Promise} a promise that resolves to an array of application objects */ deleteApplications(deep?: boolean): Promise; /** * Query applications * @param filter CREST search filter * @param fields array of fields to return */ queryApplications(filter: string, fields?: string[]): Promise; /** * Export application. The response can be saved to file as is. * @param {string} applicationId application uuid * @param {ApplicationExportOptions} options export options * @returns {Promise; /** * Export application by name. The response can be saved to file as is. * @param {string} applicationName application name * @param {ApplicationExportOptions} options export options * @returns {Promise; /** * Export all applications. The response can be saved to file as is. * @returns {Promise} Promise resolving to an ApplicationExportInterface object. */ exportApplications(options?: ApplicationExportOptions): Promise; /** * Import application. The import data is usually read from an application export file. * @param {string} applicationId application uuid * @param {ApplicationExportInterface} importData application import data. * @returns {Promise} Promise resolving to an application object. */ importApplication(applicationId: string, importData: ApplicationExportInterface, options: ApplicationImportOptions): Promise; /** * Import application by name. The import data is usually read from an application export file. * @param {string} applicationName application name * @param {ApplicationExportInterface} importData application import data. * @returns {Promise} Promise resolving to an application object. */ importApplicationByName(applicationName: string, importData: ApplicationExportInterface, options: ApplicationImportOptions): Promise; /** * Import first application. The import data is usually read from an application export file. * @param {ApplicationExportInterface} importData application import data. */ importFirstApplication(importData: ApplicationExportInterface, options: ApplicationImportOptions): Promise; /** * Import applications. The import data is usually read from an application export file. * @param {ApplicationExportInterface} importData application import data. */ importApplications(importData: ApplicationExportInterface, options: ApplicationImportOptions): Promise; }; declare const _default: (state: State) => Application; export default _default; export type ApplicationSkeleton = IdObjectSkeletonInterface & { authoritative: boolean; connectorId: string; description: string; icon: string; mappingNames: string[]; members: any; name: string; owners: any; roles: any; ssoEntities: { idpLocation: string; idpPrivateId: string; spLocation: string; spPrivate: string; }; templateName: string; templateVersion: string; uiConfig: object; url: string; }; /** * Export format for applications */ export interface ApplicationExportInterface { /** * Metadata */ meta?: ExportMetaData; /** * Managed applications */ managedApplication: Record; /** * Scripts */ script?: Record; /** * OAuth2 clients */ application?: Record; /** * Saml providers, circles of trust, and metadata */ saml?: { hosted?: Record; remote?: Record; metadata?: Record; cot?: Record; }; /** * connectors */ connector?: Record; /** * mappings */ mapping?: Record; } /** * Application export options */ export type ApplicationExportOptions = { /** * Include any dependencies (scripts, oauth2 clients, saml providers, circles of trust, etc). */ deps: boolean; /** * Use string arrays to store multi-line text in scripts. */ useStringArrays: boolean; }; /** * Application export options */ export type ApplicationImportOptions = { /** * Import any dependencies (scripts). */ deps: boolean; }; export declare function createApplicationExportTemplate({ state, }: { state: State; }): ApplicationExportInterface; export declare function getRealmManagedApplication({ state }: { state: State; }): string; export declare function createApplication({ applicationId, applicationData, state, }: { applicationId: string; applicationData: ApplicationSkeleton; state: State; }): Promise; export declare function readApplication({ applicationId, fields, state, }: { applicationId: string; fields?: string[]; state: State; }): Promise; export declare function readApplicationByName({ applicationName, fields, state, }: { applicationName: string; fields?: string[]; state: State; }): Promise; export declare function readApplications({ fields, state, }: { fields?: string[]; state: State; }): Promise; export declare function updateApplication({ applicationId, applicationData, state, }: { applicationId: string; applicationData: IdObjectSkeletonInterface; state: State; }): Promise; export declare function deleteApplication({ applicationId, options, state, }: { applicationId: string; options?: { deep: boolean; }; state: State; }): Promise; export declare function deleteApplicationByName({ applicationName, options, state, }: { applicationName: string; options?: { deep: boolean; }; state: State; }): Promise; export declare function deleteApplications({ options, state, }: { options?: { deep: boolean; }; state: State; }): Promise; export declare function queryApplications({ filter, fields, state, }: { filter: string; fields?: string[]; state: State; }): Promise; export declare function exportApplication({ applicationId, options, state, }: { applicationId: string; options: ApplicationExportOptions; state: State; }): Promise; export declare function exportApplicationByName({ applicationName, options, state, }: { applicationName: string; options: ApplicationExportOptions; state: State; }): Promise; export declare function exportApplications({ options, state, }: { options: ApplicationExportOptions; state: State; }): Promise; /** * Import application * @param {string} clientId client id * @param {ApplicationExportInterface} importData import data * @param {ApplicationImportOptions} options import options * @returns {Promise} a promise resolving to an oauth2 client */ export declare function importApplication({ applicationId, importData, options, state, }: { applicationId: string; importData: ApplicationExportInterface; options?: ApplicationImportOptions; state: State; }): Promise; /** * Import application * @param {string} clientId client id * @param {ApplicationExportInterface} importData import data * @param {ApplicationImportOptions} options import options * @returns {Promise} a promise resolving to an oauth2 client */ export declare function importApplicationByName({ applicationName: applicationName, importData, options, state, }: { applicationName: string; importData: ApplicationExportInterface; options?: ApplicationImportOptions; state: State; }): Promise; /** * Import first application * @param {ApplicationExportInterface} importData import data * @param {ApplicationImportOptions} options import options * @returns {Promise} a promise resolving to an array of oauth2 clients */ export declare function importFirstApplication({ importData, options, state, }: { importData: ApplicationExportInterface; options?: ApplicationImportOptions; state: State; }): Promise; /** * Import applications * @param {ApplicationExportInterface} importData import data * @param {ApplicationImportOptions} options import options * @returns {Promise} a promise resolving to an array of oauth2 clients */ export declare function importApplications({ importData, options, state, }: { importData: ApplicationExportInterface; options?: ApplicationImportOptions; state: State; }): Promise; //# sourceMappingURL=ApplicationOps.d.ts.map