@magda/semantic-indexer-sdk 6.0.0-alpha.2 → 6.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +9 -12
  2. package/dist/index.js +641 -1260
  3. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ declare abstract class BaseApiClient {
20
20
  readonly userId: string;
21
21
  constructor(options: BaseApiClientConfig);
22
22
  protected getBaseApiUri(): urijs;
23
- protected setHeader(headers: HeadersInit | undefined | null, headerName: string, headerValue: string): Record<string, string> | [string, string][] | Headers;
23
+ protected setHeader(headers: HeadersInit | undefined | null, headerName: string, headerValue: string): [string, string][] | Record<string, string> | Headers;
24
24
  protected addAuthHeader(config?: RequestInit): {
25
25
  body?: BodyInit;
26
26
  cache?: RequestCache;
@@ -83,7 +83,6 @@ declare interface EmbeddingApiClientConfig extends BaseApiClientConfig {
83
83
 
84
84
  declare interface EmbeddingApiConfig {
85
85
  baseUrl: string;
86
- bulkEmbeddingsSize: number;
87
86
  }
88
87
 
89
88
  export declare type EmbeddingText = {
@@ -95,10 +94,7 @@ export declare type EmbeddingText = {
95
94
  }>;
96
95
  };
97
96
 
98
- export declare function indexEmbeddingText(options: SemanticIndexerOptions, EmbeddingText: EmbeddingText, meta: {
99
- recordId: string;
100
- fileFormat?: string;
101
- }, chunker: Chunker, embeddingApiClient: EmbeddingApiClient, opensearchApiClient: OpensearchApiClient): Promise<void>;
97
+ export declare function indexEmbeddingText(options: SemanticIndexerOptions, EmbeddingText: EmbeddingText, chunker: Chunker, embeddingApiClient: EmbeddingApiClient, opensearchApiClient: OpensearchApiClient, recordId: string, fileFormat?: string): Promise<void>;
102
98
 
103
99
  export declare type ItemType = "registryRecord" | "storageObject";
104
100
 
@@ -148,7 +144,6 @@ declare class OpensearchApiClient {
148
144
 
149
145
  declare interface OpensearchConfig {
150
146
  serverUrl: string;
151
- bulkIndexSize: number;
152
147
  indices: {
153
148
  semanticIndex: {
154
149
  indexName: string;
@@ -184,23 +179,23 @@ declare class Record_2 {
184
179
  /**
185
180
  * The identifier of the record
186
181
  */
187
- "id": string;
182
+ 'id': string;
188
183
  /**
189
184
  * The name of the record
190
185
  */
191
- "name": string;
186
+ 'name': string;
192
187
  /**
193
188
  * The aspects included in this record
194
189
  */
195
- "aspects": any;
190
+ 'aspects': any;
196
191
  /**
197
192
  * A tag representing the action by the source of this record (e.g. an id for a individual crawl of a data portal).
198
193
  */
199
- "sourceTag": string;
194
+ 'sourceTag': string;
200
195
  /**
201
196
  * The identifier of a tenant
202
197
  */
203
- "tenantId": number;
198
+ 'tenantId': number;
204
199
  }
205
200
  export { Record_2 as Record }
206
201
 
@@ -216,6 +211,8 @@ declare interface SemanticIndexerConfig {
216
211
  semanticIndexer: {
217
212
  chunkSizeLimit: number;
218
213
  overlap: number;
214
+ bulkEmbeddingsSize: number;
215
+ bulkIndexSize: number;
219
216
  opensearch: OpensearchConfig;
220
217
  embeddingApi: EmbeddingApiConfig;
221
218
  };