Skip to content

Commit 1fe2cc5

Browse files
committed
Merge branch 'master' into feature/add-and-configure-linter
2 parents b540517 + 667fbd3 commit 1fe2cc5

File tree

217 files changed

+7557
-4746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+7557
-4746
lines changed

.github/workflows/node.js.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [14.x, 16.x, 18.x]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
28+
29+
- name: Run clean install
30+
run: |
31+
npm cache clean --force
32+
npm cache verify
33+
npm install
34+
35+
- name: Run build
36+
run: npm run build --if-present
37+
38+
- name: Run tests
39+
run: npm test
40+
env:
41+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
42+
USER_ID: ${{ secrets.USER_ID }}
43+
APP_URL: ${{ secrets.APP_URL }}
44+
SIGNER_EMAIL: ${{ secrets.SIGNER_EMAIL }}
45+
SIGNER_NAME: ${{ secrets.SIGNER_NAME }}
46+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}

README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,41 @@ When the token expires, it updates automatically.
1717

1818
## eSignature API
1919

20-
For more information about the scopes used for obtaining authorization to use the eSignature API, see [Required scopes](https://developers.docusign.com/docs/esign-rest-api/esign101/auth#required-scopes).
20+
For more information about the scopes used for obtaining authorization to use the eSignature API, see [Required scopes](https://developers.docusign.com/docs/esign-rest-api/esign101/auth#required-scopes).
2121

22-
For a list of code examples that use the eSignature API, select the Node.js tab under [Examples and languages](https://developers.docusign.com/docs/esign-rest-api/how-to/code-launchers#examples-and-languages) on the DocuSign Developer Center.
22+
For a list of code examples that use the eSignature API, see the [How-to guides overview](https://developers.docusign.com/docs/esign-rest-api/how-to/) on the DocuSign Developer Center.
2323

24-
## Rooms API
2524

26-
**Note:** To use the Rooms API you must also [create your Rooms developer account](https://developers.docusign.com/docs/rooms-api/rooms101/create-account). Examples 4 and 6 require that you have the DocuSign Forms feature enabled in your Rooms for Real Estate account.
27-
For more information about the scopes used for obtaining authorization to use the Rooms API, see [Required scopes](https://developers.docusign.com/docs/rooms-api/rooms101/auth/).
25+
## Rooms API
2826

29-
For a list of code examples that use the Rooms API, select the Node.js tab under [Examples and languages](https://developers.docusign.com/docs/rooms-api/how-to/code-launchers#examples-and-languages) on the DocuSign Developer Center.
27+
**Note:** To use the Rooms API, you must also [create your Rooms developer account](https://developers.docusign.com/docs/rooms-api/rooms101/create-account). Examples 4 and 6 require that you have the DocuSign Forms feature enabled in your Rooms for Real Estate account.
28+
For more information about the scopes used for obtaining authorization to use the Rooms API, see [Required scopes](https://developers.docusign.com/docs/rooms-api/rooms101/auth/).
3029

31-
## Click API
30+
For a list of code examples that use the Rooms API, see the [How-to guides overview](https://developers.docusign.com/docs/rooms-api/how-to/) on the DocuSign Developer Center.
3231

33-
For more information about the scopes used for obtaining authorization to use the Click API, see [Required scopes](https://developers.docusign.com/docs/click-api/click101/auth/#required-scopes).
3432

35-
For a list of code examples that use the Click API, select the Node.js tab under [Examples and languages](https://developers.docusign.com/docs/click-api/how-to/code-launchers#examples-and-languages) on the DocuSign Developer Center.
33+
## Click API
34+
For more information about the scopes used for obtaining authorization to use the Click API, see [Required scopes](https://developers.docusign.com/docs/click-api/click101/auth/#required-scopes)
35+
36+
For a list of code examples that use the Click API, see the [How-to guides overview](https://developers.docusign.com/docs/click-api/how-to/) on the DocuSign Developer Center.
37+
3638

3739
## Monitor API
38-
**Note:** To use the Monitor API, you must also [enable DocuSign Monitor for your organization](https://developers.docusign.com/docs/monitor-api/how-to/enable-monitor/).
39-
For information about the scopes used for obtaining authorization to use the Monitor API, see the [scopes section](https://developers.docusign.com/docs/monitor-api/monitor101/auth/).
4040

41-
For a list of code examples that use the Monitor API, select the Node.js tab under [Examples and languages](https://developers.docusign.com/docs/monitor-api/how-to/code-launchers/#examples-and-languages) on the DocuSign Developer Center.
41+
**Note:** To use the Monitor API, you must also [enable DocuSign Monitor for your organization](https://developers.docusign.com/docs/monitor-api/how-to/enable-monitor/).
42+
43+
For information about the scopes used for obtaining authorization to use the Monitor API, see the [scopes section](https://developers.docusign.com/docs/monitor-api/monitor101/auth/).
44+
45+
For a list of code examples that use the Monitor API, see the [How-to guides overview](https://developers.docusign.com/docs/monitor-api/how-to/) on the DocuSign Developer Center.
46+
4247

4348
## Admin API
44-
**Note:** To use the Admin API, you must [create an organization](https://support.docusign.com/en/guides/org-admin-guide-create-org) in your DocuSign developer account. Also, to run the DocuSign CLM code example, [CLM must be enabled for your organization](https://support.docusign.com/en/articles/DocuSign-and-SpringCM).
4549

46-
For more information about the scopes used for obtaining authorization to use the Admin API, see the [scopes section](https://developers.docusign.com/docs/admin-api/admin101/auth/).
50+
**Note:** To use the Admin API, you must [create an organization](https://support.docusign.com/en/guides/org-admin-guide-create-org) in your DocuSign developer account. Also, to run the DocuSign CLM code example, [CLM must be enabled for your organization](https://support.docusign.com/en/articles/DocuSign-and-SpringCM).
4751

48-
For a list of code examples that use the Admin API, select the Node.js tab under [Examples and languages](https://developers.docusign.com/docs/admin-api/how-to/code-launchers/#examples-and-languages) on the DocuSign Developer Center.
52+
For information about the scopes used for obtaining authorization to use the Admin API, see the [scopes section](https://developers.docusign.com/docs/admin-api/admin101/auth/).
4953

54+
For a list of code examples that use the Admin API, see the [How-to guides overview](https://developers.docusign.com/docs/admin-api/how-to/) on the DocuSign Developer Center.
5055
## Installation
5156

5257
### Prerequisites

azure-pipelines.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Starter pipeline
2+
# Start with a minimal pipeline that you can customize to build and deploy your code.
3+
# Add steps that build, run tests, deploy, and more:
4+
# https://aka.ms/yaml
5+
6+
trigger:
7+
- master
8+
9+
# pool:
10+
# vmImage: ubuntu-latest
11+
12+
pool:
13+
name: defualt
14+
15+
steps:
16+
- script: echo Hello, world!
17+
displayName: 'Run a one-line script'
18+
19+
# - script: |
20+
# echo Add other tasks to build, test, and deploy your project.
21+
# echo See https://aka.ms/yaml
22+
# displayName: 'Run a multi-line script'
23+
24+
- script: |
25+
allure –-version
26+
java --version
27+
javac --version
28+
mvn --version
29+
docker --version
30+

config/appsettings.example.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,5 @@
2929
"clickAPIUrl": "https://demo.docusign.net/clickapi",
3030
"adminAPIUrl": "https://api-d.docusign.net/management",
3131
"monitorApiUrl": "https://lens-d.docusign.net",
32-
"eSignManifestUrl": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/eSignatureManifest.json",
33-
"clickManifestUrl": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/ClickManifest.json",
34-
"roomsManifestUrl": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/RoomsManifest.json",
35-
"adminManifestUrl": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/AdminManifest.json",
36-
"monitorManifestUrl": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/MonitorManifest.json"
32+
"codeExamplesManifest": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/CodeExamplesManifest.json"
3733
}
36.3 KB
Binary file not shown.

embeddedSigning.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const sendEnvelopeForEmbeddedSigning = async (args) => {
1818
// args.accessToken
1919
// args.accountId
2020

21+
//ds-snippet-start:eSign1Step3
2122
let dsApiClient = new docusign.ApiClient();
2223
dsApiClient.setBasePath(args.basePath);
2324
dsApiClient.addDefaultHeader('Authorization', 'Bearer ' + args.accessToken);
@@ -32,11 +33,13 @@ const sendEnvelopeForEmbeddedSigning = async (args) => {
3233
results = await envelopesApi.createEnvelope(args.accountId, {
3334
envelopeDefinition: envelope,
3435
});
36+
//ds-snippet-end:eSign1Step3
3537

3638
let envelopeId = results.envelopeId;
3739
console.log(`Envelope was created. EnvelopeId ${envelopeId}`);
3840

3941
// Step 3. create the recipient view, the embedded signing
42+
//ds-snippet-start:eSign1Step5
4043
let viewRequest = makeRecipientViewRequest(args.envelopeArgs);
4144
// Call the CreateRecipientView API
4245
// Exceptions will be caught by the calling function
@@ -46,6 +49,7 @@ const sendEnvelopeForEmbeddedSigning = async (args) => {
4649

4750
return { envelopeId: envelopeId, redirectUrl: results.url };
4851
};
52+
//ds-snippet-end:eSign1Step5
4953

5054
/**
5155
* Creates envelope
@@ -54,6 +58,8 @@ const sendEnvelopeForEmbeddedSigning = async (args) => {
5458
* @returns {Envelope} An envelope definition
5559
* @private
5660
*/
61+
62+
//ds-snippet-start:eSign1Step2
5763
function makeEnvelope(args) {
5864
// Data for this method
5965
// args.signerEmail
@@ -125,7 +131,9 @@ function makeEnvelope(args) {
125131

126132
return env;
127133
}
134+
//ds-snippet-end:eSign1Step2
128135

136+
//ds-snippet-start:eSign1Step4
129137
function makeRecipientViewRequest(args) {
130138
// Data for this method
131139
// args.dsReturnUrl
@@ -168,5 +176,6 @@ function makeRecipientViewRequest(args) {
168176

169177
return viewRequest;
170178
}
179+
//ds-snippet-end:eSign1Step4
171180

172-
module.exports = { sendEnvelopeForEmbeddedSigning };
181+
module.exports = { sendEnvelopeForEmbeddedSigning, makeEnvelope, makeRecipientViewRequest };

0 commit comments

Comments
 (0)