Skip to content

Commit

Permalink
Export all Security, Spaces and EncryptedSavedObjects types reference…
Browse files Browse the repository at this point in the history
…d in the public API contracts. (#122421)
  • Loading branch information
azasypkin authored Jan 10, 2022
1 parent 3cca7f0 commit f2af5c1
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
16 changes: 12 additions & 4 deletions x-pack/plugins/encrypted_saved_objects/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 15 additions & 2 deletions x-pack/plugins/security/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion x-pack/plugins/security/common/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/security/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/security/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
*/

export { getCopyToSpaceFlyoutComponent } from './components';
export type { CopyToSpaceFlyoutProps, CopyToSpaceSavedObjectTarget } from './types';
export type {
CopyToSpaceFlyoutProps,
CopyToSpaceSavedObjectTarget,
CopySavedObjectsToSpaceResponse,
} from './types';
3 changes: 3 additions & 0 deletions x-pack/plugins/spaces/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit f2af5c1

Please sign in to comment.