Git Product home page Git Product logo

esign's People

Contributors

jfcote87 avatar simplysivu avatar

Stargazers

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

Watchers

 avatar  avatar

esign's Issues

Bug preventing signer from editting text tab with default value

Using v2.1 of the esign library, the "omitempty" portion of Locked DSBool `json:"locked,omitempty"` at

Locked DSBool `json:"locked,omitempty"`
is problematic and results in undesired behavior.

Per the docs https://pkg.go.dev/encoding/json, "The 'omitempty' option specifies that the field should be omitted from encoding if the field has an empty value, defined as false, ..."

Using v2.1 of the library, the problem arises when setting TabValue.Value in model.Text
when creating an editable text tab (model.Text) for a signer and setting a non-empty string value (TabValue.Value).

I cannot find this explicitly stated in DocuSign docs, but based off the API behavior, when the json values for a request to Docusign contains a non-empty string for model.Text.TabValue.Value and model.Text.Locked is not set in the request, model.Text.Locked defaults to true in DocuSign's end of the API. Essentially, the 'omitempty' part of Locked DSBool `json:"locked,omitempty"` prevents one from setting a non-empty string value for model.Text.TabValue.Value and model.Text.Locked = false to allow a signer to edit a text tab (since the json form of model.Text.Locked = false is excluded from the request due to "omitempty"). Removing "omitempty" from Locked DSBool json:"locked,omitempty"`` resolves the problem.

From Go docs https://pkg.go.dev/encoding/json:
Screen Shot 2021-09-23 at 4 08 04 PM

cannot find package "." in: /vendor/github.com/jfcote87/esign/v2/envelopes

Hi,
Thank you for the library. When I try to run the func Example_create_envelope() I get the following error. How do I fix it or I am missing something here? I already added the library as part of my module and don't get any other error. Thanks!!

cannot find package "." in:
/vendor/github.com/jfcote87/esign/v2/envelopes
cannot find package "." in:
vendor/github.com/jfcote87/esign/v2/model

Allow JSON webhook notifications

Hi @jfcote87 quick question about webhook events.

I've been testing the client but the webhook response always comes as XML but according to DocuSign docs it should be possible to get the response in JSON

Is this something that the library currently supports?

For reference, this is how I build an envelope notification

envelope.EventNotification = &model.EventNotification{
		EnvelopeEvents: []model.EnvelopeEvent{
			{EnvelopeEventStatusCode: "Sent"},
			{EnvelopeEventStatusCode: "Completed"},
			{EnvelopeEventStatusCode: "Declined"},
			{EnvelopeEventStatusCode: "Voided"},
		},
		LoggingEnabled:        true,
		RequireAcknowledgment: true,
		URL:                   webhook
	}

move service packages to v2 directory

I'm thinking about making a breaking change by moving the model package and service packages (accounts, authentication, envelopes, etc.) to a v2 directory. When the v2.1 swagger file is released, I will generate packages in a v2.1 directory allowing developers to use either version or even mix them.

The fix will be simple, just change the import statements to:

import github.com/jfcote87/esign/v2/model
import github.com/jfcote87/esign/v2/{service name}

@luonghaiviet88 @reilg

Embedded signing ceremony

@jfcote87 - I am also trying to implement the same, got the envelopeID but stuck at this step Request a Recipient View URL (the Signing Ceremony URL). Is this functionality supported?

Error Unmarshal JSON

Hi @jfcote87 ,

Thanks for this awesome library. It made my job much easier.
When trying to update an existing envelope(in the created state) which is equivalent to
PUT https://demo.docusign.net/restapi/v2/accounts/10150368/envelopes/e24941f6-8c68-4e78-ab54-f79e206f57ae/recipients/1/tabs Request Body: { "textTabs": [ { "documentId": "1", "pageNumber": "1", "tabLabel": "Name", "value": "Jon snow", "xPosition": "195", "yPosition": "1600" } ] }
I see an error at (

esign/esign.go

Line 262 in 471db20

done <- json.NewDecoder(res.Body).Decode(result)
)
The error is error updaing document: json: cannot unmarshal string into Go struct field Text.tabUpdateResults.textTabs.width of type int32
After debugging I found that the response body which we are trying to marshal into model.EnvelopeUpdateSummary contains width and height of type string.

It means the response body contains width and height has string type but the model.Text.Widht and model.Text.Height are of type int32.

"create credential error: private key should be a PEM or plain PKSC1"

Thanks for the library.
I am trying to run your examples_test.go ExampleJWTConfig() function and have an error:

create credential error: private key should be a PEM or plain PKSC1 or PKCS8; parse error: asn1: structure error: tags don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2 exit status 1

undefined: jwt.ExpirationSetting

hello jfcote87,
thank for writing a good sdk, but when I try to use, it said that:
e87/esign/oauth2.go:219:14: undefined: jwt.ExpirationSetting

could you please take a look?

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.