-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
suggest data types for table columns
- Loading branch information
1 parent
02cade8
commit df85c02
Showing
8 changed files
with
189 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import axios from "axios"; | ||
import { API_URL } from "../utils/constants"; | ||
|
||
export const getPreviewData = (sampleFiles, extractInstructions) => { | ||
const formData = new FormData(); | ||
sampleFiles.forEach((file) => { | ||
formData.append("files", file); | ||
}); | ||
formData.append("extract_instructions", extractInstructions); | ||
|
||
return axios.post(`${API_URL}data-profiles/preview/`, formData, { | ||
headers: { | ||
"Content-Type": "multipart/form-data", | ||
}, | ||
}); | ||
}; | ||
|
||
export const getAvailableColumnTypes = () => { | ||
return axios.get(`${API_URL}data-profiles/column-types/`); | ||
}; | ||
|
||
export const getSuggestedColumnTypes = (previewData) => { | ||
return axios.post(`${API_URL}data-profiles/preview/column-types/`, { | ||
data: previewData, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.