@lableb/javascript-sdk
Version:
Lableb cloud search client for javascript
49 lines (37 loc) • 1.58 kB
text/typescript
import { LablebDocument, LablebDocumentInput } from "../../core/lableb-client/lableb-client.type";
import { BuildRequestResult } from "../../types";
export interface IndexingRequestParams {
/** your indexing API Key copied from [Lableb Dashboard](https://dashboard.lableb.com) */
indexingAPIKey?: string,
/**
* your platform name in small-letters
*
* Required if you didn't pass a platform name to the global lableb request builder
*
* if provided it will override the global platform name passed to Lableb request builder
* otherwise we use the global platform name at Lableb request builder(if present, otherwise throw an error)
*/
platformName?: string,
/** the used index name for the index function */
indexName?: string,
/**
* array of data you want to upload/add to Lableb's cloud
*
* Each document must at least contain an `id` and should match your platform's schema that is defined at [Lableb Dashboard](https://dashboard.lableb.com), Go to indices page, select your index name, then navigate to `schema` page and see what fields your document object can or can't have in it.
*
* ```js
* documents: [
* { id: "1", title: "Nice to search with Lableb" },
* { id: "2", title: "Forget your manual SQL search for ever" },
* ...
* ]
* ```
*/
documents: LablebDocumentInput[]
}
export interface IndexingRequestResult extends BuildRequestResult {
params: {
apikey?: string,
},
body: LablebDocument[]
}