File tree Expand file tree Collapse file tree 2 files changed +7
-18
lines changed
packages/compass-generative-ai/src Expand file tree Collapse file tree 2 files changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -215,19 +215,16 @@ const aiURLConfig = {
215215 } ,
216216} as const ;
217217
218- export const MockDataSchemaRawFieldMappingShape = z . record (
219- z . string ( ) ,
220- z . object ( {
221- type : z . string ( ) ,
222- sampleValues : z . array ( z . unknown ( ) ) . optional ( ) ,
223- probability : z . number ( ) . min ( 0 ) . max ( 1 ) . optional ( ) ,
224- } )
225- ) ;
218+ export interface MockDataSchemaRawField {
219+ type : string ;
220+ sampleValues ?: unknown [ ] ;
221+ probability ?: number ;
222+ }
226223
227224export interface MockDataSchemaRequest {
228225 collectionName : string ;
229226 databaseName : string ;
230- schema : MockDataSchemaRawFieldMapping ;
227+ schema : Record < string , MockDataSchemaRawField > ;
231228 validationRules ?: Record < string , unknown > | null ;
232229 includeSampleValues ?: boolean ;
233230}
@@ -256,10 +253,6 @@ export const MockDataSchemaResponseShape = z.object({
256253 } ) ,
257254} ) ;
258255
259- export type MockDataSchemaRawFieldMapping = z . infer <
260- typeof MockDataSchemaRawFieldMappingShape
261- > ;
262- export type MockDataSchemaRawField = MockDataSchemaRawFieldMapping [ string ] ;
263256export type MockDataSchemaResponse = z . infer <
264257 typeof MockDataSchemaResponseShape
265258> ;
Original file line number Diff line number Diff line change @@ -24,10 +24,7 @@ export {
2424 createAIPlaceholderHTMLPlaceholder ,
2525} from './components' ;
2626
27- export {
28- MockDataSchemaRawFieldMappingShape ,
29- MockDataSchemaResponseShape ,
30- } from './atlas-ai-service' ;
27+ export { MockDataSchemaResponseShape } from './atlas-ai-service' ;
3128
3229export {
3330 AtlasAiServiceInvalidInputError ,
@@ -36,7 +33,6 @@ export {
3633
3734export type {
3835 MockDataSchemaRequest ,
39- MockDataSchemaRawFieldMapping ,
4036 MockDataSchemaRawField ,
4137 MockDataSchemaResponse ,
4238} from './atlas-ai-service' ;
You can’t perform that action at this time.
0 commit comments