This repository was archived by the owner on Mar 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed
Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " getindexify" ,
3- "version" : " 0.0.18 " ,
3+ "version" : " 0.0.19 " ,
44 "description" : " This is the TypeScript client for interacting with the Indexify service." ,
55 "main" : " ./dist/index.js" ,
66 "module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 ISearchIndexResponse ,
1313 IBaseContentMetadata ,
1414 IExtractedMetadata ,
15+ ISchema ,
1516} from "./types" ;
1617
1718const DEFAULT_SERVICE_URL = "http://localhost:8900" ; // Set your default service URL
@@ -223,7 +224,7 @@ class IndexifyClient {
223224
224225 async getExtractedMetadata ( id : string ) : Promise < IExtractedMetadata [ ] > {
225226 const resp = await this . client . get ( `content/${ id } /metadata` ) ;
226- return resp . data . metadata
227+ return resp . data . metadata ;
227228 }
228229
229230 async downloadContent < T > ( id : string ) : Promise < T > {
@@ -243,6 +244,11 @@ class IndexifyClient {
243244 return resp . data . tasks ;
244245 }
245246
247+ async getSchemas ( ) : Promise < ISchema [ ] > {
248+ const resp = await this . client . get ( "schemas" ) ;
249+ return resp . data . schemas ;
250+ }
251+
246252 async uploadFile ( fileInput : string | Blob ) : Promise < any > {
247253 function isBlob ( input : any ) : input is Blob {
248254 return input instanceof Blob ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
1212 ISearchIndexResponse ,
1313 ITask ,
1414 IDocument ,
15+ ISchema ,
1516} from "./types" ;
1617
1718export {
@@ -20,6 +21,7 @@ export {
2021 INamespace ,
2122 IEmbeddingSchema ,
2223 IExtractorSchema ,
24+ ISchema ,
2325 IExtractor ,
2426 IIndex ,
2527 IContentMetadata ,
Original file line number Diff line number Diff line change @@ -19,9 +19,14 @@ export interface IExtractor {
1919 outputs : IExtractorSchema ;
2020}
2121
22+ export interface ISchema {
23+ columns : Record < string , string | number | boolean > ;
24+ content_source : string ;
25+ namespace : string ;
26+ }
2227export interface IIndex {
2328 name : string ;
24- schema : Record < string , string | number > ;
29+ schema : Record < string , string | number | boolean > ;
2530}
2631
2732export interface IBaseContentMetadata {
You can’t perform that action at this time.
0 commit comments