bkper-js 2.45.0 → 2.46.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/dist/bkper.min.js +1 -1
- package/dist/bkper.min.js.map +3 -3
- package/lib/index.d.ts +6 -0
- package/lib/model/App.js +8 -0
- package/lib/model/Billing.js +6 -2
- package/lib/model/Book.js +2 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -524,6 +524,12 @@ export declare class App extends Resource<bkper.App> {
|
|
|
524
524
|
* @returns True if this App is published
|
|
525
525
|
*/
|
|
526
526
|
isPublished(): boolean;
|
|
527
|
+
/**
|
|
528
|
+
* Checks if this App is hidden.
|
|
529
|
+
*
|
|
530
|
+
* @returns True if this App is hidden, defaults to false
|
|
531
|
+
*/
|
|
532
|
+
isHidden(): boolean;
|
|
527
533
|
/**
|
|
528
534
|
* Tells if this App is installable.
|
|
529
535
|
*
|
package/lib/model/App.js
CHANGED
|
@@ -79,6 +79,14 @@ export class App extends Resource {
|
|
|
79
79
|
isPublished() {
|
|
80
80
|
return this.payload.published || false;
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Checks if this App is hidden.
|
|
84
|
+
*
|
|
85
|
+
* @returns True if this App is hidden, defaults to false
|
|
86
|
+
*/
|
|
87
|
+
isHidden() {
|
|
88
|
+
return this.payload.hidden || false;
|
|
89
|
+
}
|
|
82
90
|
/**
|
|
83
91
|
* Tells if this App is installable.
|
|
84
92
|
*
|
package/lib/model/Billing.js
CHANGED
|
@@ -96,7 +96,9 @@ export class Billing extends Resource {
|
|
|
96
96
|
* @returns The number of total transactions this month
|
|
97
97
|
*/
|
|
98
98
|
getTotalTransactionsThisMonth() {
|
|
99
|
-
|
|
99
|
+
const total = this.payload.totalTransactionsThisMonth;
|
|
100
|
+
// int64 totals arrive as JSON strings
|
|
101
|
+
return total != null ? +total : undefined;
|
|
100
102
|
}
|
|
101
103
|
/**
|
|
102
104
|
* Gets the number of total transactions this year for the User's billing account.
|
|
@@ -104,7 +106,9 @@ export class Billing extends Resource {
|
|
|
104
106
|
* @returns The number of total transactions this year
|
|
105
107
|
*/
|
|
106
108
|
getTotalTransactionsThisYear() {
|
|
107
|
-
|
|
109
|
+
const total = this.payload.totalTransactionsThisYear;
|
|
110
|
+
// int64 totals arrive as JSON strings
|
|
111
|
+
return total != null ? +total : undefined;
|
|
108
112
|
}
|
|
109
113
|
/**
|
|
110
114
|
* Gets the authoritative rolling monthly average of posted transactions.
|
package/lib/model/Book.js
CHANGED
|
@@ -1174,7 +1174,8 @@ export class Book extends ResourceProperty {
|
|
|
1174
1174
|
countTransactions(query) {
|
|
1175
1175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1176
1176
|
const count = yield TransactionService.countTransactions(this.getId(), query, this.getConfig());
|
|
1177
|
-
|
|
1177
|
+
// int64 totals arrive as JSON strings
|
|
1178
|
+
return count.total != null ? +count.total : undefined;
|
|
1178
1179
|
});
|
|
1179
1180
|
}
|
|
1180
1181
|
listEvents(optionsOrAfterDate, beforeDate, onError, resourceId, limit, cursor) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.46.0",
|
|
4
4
|
"description": "Javascript client for Bkper REST API",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"release:major": "npm version major -m \"chore(release): v%s\""
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@bkper/bkper-api-types": "^5.
|
|
41
|
+
"@bkper/bkper-api-types": "^5.48.0",
|
|
42
42
|
"big.js": "^6.0.3",
|
|
43
43
|
"dayjs": "^1.10.3",
|
|
44
44
|
"luxon": "^1.25.0",
|