bkper-js 2.14.1 → 2.15.0
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/CHANGELOG.md +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/model/Book.js +13 -0
- package/lib/service/book-service.js +6 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1909,6 +1909,14 @@ export declare class Book extends Resource<bkper.Book> {
|
|
|
1909
1909
|
* @returns The updated Book object
|
|
1910
1910
|
*/
|
|
1911
1911
|
update(): Promise<Book>;
|
|
1912
|
+
/**
|
|
1913
|
+
* Warning!
|
|
1914
|
+
*
|
|
1915
|
+
* Deletes this Book and all its data (transactions, accounts, groups). Book owner only.
|
|
1916
|
+
*
|
|
1917
|
+
* @returns This Book after deletion
|
|
1918
|
+
*/
|
|
1919
|
+
remove(): Promise<Book>;
|
|
1912
1920
|
/**
|
|
1913
1921
|
* Create a [[BalancesReport]] based on query.
|
|
1914
1922
|
*
|
package/lib/model/Book.js
CHANGED
|
@@ -1172,6 +1172,19 @@ export class Book extends Resource {
|
|
|
1172
1172
|
return this;
|
|
1173
1173
|
});
|
|
1174
1174
|
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Warning!
|
|
1177
|
+
*
|
|
1178
|
+
* Deletes this Book and all its data (transactions, accounts, groups). Book owner only.
|
|
1179
|
+
*
|
|
1180
|
+
* @returns This Book after deletion
|
|
1181
|
+
*/
|
|
1182
|
+
remove() {
|
|
1183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1184
|
+
this.payload = yield BookService.deleteBook(this.getId(), this.getConfig());
|
|
1185
|
+
return this;
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1175
1188
|
/**
|
|
1176
1189
|
* Create a [[BalancesReport]] based on query.
|
|
1177
1190
|
*
|
|
@@ -74,4 +74,10 @@ export function copyBook(bookId, name, copyTransactions, fromDate, config) {
|
|
|
74
74
|
return response.data;
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
+
export function deleteBook(bookId, config) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const response = yield new HttpBooksApiV5Request(`${bookId}`, config).setMethod('DELETE').fetch();
|
|
80
|
+
return response.data;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
77
83
|
//# sourceMappingURL=book-service.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Javascript client for Bkper REST API",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\""
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@bkper/bkper-api-types": "^5.
|
|
38
|
+
"@bkper/bkper-api-types": "^5.30.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"big.js": "^6.0.3",
|