bkper-js 1.20.0 → 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 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,12 @@ 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;
2314
2318
  /**
2315
2319
  * Tells if billing is enabled for the User.
2316
2320
  *
@@ -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,14 @@ 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
+ }
76
84
  /**
77
85
  * Tells if billing is enabled for the User.
78
86
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "1.20.0",
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.10.0"
37
+ "@bkper/bkper-api-types": "^5.12.0"
38
38
  },
39
39
  "dependencies": {
40
40
  "@google-cloud/local-auth": "^3.0.1",