File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,7 +248,8 @@ export class BrightClient {
248248 // Ingress (Data Ingestion)
249249
250250 async listIngresses ( indexId : string ) : Promise < IngressConfig [ ] > {
251- return this . request < IngressConfig [ ] > ( `/indexes/${ indexId } /ingresses` ) ;
251+ const response = await this . request < { ingresses : IngressConfig [ ] } > ( `/indexes/${ indexId } /ingresses` ) ;
252+ return response . ingresses ;
252253 }
253254
254255 async createIngress (
Original file line number Diff line number Diff line change @@ -33,15 +33,22 @@ export interface PostgresIngressConfig {
3333 auto_triggers ?: boolean ;
3434}
3535
36- // Base ingress fields shared by all ingress types
36+ // Ingress statistics from the server
37+ export interface IngressStatistics {
38+ last_sync_at ?: string ;
39+ documents_synced : number ;
40+ documents_deleted : number ;
41+ full_sync_complete : boolean ;
42+ last_error ?: string ;
43+ error_count : number ;
44+ }
3745
46+ // Base ingress fields shared by all ingress types
3847interface IngressBase {
3948 id : string ;
4049 index_id : string ;
4150 status : IngressStatus ;
42- last_sync ?: string ;
43- documents_synced ?: number ;
44- errors ?: number ;
51+ statistics : IngressStatistics ;
4552}
4653
4754// Typed ingress configs (discriminated union)
@@ -63,11 +70,13 @@ export type IngressConfig = PostgresIngressResponse | GenericIngressResponse;
6370// Create params
6471
6572export interface CreateIngressParams {
73+ id : string ;
6674 type : string ;
6775 config : Record < string , unknown > ;
6876}
6977
7078export interface CreatePostgresIngressParams {
79+ id : string ;
7180 type : 'postgres' ;
7281 config : PostgresIngressConfig ;
7382}
You can’t perform that action at this time.
0 commit comments