Skip to content

Commit

Permalink
chore: Sign requests multiple documents
Browse files Browse the repository at this point in the history
  • Loading branch information
congminh1254 committed Jul 7, 2023
1 parent a7c5663 commit ed969ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/sign-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ OPTIONS
supported for: is_in_person,order,embed_url_external_user_id,redirect_url,declined_redirect_url
--source-files=source-files
(required) Comma separated list of files to create a signing document from. This is currently limited to one file,
(required) Comma separated list of files to create a signing document from. This is currently limited to 10 files,
e.g. 12345
--[no-]text-signatures-enabled
Expand Down
2 changes: 1 addition & 1 deletion src/commands/sign-requests/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ SignRequestsCreateCommand.flags = {
'source-files': flags.string({
required: true,
description:
'Comma separated list of files to create a signing document from. This is currently limited to one file, e.g. 12345',
'Comma separated list of files to create a signing document from. This is currently limited to 10 files, e.g. 12345',
parse: input => input.split(',').map(id => ({
type: 'file',
id,
Expand Down
13 changes: 11 additions & 2 deletions test/commands/sign-requests.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('Sign requests', () => {
signerRedirectUrl = 'https://box.com/redirect_url_signer_1',
signerDeclinedRedirectUrl = 'https://box.com/declined_redirect_url_signer_1',
fileId = '1234',
fileId2 = '2345',
parentFolderId = '2345',
documentTag1Id = '3456',
documentTag1Value = 'hello',
Expand All @@ -76,6 +77,10 @@ describe('Sign requests', () => {
type: 'file',
id: fileId,
},
{
type: 'file',
id: fileId2,
}
],
parent_folder: {
type: 'folder',
Expand All @@ -100,7 +105,7 @@ describe('Sign requests', () => {
.command([
'sign-requests:create',
`--signer=email=${signerEmail},role=approver,is_in_person=1,redirect_url=${signerRedirectUrl},declined_redirect_url=${signerDeclinedRedirectUrl}`,
`--source-files=${fileId}`,
`--source-files=${fileId},${fileId2}`,
`--parent-folder=${parentFolderId}`,
`--prefill-tag=id=${documentTag1Id},text=${documentTag1Value}`,
`--prefill-tag=id=${documentTag2Id},checkbox=0`,
Expand Down Expand Up @@ -130,6 +135,10 @@ describe('Sign requests', () => {
type: 'file',
id: fileId,
},
{
type: 'file',
id: fileId2,
}
],
parent_folder: {
type: 'folder',
Expand All @@ -154,7 +163,7 @@ describe('Sign requests', () => {
.command([
'sign-requests:create',
`--signer=email=${signerEmail},role=approver,is-in-person=1,redirect-url=${signerRedirectUrl},declined-redirect-url=${signerDeclinedRedirectUrl}`,
`--source-files=${fileId}`,
`--source-files=${fileId},${fileId2}`,
`--parent-folder=${parentFolderId}`,
`--prefill-tag=id=${documentTag1Id},text=${documentTag1Value}`,
`--prefill-tag=id=${documentTag2Id},checkbox=0`,
Expand Down

0 comments on commit ed969ad

Please sign in to comment.