@fluxbase/sdk 2026.2.3-rc.12 → 2026.2.3-rc.15
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.
- package/dist/index.cjs +448 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +543 -1
- package/dist/index.d.ts +543 -1
- package/dist/index.js +448 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8514,6 +8514,454 @@ var FluxbaseAdminAI = class {
|
|
|
8514
8514
|
return { data: null, error };
|
|
8515
8515
|
}
|
|
8516
8516
|
}
|
|
8517
|
+
// ============================================================================
|
|
8518
|
+
// DOCUMENT UPDATE AND BULK DELETE
|
|
8519
|
+
// ============================================================================
|
|
8520
|
+
/**
|
|
8521
|
+
* Update a document in a knowledge base
|
|
8522
|
+
*
|
|
8523
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8524
|
+
* @param documentId - Document ID
|
|
8525
|
+
* @param updates - Fields to update
|
|
8526
|
+
* @returns Promise resolving to { data, error } tuple with updated document
|
|
8527
|
+
*
|
|
8528
|
+
* @example
|
|
8529
|
+
* ```typescript
|
|
8530
|
+
* const { data, error } = await client.admin.ai.updateDocument('kb-uuid', 'doc-uuid', {
|
|
8531
|
+
* title: 'Updated Title',
|
|
8532
|
+
* tags: ['updated', 'tag'],
|
|
8533
|
+
* metadata: { category: 'updated' },
|
|
8534
|
+
* })
|
|
8535
|
+
* ```
|
|
8536
|
+
*/
|
|
8537
|
+
async updateDocument(knowledgeBaseId, documentId, updates) {
|
|
8538
|
+
try {
|
|
8539
|
+
const data = await this.fetch.patch(
|
|
8540
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/documents/${documentId}`,
|
|
8541
|
+
updates
|
|
8542
|
+
);
|
|
8543
|
+
return { data, error: null };
|
|
8544
|
+
} catch (error) {
|
|
8545
|
+
return { data: null, error };
|
|
8546
|
+
}
|
|
8547
|
+
}
|
|
8548
|
+
/**
|
|
8549
|
+
* Delete documents from a knowledge base by filter
|
|
8550
|
+
*
|
|
8551
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8552
|
+
* @param filter - Filter criteria for deletion
|
|
8553
|
+
* @returns Promise resolving to { data, error } tuple with deletion count
|
|
8554
|
+
*
|
|
8555
|
+
* @example
|
|
8556
|
+
* ```typescript
|
|
8557
|
+
* // Delete by tags
|
|
8558
|
+
* const { data, error } = await client.admin.ai.deleteDocumentsByFilter('kb-uuid', {
|
|
8559
|
+
* tags: ['deprecated', 'archive'],
|
|
8560
|
+
* })
|
|
8561
|
+
*
|
|
8562
|
+
* // Delete by metadata
|
|
8563
|
+
* const { data, error } = await client.admin.ai.deleteDocumentsByFilter('kb-uuid', {
|
|
8564
|
+
* metadata: { source: 'legacy-system' },
|
|
8565
|
+
* })
|
|
8566
|
+
*
|
|
8567
|
+
* if (data) {
|
|
8568
|
+
* console.log(`Deleted ${data.deleted_count} documents`)
|
|
8569
|
+
* }
|
|
8570
|
+
* ```
|
|
8571
|
+
*/
|
|
8572
|
+
async deleteDocumentsByFilter(knowledgeBaseId, filter) {
|
|
8573
|
+
try {
|
|
8574
|
+
const data = await this.fetch.post(
|
|
8575
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/documents/delete-by-filter`,
|
|
8576
|
+
filter
|
|
8577
|
+
);
|
|
8578
|
+
return { data, error: null };
|
|
8579
|
+
} catch (error) {
|
|
8580
|
+
return { data: null, error };
|
|
8581
|
+
}
|
|
8582
|
+
}
|
|
8583
|
+
// ============================================================================
|
|
8584
|
+
// KNOWLEDGE BASE CAPABILITIES
|
|
8585
|
+
// ============================================================================
|
|
8586
|
+
/**
|
|
8587
|
+
* Get knowledge base system capabilities
|
|
8588
|
+
*
|
|
8589
|
+
* Returns information about OCR support, supported file types, etc.
|
|
8590
|
+
*
|
|
8591
|
+
* @returns Promise resolving to { data, error } tuple with capabilities
|
|
8592
|
+
*
|
|
8593
|
+
* @example
|
|
8594
|
+
* ```typescript
|
|
8595
|
+
* const { data, error } = await client.admin.ai.getCapabilities()
|
|
8596
|
+
* if (data) {
|
|
8597
|
+
* console.log('OCR available:', data.ocr_available)
|
|
8598
|
+
* console.log('Supported types:', data.supported_file_types)
|
|
8599
|
+
* }
|
|
8600
|
+
* ```
|
|
8601
|
+
*/
|
|
8602
|
+
async getCapabilities() {
|
|
8603
|
+
try {
|
|
8604
|
+
const data = await this.fetch.get(
|
|
8605
|
+
"/api/v1/admin/ai/knowledge-bases/capabilities"
|
|
8606
|
+
);
|
|
8607
|
+
return { data, error: null };
|
|
8608
|
+
} catch (error) {
|
|
8609
|
+
return { data: null, error };
|
|
8610
|
+
}
|
|
8611
|
+
}
|
|
8612
|
+
// ============================================================================
|
|
8613
|
+
// KNOWLEDGE GRAPH / ENTITIES
|
|
8614
|
+
// ============================================================================
|
|
8615
|
+
/**
|
|
8616
|
+
* List entities in a knowledge base
|
|
8617
|
+
*
|
|
8618
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8619
|
+
* @param entityType - Optional entity type filter
|
|
8620
|
+
* @returns Promise resolving to { data, error } tuple with array of entities
|
|
8621
|
+
*
|
|
8622
|
+
* @example
|
|
8623
|
+
* ```typescript
|
|
8624
|
+
* // List all entities
|
|
8625
|
+
* const { data, error } = await client.admin.ai.listEntities('kb-uuid')
|
|
8626
|
+
*
|
|
8627
|
+
* // Filter by type
|
|
8628
|
+
* const { data, error } = await client.admin.ai.listEntities('kb-uuid', 'person')
|
|
8629
|
+
*
|
|
8630
|
+
* if (data) {
|
|
8631
|
+
* console.log('Entities:', data.map(e => e.name))
|
|
8632
|
+
* }
|
|
8633
|
+
* ```
|
|
8634
|
+
*/
|
|
8635
|
+
async listEntities(knowledgeBaseId, entityType) {
|
|
8636
|
+
try {
|
|
8637
|
+
const params = entityType ? `?entity_type=${entityType}` : "";
|
|
8638
|
+
const response = await this.fetch.get(
|
|
8639
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/entities${params}`
|
|
8640
|
+
);
|
|
8641
|
+
return { data: response.entities || [], error: null };
|
|
8642
|
+
} catch (error) {
|
|
8643
|
+
return { data: null, error };
|
|
8644
|
+
}
|
|
8645
|
+
}
|
|
8646
|
+
/**
|
|
8647
|
+
* Search for entities in a knowledge base
|
|
8648
|
+
*
|
|
8649
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8650
|
+
* @param query - Search query
|
|
8651
|
+
* @param types - Optional entity type filters
|
|
8652
|
+
* @returns Promise resolving to { data, error } tuple with matching entities
|
|
8653
|
+
*
|
|
8654
|
+
* @example
|
|
8655
|
+
* ```typescript
|
|
8656
|
+
* // Search all entity types
|
|
8657
|
+
* const { data, error } = await client.admin.ai.searchEntities('kb-uuid', 'John')
|
|
8658
|
+
*
|
|
8659
|
+
* // Search specific types
|
|
8660
|
+
* const { data, error } = await client.admin.ai.searchEntities('kb-uuid', 'Apple', ['organization', 'product'])
|
|
8661
|
+
*
|
|
8662
|
+
* if (data) {
|
|
8663
|
+
* console.log('Found entities:', data.map(e => `${e.name} (${e.entity_type})`))
|
|
8664
|
+
* }
|
|
8665
|
+
* ```
|
|
8666
|
+
*/
|
|
8667
|
+
async searchEntities(knowledgeBaseId, query, types) {
|
|
8668
|
+
try {
|
|
8669
|
+
const params = new URLSearchParams({ query });
|
|
8670
|
+
if (types && types.length > 0) {
|
|
8671
|
+
params.append("types", types.join(","));
|
|
8672
|
+
}
|
|
8673
|
+
const response = await this.fetch.get(
|
|
8674
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/entities/search?${params.toString()}`
|
|
8675
|
+
);
|
|
8676
|
+
return { data: response.entities || [], error: null };
|
|
8677
|
+
} catch (error) {
|
|
8678
|
+
return { data: null, error };
|
|
8679
|
+
}
|
|
8680
|
+
}
|
|
8681
|
+
/**
|
|
8682
|
+
* Get relationships for a specific entity
|
|
8683
|
+
*
|
|
8684
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8685
|
+
* @param entityId - Entity ID
|
|
8686
|
+
* @returns Promise resolving to { data, error } tuple with entity relationships
|
|
8687
|
+
*
|
|
8688
|
+
* @example
|
|
8689
|
+
* ```typescript
|
|
8690
|
+
* const { data, error } = await client.admin.ai.getEntityRelationships('kb-uuid', 'entity-uuid')
|
|
8691
|
+
* if (data) {
|
|
8692
|
+
* console.log('Relationships:', data.map(r => `${r.relationship_type} -> ${r.target_entity?.name}`))
|
|
8693
|
+
* }
|
|
8694
|
+
* ```
|
|
8695
|
+
*/
|
|
8696
|
+
async getEntityRelationships(knowledgeBaseId, entityId) {
|
|
8697
|
+
try {
|
|
8698
|
+
const response = await this.fetch.get(
|
|
8699
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/entities/${entityId}/relationships`
|
|
8700
|
+
);
|
|
8701
|
+
return { data: response.relationships || [], error: null };
|
|
8702
|
+
} catch (error) {
|
|
8703
|
+
return { data: null, error };
|
|
8704
|
+
}
|
|
8705
|
+
}
|
|
8706
|
+
/**
|
|
8707
|
+
* Get the knowledge graph for a knowledge base
|
|
8708
|
+
*
|
|
8709
|
+
* Returns all entities and relationships for visualization.
|
|
8710
|
+
*
|
|
8711
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8712
|
+
* @returns Promise resolving to { data, error } tuple with graph data
|
|
8713
|
+
*
|
|
8714
|
+
* @example
|
|
8715
|
+
* ```typescript
|
|
8716
|
+
* const { data, error } = await client.admin.ai.getKnowledgeGraph('kb-uuid')
|
|
8717
|
+
* if (data) {
|
|
8718
|
+
* console.log('Graph:', data.entity_count, 'entities,', data.relationship_count, 'relationships')
|
|
8719
|
+
* // Use with visualization libraries like D3.js, Cytoscape.js, etc.
|
|
8720
|
+
* }
|
|
8721
|
+
* ```
|
|
8722
|
+
*/
|
|
8723
|
+
async getKnowledgeGraph(knowledgeBaseId) {
|
|
8724
|
+
try {
|
|
8725
|
+
const data = await this.fetch.get(
|
|
8726
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/graph`
|
|
8727
|
+
);
|
|
8728
|
+
return { data, error: null };
|
|
8729
|
+
} catch (error) {
|
|
8730
|
+
return { data: null, error };
|
|
8731
|
+
}
|
|
8732
|
+
}
|
|
8733
|
+
// ============================================================================
|
|
8734
|
+
// KNOWLEDGE BASE REVERSE LOOKUP
|
|
8735
|
+
// ============================================================================
|
|
8736
|
+
/**
|
|
8737
|
+
* List all chatbots that use a specific knowledge base
|
|
8738
|
+
*
|
|
8739
|
+
* Reverse lookup to find which chatbots are linked to a knowledge base.
|
|
8740
|
+
*
|
|
8741
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8742
|
+
* @returns Promise resolving to { data, error } tuple with array of chatbot summaries
|
|
8743
|
+
*
|
|
8744
|
+
* @example
|
|
8745
|
+
* ```typescript
|
|
8746
|
+
* const { data, error } = await client.admin.ai.listChatbotsUsingKB('kb-uuid')
|
|
8747
|
+
* if (data) {
|
|
8748
|
+
* console.log('Used by chatbots:', data.map(c => c.name))
|
|
8749
|
+
* }
|
|
8750
|
+
* ```
|
|
8751
|
+
*/
|
|
8752
|
+
async listChatbotsUsingKB(knowledgeBaseId) {
|
|
8753
|
+
try {
|
|
8754
|
+
const response = await this.fetch.get(`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/chatbots`);
|
|
8755
|
+
return { data: response.chatbots || [], error: null };
|
|
8756
|
+
} catch (error) {
|
|
8757
|
+
return { data: null, error };
|
|
8758
|
+
}
|
|
8759
|
+
}
|
|
8760
|
+
// ============================================================================
|
|
8761
|
+
// TABLE EXPORT
|
|
8762
|
+
// ============================================================================
|
|
8763
|
+
/**
|
|
8764
|
+
* Export a database table to a knowledge base
|
|
8765
|
+
*
|
|
8766
|
+
* The table schema will be exported as a markdown document and indexed.
|
|
8767
|
+
* Optionally filter which columns to export for security or relevance.
|
|
8768
|
+
*
|
|
8769
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8770
|
+
* @param options - Export options including column selection
|
|
8771
|
+
* @returns Promise resolving to { data, error } tuple with export result
|
|
8772
|
+
*
|
|
8773
|
+
* @example
|
|
8774
|
+
* ```typescript
|
|
8775
|
+
* // Export all columns
|
|
8776
|
+
* const { data, error } = await client.admin.ai.exportTable('kb-uuid', {
|
|
8777
|
+
* schema: 'public',
|
|
8778
|
+
* table: 'users',
|
|
8779
|
+
* include_foreign_keys: true,
|
|
8780
|
+
* })
|
|
8781
|
+
*
|
|
8782
|
+
* // Export specific columns (recommended for sensitive data)
|
|
8783
|
+
* const { data, error } = await client.admin.ai.exportTable('kb-uuid', {
|
|
8784
|
+
* schema: 'public',
|
|
8785
|
+
* table: 'users',
|
|
8786
|
+
* columns: ['id', 'name', 'email', 'created_at'],
|
|
8787
|
+
* })
|
|
8788
|
+
* ```
|
|
8789
|
+
*/
|
|
8790
|
+
async exportTable(knowledgeBaseId, options) {
|
|
8791
|
+
try {
|
|
8792
|
+
const data = await this.fetch.post(
|
|
8793
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/tables/export`,
|
|
8794
|
+
options
|
|
8795
|
+
);
|
|
8796
|
+
return { data, error: null };
|
|
8797
|
+
} catch (error) {
|
|
8798
|
+
return { data: null, error };
|
|
8799
|
+
}
|
|
8800
|
+
}
|
|
8801
|
+
/**
|
|
8802
|
+
* Get detailed table information including columns
|
|
8803
|
+
*
|
|
8804
|
+
* Use this to discover available columns before exporting.
|
|
8805
|
+
*
|
|
8806
|
+
* @param schema - Schema name (e.g., 'public')
|
|
8807
|
+
* @param table - Table name
|
|
8808
|
+
* @returns Promise resolving to { data, error } tuple with table details
|
|
8809
|
+
*
|
|
8810
|
+
* @example
|
|
8811
|
+
* ```typescript
|
|
8812
|
+
* const { data, error } = await client.admin.ai.getTableDetails('public', 'users')
|
|
8813
|
+
* if (data) {
|
|
8814
|
+
* console.log('Columns:', data.columns.map(c => c.name))
|
|
8815
|
+
* console.log('Primary key:', data.primary_key)
|
|
8816
|
+
* }
|
|
8817
|
+
* ```
|
|
8818
|
+
*/
|
|
8819
|
+
async getTableDetails(schema, table) {
|
|
8820
|
+
try {
|
|
8821
|
+
const data = await this.fetch.get(
|
|
8822
|
+
`/api/v1/admin/ai/tables/${schema}/${table}`
|
|
8823
|
+
);
|
|
8824
|
+
return { data, error: null };
|
|
8825
|
+
} catch (error) {
|
|
8826
|
+
return { data: null, error };
|
|
8827
|
+
}
|
|
8828
|
+
}
|
|
8829
|
+
// ============================================================================
|
|
8830
|
+
// TABLE EXPORT PRESETS
|
|
8831
|
+
// ============================================================================
|
|
8832
|
+
/**
|
|
8833
|
+
* Create a table export preset
|
|
8834
|
+
*
|
|
8835
|
+
* Saves a table export configuration for easy re-export. Use triggerTableExportSync
|
|
8836
|
+
* to re-export when the schema changes.
|
|
8837
|
+
*
|
|
8838
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8839
|
+
* @param config - Export preset configuration
|
|
8840
|
+
* @returns Promise resolving to { data, error } tuple with created preset
|
|
8841
|
+
*
|
|
8842
|
+
* @example
|
|
8843
|
+
* ```typescript
|
|
8844
|
+
* const { data, error } = await client.admin.ai.createTableExportSync('kb-uuid', {
|
|
8845
|
+
* schema_name: 'public',
|
|
8846
|
+
* table_name: 'products',
|
|
8847
|
+
* columns: ['id', 'name', 'description', 'price'],
|
|
8848
|
+
* include_foreign_keys: true,
|
|
8849
|
+
* export_now: true, // Trigger initial export
|
|
8850
|
+
* })
|
|
8851
|
+
* ```
|
|
8852
|
+
*/
|
|
8853
|
+
async createTableExportSync(knowledgeBaseId, config) {
|
|
8854
|
+
try {
|
|
8855
|
+
const data = await this.fetch.post(
|
|
8856
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/sync-configs`,
|
|
8857
|
+
config
|
|
8858
|
+
);
|
|
8859
|
+
return { data, error: null };
|
|
8860
|
+
} catch (error) {
|
|
8861
|
+
return { data: null, error };
|
|
8862
|
+
}
|
|
8863
|
+
}
|
|
8864
|
+
/**
|
|
8865
|
+
* List table export presets for a knowledge base
|
|
8866
|
+
*
|
|
8867
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8868
|
+
* @returns Promise resolving to { data, error } tuple with array of presets
|
|
8869
|
+
*
|
|
8870
|
+
* @example
|
|
8871
|
+
* ```typescript
|
|
8872
|
+
* const { data, error } = await client.admin.ai.listTableExportSyncs('kb-uuid')
|
|
8873
|
+
* if (data) {
|
|
8874
|
+
* data.forEach(config => {
|
|
8875
|
+
* console.log(`${config.schema_name}.${config.table_name}`)
|
|
8876
|
+
* })
|
|
8877
|
+
* }
|
|
8878
|
+
* ```
|
|
8879
|
+
*/
|
|
8880
|
+
async listTableExportSyncs(knowledgeBaseId) {
|
|
8881
|
+
try {
|
|
8882
|
+
const response = await this.fetch.get(`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/sync-configs`);
|
|
8883
|
+
return { data: response.sync_configs || [], error: null };
|
|
8884
|
+
} catch (error) {
|
|
8885
|
+
return { data: null, error };
|
|
8886
|
+
}
|
|
8887
|
+
}
|
|
8888
|
+
/**
|
|
8889
|
+
* Update a table export preset
|
|
8890
|
+
*
|
|
8891
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8892
|
+
* @param syncId - Preset ID
|
|
8893
|
+
* @param updates - Fields to update
|
|
8894
|
+
* @returns Promise resolving to { data, error } tuple with updated preset
|
|
8895
|
+
*
|
|
8896
|
+
* @example
|
|
8897
|
+
* ```typescript
|
|
8898
|
+
* const { data, error } = await client.admin.ai.updateTableExportSync('kb-uuid', 'sync-id', {
|
|
8899
|
+
* columns: ['id', 'name', 'email', 'updated_at'],
|
|
8900
|
+
* })
|
|
8901
|
+
* ```
|
|
8902
|
+
*/
|
|
8903
|
+
async updateTableExportSync(knowledgeBaseId, syncId, updates) {
|
|
8904
|
+
try {
|
|
8905
|
+
const data = await this.fetch.patch(
|
|
8906
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/sync-configs/${syncId}`,
|
|
8907
|
+
updates
|
|
8908
|
+
);
|
|
8909
|
+
return { data, error: null };
|
|
8910
|
+
} catch (error) {
|
|
8911
|
+
return { data: null, error };
|
|
8912
|
+
}
|
|
8913
|
+
}
|
|
8914
|
+
/**
|
|
8915
|
+
* Delete a table export sync configuration
|
|
8916
|
+
*
|
|
8917
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8918
|
+
* @param syncId - Sync config ID
|
|
8919
|
+
* @returns Promise resolving to { data, error } tuple
|
|
8920
|
+
*
|
|
8921
|
+
* @example
|
|
8922
|
+
* ```typescript
|
|
8923
|
+
* const { data, error } = await client.admin.ai.deleteTableExportSync('kb-uuid', 'sync-id')
|
|
8924
|
+
* ```
|
|
8925
|
+
*/
|
|
8926
|
+
async deleteTableExportSync(knowledgeBaseId, syncId) {
|
|
8927
|
+
try {
|
|
8928
|
+
await this.fetch.delete(
|
|
8929
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/sync-configs/${syncId}`
|
|
8930
|
+
);
|
|
8931
|
+
return { data: null, error: null };
|
|
8932
|
+
} catch (error) {
|
|
8933
|
+
return { data: null, error };
|
|
8934
|
+
}
|
|
8935
|
+
}
|
|
8936
|
+
/**
|
|
8937
|
+
* Manually trigger a table export sync
|
|
8938
|
+
*
|
|
8939
|
+
* Immediately re-exports the table to the knowledge base,
|
|
8940
|
+
* regardless of the sync mode.
|
|
8941
|
+
*
|
|
8942
|
+
* @param knowledgeBaseId - Knowledge base ID
|
|
8943
|
+
* @param syncId - Sync config ID
|
|
8944
|
+
* @returns Promise resolving to { data, error } tuple with export result
|
|
8945
|
+
*
|
|
8946
|
+
* @example
|
|
8947
|
+
* ```typescript
|
|
8948
|
+
* const { data, error } = await client.admin.ai.triggerTableExportSync('kb-uuid', 'sync-id')
|
|
8949
|
+
* if (data) {
|
|
8950
|
+
* console.log('Exported document:', data.document_id)
|
|
8951
|
+
* }
|
|
8952
|
+
* ```
|
|
8953
|
+
*/
|
|
8954
|
+
async triggerTableExportSync(knowledgeBaseId, syncId) {
|
|
8955
|
+
try {
|
|
8956
|
+
const data = await this.fetch.post(
|
|
8957
|
+
`/api/v1/admin/ai/knowledge-bases/${knowledgeBaseId}/sync-configs/${syncId}/trigger`,
|
|
8958
|
+
{}
|
|
8959
|
+
);
|
|
8960
|
+
return { data, error: null };
|
|
8961
|
+
} catch (error) {
|
|
8962
|
+
return { data: null, error };
|
|
8963
|
+
}
|
|
8964
|
+
}
|
|
8517
8965
|
};
|
|
8518
8966
|
|
|
8519
8967
|
// src/admin-rpc.ts
|