@internetarchive/search-service
Advanced tools
Comparing version 1.2.5-alpha.25 to 1.2.5-alpha.26
@@ -24,3 +24,3 @@ import { Aggregation } from '../models/aggregation'; | ||
*/ | ||
export declare class SearchResponseDetails { | ||
export interface SearchResponseDetailsInterface { | ||
/** | ||
@@ -68,2 +68,44 @@ * Total number of results found | ||
schema?: SearchHitSchema; | ||
} | ||
/** | ||
* Implementation for search response details, converting raw response bodies | ||
* into a more consistent set of properties & types. | ||
*/ | ||
export declare class SearchResponseDetails implements SearchResponseDetailsInterface { | ||
/** | ||
* @inheritdoc | ||
*/ | ||
totalResults: number; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
returnedCount: number; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
results: SearchResult[]; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
aggregations?: Record<string, Aggregation>; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
collectionTitles?: Record<string, string>; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
collectionExtraInfo?: CollectionExtraInfo; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
accountExtraInfo?: AccountExtraInfo; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
pageElements?: PageElementMap; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
schema?: SearchHitSchema; | ||
constructor(body: SearchResponseBody, schema: SearchHitSchema); | ||
@@ -70,0 +112,0 @@ /** |
@@ -9,6 +9,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/** | ||
* This is the search response details inside the SearchResponse object that contains | ||
* the search results, under the `results` key. | ||
* | ||
* @export | ||
* Implementation for search response details, converting raw response bodies | ||
* into a more consistent set of properties & types. | ||
*/ | ||
@@ -15,0 +13,0 @@ export class SearchResponseDetails { |
import { SearchResponseHeader } from './search-response-header'; | ||
import { SearchResponseDetails } from './search-response-details'; | ||
import { SearchResponseDetailsInterface } from './search-response-details'; | ||
import { SearchRequest } from './search-request'; | ||
@@ -33,7 +33,7 @@ /** | ||
* | ||
* @type {SearchResponseDetails} | ||
* @type {SearchResponseDetailsInterface} | ||
* @memberof SearchResponse | ||
*/ | ||
response: SearchResponseDetails; | ||
response: SearchResponseDetailsInterface; | ||
constructor(json: Record<string, any>); | ||
} |
@@ -1,2 +0,2 @@ | ||
import { SearchResponseDetails } from './search-response-details'; | ||
import { SearchResponseDetails, } from './search-response-details'; | ||
import { SearchRequest } from './search-request'; | ||
@@ -3,0 +3,0 @@ /** |
{ | ||
"name": "@internetarchive/search-service", | ||
"version": "1.2.5-alpha.25", | ||
"version": "1.2.5-alpha.26", | ||
"description": "A search service for the Internet Archive", | ||
@@ -5,0 +5,0 @@ "license": "AGPL-3.0-only", |
@@ -38,3 +38,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
*/ | ||
export class SearchResponseDetails { | ||
export interface SearchResponseDetailsInterface { | ||
/** | ||
@@ -90,3 +90,54 @@ * Total number of results found | ||
schema?: SearchHitSchema; | ||
} | ||
/** | ||
* Implementation for search response details, converting raw response bodies | ||
* into a more consistent set of properties & types. | ||
*/ | ||
export class SearchResponseDetails implements SearchResponseDetailsInterface { | ||
/** | ||
* @inheritdoc | ||
*/ | ||
totalResults: number; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
returnedCount: number; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
results: SearchResult[]; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
aggregations?: Record<string, Aggregation>; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
collectionTitles?: Record<string, string>; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
collectionExtraInfo?: CollectionExtraInfo; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
accountExtraInfo?: AccountExtraInfo; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
pageElements?: PageElementMap; | ||
/** | ||
* @inheritdoc | ||
*/ | ||
schema?: SearchHitSchema; | ||
constructor(body: SearchResponseBody, schema: SearchHitSchema) { | ||
@@ -93,0 +144,0 @@ this.schema = schema; |
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { SearchResponseHeader } from './search-response-header'; | ||
import { SearchResponseDetails } from './search-response-details'; | ||
import { | ||
SearchResponseDetailsInterface, | ||
SearchResponseDetails, | ||
} from './search-response-details'; | ||
import { SearchRequest } from './search-request'; | ||
@@ -38,6 +41,6 @@ | ||
* | ||
* @type {SearchResponseDetails} | ||
* @type {SearchResponseDetailsInterface} | ||
* @memberof SearchResponse | ||
*/ | ||
response: SearchResponseDetails; | ||
response: SearchResponseDetailsInterface; | ||
@@ -44,0 +47,0 @@ constructor(json: Record<string, any>) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
970487
13925