bkper-js 1.3.0 → 1.4.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 +40 -0
- package/lib/model/User.js +54 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1824,6 +1824,10 @@ export declare class TransactionIterator {
|
|
|
1824
1824
|
export declare class User {
|
|
1825
1825
|
|
|
1826
1826
|
constructor(json?: bkper.User);
|
|
1827
|
+
/**
|
|
1828
|
+
* @returns The wrapped plain json object
|
|
1829
|
+
*/
|
|
1830
|
+
json(): bkper.User;
|
|
1827
1831
|
/**
|
|
1828
1832
|
* Gets the id of the User.
|
|
1829
1833
|
*
|
|
@@ -1842,6 +1846,42 @@ export declare class User {
|
|
|
1842
1846
|
* @returns The User's full name
|
|
1843
1847
|
*/
|
|
1844
1848
|
getFullName(): string | undefined;
|
|
1849
|
+
/**
|
|
1850
|
+
* Gets the email of the User.
|
|
1851
|
+
*
|
|
1852
|
+
* @returns The User's email
|
|
1853
|
+
*/
|
|
1854
|
+
getEmail(): string | undefined;
|
|
1855
|
+
/**
|
|
1856
|
+
* Gets the hosted domain of the User.
|
|
1857
|
+
*
|
|
1858
|
+
* @returns The User's hosted domain
|
|
1859
|
+
*/
|
|
1860
|
+
getHostedDomain(): string | undefined;
|
|
1861
|
+
/**
|
|
1862
|
+
* Tells if the User is in the free plan.
|
|
1863
|
+
*
|
|
1864
|
+
* @returns True if the User is in the free plan
|
|
1865
|
+
*/
|
|
1866
|
+
isFree(): boolean | undefined;
|
|
1867
|
+
/**
|
|
1868
|
+
* Tells if the User has started the trial.
|
|
1869
|
+
*
|
|
1870
|
+
* @returns True if the User has started the trial
|
|
1871
|
+
*/
|
|
1872
|
+
hasStartedTrial(): boolean | undefined;
|
|
1873
|
+
/**
|
|
1874
|
+
* Gets the days left in User's trial.
|
|
1875
|
+
*
|
|
1876
|
+
* @returns The User's days left in trial
|
|
1877
|
+
*/
|
|
1878
|
+
getDaysLeftInTrial(): number | undefined;
|
|
1879
|
+
/**
|
|
1880
|
+
* Tells if the User has already used [[Connections]].
|
|
1881
|
+
*
|
|
1882
|
+
* @returns True if the User has already used Connections
|
|
1883
|
+
*/
|
|
1884
|
+
hasUsedConnections(): boolean | undefined;
|
|
1845
1885
|
/**
|
|
1846
1886
|
* Gets the [[Connections]] of the User.
|
|
1847
1887
|
*
|
package/lib/model/User.js
CHANGED
|
@@ -20,6 +20,12 @@ export class User {
|
|
|
20
20
|
this.wrapped = {};
|
|
21
21
|
this.wrapped = json || {};
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* @returns The wrapped plain json object
|
|
25
|
+
*/
|
|
26
|
+
json() {
|
|
27
|
+
return this.wrapped;
|
|
28
|
+
}
|
|
23
29
|
/**
|
|
24
30
|
* Gets the id of the User.
|
|
25
31
|
*
|
|
@@ -44,6 +50,54 @@ export class User {
|
|
|
44
50
|
getFullName() {
|
|
45
51
|
return this.wrapped.fullName;
|
|
46
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Gets the email of the User.
|
|
55
|
+
*
|
|
56
|
+
* @returns The User's email
|
|
57
|
+
*/
|
|
58
|
+
getEmail() {
|
|
59
|
+
return this.wrapped.email;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Gets the hosted domain of the User.
|
|
63
|
+
*
|
|
64
|
+
* @returns The User's hosted domain
|
|
65
|
+
*/
|
|
66
|
+
getHostedDomain() {
|
|
67
|
+
return this.wrapped.hostedDomain;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Tells if the User is in the free plan.
|
|
71
|
+
*
|
|
72
|
+
* @returns True if the User is in the free plan
|
|
73
|
+
*/
|
|
74
|
+
isFree() {
|
|
75
|
+
return this.wrapped.free;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Tells if the User has started the trial.
|
|
79
|
+
*
|
|
80
|
+
* @returns True if the User has started the trial
|
|
81
|
+
*/
|
|
82
|
+
hasStartedTrial() {
|
|
83
|
+
return this.wrapped.startedTrial;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets the days left in User's trial.
|
|
87
|
+
*
|
|
88
|
+
* @returns The User's days left in trial
|
|
89
|
+
*/
|
|
90
|
+
getDaysLeftInTrial() {
|
|
91
|
+
return this.wrapped.daysLeftInTrial;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Tells if the User has already used [[Connections]].
|
|
95
|
+
*
|
|
96
|
+
* @returns True if the User has already used Connections
|
|
97
|
+
*/
|
|
98
|
+
hasUsedConnections() {
|
|
99
|
+
return this.wrapped.bankConnections;
|
|
100
|
+
}
|
|
47
101
|
/**
|
|
48
102
|
* Gets the [[Connections]] of the User.
|
|
49
103
|
*
|