bkper-js 1.47.2 → 2.0.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 +346 -0
- package/README.md +24 -0
- package/lib/index.d.ts +891 -402
- package/lib/model/Account.js +81 -66
- package/lib/model/Agent.js +6 -0
- package/lib/model/Amount.js +72 -13
- package/lib/model/App.js +77 -26
- package/lib/model/BalancesReport.js +11 -5
- package/lib/model/Bkper.js +19 -42
- package/lib/model/Book.js +164 -94
- package/lib/model/BotResponse.js +13 -3
- package/lib/model/Collection.js +16 -2
- package/lib/model/Connection.js +8 -6
- package/lib/model/Conversation.js +9 -2
- package/lib/model/Event.js +18 -0
- package/lib/model/EventList.js +10 -5
- package/lib/model/File.js +31 -12
- package/lib/model/Group.js +75 -33
- package/lib/model/Integration.js +4 -2
- package/lib/model/Message.js +18 -5
- package/lib/model/Query.js +18 -4
- package/lib/model/Template.js +2 -0
- package/lib/model/Transaction.js +165 -93
- package/lib/model/TransactionList.js +14 -7
- package/lib/model/User.js +7 -1
- package/package.json +1 -1
|
@@ -10,6 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Transaction } from "./Transaction.js";
|
|
11
11
|
/**
|
|
12
12
|
* A list associated with a transaction query.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
13
15
|
*/
|
|
14
16
|
export class TransactionList {
|
|
15
17
|
constructor(book, payload) {
|
|
@@ -17,13 +19,17 @@ export class TransactionList {
|
|
|
17
19
|
this.payload = payload || {};
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
|
-
*
|
|
22
|
+
* Gets the cursor associated with the query for pagination.
|
|
23
|
+
*
|
|
24
|
+
* @returns The cursor associated with the query for pagination
|
|
21
25
|
*/
|
|
22
26
|
getCursor() {
|
|
23
27
|
return this.payload.cursor;
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
30
|
* Retrieves the account associated with the query, when filtering by account.
|
|
31
|
+
*
|
|
32
|
+
* @returns The account associated with the query, or undefined if not set
|
|
27
33
|
*/
|
|
28
34
|
getAccount() {
|
|
29
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -34,26 +40,27 @@ export class TransactionList {
|
|
|
34
40
|
});
|
|
35
41
|
}
|
|
36
42
|
/**
|
|
37
|
-
*
|
|
43
|
+
* Gets the first Transaction in the list.
|
|
44
|
+
*
|
|
45
|
+
* @returns The first Transaction in the list
|
|
38
46
|
*/
|
|
39
47
|
getFirst() {
|
|
40
48
|
const transactions = this.getItems();
|
|
41
49
|
return transactions.length > 0 ? transactions[0] : undefined;
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
52
|
+
* Gets the total number of transactions in the list.
|
|
44
53
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @returns The total number of transactions.
|
|
54
|
+
* @returns The total number of transactions
|
|
48
55
|
*/
|
|
49
56
|
size() {
|
|
50
57
|
var _a;
|
|
51
58
|
return ((_a = this.payload.items) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
52
59
|
}
|
|
53
60
|
/**
|
|
54
|
-
*
|
|
61
|
+
* Gets the transactions in the list.
|
|
55
62
|
*
|
|
56
|
-
* @returns An array of Transaction objects
|
|
63
|
+
* @returns An array of Transaction objects
|
|
57
64
|
*/
|
|
58
65
|
getItems() {
|
|
59
66
|
var _a;
|
package/lib/model/User.js
CHANGED
|
@@ -10,7 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Connection } from "./Connection.js";
|
|
11
11
|
import * as ConnectionService from '../service/connection-service.js';
|
|
12
12
|
/**
|
|
13
|
-
* This class defines a User.
|
|
13
|
+
* This class defines a User on the Bkper platform.
|
|
14
|
+
*
|
|
15
|
+
* Users can own and collaborate on [[Books]], manage [[Collections]], and connect to external services through [[Connections]].
|
|
16
|
+
*
|
|
17
|
+
* Each User has a unique identity, subscription plan details, and access permissions across the platform.
|
|
14
18
|
*
|
|
15
19
|
* @public
|
|
16
20
|
*/
|
|
@@ -20,6 +24,8 @@ export class User {
|
|
|
20
24
|
this.payload = payload || {};
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
27
|
+
* Gets an immutable copy of the JSON payload for this User.
|
|
28
|
+
*
|
|
23
29
|
* @returns An immutable copy of the json payload
|
|
24
30
|
*/
|
|
25
31
|
json() {
|