tflanagan / node-quickbase Goto Github PK
View Code? Open in Web Editor NEWA lightweight, very flexible QuickBase API for Node.js
Home Page: https://tflanagan.github.io/node-quickbase/
License: Other
A lightweight, very flexible QuickBase API for Node.js
Home Page: https://tflanagan.github.io/node-quickbase/
License: Other
The Initialization documentation says that appToken parameter is not required, but whenever initiate with only a userToken and make an API call I get an error like:
"Invalid Application Token: An Application Token must be supplied."
Hi @tflanagan , just curious about your planned next steps with this library. Do you plan on adding the webhook API calls at some point? Is there any underlying technical reason they aren't there now? Any tips on how my team and I might build this library out to include those methods? Happy to submit a PR once we do!
Thanks for this library–it's a huge timesaver!
I found that some bits of the documentation are correct: The references to API_AddRecord imply that specifying disprec: false
and fform: false
in options is the correct way to set those values. However, Quickbase appears to base its response solely on the presence of those options, not the value. Setting those to false
(or presumably any value) is effectively the same as setting them to 1
–the response is a redirect to the form of the newly added record.
What do you think the best way of documenting those parameters is?
Can you push 4.2.0 to npm? I was wanting to implement copyApp
but keep my project tied to the npm package.
Thank you.
Could you explain how this module would work in a stack project using express and angular? Is it, in its current form, capable of doing this? Disregarding the issue of cross domain access.
Hi I am using this node module to integrate with quick base and it works great! Thank you!
My application is behind a corporate proxy and want to know if proxy support has been added.
Hi - I'm guessing this is an issue with quickbase and not with this module, but I thought I would ask here anyway! I'm having issues updating quickbase fields with non-Western characters. When I update a field with this module and then view it in quickbase (after changing my browser's character encoding settings to UTF-8), some of the characters display correctly, but others show as question marks. I tried changing the module's encoding setting to UTF-8, but this actually made it worse (now ALL the non-Western characters display incorrectly). Is there another charset I can use that will fix this? Or is this a larger issue with quickbase (I know they don't really support other languages). Thanks!
While chasing down some memory usages in an internal system we've got, I came across the quickbase library holding onto a ton of data that was no longer relevant. It turns out to be some sort of issue with bluebird that I didn't feel like tracking down.
Screenshot of the memory usage for the curious
My question is why is bluebird needed in the first place when Promise already exists? If you look at the screenshot, the first two snapshots are with bluebird included and the last two are with the bluebird inclusion commented out. Memory usage drops by almost 50%.
If bluebird is needed for some specific reason, could we get a version of the quickbase library to import that doesn't include that extra library?
With the new Rich Text Fields, XML Parsing is broken. QuickBase sends the XML response with <BR/>
not escaped so when xml2js parses it, you have output like this:
{ _: 'Some text',
BR: [ '', ''] }
The BR tags need to be escaped.
Please see the below example.
The example does not show where the project variable is declared or what it is intended to represent.
Should there be a load function?
Is there a set DBName?
Not sure what is required to make this work.
project.set('projectName', 'Some Example Project');
project.set('completed', false);
project.set('finishDate', moment(1587355200000));
project.set('elapsedTime', moment.duration(10800000));
project.set('$tableRow', $('.some-tr-row'));
task.set('taskName', 'Some Task');
project.set('tasks', [
task
]);
project.toJson();
So this should be an easy one - I just can't figure it out. I'm migrating from version 2.something to 4.2.2 and I can't find in the documentation how to update a record. quickbase.upsertRecords seems like a possibility - but I don't see a place for a record ID. Is it like mongoDb/mongoose where you run a query, then something like 'record.set('fieldID', 'value')', then something like 'record.save()'? Or am I just not seeing the right funtion/method? Thanks.
The following payload will fail, but it shouldn't:
JSON.stringify({x:{a:1,b:2,c: [1,2,3,4,5,6]}})
Hello-
I am trying to get my results in a non-structured format. I attempted to override the default by setting fmt = '' but this does not seem to be working:
var qb = new quickbase({
realm: settings.qbRealm,
appToken: settings.qbAppToken,
flags: {
fmt: ''
}
});
Is there another way to remove this flag?
thanks,
Howie
Hi guys! It looks like node-quickbase
is using a version of lodash.merge
with a major security vulnerability (described here). Would you mind bumping lodash.merge
to at least ^4.6.2
and issuing a quick minor version fix?
I am unable to connect to quickbase with the following error:
/home/test/node/node_modules/quickbase/QuickBase.js:281
this.queries[query].response = {status: status, results: results};
^
TypeError: Cannot read property '0' of undefined
at ClientRequest.quickbase._return (/home/hoakes/E2E/node/node_modules/quickbase/QuickBase.js:281:15)
at ClientRequest. (/home/hoakes/E2E/node/node_modules/quickbase/QuickBase.js:264:17)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at CleartextStream.socketErrorListener (http.js:1547:9)
at CleartextStream.EventEmitter.emit (events.js:95:17)
at Socket.onerror (tls.js:1445:17)
at Socket.EventEmitter.emit (events.js:117:20)
at net.js:440:14
at process._tickCallback (node.js:419:13)
I have verified I can access the qb url via cURL. I am behind an http proxy, but I have the proxy set in my environment variables.
any help would be appreciated.
Has anyone else run into this?
I need to store the record ID of the record I am adding. Until I figure out why the API request is returning a blank response, I am using webhooks to catch when a record is added and field matching it to the record without a record ID in my application. This approach is obviously not ideal. I would appreciate some help figuring out why AddRecord and EditRecord are returning empty responses. My code for AddRecord is pasted below:
quickbase.api('API_AddRecord',{
dbid: external.content.api.dbid,
fields: external.clone.fields,
disprec: true,
msInUTC: false,
ignoreError: false,
udata: "Record added by Qipo"
}).then((results) => {
console.log("DEBUG: results returned from Quickbase.AddRecord: ",results);
resolve(results);
/* results = {
* action: 'API_AddRecord',
* errcode: 0,
* errtext: 'No error',
* rid: 21,
* update_id: 1206177014451
* }
*/
}).catch( (error) => {
console.log("QuickbaseAPI.AddRecord Error: ",error);
reject(new Error(error));
});
Issue:
Current version of node-quickbase is using [email protected]. This throws an audit warning rated at moderate severity.
Solution:
Upgrade node-quickbase to a newer version of axios.
Workaround:
Install [email protected], which is not an option.
Comments:
Is there any reason why Axios can't be used at the latest version, which is up to 1.6.8 on npm?
Wrap-up:
Thanks for the great library! I use it all the time, since my organization leverages Quickbase heavily.
I am moving data between two tables in a QB application. One of the fields is a File Attachment. I am able to download the file, but when I upsert to the new table I get an error that required data is missing. If I make the destination table's file attachment field not required, the upsert records save. Also, I have confirmed the file is downloading successfully and I used that output as was able to recreate a POST request to save to the destination table
Relavant schema (destination):
ID Name Type
10 Charter File attachment
20 Related Team Numeric
Application code snippet:
qb.downloadFile({
"tableId":"foo",
"fieldId":"10",
"recordId":"123",
"versionNumber":1
}).then(file => {
qb.upsert({
"tableId": "bar",
"data": [{
"10": {"value": {"filename":"test.pptx","data":file}},
"20": {"value": 584}
}]
})
Hello!
Im using Quickbase library with VUE.js
here is my request code
in dev env its working nice, but when i build project and push it to Quickbase pages i have this error
When i use my local build its working good too.
So i think quickbase returns bad xml and library can't parse it.
how i can solve it?
deepmerge
did not used to be a dependency the user needed to install, but now it is. Just wondering if this is intentional?
I tried to use UTF-8 encoding, but didn't seem to work. Please include example usage in docs if possible.
With the ever increasing use of this library [Thanks guys! :)] in Node, and now the browser, getting a stable API is becoming more of an issue.
With that in mind, I would like to release 1.0.0 marking a line in the sand in terms of backwards compatibility and intended use.
If anyone has anything to add to this list before I release 1.0.0, please feel free to comment/submit a PR.
Test each API function looking for sensible return objects from XML -> JSON and then cleanXML. This will help find bugs in cleanXML and keep the output standardized as much as possible.
Ensure that the same option name for different API Functions have the same behavior
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.