Skip to content

Commit d64b873

Browse files
Merge branch 'master' into feature/maestro-api-examples
2 parents 6b4efd5 + f5c89b3 commit d64b873

26 files changed

+609
-29
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@ secret
6868
.vs
6969

7070
# ignore RSA keys
71-
private.key
71+
private.key
72+
73+
# ignore Web Form config
74+
web-form-config.json

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ For a list of code examples that use the Monitor API, see the [How-to guides ove
5252
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/).
5353

5454
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.
55+
56+
57+
## Web Forms API
58+
59+
The Web Forms API is available in all developer accounts, but only in certain production account plans. Contact [DocuSign Support](https://support.docusign.com/) or your account manager to find out whether the Web Forms API is available for your production account plan.
60+
61+
For more information about the scopes used for obtaining authorization to use the Rooms API, see [Required scopes](https://developers.docusign.com/docs/web-forms-api/plan-integration/authentication/).
62+
63+
For a list of code examples that use the Web Forms API, see the [How-to guides overview](https://developers.docusign.com/docs/web-forms-api/how-to/) on the DocuSign Developer Center.
64+
5565
## Installation
5666

5767
### Prerequisites

azure-pipelines.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pr:
1515
- releases/*
1616

1717
pool:
18-
name: Launcher Automation
18+
name: launcher-automation-pool
1919

2020
steps:
2121
- script: echo Hello, world!
@@ -54,7 +54,7 @@ steps:
5454
name: node_appsettings
5555
displayName: 'download appsettings.json'
5656
inputs:
57-
secureFile: 'node_appsettings.json'
57+
secureFile: 'node.appsettings.json'
5858

5959

6060
- script: |
@@ -97,4 +97,13 @@ steps:
9797
- script: |
9898
docker stop $(docker ps -a -q)
9999
docker rm $(docker ps -a -q)
100-
displayName: 'stop node app'
100+
displayName: 'stop node app'
101+
102+
- script: |
103+
allure generate --clean --output $(Build.SourcesDirectory)/node-allure-output '$(Build.SourcesDirectory)/launcher-automation/target/allure-results'
104+
displayName: generate allure html reports
105+
106+
- task: PublishAllureReport@1
107+
displayName: 'Publish Allure Report'
108+
inputs:
109+
reportDir: '$(Build.SourcesDirectory)/node-allure-output'

config/appsettings.example.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"clickAPIUrl": "https://demo.docusign.net/clickapi",
3030
"adminAPIUrl": "https://api-d.docusign.net/management",
3131
"monitorApiUrl": "https://lens-d.docusign.net",
32-
"maestroApiUrl": "https://demo.services.docusign.net/",
32+
"maestroApiUrl": "https://demo.services.docusign.net",
33+
"webformsApiUrl": "https://apps-d.docusign.com/api/webforms/v1.1",
3334
"codeExamplesManifest": "https://raw.githubusercontent.com/docusign/code-examples-csharp/master/manifest/CodeExamplesManifest.json"
3435
}
44.7 KB
Binary file not shown.

demo_documents/web-form-config.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const {
5555

5656
const { eg001connect } = require('./lib/connect/controllers');
5757
const { eg001maestro, eg002maestro, eg003maestro } = require('./lib/maestro/controllers');
58+
const { eg001webforms } = require('./lib/webforms/controllers');
5859

5960
const PORT = process.env.PORT || 3000;
6061
const HOST = process.env.HOST || 'localhost';
@@ -281,6 +282,12 @@ app.get('/mseg001', eg001maestro.getController)
281282
.get('/mseg003', eg003maestro.getController)
282283
.post('/mseg003', eg003maestro.createController);
283284

285+
app.get('/weg001', eg001webforms.getController)
286+
.get('/weg001webForm', eg001webforms.getWebFormCreateController)
287+
.post('/weg001', eg001webforms.createWebFormTemplate)
288+
.post('/weg001webForm', eg001webforms.createWebFormInstance);
289+
290+
284291
function dsLoginCB1(req, res, next) { req.dsAuthCodeGrant.oauth_callback1(req, res, next); }
285292
function dsLoginCB2(req, res, next) { req.dsAuthCodeGrant.oauth_callback2(req, res, next); }
286293

@@ -326,8 +333,11 @@ const ADMIN_SCOPES = [
326333
'asset_group_account_clone_read'
327334
];
328335
const MAESTRO_SCOPES = ['signature', 'aow_manage'];
336+
const WEBFORMS_SCOPES = [
337+
'webforms_read', 'webforms_instance_read', 'webforms_instance_write'
338+
];
329339

330-
const scope = [...ROOM_SCOPES, ...CLICK_SCOPES, ...MONITOR_SCOPES, ...ADMIN_SCOPES, ...SCOPES, ...MAESTRO_SCOPES];
340+
const scope = [...ROOM_SCOPES, ...CLICK_SCOPES, ...MONITOR_SCOPES, ...ADMIN_SCOPES, ...SCOPES, ...WEBFORMS_SCOPES, ...MAESTRO_SCOPES];
331341

332342
// Configure passport for DocusignStrategy
333343
let docusignStrategy = new DocusignStrategy({

lib/DSJwtAuth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let DsJwtAuth = function _DsJwtAuth(req) {
1818
this.accountName = req.user && req.user.accountName;
1919
this.basePath = req.user && req.user.basePath;
2020
this._tokenExpiration = req.user && req.user.tokenExpirationTimestamp;
21-
this.scopes = 'signature dtr.rooms.read dtr.rooms.write dtr.documents.read dtr.documents.write dtr.profile.read dtr.profile.write dtr.company.read dtr.company.write room_forms click.manage click.send organization_read group_read permission_read user_read user_write account_read domain_read identity_provider_read user_data_redact asset_group_account_read asset_group_account_clone_write asset_group_account_clone_read webforms_manage aow_manage';
21+
this.scopes = 'signature dtr.rooms.read dtr.rooms.write dtr.documents.read dtr.documents.write dtr.profile.read dtr.profile.write dtr.company.read dtr.company.write room_forms click.manage click.send organization_read group_read permission_read user_read user_write account_read domain_read identity_provider_read user_data_redact asset_group_account_read asset_group_account_clone_write asset_group_account_clone_read webforms_read webforms_instance_read webforms_instance_write aow_manage';
2222

2323
// For production use, you'd want to store the refresh token in non-volatile storage since it is
2424
// good for 30 days. You'd probably want to encrypt it too.

lib/admin/examples/auditUsers.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ const auditUsers = async (args) => {
2828
let opts = {};
2929

3030
for (const user of modifiedUsers) {
31+
//ds-snippet-end:Admin5Step5
32+
//ds-snippet-start:Admin5Step4
3133
opts.email = user.email;
34+
//ds-snippet-end:Admin5Step4
35+
//ds-snippet-start:Admin5Step5
3236
const result = await usersApi.getUserProfiles(args.organizationId, opts);
3337
results.push(result.users);
3438
}

lib/common/DSJwtAuth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
this.accountName = req.user && req.user.accountName;
1919
this.basePath = req.user && req.user.basePath;
2020
this._tokenExpiration = req.user && req.user.tokenExpirationTimestamp;
21-
this.scopes = 'signature dtr.rooms.read dtr.rooms.write dtr.documents.read dtr.documents.write dtr.profile.read dtr.profile.write dtr.company.read dtr.company.write room_forms click.manage click.send aow_manage';
21+
this.scopes = 'signature dtr.rooms.read dtr.rooms.write dtr.documents.read dtr.documents.write dtr.profile.read dtr.profile.write dtr.company.read dtr.company.write room_forms click.manage click.send webforms_read webforms_instance_read webforms_instance_write aow_manage';
2222

2323
// For production use, you'd want to store the refresh token in non-volatile storage since it is
2424
// good for 30 days. You'd probably want to encrypt it too.

0 commit comments

Comments
 (0)