bkper-js 2.11.0 → 2.12.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 +6 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.js +1 -0
- package/lib/model/Backlog.js +29 -0
- package/lib/model/Book.js +12 -0
- package/lib/service/event-service.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,9 @@ See what's new and what has changed in bkper-js
|
|
|
20
20
|
- Added `App.isInstallable`
|
|
21
21
|
- Added `App.isRepositoryPrivate`
|
|
22
22
|
- Added `Book.getCollaborators`
|
|
23
|
+
- Added `Book.getBacklog`
|
|
24
|
+
- Added `Backlog`
|
|
25
|
+
- Added `Backlog.getCount`
|
|
23
26
|
- Added `Collaborator`
|
|
24
27
|
- Added `Collaborator.json`
|
|
25
28
|
- Added `Collaborator.getId`
|
|
@@ -31,6 +34,9 @@ See what's new and what has changed in bkper-js
|
|
|
31
34
|
- Added `Collaborator.update`
|
|
32
35
|
- Added `Collaborator.remove`
|
|
33
36
|
- Added `Group.isBalanceVerified`
|
|
37
|
+
- Deprecated `Integration.getLogo`
|
|
38
|
+
- Added `Integration.getLogoUrl`
|
|
39
|
+
- Added `Integration.getLogoUrlDark`
|
|
34
40
|
- Replaced axios with native Fetch API for better compatibility with multiple environments
|
|
35
41
|
|
|
36
42
|
**August 2025**
|
package/lib/index.d.ts
CHANGED
|
@@ -640,6 +640,26 @@ export declare class App extends Resource<bkper.App> {
|
|
|
640
640
|
update(): Promise<App>;
|
|
641
641
|
}
|
|
642
642
|
|
|
643
|
+
/**
|
|
644
|
+
*
|
|
645
|
+
* This class defines the Backlog of a [[Book]].
|
|
646
|
+
*
|
|
647
|
+
* A Backlog is a list of pending tasks in a Book
|
|
648
|
+
*
|
|
649
|
+
* @public
|
|
650
|
+
*/
|
|
651
|
+
export declare class Backlog extends Resource<bkper.Backlog> {
|
|
652
|
+
private config?;
|
|
653
|
+
constructor(payload?: bkper.Backlog, config?: Config);
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Returns the number of pending tasks in this Backlog.
|
|
657
|
+
*
|
|
658
|
+
* @returns The number of tasks in the Backlog, or undefined if not available.
|
|
659
|
+
*/
|
|
660
|
+
getCount(): number | undefined;
|
|
661
|
+
}
|
|
662
|
+
|
|
643
663
|
/**
|
|
644
664
|
* Class that represents an [[Account]] or [[Group]] balance on a window of time (Day / Month / Year).
|
|
645
665
|
*
|
|
@@ -1844,6 +1864,12 @@ export declare class Book extends Resource<bkper.Book> {
|
|
|
1844
1864
|
* @returns Array of Collaborator objects
|
|
1845
1865
|
*/
|
|
1846
1866
|
getCollaborators(): Promise<Collaborator[]>;
|
|
1867
|
+
/**
|
|
1868
|
+
* Gets the Backlog of this Book.
|
|
1869
|
+
*
|
|
1870
|
+
* @returns The Backlog object
|
|
1871
|
+
*/
|
|
1872
|
+
getBacklog(): Promise<Backlog>;
|
|
1847
1873
|
}
|
|
1848
1874
|
|
|
1849
1875
|
/**
|
package/lib/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { Account } from "./model/Account.js";
|
|
|
9
9
|
export { Agent } from "./model/Agent.js";
|
|
10
10
|
export { Amount } from "./model/Amount.js";
|
|
11
11
|
export { App } from "./model/App.js";
|
|
12
|
+
export { Backlog } from "./model/Backlog.js";
|
|
12
13
|
export { Balance } from "./model/Balance.js";
|
|
13
14
|
export { BalancesDataTableBuilder } from "./model/BalancesDataTableBuilder.js";
|
|
14
15
|
export { BalancesReport } from "./model/BalancesReport.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Resource } from "./Resource.js";
|
|
2
|
+
import { Bkper } from "./Bkper.js";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* This class defines the Backlog of a [[Book]].
|
|
6
|
+
*
|
|
7
|
+
* A Backlog is a list of pending tasks in a Book
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export class Backlog extends Resource {
|
|
12
|
+
constructor(payload, config) {
|
|
13
|
+
super(payload);
|
|
14
|
+
this.config = config;
|
|
15
|
+
}
|
|
16
|
+
/** @internal */
|
|
17
|
+
getConfig() {
|
|
18
|
+
return this.config || Bkper.globalConfig;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Returns the number of pending tasks in this Backlog.
|
|
22
|
+
*
|
|
23
|
+
* @returns The number of tasks in the Backlog, or undefined if not available.
|
|
24
|
+
*/
|
|
25
|
+
getCount() {
|
|
26
|
+
return this.payload.count;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=Backlog.js.map
|
package/lib/model/Book.js
CHANGED
|
@@ -33,6 +33,7 @@ import { BalancesReport } from "./BalancesReport.js";
|
|
|
33
33
|
import { App } from "./App.js";
|
|
34
34
|
import { Query } from "./Query.js";
|
|
35
35
|
import { Bkper } from "./Bkper.js";
|
|
36
|
+
import { Backlog } from "./Backlog.js";
|
|
36
37
|
/**
|
|
37
38
|
* A Book represents a [General Ledger](https://en.wikipedia.org/wiki/General_ledger) for a company or business, but can also represent a [Ledger](https://en.wikipedia.org/wiki/Ledger) for a project or department
|
|
38
39
|
*
|
|
@@ -1140,5 +1141,16 @@ export class Book extends Resource {
|
|
|
1140
1141
|
return this.collaborators;
|
|
1141
1142
|
});
|
|
1142
1143
|
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Gets the Backlog of this Book.
|
|
1146
|
+
*
|
|
1147
|
+
* @returns The Backlog object
|
|
1148
|
+
*/
|
|
1149
|
+
getBacklog() {
|
|
1150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1151
|
+
const backlogPayload = yield EventService.getBacklog(this, this.getConfig());
|
|
1152
|
+
return new Backlog(backlogPayload);
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1143
1155
|
}
|
|
1144
1156
|
//# sourceMappingURL=Book.js.map
|
|
@@ -44,4 +44,10 @@ export function replayEventsBatch(book, eventList, errorsOnly, config) {
|
|
|
44
44
|
yield request.fetch();
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
+
export function getBacklog(book, config) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const response = yield new HttpBooksApiV5Request(`${book.getId()}/events/backlog`, config).setMethod("GET").fetch();
|
|
50
|
+
return response.data;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
47
53
|
//# sourceMappingURL=event-service.js.map
|