bkper-js 1.19.4 → 1.21.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 +23 -13
- package/lib/model/Bkper.js +0 -15
- package/lib/model/Book.js +16 -0
- package/lib/model/User.js +16 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -545,19 +545,6 @@ export declare class BalancesReport {
|
|
|
545
545
|
* @public
|
|
546
546
|
*/
|
|
547
547
|
export declare class Bkper {
|
|
548
|
-
/**
|
|
549
|
-
* Instantiate a new [[Book]]
|
|
550
|
-
*
|
|
551
|
-
* Example:
|
|
552
|
-
* ```js
|
|
553
|
-
* var book = Bkper.newBook()
|
|
554
|
-
* .setName('My New Book')
|
|
555
|
-
* .setFractionDigits(2)
|
|
556
|
-
* .setDecimalSeparator('DOT')
|
|
557
|
-
* .create();
|
|
558
|
-
* ```
|
|
559
|
-
*/
|
|
560
|
-
static newBook(): Book;
|
|
561
548
|
/**
|
|
562
549
|
* Gets the [[Book]] with the specified bookId from url param.
|
|
563
550
|
*
|
|
@@ -778,6 +765,17 @@ export declare class Book {
|
|
|
778
765
|
* @returns The time zone offset of the book, in minutes
|
|
779
766
|
*/
|
|
780
767
|
getTimeZoneOffset(): number | undefined;
|
|
768
|
+
/**
|
|
769
|
+
* @returns The auto post status of the Book
|
|
770
|
+
*/
|
|
771
|
+
getAutoPost(): boolean | undefined;
|
|
772
|
+
/**
|
|
773
|
+
*
|
|
774
|
+
* Sets the auto post status of the Book
|
|
775
|
+
*
|
|
776
|
+
* @returns This Book, for chainning.
|
|
777
|
+
*/
|
|
778
|
+
setAutoPost(autoPost: boolean): Book;
|
|
781
779
|
/**
|
|
782
780
|
* @returns The last update date of the book, in in milliseconds
|
|
783
781
|
*/
|
|
@@ -2311,6 +2309,18 @@ export declare class User {
|
|
|
2311
2309
|
* @returns True if the User is in the free plan
|
|
2312
2310
|
*/
|
|
2313
2311
|
isFree(): boolean | undefined;
|
|
2312
|
+
/**
|
|
2313
|
+
* Gets the plan of the User.
|
|
2314
|
+
*
|
|
2315
|
+
* @returns The User's plan
|
|
2316
|
+
*/
|
|
2317
|
+
getPlan(): string | undefined;
|
|
2318
|
+
/**
|
|
2319
|
+
* Tells if billing is enabled for the User.
|
|
2320
|
+
*
|
|
2321
|
+
* @returns True if billing is enabled for the User
|
|
2322
|
+
*/
|
|
2323
|
+
hasBillingEnabled(): boolean | undefined;
|
|
2314
2324
|
/**
|
|
2315
2325
|
* Tells if the User has started the trial.
|
|
2316
2326
|
*
|
package/lib/model/Bkper.js
CHANGED
|
@@ -37,21 +37,6 @@ import { Collection } from "./Collection.js";
|
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
39
|
export class Bkper {
|
|
40
|
-
/**
|
|
41
|
-
* Instantiate a new [[Book]]
|
|
42
|
-
*
|
|
43
|
-
* Example:
|
|
44
|
-
* ```js
|
|
45
|
-
* var book = Bkper.newBook()
|
|
46
|
-
* .setName('My New Book')
|
|
47
|
-
* .setFractionDigits(2)
|
|
48
|
-
* .setDecimalSeparator('DOT')
|
|
49
|
-
* .create();
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
static newBook() {
|
|
53
|
-
return new Book();
|
|
54
|
-
}
|
|
55
40
|
/**
|
|
56
41
|
* Gets the [[Book]] with the specified bookId from url param.
|
|
57
42
|
*
|
package/lib/model/Book.js
CHANGED
|
@@ -252,6 +252,22 @@ export class Book {
|
|
|
252
252
|
getTimeZoneOffset() {
|
|
253
253
|
return this.payload.timeZoneOffset;
|
|
254
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* @returns The auto post status of the Book
|
|
257
|
+
*/
|
|
258
|
+
getAutoPost() {
|
|
259
|
+
return this.payload.autoPost;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
*
|
|
263
|
+
* Sets the auto post status of the Book
|
|
264
|
+
*
|
|
265
|
+
* @returns This Book, for chainning.
|
|
266
|
+
*/
|
|
267
|
+
setAutoPost(autoPost) {
|
|
268
|
+
this.payload.autoPost = autoPost;
|
|
269
|
+
return this;
|
|
270
|
+
}
|
|
255
271
|
/**
|
|
256
272
|
* @returns The last update date of the book, in in milliseconds
|
|
257
273
|
*/
|
package/lib/model/User.js
CHANGED
|
@@ -73,6 +73,22 @@ export class User {
|
|
|
73
73
|
isFree() {
|
|
74
74
|
return this.payload.free;
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Gets the plan of the User.
|
|
78
|
+
*
|
|
79
|
+
* @returns The User's plan
|
|
80
|
+
*/
|
|
81
|
+
getPlan() {
|
|
82
|
+
return this.payload.plan;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Tells if billing is enabled for the User.
|
|
86
|
+
*
|
|
87
|
+
* @returns True if billing is enabled for the User
|
|
88
|
+
*/
|
|
89
|
+
hasBillingEnabled() {
|
|
90
|
+
return this.payload.billingEnabled;
|
|
91
|
+
}
|
|
76
92
|
/**
|
|
77
93
|
* Tells if the User has started the trial.
|
|
78
94
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.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.
|
|
37
|
+
"@bkper/bkper-api-types": "^5.12.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@google-cloud/local-auth": "^3.0.1",
|