Skip to content

Commit e54536a

Browse files
raileendrroot
andauthored
Version 6.4.0-v2.1-23.3.00.01 release (#334)
Co-authored-by: root <[email protected]>
1 parent 8304f9f commit e54536a

19 files changed

+490
-42
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
33

44

5+
## [v6.4.0] - eSignature API v2.1-23.3.00.01 - 2023-08-30
6+
### Changed
7+
- Added support for version v2.1-23.3.00.01 of the DocuSign ESignature API.
8+
- Updated the SDK release version.
9+
510
## [v6.3.0] - eSignature API v2.1-23.2.00.00 - 2023-05-15
611
### Changed
712
- Added support for version v2.1-23.2.00.00 of the DocuSign ESignature API.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docusign-esign",
3-
"version": "6.3.0",
3+
"version": "6.4.0",
44
"description": "DocuSign Node.js API client.",
55
"license": "MIT",
66
"main": "src/index.js",
@@ -55,7 +55,8 @@
5555
"jsonwebtoken": "^9.0.0",
5656
"passport-oauth2": "^1.6.1",
5757
"safe-buffer": "^5.1.2",
58-
"superagent": "3.8.2"
58+
"superagent": "3.8.2",
59+
"superagent-proxy": "^2.0.0"
5960
},
6061
"devDependencies": {
6162
"docdash": "0.4.0",

src/ApiClient.js

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
if (typeof define === 'function' && define.amd) {
1313
// AMD. Register as an anonymous module.
1414
define(['superagent'], factory);
15+
define(['superagent-proxy'], factory);
1516
} else if (typeof module === 'object' && module.exports) {
1617
// CommonJS-like environments that support module.exports, like Node.
17-
module.exports = factory(require('superagent'));
18+
module.exports = factory(require('superagent'), require('superagent-proxy'));
1819
} else {
1920
// Browser globals (root is window)
2021
if (!root.Docusign) {
2122
root.Docusign = {};
2223
}
23-
root.Docusign.ApiClient = factory(root.superagent, opts);
24+
root.Docusign.ApiClient = factory(root.superagent, root.superagentProxy, opts);
2425
}
25-
}(this, function(superagent, opts) {
26+
}(this, function(superagent, superagentProxy, opts) {
2627
'use strict';
2728

2829
var SCOPE_SIGNATURE = "signature";
@@ -65,9 +66,14 @@
6566
return jwt.sign(jwtPayload, privateKey, { algorithm: JWT_SIGNING_ALGO });
6667
};
6768

68-
var sendJWTTokenRequest = function (assertion, oAuthBasePath, callback) {
69-
var request = superagent.post("https://" + oAuthBasePath + "/oauth/token")
70-
.timeout(exports.prototype.timeout)
69+
var sendJWTTokenRequest = function (assertion, oAuthBasePath, proxy, callback) {
70+
var request = superagentProxy(superagent)
71+
.post("https://" + oAuthBasePath + "/oauth/token");
72+
73+
if (proxy)
74+
request.proxy(proxy)
75+
76+
request.timeout(exports.prototype.timeout)
7177
.set('Content-Type', 'application/x-www-form-urlencoded')
7278
.set('Cache-Control', 'no-store')
7379
.set('Pragma', 'no-cache')
@@ -128,6 +134,14 @@
128134
opts = Object.assign({},defaults, opts);
129135
opts.oAuthBasePath = deriveOAuthBasePathFromRestBasePath(opts.basePath);
130136

137+
/**
138+
* The full URI for the desired proxy.
139+
* A complete list of supported proxies can be found here: https://www.npmjs.com/package/proxy-agent.
140+
* @type {String}
141+
* @default
142+
*/
143+
this.proxy = opts.proxy;
144+
131145
/**
132146
* The base URL against which to resolve every API call's (relative) path.
133147
* @type {String}
@@ -495,7 +509,13 @@
495509

496510
var _this = this;
497511
var url = this.buildUrl(path, pathParams);
498-
var request = superagent(httpMethod, url);
512+
var request = superagentProxy(superagent(httpMethod, url));
513+
514+
//apply proxy if specified
515+
if(this.proxy) {
516+
request.proxy(this.proxy);
517+
}
518+
499519
var _formParams = this.normalizeParams(formParams);
500520
var body = httpMethod.toUpperCase() === 'GET' && !bodyParam ? undefined : bodyParam || {};
501521

@@ -799,7 +819,12 @@
799819
"Pragma": "no-cache"
800820
}
801821

802-
var request = superagent.get("https://" + this.getOAuthBasePath() + "/oauth/userinfo").set(headers);
822+
var request = superagentProxy(superagent).get("https://" + this.getOAuthBasePath() + "/oauth/userinfo").set(headers);
823+
824+
if (this.proxy) {
825+
request.proxy(this.proxy);
826+
}
827+
803828
var UserInfo = require('./OAuth').UserInfo;
804829

805830

@@ -916,14 +941,14 @@
916941
var privateKey = rsaPrivateKey,
917942
assertion = generateAndSignJWTAssertion(clientId, scopes, privateKey, this.getOAuthBasePath(), expiresIn, userId);
918943

919-
return sendJWTTokenRequest(assertion, this.oAuthBasePath, callback);
944+
return sendJWTTokenRequest(assertion, this.oAuthBasePath, this.proxy, callback);
920945
};
921946

922947
exports.prototype.requestJWTApplicationToken = function(clientId, scopes, rsaPrivateKey, expiresIn, callback) {
923948
var privateKey = rsaPrivateKey,
924949
assertion = generateAndSignJWTAssertion(clientId, scopes, privateKey, this.getOAuthBasePath(), expiresIn);
925950

926-
return sendJWTTokenRequest(assertion, this.oAuthBasePath, callback);
951+
return sendJWTTokenRequest(assertion, this.oAuthBasePath, this.proxy, callback);
927952
};
928953

929954
exports.prototype.OAuth = require('./OAuth');

src/api/AccountsApi.js

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,18 @@
6363
* Deletes the specified account.
6464
* This closes the specified account. You must be an account admin to close your account. Once closed, an account must be reopened by DocuSign.
6565
* @param {String} accountId The external account number (int) or account ID Guid.
66+
* @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
67+
* @param {String} optsOrCallback.redactUserData
6668
* @param {module:api/AccountsApi~_deleteCallback} callback The callback function, accepting three arguments: error, data, response
6769
*/
68-
this._delete = function(accountId, callback) {
70+
this._delete = function(accountId, optsOrCallback, callback) {
71+
optsOrCallback = optsOrCallback || {};
72+
73+
if (typeof optsOrCallback === 'function') {
74+
callback = optsOrCallback;
75+
optsOrCallback = {};
76+
}
77+
6978
var postBody = null;
7079

7180
// verify the required parameter 'accountId' is set
@@ -84,6 +93,7 @@
8493
'accountId': accountId
8594
};
8695
var queryParams = {
96+
'redact_user_data': optsOrCallback['redactUserData']
8797
};
8898
var headerParams = {
8999
};
@@ -1285,10 +1295,19 @@ To delete a permission profile, it must not have any users associated with it. W
12851295
12861296
12871297
* @param {String} accountId The external account number (int) or account ID Guid.
1298+
* @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
1299+
* @param {String} optsOrCallback.identityVerificationWorkflowStatus
12881300
* @param {module:api/AccountsApi~getAccountIdentityVerificationCallback} callback The callback function, accepting three arguments: error, data, response
12891301
* data is of type: {@link module:model/AccountIdentityVerificationResponse}
12901302
*/
1291-
this.getAccountIdentityVerification = function(accountId, callback) {
1303+
this.getAccountIdentityVerification = function(accountId, optsOrCallback, callback) {
1304+
optsOrCallback = optsOrCallback || {};
1305+
1306+
if (typeof optsOrCallback === 'function') {
1307+
callback = optsOrCallback;
1308+
optsOrCallback = {};
1309+
}
1310+
12921311
var postBody = null;
12931312

12941313
// verify the required parameter 'accountId' is set
@@ -1307,6 +1326,7 @@ To delete a permission profile, it must not have any users associated with it. W
13071326
'accountId': accountId
13081327
};
13091328
var queryParams = {
1329+
'identity_verification_workflow_status': optsOrCallback['identityVerificationWorkflowStatus']
13101330
};
13111331
var headerParams = {
13121332
};
@@ -2196,7 +2216,7 @@ A brand uses a set of brand resource files to control the sending, signing, emai
21962216
* Gets the Electronic Record and Signature Disclosure.
21972217
* Retrieves the Electronic Record and Signature Disclosure, with HTML formatting, for the requested envelope recipient. This might be different than the current account disclosure depending on account settings, such as branding, and when the account disclosure was last updated. An optional query string can be included to return the language for the disclosure.
21982218
* @param {String} accountId The external account number (int) or account ID Guid.
2199-
* @param {String} langCode The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language.
2219+
* @param {String} langCode The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language.
22002220
* @param {module:api/AccountsApi~getConsumerDisclosureCallback} callback The callback function, accepting three arguments: error, data, response
22012221
* data is of type: {@link module:model/ConsumerDisclosure}
22022222
*/
@@ -4156,7 +4176,7 @@ When you update a custom disclosure, you can update all of the properties except
41564176
41574177
41584178
* @param {String} accountId The external account number (int) or account ID Guid.
4159-
* @param {String} langCode The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language.
4179+
* @param {String} langCode The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language.
41604180
* @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
41614181
* @param {String} optsOrCallback.includeMetadata
41624182
* @param {module:model/ConsumerDisclosure} optsOrCallback.consumerDisclosure

src/api/EnvelopesApi.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3773,7 +3773,7 @@ If the envelope is `In Process`, meaning that it has been sent and has not been
37733773
* (Optional) Callback function to receive the result of the getAttachment operation. If none specified a Promise will be returned.
37743774
* @callback module:api/EnvelopesApi~getAttachmentCallback
37753775
* @param {String} error Error message, if any.
3776-
* @param data This operation does not return a value.
3776+
* @param {Object} data The data returned by the service call.
37773777
* @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
37783778
*/
37793779

@@ -3784,6 +3784,7 @@ If the envelope is `In Process`, meaning that it has been sent and has not been
37843784
* @param {String} envelopeId The envelopeId Guid of the envelope being accessed.
37853785
* @param {String} attachmentId
37863786
* @param {module:api/EnvelopesApi~getAttachmentCallback} callback The callback function, accepting three arguments: error, data, response
3787+
* data is of type: {@link Object}
37873788
*/
37883789
this.getAttachment = function(accountId, envelopeId, attachmentId, callback) {
37893790
var postBody = null;
@@ -3824,8 +3825,8 @@ If the envelope is `In Process`, meaning that it has been sent and has not been
38243825

38253826
var authNames = ['docusignAccessCode'];
38263827
var contentTypes = [];
3827-
var accepts = ['application/json'];
3828-
var returnType = null;
3828+
var accepts = ['application/octet-stream'];
3829+
var returnType = Object;
38293830

38303831
return this.apiClient.callApi(
38313832
'/v2.1/accounts/{accountId}/envelopes/{envelopeId}/attachments/{attachmentId}', 'GET',
@@ -4053,7 +4054,7 @@ stream.
40534054
* @param {String} accountId The external account number (int) or account ID Guid.
40544055
* @param {String} envelopeId The envelopeId Guid of the envelope being accessed.
40554056
* @param {String} recipientId The ID of the recipient being accessed.
4056-
* @param {String} langCode The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language.
4057+
* @param {String} langCode The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language.
40574058
* @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
40584059
* @param {String} optsOrCallback.langCode2 The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language.
40594060
* @param {module:api/EnvelopesApi~getConsumerDisclosureCallback} callback The callback function, accepting three arguments: error, data, response
@@ -6588,6 +6589,7 @@ Client applications should check that the statuses they are requesting make sens
65886589
* @param {String} optsOrCallback.powerformids
65896590
* @param {String} optsOrCallback.queryBudget
65906591
* @param {String} optsOrCallback.requesterDateFormat
6592+
* @param {String} optsOrCallback.searchMode
65916593
* @param {String} optsOrCallback.searchText
65926594
* @param {String} optsOrCallback.startPosition
65936595
* @param {String} optsOrCallback.status The list of current statuses to include in the response. By default, all envelopes found are returned. If values are specified, then of the envelopes found, only those with the current status specified are returned in the results. Possible values are: Voided, Created, Deleted, Sent, Delivered, Signed, Completed, Declined, TimedOut and Processing.
@@ -6647,6 +6649,7 @@ Client applications should check that the statuses they are requesting make sens
66476649
'powerformids': optsOrCallback['powerformids'],
66486650
'query_budget': optsOrCallback['queryBudget'],
66496651
'requester_date_format': optsOrCallback['requesterDateFormat'],
6652+
'search_mode': optsOrCallback['searchMode'],
66506653
'search_text': optsOrCallback['searchText'],
66516654
'start_position': optsOrCallback['startPosition'],
66526655
'status': optsOrCallback['status'],

0 commit comments

Comments
 (0)