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.
@@ -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
- * @returns The cursor associated with the query for pagination.
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
- * @returns The first Transaction in the list.
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
- * Get the total number of transactions in the list.
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
- * Get the transactions in the list.
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() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "1.47.2",
3
+ "version": "2.0.0",
4
4
  "description": "Javascript client for Bkper REST API",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",