bkper-js 2.9.0 → 2.9.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/CHANGELOG.md +3 -1
- package/lib/index.d.ts +16 -98
- package/lib/model/Account.js +1 -5
- package/lib/model/App.js +1 -5
- package/lib/model/Book.js +1 -5
- package/lib/model/Collaborator.js +1 -5
- package/lib/model/Collection.js +1 -5
- package/lib/model/Connection.js +1 -5
- package/lib/model/Conversation.js +1 -5
- package/lib/model/File.js +1 -5
- package/lib/model/Group.js +1 -5
- package/lib/model/Integration.js +1 -5
- package/lib/model/Message.js +1 -5
- package/lib/model/Query.js +1 -5
- package/lib/model/Template.js +1 -5
- package/lib/model/Transaction.js +1 -5
- package/lib/model/User.js +1 -5
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,12 +12,14 @@ See what's new and what has changed in bkper-js
|
|
|
12
12
|
* Enhanced type safety with explicit Config type usage throughout
|
|
13
13
|
* Standardized `json()` method across resources for consistent JSON serialization
|
|
14
14
|
* Maintained full backward compatibility - no breaking changes to existing APIs
|
|
15
|
+
* Added `Account.isBalanceVerified`
|
|
15
16
|
* Added `App.getOwnerWebsiteUrl`
|
|
16
17
|
* Added `App.getReadme`
|
|
17
18
|
* Added `App.getRepositoryUrl`
|
|
18
19
|
* Added `App.getWebsiteUrl`
|
|
19
20
|
* Added `App.isInstallable`
|
|
20
21
|
* Added `App.isRepositoryPrivate`
|
|
22
|
+
* Added `Book.getCollaborators`
|
|
21
23
|
* Added `Collaborator`
|
|
22
24
|
* Added `Collaborator.json`
|
|
23
25
|
* Added `Collaborator.getId`
|
|
@@ -28,7 +30,7 @@ See what's new and what has changed in bkper-js
|
|
|
28
30
|
* Added `Collaborator.create`
|
|
29
31
|
* Added `Collaborator.update`
|
|
30
32
|
* Added `Collaborator.remove`
|
|
31
|
-
* Added `
|
|
33
|
+
* Added `Group.isBalanceVerified`
|
|
32
34
|
* Replaced axios with native Fetch API for better compatibility with multiple environments
|
|
33
35
|
|
|
34
36
|
**August 2025**
|
package/lib/index.d.ts
CHANGED
|
@@ -18,12 +18,7 @@
|
|
|
18
18
|
export declare class Account extends Resource<bkper.Account> {
|
|
19
19
|
|
|
20
20
|
constructor(book: Book, payload?: bkper.Account);
|
|
21
|
-
|
|
22
|
-
* Gets the configuration object for this Account.
|
|
23
|
-
*
|
|
24
|
-
* @returns The Config object from the parent Book
|
|
25
|
-
*/
|
|
26
|
-
getConfig(): Config;
|
|
21
|
+
|
|
27
22
|
/**
|
|
28
23
|
* Gets the Account internal id.
|
|
29
24
|
*
|
|
@@ -450,12 +445,7 @@ export declare class Amount {
|
|
|
450
445
|
export declare class App extends Resource<bkper.App> {
|
|
451
446
|
private config?;
|
|
452
447
|
constructor(payload?: bkper.App, config?: Config);
|
|
453
|
-
|
|
454
|
-
* Gets the configuration object for this App.
|
|
455
|
-
*
|
|
456
|
-
* @returns The Config object for this App or the global config
|
|
457
|
-
*/
|
|
458
|
-
getConfig(): Config;
|
|
448
|
+
|
|
459
449
|
/**
|
|
460
450
|
* Sets the webhook url for development.
|
|
461
451
|
*
|
|
@@ -1327,12 +1317,7 @@ export declare class Book extends Resource<bkper.Book> {
|
|
|
1327
1317
|
|
|
1328
1318
|
|
|
1329
1319
|
constructor(payload?: bkper.Book, config?: Config);
|
|
1330
|
-
|
|
1331
|
-
* Gets the configuration object for this Book.
|
|
1332
|
-
*
|
|
1333
|
-
* @returns The Config object for this Book or the global config
|
|
1334
|
-
*/
|
|
1335
|
-
getConfig(): Config;
|
|
1320
|
+
|
|
1336
1321
|
/**
|
|
1337
1322
|
* Gets the unique identifier of this Book.
|
|
1338
1323
|
*
|
|
@@ -1966,12 +1951,7 @@ export declare enum BotResponseType {
|
|
|
1966
1951
|
export declare class Collaborator extends Resource<bkper.Collaborator> {
|
|
1967
1952
|
|
|
1968
1953
|
constructor(book: Book, payload?: bkper.Collaborator);
|
|
1969
|
-
|
|
1970
|
-
* Gets the configuration object for this Collaborator.
|
|
1971
|
-
*
|
|
1972
|
-
* @returns The Config object from the parent Book
|
|
1973
|
-
*/
|
|
1974
|
-
getConfig(): Config;
|
|
1954
|
+
|
|
1975
1955
|
/**
|
|
1976
1956
|
* Gets the Collaborator internal id.
|
|
1977
1957
|
*
|
|
@@ -2034,12 +2014,7 @@ export declare class Collaborator extends Resource<bkper.Collaborator> {
|
|
|
2034
2014
|
export declare class Collection extends Resource<bkper.Collection> {
|
|
2035
2015
|
private config?;
|
|
2036
2016
|
constructor(payload?: bkper.Collection, config?: Config);
|
|
2037
|
-
|
|
2038
|
-
* Gets the configuration object for this Collection.
|
|
2039
|
-
*
|
|
2040
|
-
* @returns The Config object for this Collection or the global config
|
|
2041
|
-
*/
|
|
2042
|
-
getConfig(): Config;
|
|
2017
|
+
|
|
2043
2018
|
/**
|
|
2044
2019
|
* Gets the unique identifier of this Collection.
|
|
2045
2020
|
*
|
|
@@ -2175,12 +2150,7 @@ export declare interface Config {
|
|
|
2175
2150
|
export declare class Connection extends Resource<bkper.Connection> {
|
|
2176
2151
|
private config?;
|
|
2177
2152
|
constructor(payload?: bkper.Connection, config?: Config);
|
|
2178
|
-
|
|
2179
|
-
* Gets the configuration object for this Connection.
|
|
2180
|
-
*
|
|
2181
|
-
* @returns The Config object for this Connection or the global config
|
|
2182
|
-
*/
|
|
2183
|
-
getConfig(): Config;
|
|
2153
|
+
|
|
2184
2154
|
/**
|
|
2185
2155
|
* Gets the id of the Connection.
|
|
2186
2156
|
*
|
|
@@ -2346,12 +2316,7 @@ export declare class Conversation extends Resource<bkper.Conversation> {
|
|
|
2346
2316
|
|
|
2347
2317
|
private config?;
|
|
2348
2318
|
constructor(agent: Agent, payload?: bkper.Conversation, config?: Config);
|
|
2349
|
-
|
|
2350
|
-
* Gets the configuration object for this Conversation.
|
|
2351
|
-
*
|
|
2352
|
-
* @returns The Config object for this Conversation or the global config
|
|
2353
|
-
*/
|
|
2354
|
-
getConfig(): Config;
|
|
2319
|
+
|
|
2355
2320
|
/**
|
|
2356
2321
|
* Gets the Agent associated to this Conversation.
|
|
2357
2322
|
*
|
|
@@ -2564,12 +2529,7 @@ export declare enum EventType {
|
|
|
2564
2529
|
export declare class File extends Resource<bkper.File> {
|
|
2565
2530
|
|
|
2566
2531
|
constructor(book: Book, payload?: bkper.File);
|
|
2567
|
-
|
|
2568
|
-
* Gets the configuration object for this File.
|
|
2569
|
-
*
|
|
2570
|
-
* @returns The Config object from the parent Book
|
|
2571
|
-
*/
|
|
2572
|
-
getConfig(): Config;
|
|
2532
|
+
|
|
2573
2533
|
/**
|
|
2574
2534
|
* Gets the File id.
|
|
2575
2535
|
*
|
|
@@ -2698,12 +2658,7 @@ export declare class Group extends Resource<bkper.Group> {
|
|
|
2698
2658
|
|
|
2699
2659
|
|
|
2700
2660
|
constructor(book: Book, payload?: bkper.Group);
|
|
2701
|
-
|
|
2702
|
-
* Gets the configuration object for this Group.
|
|
2703
|
-
*
|
|
2704
|
-
* @returns The Config object from the parent Book
|
|
2705
|
-
*/
|
|
2706
|
-
getConfig(): Config;
|
|
2661
|
+
|
|
2707
2662
|
/**
|
|
2708
2663
|
* Gets the id of this Group.
|
|
2709
2664
|
*
|
|
@@ -2950,12 +2905,7 @@ export declare class Group extends Resource<bkper.Group> {
|
|
|
2950
2905
|
export declare class Integration extends Resource<bkper.Integration> {
|
|
2951
2906
|
private config?;
|
|
2952
2907
|
constructor(payload?: bkper.Integration, config?: Config);
|
|
2953
|
-
|
|
2954
|
-
* Gets the configuration object for this Integration.
|
|
2955
|
-
*
|
|
2956
|
-
* @returns The Config object for this Integration or the global config
|
|
2957
|
-
*/
|
|
2958
|
-
getConfig(): Config;
|
|
2908
|
+
|
|
2959
2909
|
/**
|
|
2960
2910
|
* Gets the [[Book]] id of the Integration.
|
|
2961
2911
|
*
|
|
@@ -3066,12 +3016,7 @@ export declare class Message extends Resource<bkper.Message> {
|
|
|
3066
3016
|
|
|
3067
3017
|
|
|
3068
3018
|
constructor(conversation: Conversation, payload?: bkper.Message, config?: Config);
|
|
3069
|
-
|
|
3070
|
-
* Gets the configuration object for this Message.
|
|
3071
|
-
*
|
|
3072
|
-
* @returns The Config object from the parent Conversation
|
|
3073
|
-
*/
|
|
3074
|
-
getConfig(): Config;
|
|
3019
|
+
|
|
3075
3020
|
/**
|
|
3076
3021
|
* Gets the Message universal identifier.
|
|
3077
3022
|
*
|
|
@@ -3277,12 +3222,7 @@ export declare enum Permission {
|
|
|
3277
3222
|
export declare class Query extends Resource<bkper.Query> {
|
|
3278
3223
|
|
|
3279
3224
|
constructor(book: Book, payload?: bkper.Query);
|
|
3280
|
-
|
|
3281
|
-
* Gets the configuration object for this Query.
|
|
3282
|
-
*
|
|
3283
|
-
* @returns The Config object from the parent Book
|
|
3284
|
-
*/
|
|
3285
|
-
getConfig(): Config;
|
|
3225
|
+
|
|
3286
3226
|
/**
|
|
3287
3227
|
* Gets the Query universal identifier.
|
|
3288
3228
|
*
|
|
@@ -3359,14 +3299,7 @@ declare abstract class Resource<T = any> {
|
|
|
3359
3299
|
* @returns An immutable copy of the json payload
|
|
3360
3300
|
*/
|
|
3361
3301
|
json(): T;
|
|
3362
|
-
|
|
3363
|
-
* Gets the effective configuration for this resource.
|
|
3364
|
-
* Each resource must implement this to either:
|
|
3365
|
-
* - Return its own config (for root containers like Book, Collection)
|
|
3366
|
-
* - Delegate to its container (for contained resources like Account, Transaction)
|
|
3367
|
-
* @returns The resolved configuration
|
|
3368
|
-
*/
|
|
3369
|
-
abstract getConfig(): Config;
|
|
3302
|
+
|
|
3370
3303
|
}
|
|
3371
3304
|
|
|
3372
3305
|
/**
|
|
@@ -3379,12 +3312,7 @@ declare abstract class Resource<T = any> {
|
|
|
3379
3312
|
export declare class Template extends Resource<bkper.Template> {
|
|
3380
3313
|
private config?;
|
|
3381
3314
|
constructor(json?: bkper.Template, config?: Config);
|
|
3382
|
-
|
|
3383
|
-
* Gets the configuration object for this Template.
|
|
3384
|
-
*
|
|
3385
|
-
* @returns The Config object for this Template or the global config
|
|
3386
|
-
*/
|
|
3387
|
-
getConfig(): Config;
|
|
3315
|
+
|
|
3388
3316
|
/**
|
|
3389
3317
|
* Gets the name of the Template.
|
|
3390
3318
|
*
|
|
@@ -3446,12 +3374,7 @@ export declare class Template extends Resource<bkper.Template> {
|
|
|
3446
3374
|
export declare class Transaction extends Resource<bkper.Transaction> {
|
|
3447
3375
|
|
|
3448
3376
|
constructor(book: Book, payload?: bkper.Transaction);
|
|
3449
|
-
|
|
3450
|
-
* Gets the configuration object for this Transaction.
|
|
3451
|
-
*
|
|
3452
|
-
* @returns The Config object from the parent Book
|
|
3453
|
-
*/
|
|
3454
|
-
getConfig(): Config;
|
|
3377
|
+
|
|
3455
3378
|
/**
|
|
3456
3379
|
* Gets the book associated with this transaction.
|
|
3457
3380
|
*
|
|
@@ -3949,12 +3872,7 @@ export declare class TransactionList {
|
|
|
3949
3872
|
export declare class User extends Resource<bkper.User> {
|
|
3950
3873
|
private config?;
|
|
3951
3874
|
constructor(payload?: bkper.User, config?: Config);
|
|
3952
|
-
|
|
3953
|
-
* Gets the configuration object for this User.
|
|
3954
|
-
*
|
|
3955
|
-
* @returns The Config object for this User or the global config
|
|
3956
|
-
*/
|
|
3957
|
-
getConfig(): Config;
|
|
3875
|
+
|
|
3958
3876
|
/**
|
|
3959
3877
|
* Gets the id of the User.
|
|
3960
3878
|
*
|
package/lib/model/Account.js
CHANGED
|
@@ -26,11 +26,7 @@ export class Account extends Resource {
|
|
|
26
26
|
super(payload || { createdAt: `${Date.now()}` });
|
|
27
27
|
this.book = book;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Gets the configuration object for this Account.
|
|
31
|
-
*
|
|
32
|
-
* @returns The Config object from the parent Book
|
|
33
|
-
*/
|
|
29
|
+
/** @internal */
|
|
34
30
|
getConfig() {
|
|
35
31
|
return this.book.getConfig();
|
|
36
32
|
}
|
package/lib/model/App.js
CHANGED
|
@@ -22,11 +22,7 @@ export class App extends Resource {
|
|
|
22
22
|
super(payload);
|
|
23
23
|
this.config = config;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Gets the configuration object for this App.
|
|
27
|
-
*
|
|
28
|
-
* @returns The Config object for this App or the global config
|
|
29
|
-
*/
|
|
25
|
+
/** @internal */
|
|
30
26
|
getConfig() {
|
|
31
27
|
return this.config || Bkper.globalConfig;
|
|
32
28
|
}
|
package/lib/model/Book.js
CHANGED
|
@@ -51,11 +51,7 @@ export class Book extends Resource {
|
|
|
51
51
|
this.mapGroups(this.payload.groups);
|
|
52
52
|
this.mapAccounts(this.payload.accounts);
|
|
53
53
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Gets the configuration object for this Book.
|
|
56
|
-
*
|
|
57
|
-
* @returns The Config object for this Book or the global config
|
|
58
|
-
*/
|
|
54
|
+
/** @internal */
|
|
59
55
|
getConfig() {
|
|
60
56
|
return this.config || Bkper.globalConfig;
|
|
61
57
|
}
|
|
@@ -21,11 +21,7 @@ export class Collaborator extends Resource {
|
|
|
21
21
|
super(payload);
|
|
22
22
|
this.book = book;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Gets the configuration object for this Collaborator.
|
|
26
|
-
*
|
|
27
|
-
* @returns The Config object from the parent Book
|
|
28
|
-
*/
|
|
24
|
+
/** @internal */
|
|
29
25
|
getConfig() {
|
|
30
26
|
return this.book.getConfig();
|
|
31
27
|
}
|
package/lib/model/Collection.js
CHANGED
|
@@ -21,11 +21,7 @@ export class Collection extends Resource {
|
|
|
21
21
|
super(payload);
|
|
22
22
|
this.config = config;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Gets the configuration object for this Collection.
|
|
26
|
-
*
|
|
27
|
-
* @returns The Config object for this Collection or the global config
|
|
28
|
-
*/
|
|
24
|
+
/** @internal */
|
|
29
25
|
getConfig() {
|
|
30
26
|
return this.config || Bkper.globalConfig;
|
|
31
27
|
}
|
package/lib/model/Connection.js
CHANGED
|
@@ -21,11 +21,7 @@ export class Connection extends Resource {
|
|
|
21
21
|
super(payload);
|
|
22
22
|
this.config = config;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Gets the configuration object for this Connection.
|
|
26
|
-
*
|
|
27
|
-
* @returns The Config object for this Connection or the global config
|
|
28
|
-
*/
|
|
24
|
+
/** @internal */
|
|
29
25
|
getConfig() {
|
|
30
26
|
return this.config || Bkper.globalConfig;
|
|
31
27
|
}
|
|
@@ -25,11 +25,7 @@ export class Conversation extends Resource {
|
|
|
25
25
|
this.agent = agent;
|
|
26
26
|
this.config = config;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Gets the configuration object for this Conversation.
|
|
30
|
-
*
|
|
31
|
-
* @returns The Config object for this Conversation or the global config
|
|
32
|
-
*/
|
|
28
|
+
/** @internal */
|
|
33
29
|
getConfig() {
|
|
34
30
|
return this.config || Bkper.globalConfig;
|
|
35
31
|
}
|
package/lib/model/File.js
CHANGED
|
@@ -22,11 +22,7 @@ export class File extends Resource {
|
|
|
22
22
|
super(payload || { createdAt: `${Date.now()}` });
|
|
23
23
|
this.book = book;
|
|
24
24
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Gets the configuration object for this File.
|
|
27
|
-
*
|
|
28
|
-
* @returns The Config object from the parent Book
|
|
29
|
-
*/
|
|
25
|
+
/** @internal */
|
|
30
26
|
getConfig() {
|
|
31
27
|
return this.book.getConfig();
|
|
32
28
|
}
|
package/lib/model/Group.js
CHANGED
|
@@ -27,11 +27,7 @@ export class Group extends Resource {
|
|
|
27
27
|
this.children = new Map();
|
|
28
28
|
this.book = book;
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Gets the configuration object for this Group.
|
|
32
|
-
*
|
|
33
|
-
* @returns The Config object from the parent Book
|
|
34
|
-
*/
|
|
30
|
+
/** @internal */
|
|
35
31
|
getConfig() {
|
|
36
32
|
return this.book.getConfig();
|
|
37
33
|
}
|
package/lib/model/Integration.js
CHANGED
|
@@ -20,11 +20,7 @@ export class Integration extends Resource {
|
|
|
20
20
|
super(payload || {});
|
|
21
21
|
this.config = config;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Gets the configuration object for this Integration.
|
|
25
|
-
*
|
|
26
|
-
* @returns The Config object for this Integration or the global config
|
|
27
|
-
*/
|
|
23
|
+
/** @internal */
|
|
28
24
|
getConfig() {
|
|
29
25
|
return this.config || Bkper.globalConfig;
|
|
30
26
|
}
|
package/lib/model/Message.js
CHANGED
|
@@ -23,11 +23,7 @@ export class Message extends Resource {
|
|
|
23
23
|
super(payload || {});
|
|
24
24
|
this.conversation = conversation;
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
27
|
-
* Gets the configuration object for this Message.
|
|
28
|
-
*
|
|
29
|
-
* @returns The Config object from the parent Conversation
|
|
30
|
-
*/
|
|
26
|
+
/** @internal */
|
|
31
27
|
getConfig() {
|
|
32
28
|
return this.conversation.getConfig();
|
|
33
29
|
}
|
package/lib/model/Query.js
CHANGED
|
@@ -21,11 +21,7 @@ export class Query extends Resource {
|
|
|
21
21
|
super(payload);
|
|
22
22
|
this.book = book;
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Gets the configuration object for this Query.
|
|
26
|
-
*
|
|
27
|
-
* @returns The Config object from the parent Book
|
|
28
|
-
*/
|
|
24
|
+
/** @internal */
|
|
29
25
|
getConfig() {
|
|
30
26
|
return this.book.getConfig();
|
|
31
27
|
}
|
package/lib/model/Template.js
CHANGED
|
@@ -12,11 +12,7 @@ export class Template extends Resource {
|
|
|
12
12
|
super(json);
|
|
13
13
|
this.config = config;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Gets the configuration object for this Template.
|
|
17
|
-
*
|
|
18
|
-
* @returns The Config object for this Template or the global config
|
|
19
|
-
*/
|
|
15
|
+
/** @internal */
|
|
20
16
|
getConfig() {
|
|
21
17
|
return this.config || Bkper.globalConfig;
|
|
22
18
|
}
|
package/lib/model/Transaction.js
CHANGED
|
@@ -26,11 +26,7 @@ export class Transaction extends Resource {
|
|
|
26
26
|
super(payload || { createdAt: `${Date.now()}` });
|
|
27
27
|
this.book = book;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Gets the configuration object for this Transaction.
|
|
31
|
-
*
|
|
32
|
-
* @returns The Config object from the parent Book
|
|
33
|
-
*/
|
|
29
|
+
/** @internal */
|
|
34
30
|
getConfig() {
|
|
35
31
|
return this.book.getConfig();
|
|
36
32
|
}
|
package/lib/model/User.js
CHANGED
|
@@ -25,11 +25,7 @@ export class User extends Resource {
|
|
|
25
25
|
super(payload);
|
|
26
26
|
this.config = config;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Gets the configuration object for this User.
|
|
30
|
-
*
|
|
31
|
-
* @returns The Config object for this User or the global config
|
|
32
|
-
*/
|
|
28
|
+
/** @internal */
|
|
33
29
|
getConfig() {
|
|
34
30
|
return this.config || Bkper.globalConfig;
|
|
35
31
|
}
|
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper-js",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "Javascript client for Bkper REST API",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"luxon": "^1.25.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.12
|
|
45
|
+
"@microsoft/api-extractor": "^7.52.12",
|
|
46
46
|
"@types/big.js": "^6.0.2",
|
|
47
47
|
"@types/chai": "^4.2.14",
|
|
48
48
|
"@types/luxon": "^1.25.1",
|