Package Exports
- bigparser
- bigparser/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bigparser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bigparser
Contents
Features ✨
- Query Existing Grids (using
search
,searchCount
&searchDistinct
) - Add Data to Existing Grids (using
insert
) - Update Data in Existing Grids (using
updateByQuery
&updateByRowId
) - Delete Data in Existing Grids (using
deleteByQuery
&deleteByRowId
) - Update Column Data Types (using
updateColumnDatatype
) - Get Grid Metadata (using
getHeaders
&getMultisheetMetadata
) - Create New Grids from a Data Model (
Coming Soon
) - Generate Data Model Types from BigParser Grid (
Coming Soon
)
Install 🐙
If using npm
:
npm install bigparser
If using yarn
:
yarn install bigparser
If using pnpm
:
pnpm install bigparser
Usage 💡
Set the BP_AUTH
environment variable to your BigParser Auth Id.
This can be done in the terminal
export BP_AUTH=YOUR_AUTH_ID
OR using a .env file
BP_AUTH=YOUR_AUTH_ID
OR using process.env
process.env.BP_AUTH = 'YOUR_AUTH_ID'
Optionally you can also set the BP_QA
environment variable to true
to use qa.bigparser.com
instead of www.bigparser.com
Below is an example of calling one of the APIs methods with a Grid Data Model
import { search } from 'bigparser'
declare type GridDataModel {
Country: string;
Airport: string;
Airlines: string;
NumPlanes: number;
HasLounge: boolean;
}
const { data: searchData, error: searchError } = await search<GridDataModel>({
query: {
globalFilter: {
filters: [
{
operator: 'LIKE', // default like (optional)
keyword: 'United',
},
{
operator: 'NLIKE',
keyword: 'Airlines',
},
],
filtersJoinOperator: 'OR' // default OR (optional)
},
columnFilter: {
filters: [
{
column: 'Country',
operator: 'LIKE', // default like (optional)
keyword: 'South'
},
{
column: 'Country',
operator: 'NLIKE', // default like (optional)
keyword: 'America'
}
],
filtersJoinOperator: 'AND' // default AND (optional)
},
globalColumnFilterJoinOperator: 'OR', // default OR (optional)
sendRowIdsInResponse: true,
showColumnNamesInResponse: true,
pagination: {
startRow: 1,
rowCount: 50
},
sort: {
NumPlanes: 'desc'
},
selectColumnNames: [
'Airport',
],
}
}, 'YOUR_GRID_ID')
if (searchError || !searchData) {
console.log('Network Error')
}
console.log(searchData)
/*
{
totalRowCount: 76,
rows: [
{
"Airport": "JNB"
},
{
"Airport": "CPT"
}
...
]
}
*/
Documentation 📄
Full documentation on the bigparser APIs can be found at api.bigparser.com
Contributing 🍰
Please make sure to read the Contributing Guide before making a pull request.
Thank you to all the people who already contributed to this project!
Maintainers 👷
Anubis 💻 |
jkeegan2 💻 |
Hasna Hena Mow 💻 |
Dinu 💻 |
License ⚖️
MIT