node-quickbooks vs intuit-oauth - node.js

I am doing research on quickbooks online integration using node and angular 8.
The official intuit developer site provides two node packages.
one is official from intuit and one is from community.
I have glanced through both of them.
the official package is fairly universal. It essentially is just a API client to send a request to remote server and the payload is basic json format.
the community package seems a bit more specific but the documentation seems a bit confusing.
Which one would you choose to do the work and why?
I would love to hear your input.
Thanks :)

The Intuit provided library (intuit-oauth) is specifically for authenticating and getting the OAuth token you need to communicate with the Quickbooks API, the other library (node-quickbooks) is for making the actual calls against the API endpoints.
You will need both libraries, unless you are handling authentication in a different way.

Fwiw for whoever finds this useful:
I forked intuit-oauth, added typescript and fixed vulnerabilities that have been fixed in the PRs of their repo for years and never updated here: https://www.npmjs.com/package/intuit-oauth-ts
Additionally I forked node-quickbooks, updated the api to return promises rather than relying on callbacks, resolved the discovery URLs automatically, changed the format of response objects to be more sensible, and added (unfortunately only some) of the typescript definitions for it here: https://www.npmjs.com/package/qbo. I don't have enough time to add the definitions for all of the files (largey because the included ones should be completely exhaustive for every property in the QBO api, which is timeconsuming to define). If someone would like to contribute by adding more of the typescript definitions or adding all of them, I would really appreciate it.

I am interested in any example angular app using intuit-oauth
Trying to work it out but getting issues since there is no document for typescript.

Related

How can I use grpc's boringssl functionnalities to work with my nodejs program

I don't want to install another openssl when knowing Google gRPC has a working version of boringSSL.
Now, my challenge is to be able to access some functionalities such as calculate a salt and CMAC.
I am aware that Google does not promote the use of it in case something changes and breaks my code.
I saw there is file called 'binding.gyp' in the root of node_modules/grpc, but don't know if possible to use it.
Any suggestions are welcome.
Thanks
There are several layers of problems with your question, and it's missing a lot of context, but here's a few things I can provide based on what I am getting:
First, grpc-node is deprecated, and you should move over to grpc-js, which is no longer containing native code.
Then, grpc-node doesn't actually use BoringSSL, it's in fact relying on nodejs exposing OpenSSL itself as a native API.
And finally, you're supposed to be able to use nodejs' exposed OpenSSL API in a native node module: https://nodejs.org/api/addons.html#addons_linking_to_libraries_included_with_node_js

IBM Natural Language Processing Projects (Beginner getting started question)

I've been digging into the IBM Cloud Services, Watson and NLP. Just installed the CLI and tried with Node SDKs, and a starterkit, unfortunately I did not succeed by trying to get a sample code by default to understand how it works.
After that, I did some research get a better open minded approach to how actually I could use some of their free services to get started, but there's actually to vague information, even though the IBM Docs are pretty extensive and well written, it can get very confusing.
I would appreciate any open source repo, or working/live project that you are willing to share to make a better image in my mind about it IBM cloud services.
A few days ago I wrote a sample application using the Natural Language Understanding service. Check the source code here: https://github.com/watson-developer-cloud/natural-language-understanding-code-pattern
The README has instructions on how to get the apikey which is the way you will use to authenticate your API calls.
Since you are using Node.js you can start with the sample above and also look at this page: https://cloud.ibm.com/apidocs/natural-language-understanding/natural-language-understanding?code=node which includes examples for all the features in Node.js using the node-sdk: https://github.com/watson-developer-cloud/node-sdk/

What is the benefit of using node.js http-errors package?

In multiple tutorials I saw people using http-errors npm package. Based on its docs, it provides only a handful of functions. I do not understand its popularity and use-case.
Why not simply use
return res.status(errorCode).render(errorTemplate)
?
Does this package provide something useful, or is it literally just a custom one-function middleware? Its weekly downloads are astronomical.
Strange question...
It should be a comment but write here du to the length...
First the download rate is due to the fact that it's a part of popular node.js frameworks... A visit on the github page will explain this :
Create HTTP errors for Express, Koa, Connect, etc. with ease.
For the use case, just a visit inside the code shows what it does :
Set and fill specific errors
Fill the res with this errors
Nothing surprising, but it does well the job, and it's not usefull to reinvent the wheel...
https://github.com/jshttp/http-errors/blob/master/index.js

How to efficiently update the API when Swagger spec file is updated? (express, nodejs)

I'm trying to setup a nodejs-express boilerplate for my new project, and this time I want to try doc-driven flow. I've checked couples of packages like swagger-node, swaggerize-express ...etc. They all provide great functionalities.
However, I don't see anything that could support incremental scaffolding when the Swagger file is updated. That means when the spec changes I have to manually check the diff and manually add/modify the new specs. That doesn't sound cool.
Does anyone could share something that is more reasonable? Thanks!!!
Edit:
After trying some frameworks, I decided to use swagger-express-middleware. This framework offers a convenient way to automatically check routes/parameters for your service.
You can use tools like swagger-maven-plugin to incrementally rebuild your server code, which means reading from your api definition and updating/building code as necessary. There are SAAS products like SwaggerHub which enable this as well, by merging code and pushing to git.

Sandboxed plugins for Node.js

I'm a complete Node noob, so I apologize if this question has an obvious answer.
I'm looking to create a web app that will run plugins from untrusted sources (i.e. community submissions). So I need to lock down those plugins into a sandbox where only certain access is allowed (can't write to disk, etc.). Ideally, the plugin would only be able to use certain approved node packages and APIs.
Is this possible in Node? If so, can you point me toward a package or documentation that will get me started?
Here is a small list of projects that can help you:
https://github.com/gf3/sandbox
https://github.com/hflw/node-sandbox
https://github.com/bcoe/sandcastle
https://github.com/wearefractal/boxy
I suggest the first one (sandbox) since it's more mature.
I would also contribute to the list with my library: https://github.com/asvd/jailed. In addition to the sandboxing of the untrusted code (in a restricted subprocess), it gives an opportunity to export any set of functions inside the sandbox thus defining a custom API for the sandboxed code.

Resources