Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions x-pack/plugins/enterprise_search/common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ export interface IConfiguredLimits {
appSearch: IAppSearchConfiguredLimits;
workplaceSearch: IWorkplaceSearchConfiguredLimits;
}

export interface IMetaPage {
current: number;
size: number;
total_pages: number;
total_results: number;
}

export interface IMeta {
page: IMetaPage;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { i18n } from '@kbn/i18n';

export const ADMIN = 'admin';
export const PRIVATE = 'private';
export const SEARCH = 'search';

export const TOKEN_TYPE_DESCRIPTION = {
[SEARCH]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.search.description', {
defaultMessage: 'Public Search Keys are used for search endpoints only.',
}),
[PRIVATE]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.private.description', {
defaultMessage:
'Private API Keys are used for read and/or write access on one or more Engines.',
}),
[ADMIN]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.admin.description', {
defaultMessage: 'Private Admin Keys are used to interact with the Credentials API.',
}),
};

export const TOKEN_TYPE_DISPLAY_NAMES = {
[SEARCH]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.search.name', {
defaultMessage: 'Public Search Key',
}),
[PRIVATE]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.private.name', {
defaultMessage: 'Private API Key',
}),
[ADMIN]: i18n.translate('xpack.enterpriseSearch.appSearch.tokens.admin.name', {
defaultMessage: 'Private Admin Key',
}),
};

export const TOKEN_TYPE_INFO = [
{ value: SEARCH, text: TOKEN_TYPE_DISPLAY_NAMES[SEARCH] },
{ value: PRIVATE, text: TOKEN_TYPE_DISPLAY_NAMES[PRIVATE] },
{ value: ADMIN, text: TOKEN_TYPE_DISPLAY_NAMES[ADMIN] },
];
Loading