bkper-js 2.8.1 → 2.9.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/lib/index.d.ts CHANGED
@@ -44,6 +44,12 @@ export declare class Account extends Resource<bkper.Account> {
44
44
  * @returns This Account, for chaining
45
45
  */
46
46
  setName(name: string): Account;
47
+ /**
48
+ * Tells if the balance of this Account has been verified/audited.
49
+ *
50
+ * @returns True if the balance of this Account has been verified/audited
51
+ */
52
+ isBalanceVerified(): boolean | undefined;
47
53
  /**
48
54
  * Gets the normalized name of this Account without spaces or special characters.
49
55
  *
@@ -2718,6 +2724,12 @@ export declare class Group extends Resource<bkper.Group> {
2718
2724
  * @returns This Group, for chaining
2719
2725
  */
2720
2726
  setName(name: string): Group;
2727
+ /**
2728
+ * Tells if the balance of this Group has been verified/audited.
2729
+ *
2730
+ * @returns True if the balance of this Group has been verified/audited
2731
+ */
2732
+ isBalanceVerified(): Promise<boolean | undefined>;
2721
2733
  /**
2722
2734
  * Tells if the Group is locked by the Book owner.
2723
2735
  *
@@ -61,6 +61,14 @@ export class Account extends Resource {
61
61
  this.payload.name = name;
62
62
  return this;
63
63
  }
64
+ /**
65
+ * Tells if the balance of this Account has been verified/audited.
66
+ *
67
+ * @returns True if the balance of this Account has been verified/audited
68
+ */
69
+ isBalanceVerified() {
70
+ return this.payload.balanceVerified;
71
+ }
64
72
  /**
65
73
  * Gets the normalized name of this Account without spaces or special characters.
66
74
  *
@@ -62,6 +62,22 @@ export class Group extends Resource {
62
62
  this.payload.name = name;
63
63
  return this;
64
64
  }
65
+ /**
66
+ * Tells if the balance of this Group has been verified/audited.
67
+ *
68
+ * @returns True if the balance of this Group has been verified/audited
69
+ */
70
+ isBalanceVerified() {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ const accounts = yield this.getAccounts();
73
+ for (const account of accounts) {
74
+ if (!account.isBalanceVerified()) {
75
+ return false;
76
+ }
77
+ }
78
+ return true;
79
+ });
80
+ }
65
81
  /**
66
82
  * Tells if the Group is locked by the Book owner.
67
83
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "2.8.1",
3
+ "version": "2.9.0",
4
4
  "description": "Javascript client for Bkper REST API",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
@@ -34,7 +34,7 @@
34
34
  "postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\""
35
35
  },
36
36
  "peerDependencies": {
37
- "@bkper/bkper-api-types": "^5.25.0"
37
+ "@bkper/bkper-api-types": "^5.26.0"
38
38
  },
39
39
  "dependencies": {
40
40
  "big.js": "^6.0.3",