From f2af5c1bd2e17fda450013d259ee90992907bd55 Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Mon, 10 Jan 2022 11:43:41 +0100 Subject: [PATCH] Export all Security, Spaces and EncryptedSavedObjects types referenced in the public API contracts. (#122421) --- .../server/crypto/index.ts | 1 + .../encrypted_saved_objects/server/index.ts | 16 ++++++++++++---- x-pack/plugins/security/common/index.ts | 17 +++++++++++++++-- x-pack/plugins/security/common/model/index.ts | 2 +- x-pack/plugins/security/public/index.ts | 2 ++ x-pack/plugins/security/server/index.ts | 1 + .../public/copy_saved_objects_to_space/index.ts | 6 +++++- x-pack/plugins/spaces/public/index.ts | 3 +++ 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts b/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts index 532702f213192..c4eec06ae5877 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/crypto/index.ts @@ -8,6 +8,7 @@ export type { EncryptedSavedObjectTypeRegistration, SavedObjectDescriptor, + AttributeToEncrypt, } from './encrypted_saved_objects_service'; export { EncryptedSavedObjectsService, descriptorToArray } from './encrypted_saved_objects_service'; export { EncryptionError, EncryptionErrorOperation } from './encryption_error'; diff --git a/x-pack/plugins/encrypted_saved_objects/server/index.ts b/x-pack/plugins/encrypted_saved_objects/server/index.ts index 873c8c0d52cb5..fef302739b7ad 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/index.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/index.ts @@ -10,11 +10,19 @@ import type { PluginConfigDescriptor, PluginInitializerContext } from 'src/core/ import { ConfigSchema } from './config'; import { EncryptedSavedObjectsPlugin } from './plugin'; -export type { EncryptedSavedObjectTypeRegistration } from './crypto'; -export { EncryptionError } from './crypto'; +export type { EncryptedSavedObjectTypeRegistration, AttributeToEncrypt } from './crypto'; +export { EncryptionError, EncryptionErrorOperation } from './crypto'; export type { EncryptedSavedObjectsPluginSetup, EncryptedSavedObjectsPluginStart } from './plugin'; -export type { EncryptedSavedObjectsClient } from './saved_objects'; -export type { IsMigrationNeededPredicate } from './create_migration'; +export type { + EncryptedSavedObjectsClient, + EncryptedSavedObjectsClientOptions, + ClientInstanciator, +} from './saved_objects'; +export type { + IsMigrationNeededPredicate, + CreateEncryptedSavedObjectsMigrationFn, + CreateEncryptedSavedObjectsMigrationFnOpts, +} from './create_migration'; export const config: PluginConfigDescriptor = { schema: ConfigSchema, diff --git a/x-pack/plugins/security/common/index.ts b/x-pack/plugins/security/common/index.ts index 1d05036191635..0da855b153be8 100644 --- a/x-pack/plugins/security/common/index.ts +++ b/x-pack/plugins/security/common/index.ts @@ -5,5 +5,18 @@ * 2.0. */ -export type { SecurityLicense } from './licensing'; -export type { AuthenticatedUser, PrivilegeDeprecationsService } from './model'; +export type { SecurityLicense, SecurityLicenseFeatures, LoginLayout } from './licensing'; +export type { + AuthenticatedUser, + AuthenticationProvider, + PrivilegeDeprecationsService, + PrivilegeDeprecationsRolesByFeatureIdRequest, + PrivilegeDeprecationsRolesByFeatureIdResponse, + Role, + RoleIndexPrivilege, + RoleKibanaPrivilege, + FeaturesPrivileges, + User, + ApiKey, + UserRealm, +} from './model'; diff --git a/x-pack/plugins/security/common/model/index.ts b/x-pack/plugins/security/common/model/index.ts index bc1666af3200c..84d7f261e51a7 100644 --- a/x-pack/plugins/security/common/model/index.ts +++ b/x-pack/plugins/security/common/model/index.ts @@ -8,7 +8,7 @@ export type { ApiKey, ApiKeyToInvalidate, ApiKeyRoleDescriptors } from './api_key'; export type { User, EditUser } from './user'; export { getUserDisplayName } from './user'; -export type { AuthenticatedUser } from './authenticated_user'; +export type { AuthenticatedUser, UserRealm } from './authenticated_user'; export { canUserChangePassword } from './authenticated_user'; export type { AuthenticationProvider } from './authentication_provider'; export { shouldProviderUseLoginForm } from './authentication_provider'; diff --git a/x-pack/plugins/security/public/index.ts b/x-pack/plugins/security/public/index.ts index 55925e142ff24..552442c0b8611 100644 --- a/x-pack/plugins/security/public/index.ts +++ b/x-pack/plugins/security/public/index.ts @@ -19,6 +19,8 @@ export type { SecurityPluginSetup, SecurityPluginStart }; export type { AuthenticatedUser } from '../common/model'; export type { SecurityLicense, SecurityLicenseFeatures } from '../common/licensing'; export type { UserMenuLink, SecurityNavControlServiceStart } from '../public/nav_control'; +export type { UiApi } from './ui_api'; +export type { PersonalInfoProps, ChangePasswordProps } from './account_management'; export type { AuthenticationServiceStart, AuthenticationServiceSetup } from './authentication'; diff --git a/x-pack/plugins/security/server/index.ts b/x-pack/plugins/security/server/index.ts index 8b0ffc3189156..2d85c7e2b2ba1 100644 --- a/x-pack/plugins/security/server/index.ts +++ b/x-pack/plugins/security/server/index.ts @@ -21,6 +21,7 @@ import { SecurityPlugin } from './plugin'; // These exports are part of public Security plugin contract, any change in signature of exported // functions or removal of exports should be considered as a breaking change. export type { + CreateAPIKeyParams, CreateAPIKeyResult, InvalidateAPIKeysParams, InvalidateAPIKeyResult, diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/index.ts b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/index.ts index 2443c8443c091..cfeb238ce987a 100644 --- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/index.ts +++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/index.ts @@ -6,4 +6,8 @@ */ export { getCopyToSpaceFlyoutComponent } from './components'; -export type { CopyToSpaceFlyoutProps, CopyToSpaceSavedObjectTarget } from './types'; +export type { + CopyToSpaceFlyoutProps, + CopyToSpaceSavedObjectTarget, + CopySavedObjectsToSpaceResponse, +} from './types'; diff --git a/x-pack/plugins/spaces/public/index.ts b/x-pack/plugins/spaces/public/index.ts index 86f1afd234be3..6571e2e22fb75 100644 --- a/x-pack/plugins/spaces/public/index.ts +++ b/x-pack/plugins/spaces/public/index.ts @@ -15,9 +15,12 @@ export type { Space, GetAllSpacesPurpose, GetSpaceResult } from '../common'; export type { SpacesData, SpacesDataEntry, SpacesApi } from './types'; +export type { SpacesManager } from './spaces_manager'; + export type { CopyToSpaceFlyoutProps, CopyToSpaceSavedObjectTarget, + CopySavedObjectsToSpaceResponse, } from './copy_saved_objects_to_space'; export type { LegacyUrlConflictProps, EmbeddableLegacyUrlConflictProps } from './legacy_urls';