Git Product home page Git Product logo

signnow / signnownodesdk Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 22.0 4.36 MB

The Official SignNow Node.js Client Library for interacting with SignNow REST API. Sign documents, request e-signatures, and build role-based workflows with multiple signers using this client.

Home Page: https://www.signnow.com/developers

License: MIT License

JavaScript 100.00%
api-client documents electronic-signatures esign esignature node npm package sdk signnow signnow-api

signnownodesdk's People

Contributors

art-c0der avatar holdmytea avatar pdf-deploy avatar signnowspecialuser avatar yzubach avatar zolotovartem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

signnownodesdk's Issues

Can not generate two tokens

We were integrating the API into our site we are launching in 3 weeks and during development/testing we are not able to upload two documents using the node package with different tokens. The first one uploads fine, then when we go to upload the second document we try to generate a second token and get a timeout error.

I have uploaded a sample script that demonstrates the second token hanging and then timing out with no response back from the endpoint.

https://github.com/tmcpro/signnow-issue

cc: @diego-pacheco

"error": "Error 500: TypeError: Cannot read properties of undefined (reading 'unique_id')"

I'm testing this tutorial 'Creates a link for the embedded invite.' and one of the example.

It returns this error:
"error": "Error 500: TypeError: Cannot read properties of undefined (reading 'unique_id')"

My code is below:

``const email_address = 'mygmail.com';
const templateDocId= 'docIdStringhere'  //SignNow templateId;
const fieldInvite = {
            unique_id: templateDocId,
            from: "mygmail.com",
            to: [
                {
                    email: email_address,
                    role: "Signer 1",
                    order: 1,
                    reassign: "0",
                    decline_by_signature: "0",
                    reminder: 4,
                    expiration_days: 27,
                    subject: "Field invite Signer1",
                    message: "Message",
                },
            ],
        };
const sign_invite = await new Promise((resolve, reject) => {
            signNowAPI.template.invite(
                {
                    data: {
                        ...fieldInvite,
                    },
                    id: templateDocId,
                    token: signNowToken,
                },
                (error, response) => {
                    if (error) {
                        reject(error);
                    } else {
                        resolve(response);
                    }
                }
            );
        });
        ``
        ```

Support other grant types aside from 'password' in oauth2.requestToken method

Currently, it appears that the only way to request an authorization token using this SDK is by using grant_type: 'password' and passing the appropriate credentials.

When using 3-legged OAuth2 and SignNow's login portal, external to a 3rd party application, an authorization code is returned as a query parameter in the redirect, and cannot be used with this SDK's OAuth2 requestToken method to fetch the proper authorization token response. In its place, a basic HTTPS call must be used, nullifying the point of using this SDK for auth purposes.

Error uploading pdf files

Related to #1

When trying to upload a pdf (right now it seems like any pdf with more than one page will fail), I receive this error message in the response body: { errors: [ { code: 65536, message: 'Must upload one file' } ] }

I have uploaded an example providing 2 pdf files, one that fails, and one that succeeds.

See reproducible error here: https://github.com/diego-pacheco/signnow-issue

cc: @tmcpro

Angular Support?

Hi
if any possible to implement in angular for signnow.
If you can provide module for angular frameWork? or any other tutorial

Webhook 2.0

Publishing edits from the SignNow dashboard does not seem to trigger webhooks that were created using this library.

Is this because currently the dashboard utilizes Webhook 2.0 while this library does not?

If so, any plans to bring the webhook part of the module up-to-date with the current REST API?

Dynamic require in config/index.js breaks compatibility with esbuild

Hi there,

I'm currently trying to incorporate the SignNowSDK into a project that is using esbuild.

Unfortunately, it seems that setEnvConfig() uses dynamic require() statements that are causing our build to fail.

const setEnvConfig = env => {
  if (env) {
    currentEnvironment = env;
    return Object.assign(currentConfig, require(`./${env}/`));
  }

  return Object.assign(currentConfig, require(`./${currentEnvironment}`));
};

A quick and easy solution to this is to not use the dynamic requires statements, even if it means adding a small amount of code duplication.

const setEnvConfig = env => {

  if (env) {
    currentEnvironment = env;
    if (env === 'eval') {
      return Object.assign(currentConfig, require('./eval'));
    }
    if (env === 'prod') {
      return Object.assign(currentConfig, require('./prod'));
    }
  }

  return Object.assign(currentConfig, require(`./${currentEnvironment}`));
};

There may be a nicer way of writing this to remove the additional level of indentation from the added ifs of course but the point is we aren't using variables in the require().

Would it be possible to add this (or a better) fix to avoid dynamic require() statements? It would be a shame to fork and maintain a repo for such a small fix ๐Ÿ‘

Thanks in advance for the feedback and/or help!

NestJS Support?

If you can provide a module for NestJS framework? or any tutorial?

Unhandled error on document.remove function

Hi,

I'm experiencing a serious issue using

document.remove(MYID, { cancelInvites: true})

This cause a non catchable error because there is a error on line
https://github.com/signnow/SignNowNodeSDK/blob/master/lib/document/index.js#L962
with error saying Document not found because document was previously deleted on this line
https://github.com/signnow/SignNowNodeSDK/blob/master/lib/document/index.js#L1019

The big issue is that this error is not catch by a .catch method and throw without any option to be catched by code calling document.remove

Angular Support

Hi
if any possible to implement in angular for signnow.
If you can provide module for angular frameWork? or any other tutorial

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.