bkper-js 2.44.0 → 2.45.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/dist/bkper.min.js +1 -1
- package/dist/bkper.min.js.map +3 -3
- package/lib/index.d.ts +4 -0
- package/lib/model/Billing.js +6 -2
- package/lib/model/Book.js +2 -1
- package/lib/model/Enums.js +4 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -2820,6 +2820,10 @@ export declare enum EventType {
|
|
|
2820
2820
|
INTEGRATION_UPDATED = "INTEGRATION_UPDATED",
|
|
2821
2821
|
INTEGRATION_DELETED = "INTEGRATION_DELETED",
|
|
2822
2822
|
BOOK_AUDITED = "BOOK_AUDITED",
|
|
2823
|
+
/**
|
|
2824
|
+
* Daily per-Book event for Apps subscribed to it, delivered at or after 01:00 in the Book's time zone.
|
|
2825
|
+
*/
|
|
2826
|
+
BOOK_OVERNIGHT = "BOOK_OVERNIGHT",
|
|
2823
2827
|
BOOK_CREATED = "BOOK_CREATED",
|
|
2824
2828
|
BOOK_UPDATED = "BOOK_UPDATED",
|
|
2825
2829
|
BOOK_DELETED = "BOOK_DELETED"
|
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/lib/model/Enums.js
CHANGED
|
@@ -265,6 +265,10 @@ export var EventType;
|
|
|
265
265
|
EventType["INTEGRATION_UPDATED"] = "INTEGRATION_UPDATED";
|
|
266
266
|
EventType["INTEGRATION_DELETED"] = "INTEGRATION_DELETED";
|
|
267
267
|
EventType["BOOK_AUDITED"] = "BOOK_AUDITED";
|
|
268
|
+
/**
|
|
269
|
+
* Daily per-Book event for Apps subscribed to it, delivered at or after 01:00 in the Book's time zone.
|
|
270
|
+
*/
|
|
271
|
+
EventType["BOOK_OVERNIGHT"] = "BOOK_OVERNIGHT";
|
|
268
272
|
EventType["BOOK_CREATED"] = "BOOK_CREATED";
|
|
269
273
|
EventType["BOOK_UPDATED"] = "BOOK_UPDATED";
|
|
270
274
|
EventType["BOOK_DELETED"] = "BOOK_DELETED";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper-js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.45.1",
|
|
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.45.0",
|
|
42
42
|
"big.js": "^6.0.3",
|
|
43
43
|
"dayjs": "^1.10.3",
|
|
44
44
|
"luxon": "^1.25.0",
|