Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@backstage/plugin-search-common

Package Overview
Dependencies
Maintainers
4
Versions
479
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstage/plugin-search-common - npm Package Compare versions

Comparing version 0.0.0-nightly-20220317022557 to 0.0.0-nightly-20220318022925

14

CHANGELOG.md
# @backstage/plugin-search-common
## 0.0.0-nightly-20220317022557
## 0.0.0-nightly-20220318022925
### Patch Changes
- c8b295f2fb: - Introduce `SearchDocument` type. This type contains the subset of `IndexableDocument` properties relevant to the frontend, and is intended to be used for documents returned to the frontend from the search API.
- `SearchResultSet` is now a wrapper for documents of type `SearchDocument`, and is intended to be used in the frontend. This isn't a breaking change, since `IndexableDocument`s are valid `SearchDocument`s, so the old and new types are compatible.
- Introduce `IndexableResultSet` type, which wraps `IndexableDocument` instances in the same way as `SearchResultSet`.
## 0.3.2
### Patch Changes
- Updated dependencies
- @backstage/types@0.0.0-nightly-20220317022557
- @backstage/plugin-permission-common@0.0.0-nightly-20220317022557
- @backstage/types@1.0.0
- @backstage/plugin-permission-common@0.5.3

@@ -11,0 +19,0 @@ ## 0.3.1

@@ -18,5 +18,5 @@ /// <reference types="node" />

*/
interface SearchResult {
interface Result<TDocument extends SearchDocument> {
type: string;
document: IndexableDocument;
document: TDocument;
}

@@ -26,4 +26,4 @@ /**

*/
interface SearchResultSet {
results: SearchResult[];
interface ResultSet<TDocument extends SearchDocument> {
results: Result<TDocument>[];
nextPageCursor?: string;

@@ -33,7 +33,22 @@ previousPageCursor?: string;

/**
* Base properties that all indexed documents must include, as well as some
* common properties that documents are encouraged to use where appropriate.
* @beta
*/
interface IndexableDocument {
declare type SearchResult = Result<SearchDocument>;
/**
* @beta
*/
declare type SearchResultSet = ResultSet<SearchDocument>;
/**
* @beta
*/
declare type IndexableResult = Result<IndexableDocument>;
/**
* @beta
*/
declare type IndexableResultSet = ResultSet<IndexableDocument>;
/**
* Base properties that all search documents must include.
* @beta
*/
interface SearchDocument {
/**

@@ -52,2 +67,11 @@ * The primary name of the document (e.g. name, title, identifier, etc).

location: string;
}
/**
* Properties related to indexing of documents. This type is only useful for
* backends working directly with documents being inserted or retrieved from
* search indexes. When dealing with documents in the frontend, use
* {@link SearchDocument}.
* @beta
*/
declare type IndexableDocument = SearchDocument & {
/**

@@ -63,3 +87,3 @@ * Optional authorization information to be used when determining whether this

};
}
};
/**

@@ -151,5 +175,5 @@ * Information about a specific document type. Intended to be used in the

*/
query(query: SearchQuery, options?: QueryRequestOptions): Promise<SearchResultSet>;
query(query: SearchQuery, options?: QueryRequestOptions): Promise<IndexableResultSet>;
}
export { DocumentCollatorFactory, DocumentDecoratorFactory, DocumentTypeInfo, IndexableDocument, QueryRequestOptions, QueryTranslator, SearchEngine, SearchQuery, SearchResult, SearchResultSet };
export { DocumentCollatorFactory, DocumentDecoratorFactory, DocumentTypeInfo, IndexableDocument, IndexableResult, IndexableResultSet, QueryRequestOptions, QueryTranslator, Result, ResultSet, SearchDocument, SearchEngine, SearchQuery, SearchResult, SearchResultSet };
{
"name": "@backstage/plugin-search-common",
"description": "Common functionalities for Search, to be shared between various search-enabled plugins",
"version": "0.0.0-nightly-20220317022557",
"version": "0.0.0-nightly-20220318022925",
"main": "dist/index.cjs.js",

@@ -42,7 +42,7 @@ "types": "dist/index.d.ts",

"dependencies": {
"@backstage/types": "^0.0.0-nightly-20220317022557",
"@backstage/plugin-permission-common": "^0.0.0-nightly-20220317022557"
"@backstage/types": "^1.0.0",
"@backstage/plugin-permission-common": "^0.5.3"
},
"devDependencies": {
"@backstage/cli": "^0.0.0-nightly-20220317022557"
"@backstage/cli": "^0.16.0"
},

@@ -49,0 +49,0 @@ "jest": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc