bkper-js 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1760,7 +1760,7 @@ export declare class Book {
1760
1760
  *
1761
1761
  * @returns The [[File]] object
1762
1762
  */
1763
- getFile(id: string): Promise<File>;
1763
+ getFile(id: string): Promise<File | undefined>;
1764
1764
  /**
1765
1765
  * Performs create new Book.
1766
1766
  *
package/lib/model/Book.js CHANGED
@@ -1020,6 +1020,9 @@ export class Book {
1020
1020
  getFile(id) {
1021
1021
  return __awaiter(this, void 0, void 0, function* () {
1022
1022
  let wrapped = yield FileService.getFile(this.getId(), id);
1023
+ if (!wrapped) {
1024
+ return undefined;
1025
+ }
1023
1026
  let file = new File(this, wrapped);
1024
1027
  return file;
1025
1028
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "Javascript client for Bkper REST API",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",