dc-management-sdk-js
Version:
Amplience Dynamic Content Management SDK
170 lines (169 loc) • 6.29 kB
TypeScript
import { HalResource } from '../hal/models/HalResource';
import { AssignedContentType } from './AssignedContentType';
import { Page } from './Page';
import { Pageable } from './Pageable';
import { SearchIndexKey } from './SearchIndexKey';
import { SearchIndexSettings } from './SearchIndexSettings';
import { SearchIndexStatistics } from './SearchIndexStatistics';
import { SearchIndexTopHitsCollection } from './SearchIndexTopHits';
import { SearchesOrderBy, SearchIndexTopSearchesCollection } from './SearchIndexTopSearches';
import { Sortable } from './Sortable';
import { SearchIndexSearchesWithNoResultsCollection } from './SearchIndexSearchesWithNoResults';
import { SearchIndexTopFiltersNoResultSearchCollection } from './SearchIndexTopFiltersNoResultSearch';
import { SearchIndexUsersCount } from './SearchIndexUsersCount';
import { SearchIndexSearchesCount } from './SearchIndexSearchesCount';
import { SearchIndexNoResultsRate } from './SearchIndexNoResultsRate';
import { Hub } from './Hub';
import { RetryOptions } from '../utils/Retryer';
export declare const SEARCH_INDEX_RETRY_OPTIONS: RetryOptions;
/**
* Class representing an Algolia Search Index.
*/
export declare class SearchIndex extends HalResource {
/**
* Unique id generated on creation.
*/
id?: string;
/**
* Id of the replicas parent index (only present on replica indexes).
*/
parentId?: string;
/**
* Number of replica indexes for this index (only present on non-replica indexes).
*/
replicaCount?: number;
/**
* Generated index name including the hub name and user defined suffix.
*/
name?: string;
/**
* User defined suffix used to uniquely name the index.
*/
suffix?: string;
/**
* Friendly display label for index.
*/
label?: string;
/**
* Type of index.
*/
type?: string;
/**
* Timestamp representing when the Index was originally created.
*/
createdDate?: string;
/**
* Timestamp representing when the Index was last updated.
*/
lastModifiedDate?: string;
/**
* Resources and actions related to a Search Index.
*/
readonly related: {
/**
* Retrieves the Hub this search index is stored in
*/
hub: () => Promise<Hub>;
clear: () => Promise<SearchIndex>;
delete: () => Promise<void>;
update: (resource: SearchIndex) => Promise<SearchIndex>;
assignedContentTypes: {
create: (resource: AssignedContentType) => Promise<AssignedContentType>;
get: (id: string) => Promise<AssignedContentType>;
list: (options?: Pageable & Sortable) => Promise<Page<AssignedContentType>>;
};
indexObject: {
delete: (id: string) => Promise<void>;
};
keys: {
get: () => Promise<SearchIndexKey>;
};
replicas: {
list: (projection?: string, options?: Pageable & Sortable) => Promise<Page<SearchIndex>>;
};
settings: {
get: () => Promise<SearchIndexSettings>;
update: (resource: SearchIndexSettings, forwardToReplicas?: boolean, options?: {
waitUntilApplied: boolean | string[];
}) => Promise<SearchIndexSettings>;
};
stats: {
get: (period?: string) => Promise<SearchIndexStatistics>;
};
'top-searches': {
get: ({ clickAnalytics, orderBy, direction, startDate, endDate, limit, offset, tags, includeReplicas, }: {
clickAnalytics?: boolean;
orderBy?: SearchesOrderBy;
direction?: "asc" | "desc";
startDate?: string;
endDate?: string;
limit?: number;
offset?: number;
tags?: string;
includeReplicas?: boolean;
}) => Promise<SearchIndexTopSearchesCollection>;
};
'top-hits': {
get: ({ search, startDate, endDate, limit, offset, tags, includeReplicas, }: {
search?: string;
startDate?: string;
endDate?: string;
limit?: number;
offset?: number;
tags?: string;
includeReplicas?: boolean;
}) => Promise<SearchIndexTopHitsCollection>;
};
'searches-with-no-results': {
get: ({ startDate, endDate, limit, offset, tags, includeReplicas, }: {
startDate?: string;
endDate?: string;
limit?: number;
offset?: number;
tags?: string;
includeReplicas?: boolean;
}) => Promise<SearchIndexSearchesWithNoResultsCollection>;
};
'top-filters-no-result-search': {
get: ({ search, startDate, endDate, limit, offset, tags, includeReplicas, }: {
search: string;
startDate?: string;
endDate?: string;
limit?: number;
offset?: number;
tags?: string;
includeReplicas?: boolean;
}) => Promise<SearchIndexTopFiltersNoResultSearchCollection>;
};
'users-count': {
get: ({ startDate, endDate, tags, includeReplicas, }: {
startDate?: string;
endDate?: string;
tags?: string;
includeReplicas?: boolean;
}) => Promise<SearchIndexUsersCount>;
};
'searches-count': {
get: ({ startDate, endDate, tags, includeReplicas, }: {
startDate?: string;
endDate?: string;
tags?: string;
includeReplicas?: boolean;
}) => Promise<SearchIndexSearchesCount>;
};
'no-results-rate': {
get: ({ startDate, endDate, tags, includeReplicas, }: {
startDate?: string;
endDate?: string;
tags?: string;
includeReplicas?: boolean;
}) => Promise<SearchIndexNoResultsRate>;
};
};
}
/**
* @hidden
*/
export declare class SearchIndexesPage extends Page<SearchIndex> {
constructor(data?: any);
}