Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "6eb2c9c", "specHash": "0a89b2b", "version": "1.10.0" }
{ "engineHash": "5ab9c2b", "specHash": "091b558", "version": "1.10.0" }
9 changes: 6 additions & 3 deletions src/managers/downloads.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,13 @@ export class DownloadsManager {
}
return response.url;
}
if (response.headers.location == void 0) {
throw new BoxSdkError({ message: 'No location header in response' });
if ('location' in response.headers) {
return response.headers.location;
}
return response.headers.location;
if ('Location' in response.headers) {
return response.headers.Location;
}
throw new BoxSdkError({ message: 'No location header in response' });
}
/**
* Returns the contents of a file in binary format.
Expand Down
9 changes: 6 additions & 3 deletions src/managers/files.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1089,10 +1089,13 @@ export class FilesManager {
}
return response.url;
}
if (response.headers.location == void 0) {
throw new BoxSdkError({ message: 'No location header in response' });
if ('location' in response.headers) {
return response.headers.location;
}
return response.headers.location;
if ('Location' in response.headers) {
return response.headers.Location;
}
throw new BoxSdkError({ message: 'No location header in response' });
}
/**
* Retrieves a thumbnail, or smaller image representation, of a file.
Expand Down
8 changes: 5 additions & 3 deletions src/test/signRequests.generated.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ test('testCreateGetCancelAndListSignRequest', async function testCreateGetCancel
if (!(createdSignRequest.isDocumentPreparationNeeded == false)) {
throw new Error('Assertion failed');
}
if (!(createdSignRequest.name == 'Sign Request')) {
if (!(createdSignRequest.name == 'Sign Request.pdf')) {
throw new Error('Assertion failed');
}
if (!(createdSignRequest.redirectUrl == 'https://www.box.com')) {
throw new Error('Assertion failed');
}
if (!(createdSignRequest.signFiles!.files![0].name == fileToSign.name)) {
if (
!(createdSignRequest.signFiles!.files![0].name == createdSignRequest.name)
) {
throw new Error('Assertion failed');
}
if (!(createdSignRequest.signers![1].email == signerEmail)) {
Expand Down Expand Up @@ -164,7 +166,7 @@ test('testCreateGetCancelAndListSignRequest', async function testCreateGetCancel
}
const newSignRequest: SignRequest =
await client.signRequests.getSignRequestById(createdSignRequest.id!);
if (!(newSignRequest.signFiles!.files![0].name == fileToSign.name)) {
if (!(newSignRequest.signFiles!.files![0].name == createdSignRequest.name)) {
throw new Error('Assertion failed');
}
if (!(newSignRequest.signers![1].email == signerEmail)) {
Expand Down
Loading