bkper-js 1.47.2 → 2.0.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 +346 -0
- package/README.md +24 -0
- package/lib/index.d.ts +891 -402
- package/lib/model/Account.js +81 -66
- package/lib/model/Agent.js +6 -0
- package/lib/model/Amount.js +72 -13
- package/lib/model/App.js +77 -26
- package/lib/model/BalancesReport.js +11 -5
- package/lib/model/Bkper.js +19 -42
- package/lib/model/Book.js +164 -94
- package/lib/model/BotResponse.js +13 -3
- package/lib/model/Collection.js +16 -2
- package/lib/model/Connection.js +8 -6
- package/lib/model/Conversation.js +9 -2
- package/lib/model/Event.js +18 -0
- package/lib/model/EventList.js +10 -5
- package/lib/model/File.js +31 -12
- package/lib/model/Group.js +75 -33
- package/lib/model/Integration.js +4 -2
- package/lib/model/Message.js +18 -5
- package/lib/model/Query.js +18 -4
- package/lib/model/Template.js +2 -0
- package/lib/model/Transaction.js +165 -93
- package/lib/model/TransactionList.js +14 -7
- package/lib/model/User.js +7 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -7,10 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
10
|
* This class defines an [Account](https://en.wikipedia.org/wiki/Account_(bookkeeping)) of a [[Book]].
|
|
12
11
|
*
|
|
13
|
-
* It
|
|
12
|
+
* It maintains a balance of all amount [credited and debited](http://en.wikipedia.org/wiki/Debits_and_credits) in it by [[Transactions]].
|
|
14
13
|
*
|
|
15
14
|
* An Account can be grouped by [[Groups]].
|
|
16
15
|
*
|
|
@@ -21,59 +20,75 @@ export declare class Account {
|
|
|
21
20
|
|
|
22
21
|
constructor(book: Book, payload?: bkper.Account);
|
|
23
22
|
/**
|
|
23
|
+
* Gets an immutable copy of the JSON payload.
|
|
24
|
+
*
|
|
24
25
|
* @returns An immutable copy of the json payload
|
|
25
26
|
*/
|
|
26
27
|
json(): bkper.Account;
|
|
27
28
|
/**
|
|
28
|
-
* Gets the
|
|
29
|
+
* Gets the Account internal id.
|
|
30
|
+
*
|
|
31
|
+
* @returns The Account internal id
|
|
29
32
|
*/
|
|
30
33
|
getId(): string | undefined;
|
|
31
34
|
/**
|
|
32
|
-
* Gets the
|
|
35
|
+
* Gets the Account name.
|
|
36
|
+
*
|
|
37
|
+
* @returns The Account name
|
|
33
38
|
*/
|
|
34
39
|
getName(): string | undefined;
|
|
35
40
|
/**
|
|
36
|
-
*
|
|
37
41
|
* Sets the name of the Account.
|
|
38
42
|
*
|
|
39
|
-
* @
|
|
43
|
+
* @param name - The name to set
|
|
44
|
+
*
|
|
45
|
+
* @returns This Account, for chaining
|
|
40
46
|
*/
|
|
41
47
|
setName(name: string): Account;
|
|
42
48
|
/**
|
|
43
|
-
*
|
|
49
|
+
* Gets the normalized name of this Account without spaces or special characters.
|
|
50
|
+
*
|
|
51
|
+
* @returns The name of this Account without spaces or special characters
|
|
44
52
|
*/
|
|
45
53
|
getNormalizedName(): string;
|
|
46
54
|
/**
|
|
47
|
-
*
|
|
55
|
+
* Gets the type of this Account.
|
|
56
|
+
*
|
|
57
|
+
* @returns The [[AccountType]] of this Account
|
|
48
58
|
*/
|
|
49
59
|
getType(): AccountType;
|
|
50
60
|
/**
|
|
51
|
-
*
|
|
52
61
|
* Sets the type of the Account.
|
|
53
62
|
*
|
|
54
|
-
* @
|
|
63
|
+
* @param type - The [[AccountType]] to set
|
|
64
|
+
*
|
|
65
|
+
* @returns This Account, for chaining
|
|
55
66
|
*/
|
|
56
67
|
setType(type: AccountType): Account;
|
|
57
68
|
/**
|
|
58
69
|
* Gets the custom properties stored in this Account.
|
|
70
|
+
*
|
|
71
|
+
* @returns The custom properties object
|
|
59
72
|
*/
|
|
60
73
|
getProperties(): {
|
|
61
74
|
[key: string]: string;
|
|
62
75
|
};
|
|
63
76
|
/**
|
|
64
|
-
* Sets the custom properties of the Account
|
|
77
|
+
* Sets the custom properties of the Account.
|
|
65
78
|
*
|
|
66
79
|
* @param properties - Object with key/value pair properties
|
|
67
80
|
*
|
|
68
|
-
* @returns This Account, for
|
|
81
|
+
* @returns This Account, for chaining
|
|
69
82
|
*/
|
|
70
83
|
setProperties(properties: {
|
|
71
84
|
[key: string]: string;
|
|
72
85
|
}): Account;
|
|
73
86
|
/**
|
|
74
|
-
* Gets the property value for given keys. First property found will be retrieved
|
|
87
|
+
* Gets the property value for given keys. First property found will be retrieved.
|
|
75
88
|
*
|
|
76
89
|
* @param keys - The property key
|
|
90
|
+
*
|
|
91
|
+
* @returns The property value or undefined if not found
|
|
77
92
|
*/
|
|
78
93
|
getProperty(...keys: string[]): string | undefined;
|
|
79
94
|
/**
|
|
@@ -82,116 +97,129 @@ export declare class Account {
|
|
|
82
97
|
* @param key - The property key
|
|
83
98
|
* @param value - The property value
|
|
84
99
|
*
|
|
85
|
-
* @returns This Account, for
|
|
100
|
+
* @returns This Account, for chaining
|
|
86
101
|
*/
|
|
87
102
|
setProperty(key: string, value: string | null): Account;
|
|
88
103
|
/**
|
|
89
|
-
*
|
|
104
|
+
* Deletes a custom property.
|
|
90
105
|
*
|
|
91
106
|
* @param key - The property key
|
|
92
107
|
*
|
|
93
|
-
* @returns This Account, for
|
|
108
|
+
* @returns This Account, for chaining
|
|
94
109
|
*/
|
|
95
110
|
deleteProperty(key: string): Account;
|
|
96
111
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* @returns
|
|
100
|
-
*/
|
|
101
|
-
getBalance(): Amount;
|
|
102
|
-
/**
|
|
103
|
-
* Gets the raw balance, no matter credit nature of this Account.
|
|
104
|
-
* @deprecated Use `Book.getBalancesReport` instead.
|
|
105
|
-
* @returns The balance of this account.
|
|
106
|
-
*/
|
|
107
|
-
getBalanceRaw(): Amount;
|
|
108
|
-
/**
|
|
109
|
-
* Tell if this account is archived.
|
|
112
|
+
* Tells if this Account is archived.
|
|
113
|
+
*
|
|
114
|
+
* @returns True if the Account is archived
|
|
110
115
|
*/
|
|
111
116
|
isArchived(): boolean | undefined;
|
|
112
117
|
/**
|
|
113
|
-
*
|
|
118
|
+
* Sets Account archived/unarchived.
|
|
114
119
|
*
|
|
115
|
-
* @
|
|
120
|
+
* @param archived - True to archive, false to unarchive
|
|
121
|
+
*
|
|
122
|
+
* @returns This Account, for chaining
|
|
116
123
|
*/
|
|
117
124
|
setArchived(archived: boolean): Account;
|
|
118
125
|
/**
|
|
119
|
-
*
|
|
126
|
+
* Tells if the Account has any transaction already posted.
|
|
120
127
|
*
|
|
121
128
|
* Accounts with transaction posted, even with zero balance, can only be archived.
|
|
129
|
+
*
|
|
130
|
+
* @returns True if the Account has transactions posted
|
|
122
131
|
*/
|
|
123
132
|
hasTransactionPosted(): boolean | undefined;
|
|
124
133
|
/**
|
|
125
|
-
*
|
|
126
|
-
* Tell if the account is permanent.
|
|
134
|
+
* Tells if the Account is permanent.
|
|
127
135
|
*
|
|
128
136
|
* Permanent Accounts are the ones which final balance is relevant and keep its balances over time.
|
|
129
137
|
*
|
|
130
|
-
* They are also called [Real Accounts](http://en.wikipedia.org/wiki/Account_(
|
|
138
|
+
* They are also called [Real Accounts](http://en.wikipedia.org/wiki/Account_(Accountancy)#Based_on_periodicity_of_flow)
|
|
131
139
|
*
|
|
132
|
-
* Usually represents assets or tangibles, capable of being perceived by the senses or the mind, like bank
|
|
140
|
+
* Usually represents assets or tangibles, capable of being perceived by the senses or the mind, like bank Accounts, money, debts and so on.
|
|
133
141
|
*
|
|
134
142
|
* @returns True if its a permanent Account
|
|
135
143
|
*/
|
|
136
144
|
isPermanent(): boolean | undefined;
|
|
137
145
|
/**
|
|
138
|
-
*
|
|
146
|
+
* Tells if the Account has a Credit nature or Debit otherwise.
|
|
139
147
|
*
|
|
140
|
-
* Credit
|
|
148
|
+
* Credit Accounts are just for representation purposes. It increase or decrease the absolute balance. It doesn't affect the overall balance or the behavior of the system.
|
|
141
149
|
*
|
|
142
|
-
* The absolute balance of credit
|
|
150
|
+
* The absolute balance of credit Accounts increase when it participate as a credit/origin in a transaction. Its usually for Accounts that increase the balance of the assets, like revenue Accounts.
|
|
143
151
|
*
|
|
144
152
|
* ```
|
|
145
153
|
* Crediting a credit
|
|
146
|
-
* Thus --------------------->
|
|
154
|
+
* Thus ---------------------> Account increases its absolute balance
|
|
147
155
|
* Debiting a debit
|
|
148
156
|
*
|
|
149
157
|
*
|
|
150
158
|
* Debiting a credit
|
|
151
|
-
* Thus --------------------->
|
|
159
|
+
* Thus ---------------------> Account decreases its absolute balance
|
|
152
160
|
* Crediting a debit
|
|
153
161
|
* ```
|
|
154
162
|
*
|
|
155
|
-
* As a rule of thumb, and for simple understanding, almost all
|
|
163
|
+
* As a rule of thumb, and for simple understanding, almost all Accounts are Debit nature (NOT credit), except the ones that "offers" amount for the books, like revenue Accounts.
|
|
164
|
+
*
|
|
165
|
+
* @returns True if the Account has credit nature
|
|
156
166
|
*/
|
|
157
167
|
isCredit(): boolean | undefined;
|
|
158
168
|
/**
|
|
159
|
-
*
|
|
169
|
+
* Gets the [[Groups]] of this Account.
|
|
170
|
+
*
|
|
171
|
+
* @returns Promise with the [[Groups]] of this Account
|
|
160
172
|
*/
|
|
161
173
|
getGroups(): Promise<Group[]>;
|
|
162
174
|
/**
|
|
163
175
|
* Sets the groups of the Account.
|
|
164
176
|
*
|
|
165
|
-
* @
|
|
177
|
+
* @param groups - The groups to set
|
|
178
|
+
*
|
|
179
|
+
* @returns This Account, for chaining
|
|
166
180
|
*/
|
|
167
181
|
setGroups(groups: Group[] | bkper.Group[]): Account;
|
|
168
182
|
/**
|
|
169
|
-
*
|
|
183
|
+
* Adds a group to the Account.
|
|
184
|
+
*
|
|
185
|
+
* @param group - The group to add
|
|
170
186
|
*
|
|
171
|
-
* @returns This Account, for
|
|
187
|
+
* @returns This Account, for chaining
|
|
172
188
|
*/
|
|
173
189
|
addGroup(group: Group | bkper.Group): Account;
|
|
174
190
|
/**
|
|
175
|
-
*
|
|
191
|
+
* Removes a group from the Account.
|
|
192
|
+
*
|
|
193
|
+
* @param group - The group name, id or object to remove
|
|
194
|
+
*
|
|
195
|
+
* @returns Promise with this Account, for chaining
|
|
176
196
|
*/
|
|
177
197
|
removeGroup(group: string | Group): Promise<Account>;
|
|
178
198
|
/**
|
|
179
|
-
*
|
|
199
|
+
* Tells if this Account is in the [[Group]].
|
|
200
|
+
*
|
|
201
|
+
* @param group - The Group name, id or object
|
|
180
202
|
*
|
|
181
|
-
* @
|
|
203
|
+
* @returns Promise with true if the Account is in the group
|
|
182
204
|
*/
|
|
183
205
|
isInGroup(group: string | Group): Promise<boolean>;
|
|
184
206
|
|
|
185
207
|
/**
|
|
186
|
-
*
|
|
208
|
+
* Performs create new Account.
|
|
209
|
+
*
|
|
210
|
+
* @returns Promise with this Account after creation
|
|
187
211
|
*/
|
|
188
212
|
create(): Promise<Account>;
|
|
189
213
|
/**
|
|
190
|
-
*
|
|
214
|
+
* Performs update Account, applying pending changes.
|
|
215
|
+
*
|
|
216
|
+
* @returns Promise with this Account after update
|
|
191
217
|
*/
|
|
192
218
|
update(): Promise<Account>;
|
|
193
219
|
/**
|
|
194
|
-
*
|
|
220
|
+
* Performs delete Account.
|
|
221
|
+
*
|
|
222
|
+
* @returns Promise with this Account after deletion
|
|
195
223
|
*/
|
|
196
224
|
remove(): Promise<Account>;
|
|
197
225
|
|
|
@@ -232,25 +260,31 @@ export declare class Agent {
|
|
|
232
260
|
payload: bkper.Agent;
|
|
233
261
|
constructor(payload?: bkper.Agent);
|
|
234
262
|
/**
|
|
263
|
+
* Gets the wrapped plain JSON object.
|
|
264
|
+
*
|
|
235
265
|
* @returns The wrapped plain json object
|
|
236
266
|
*/
|
|
237
267
|
json(): bkper.Agent;
|
|
238
268
|
/**
|
|
269
|
+
* Gets the Agent universal identifier.
|
|
239
270
|
*
|
|
240
271
|
* @returns The Agent universal identifier
|
|
241
272
|
*/
|
|
242
273
|
getId(): string | undefined;
|
|
243
274
|
/**
|
|
275
|
+
* Gets the Agent name.
|
|
244
276
|
*
|
|
245
277
|
* @returns The Agent name
|
|
246
278
|
*/
|
|
247
279
|
getName(): string | undefined;
|
|
248
280
|
/**
|
|
281
|
+
* Gets the Agent logo URL.
|
|
249
282
|
*
|
|
250
283
|
* @returns The Agent logo url
|
|
251
284
|
*/
|
|
252
285
|
getLogoUrl(): string | undefined;
|
|
253
286
|
/**
|
|
287
|
+
* Gets the Agent logo URL in dark mode.
|
|
254
288
|
*
|
|
255
289
|
* @returns The Agent logo url in dark mode
|
|
256
290
|
*/
|
|
@@ -268,73 +302,132 @@ export declare class Amount {
|
|
|
268
302
|
|
|
269
303
|
/**
|
|
270
304
|
* The Amount constructor.
|
|
305
|
+
*
|
|
306
|
+
* @param n - The number, string, or Amount to initialize with
|
|
271
307
|
*/
|
|
272
308
|
constructor(n: number | string | Amount);
|
|
273
309
|
/**
|
|
274
310
|
* Returns an absolute Amount.
|
|
311
|
+
*
|
|
312
|
+
* @returns The absolute value as a new Amount
|
|
275
313
|
*/
|
|
276
314
|
abs(): Amount;
|
|
277
315
|
/**
|
|
278
|
-
*
|
|
316
|
+
* Compares this Amount with another value.
|
|
317
|
+
*
|
|
318
|
+
* @param n - The value to compare with
|
|
319
|
+
*
|
|
320
|
+
* @returns -1 if less than, 0 if equal, 1 if greater than
|
|
279
321
|
*/
|
|
280
322
|
cmp(n: number | string | Amount): -1 | 0 | 1;
|
|
281
323
|
/**
|
|
282
|
-
*
|
|
324
|
+
* Divides this Amount by another value.
|
|
325
|
+
*
|
|
326
|
+
* @param n - The divisor value
|
|
327
|
+
*
|
|
328
|
+
* @returns The division result as a new Amount
|
|
283
329
|
*/
|
|
284
330
|
div(n: number | string | Amount): Amount;
|
|
285
331
|
/**
|
|
286
|
-
*
|
|
332
|
+
* Checks if this Amount equals another value.
|
|
333
|
+
*
|
|
334
|
+
* @param n - The value to compare with
|
|
335
|
+
*
|
|
336
|
+
* @returns True if equal, false otherwise
|
|
287
337
|
*/
|
|
288
338
|
eq(n: number | string | Amount): boolean;
|
|
289
339
|
/**
|
|
290
|
-
*
|
|
340
|
+
* Checks if this Amount is greater than another value.
|
|
341
|
+
*
|
|
342
|
+
* @param n - The value to compare with
|
|
343
|
+
*
|
|
344
|
+
* @returns True if greater than, false otherwise
|
|
291
345
|
*/
|
|
292
346
|
gt(n: number | string | Amount): boolean;
|
|
293
347
|
/**
|
|
294
|
-
*
|
|
348
|
+
* Checks if this Amount is greater than or equal to another value.
|
|
349
|
+
*
|
|
350
|
+
* @param n - The value to compare with
|
|
351
|
+
*
|
|
352
|
+
* @returns True if greater than or equal, false otherwise
|
|
295
353
|
*/
|
|
296
354
|
gte(n: number | string | Amount): boolean;
|
|
297
355
|
/**
|
|
298
|
-
*
|
|
356
|
+
* Checks if this Amount is less than another value.
|
|
357
|
+
*
|
|
358
|
+
* @param n - The value to compare with
|
|
359
|
+
*
|
|
360
|
+
* @returns True if less than, false otherwise
|
|
299
361
|
*/
|
|
300
362
|
lt(n: number | string | Amount): boolean;
|
|
301
363
|
/**
|
|
302
|
-
*
|
|
364
|
+
* Checks if this Amount is less than or equal to another value.
|
|
365
|
+
*
|
|
366
|
+
* @param n - The value to compare with
|
|
367
|
+
*
|
|
368
|
+
* @returns True if less than or equal, false otherwise
|
|
303
369
|
*/
|
|
304
370
|
lte(n: number | string | Amount): boolean;
|
|
305
371
|
/**
|
|
306
|
-
*
|
|
372
|
+
* Adds another value to this Amount.
|
|
373
|
+
*
|
|
374
|
+
* @param n - The value to add
|
|
375
|
+
*
|
|
376
|
+
* @returns The sum as a new Amount
|
|
307
377
|
*/
|
|
308
378
|
plus(n: number | string | Amount): Amount;
|
|
309
379
|
/**
|
|
310
|
-
*
|
|
380
|
+
* Subtracts another value from this Amount.
|
|
381
|
+
*
|
|
382
|
+
* @param n - The value to subtract
|
|
383
|
+
*
|
|
384
|
+
* @returns The difference as a new Amount
|
|
311
385
|
*/
|
|
312
386
|
minus(n: number | string | Amount): Amount;
|
|
313
387
|
/**
|
|
314
|
-
*
|
|
388
|
+
* Calculates the modulo (remainder) of dividing this Amount by another value.
|
|
315
389
|
*
|
|
316
390
|
* Similar to % operator
|
|
317
391
|
*
|
|
392
|
+
* @param n - The divisor value
|
|
393
|
+
*
|
|
394
|
+
* @returns The remainder as a new Amount
|
|
318
395
|
*/
|
|
319
396
|
mod(n: number | string | Amount): Amount;
|
|
320
397
|
/**
|
|
321
|
-
*
|
|
398
|
+
* Rounds this Amount to a maximum of dp decimal places.
|
|
399
|
+
*
|
|
400
|
+
* @param dp - The number of decimal places (optional)
|
|
401
|
+
*
|
|
402
|
+
* @returns The rounded value as a new Amount
|
|
322
403
|
*/
|
|
323
404
|
round(dp?: number): Amount;
|
|
324
405
|
/**
|
|
325
|
-
*
|
|
406
|
+
* Multiplies this Amount by another value.
|
|
407
|
+
*
|
|
408
|
+
* @param n - The value to multiply by
|
|
409
|
+
*
|
|
410
|
+
* @returns The product as a new Amount
|
|
326
411
|
*/
|
|
327
412
|
times(n: number | string | Amount): Amount;
|
|
328
413
|
/**
|
|
329
|
-
* Returns a string representing the value of this Amount in normal notation to a fixed number of decimal places
|
|
414
|
+
* Returns a string representing the value of this Amount in normal notation to a fixed number of decimal places.
|
|
415
|
+
*
|
|
416
|
+
* @param dp - The number of decimal places (optional)
|
|
417
|
+
*
|
|
418
|
+
* @returns The formatted string representation
|
|
330
419
|
*/
|
|
331
420
|
toFixed(dp?: number): string;
|
|
332
421
|
/**
|
|
333
422
|
* Returns a string representing the value of this Amount.
|
|
423
|
+
*
|
|
424
|
+
* @returns The string representation of this Amount
|
|
334
425
|
*/
|
|
335
426
|
toString(): string;
|
|
336
427
|
/**
|
|
337
428
|
* Returns a primitive number representing the value of this Amount.
|
|
429
|
+
*
|
|
430
|
+
* @returns The numeric value of this Amount
|
|
338
431
|
*/
|
|
339
432
|
toNumber(): number;
|
|
340
433
|
|
|
@@ -353,112 +446,157 @@ export declare class App {
|
|
|
353
446
|
payload: bkper.App;
|
|
354
447
|
constructor(payload?: bkper.App);
|
|
355
448
|
/**
|
|
449
|
+
* Gets the wrapped plain JSON object.
|
|
450
|
+
*
|
|
356
451
|
* @returns The wrapped plain json object
|
|
357
452
|
*/
|
|
358
453
|
json(): bkper.App;
|
|
359
454
|
/**
|
|
360
|
-
*
|
|
361
455
|
* Sets the webhook url for development.
|
|
362
456
|
*
|
|
363
|
-
* @
|
|
457
|
+
* @param webhookUrlDev - The webhook URL for development
|
|
458
|
+
*
|
|
459
|
+
* @returns This App, for chaining
|
|
364
460
|
*/
|
|
365
461
|
setWebhookUrlDev(webhookUrlDev: string): App;
|
|
366
462
|
/**
|
|
367
|
-
*
|
|
368
463
|
* Sets the conversation url for development.
|
|
369
464
|
*
|
|
370
|
-
* @
|
|
465
|
+
* @param conversationUrlDev - The conversation URL for development
|
|
466
|
+
*
|
|
467
|
+
* @returns This App, for chaining
|
|
371
468
|
*/
|
|
372
469
|
setConversationUrlDev(conversationUrlDev: string): App;
|
|
373
470
|
/**
|
|
471
|
+
* Gets the App universal identifier.
|
|
374
472
|
*
|
|
375
473
|
* @returns The App universal identifier
|
|
376
474
|
*/
|
|
377
475
|
getId(): string | undefined;
|
|
378
476
|
/**
|
|
379
|
-
*
|
|
477
|
+
* Gets the name of this App.
|
|
478
|
+
*
|
|
479
|
+
* @returns The name of this App
|
|
380
480
|
*/
|
|
381
481
|
getName(): string | undefined;
|
|
382
482
|
/**
|
|
383
|
-
*
|
|
483
|
+
* Checks if this App has events bound to it.
|
|
484
|
+
*
|
|
485
|
+
* @returns True if this App has events bound to it
|
|
384
486
|
*/
|
|
385
487
|
hasEvents(): boolean;
|
|
386
488
|
/**
|
|
387
|
-
*
|
|
489
|
+
* Gets the events bound to this App.
|
|
490
|
+
*
|
|
491
|
+
* @returns The events bound to this App
|
|
388
492
|
*/
|
|
389
493
|
getEvents(): EventType[] | undefined;
|
|
390
494
|
/**
|
|
391
|
-
*
|
|
495
|
+
* Checks if this App is published.
|
|
496
|
+
*
|
|
497
|
+
* @returns True if this App is published
|
|
392
498
|
*/
|
|
393
499
|
isPublished(): boolean;
|
|
394
500
|
/**
|
|
395
|
-
*
|
|
501
|
+
* Checks if this App is conversational.
|
|
502
|
+
*
|
|
503
|
+
* @returns True if this App is conversational
|
|
396
504
|
*/
|
|
397
505
|
isConversational(): boolean;
|
|
398
506
|
/**
|
|
399
|
-
*
|
|
507
|
+
* Gets the logo url of this App.
|
|
508
|
+
*
|
|
509
|
+
* @returns The logo url of this App
|
|
400
510
|
*/
|
|
401
511
|
getLogoUrl(): string | undefined;
|
|
402
512
|
/**
|
|
403
|
-
*
|
|
513
|
+
* Gets the logo url of this App in dark mode.
|
|
514
|
+
*
|
|
515
|
+
* @returns The logo url of this App in dark mode
|
|
404
516
|
*/
|
|
405
517
|
getLogoUrlDark(): string | undefined;
|
|
406
518
|
/**
|
|
407
|
-
*
|
|
519
|
+
* Gets the description of this App.
|
|
520
|
+
*
|
|
521
|
+
* @returns The description of this App
|
|
408
522
|
*/
|
|
409
523
|
getDescription(): string | undefined;
|
|
410
524
|
/**
|
|
411
|
-
* Sets the whitelabeled user emails
|
|
525
|
+
* Sets the whitelabeled user emails.
|
|
526
|
+
*
|
|
527
|
+
* @param emails - The user emails to whitelist
|
|
412
528
|
*
|
|
413
529
|
* @returns This App for chaining
|
|
414
530
|
*/
|
|
415
531
|
setUserEmails(emails?: string): App;
|
|
416
532
|
/**
|
|
417
|
-
*
|
|
533
|
+
* Gets the name of the owner of this App.
|
|
534
|
+
*
|
|
535
|
+
* @returns The name of the owner of this App
|
|
418
536
|
*/
|
|
419
537
|
getOwnerName(): string | undefined;
|
|
420
538
|
/**
|
|
421
|
-
*
|
|
539
|
+
* Gets the menu url of this App.
|
|
540
|
+
*
|
|
541
|
+
* @returns The menu url of this App
|
|
422
542
|
*/
|
|
423
543
|
getMenuUrl(): string | undefined;
|
|
424
544
|
/**
|
|
425
|
-
*
|
|
545
|
+
* Gets the menu development url of this App.
|
|
546
|
+
*
|
|
547
|
+
* @returns The menu development url of this App
|
|
426
548
|
*/
|
|
427
549
|
getMenuUrlDev(): string | undefined;
|
|
428
550
|
/**
|
|
429
|
-
*
|
|
551
|
+
* Gets the menu text of this App.
|
|
552
|
+
*
|
|
553
|
+
* @returns The menu text of this App
|
|
430
554
|
*/
|
|
431
555
|
getMenuText(): string | undefined;
|
|
432
556
|
/**
|
|
433
|
-
*
|
|
557
|
+
* Gets the menu popup width of this App.
|
|
558
|
+
*
|
|
559
|
+
* @returns The menu popup width of this App
|
|
434
560
|
*/
|
|
435
561
|
getMenuPopupWidth(): string | undefined;
|
|
436
562
|
/**
|
|
437
|
-
*
|
|
563
|
+
* Gets the menu popup height of this App.
|
|
564
|
+
*
|
|
565
|
+
* @returns The menu popup height of this App
|
|
438
566
|
*/
|
|
439
567
|
getMenuPopupHeight(): string | undefined;
|
|
440
568
|
/**
|
|
441
|
-
*
|
|
569
|
+
* Gets the logo url of the owner of this App.
|
|
570
|
+
*
|
|
571
|
+
* @returns The logo url of the owner of this App
|
|
442
572
|
*/
|
|
443
573
|
getOwnerLogoUrl(): string | undefined;
|
|
444
574
|
/**
|
|
445
|
-
*
|
|
575
|
+
* Gets the file patterns the App handles.
|
|
576
|
+
*
|
|
577
|
+
* @returns The file patterns the App handles - E.g *.pdf *.csv
|
|
446
578
|
*/
|
|
447
579
|
getFilePatterns(): string[] | undefined;
|
|
448
580
|
/**
|
|
449
|
-
* Sets the developer email
|
|
581
|
+
* Sets the developer email.
|
|
582
|
+
*
|
|
583
|
+
* @param email - The developer email to set
|
|
450
584
|
*
|
|
451
585
|
* @returns This App for chaining
|
|
452
586
|
*/
|
|
453
587
|
setDeveloperEmail(email?: string): App;
|
|
454
588
|
/**
|
|
455
|
-
* Sets the client secret
|
|
589
|
+
* Sets the client secret.
|
|
590
|
+
*
|
|
591
|
+
* @param clientSecret - The client secret to set
|
|
456
592
|
*
|
|
457
593
|
* @returns This App for chaining
|
|
458
594
|
*/
|
|
459
595
|
setClientSecret(clientSecret?: string): App;
|
|
460
596
|
/**
|
|
461
|
-
* Sets the readme text
|
|
597
|
+
* Sets the readme text.
|
|
598
|
+
*
|
|
599
|
+
* @param readme - The readme text to set
|
|
462
600
|
*
|
|
463
601
|
* @returns This App for chaining
|
|
464
602
|
*/
|
|
@@ -467,14 +605,20 @@ export declare class App {
|
|
|
467
605
|
* Performs the app creation, applying pending changes.
|
|
468
606
|
*
|
|
469
607
|
* The App id MUST be unique. If another app is already existing, an error will be thrown.
|
|
608
|
+
*
|
|
609
|
+
* @returns This App after creation
|
|
470
610
|
*/
|
|
471
611
|
create(): Promise<App>;
|
|
472
612
|
/**
|
|
473
|
-
* Partially
|
|
613
|
+
* Partially updates an App, applying pending changes.
|
|
614
|
+
*
|
|
615
|
+
* @returns This App after the partial update
|
|
474
616
|
*/
|
|
475
617
|
patch(): Promise<App>;
|
|
476
618
|
/**
|
|
477
|
-
*
|
|
619
|
+
* Performs a full update of the App, applying pending changes.
|
|
620
|
+
*
|
|
621
|
+
* @returns This App after the update
|
|
478
622
|
*/
|
|
479
623
|
update(): Promise<App>;
|
|
480
624
|
}
|
|
@@ -488,49 +632,63 @@ export declare class App {
|
|
|
488
632
|
*/
|
|
489
633
|
export declare interface BalancesContainer {
|
|
490
634
|
/**
|
|
491
|
-
*
|
|
635
|
+
* Gets the parent [[BalancesReport]] of the container.
|
|
636
|
+
*
|
|
637
|
+
* @returns The parent [[BalancesReport]] of the container
|
|
492
638
|
*/
|
|
493
639
|
getBalancesReport: () => BalancesReport;
|
|
494
640
|
/**
|
|
641
|
+
* Gets the [[Account]] or [[Group]] name.
|
|
642
|
+
*
|
|
495
643
|
* @returns The [[Account]] or [[Group]] name
|
|
496
644
|
*/
|
|
497
645
|
getName: () => string | undefined;
|
|
498
646
|
/**
|
|
499
|
-
*
|
|
647
|
+
* Gets the [[Account]] or [[Group]] name without spaces or special characters.
|
|
648
|
+
*
|
|
649
|
+
* @returns The [[Account]] or [[Group]] name without spaces or special characters
|
|
500
650
|
*/
|
|
501
651
|
getNormalizedName: () => string | undefined;
|
|
502
652
|
/**
|
|
653
|
+
* Gets the [[Group]] associated with this container.
|
|
654
|
+
*
|
|
503
655
|
* @returns The [[Group]] associated with this container
|
|
504
656
|
*/
|
|
505
657
|
getGroup: () => Promise<Group | null>;
|
|
506
658
|
/**
|
|
659
|
+
* Gets the [[Account]] associated with this container.
|
|
660
|
+
*
|
|
507
661
|
* @returns The [[Account]] associated with this container
|
|
508
662
|
*/
|
|
509
663
|
getAccount: () => Promise<Account | null>;
|
|
510
664
|
/**
|
|
511
|
-
*
|
|
665
|
+
* Gets the parent BalanceContainer.
|
|
666
|
+
*
|
|
667
|
+
* @returns The parent BalanceContainer
|
|
512
668
|
*/
|
|
513
669
|
getParent: () => BalancesContainer | null;
|
|
514
670
|
/**
|
|
515
|
-
*
|
|
671
|
+
* Gets the depth in the parent chain up to the root.
|
|
672
|
+
*
|
|
673
|
+
* @returns The depth in the parent chain up to the root
|
|
516
674
|
*/
|
|
517
675
|
getDepth: () => number;
|
|
518
676
|
/**
|
|
519
|
-
*
|
|
677
|
+
* Gets the credit nature of the BalancesContainer, based on [[Account]] or [[Group]].
|
|
520
678
|
*
|
|
521
|
-
* For [[Account]], the credit nature will be the same as the one from the Account
|
|
679
|
+
* For [[Account]], the credit nature will be the same as the one from the Account.
|
|
522
680
|
*
|
|
523
681
|
* For [[Group]], the credit nature will be the same, if all accounts containing on it has the same credit nature. False if mixed.
|
|
524
682
|
*
|
|
683
|
+
* @returns The credit nature of the BalancesContainer
|
|
525
684
|
*/
|
|
526
685
|
isCredit: () => boolean | undefined;
|
|
527
686
|
/**
|
|
528
|
-
*
|
|
529
|
-
* Tell if this balance container is permament, based on the [[Account]] or [[Group]].
|
|
687
|
+
* Tell if this balance container is permanent, based on the [[Account]] or [[Group]].
|
|
530
688
|
*
|
|
531
689
|
* Permanent are the ones which final balance is relevant and keep its balances over time.
|
|
532
690
|
*
|
|
533
|
-
* They are also called [Real Accounts](http://en.wikipedia.org/wiki/Account_(accountancy)#Based_on_periodicity_of_flow)
|
|
691
|
+
* They are also called [Real Accounts](http://en.wikipedia.org/wiki/Account_(accountancy)#Based_on_periodicity_of_flow).
|
|
534
692
|
*
|
|
535
693
|
* Usually represents assets or liabilities, capable of being perceived by the senses or the mind, like bank accounts, money, debts and so on.
|
|
536
694
|
*
|
|
@@ -538,61 +696,85 @@ export declare interface BalancesContainer {
|
|
|
538
696
|
*/
|
|
539
697
|
isPermanent: () => boolean | undefined;
|
|
540
698
|
/**
|
|
699
|
+
* Gets whether this balance container is from an [[Account]].
|
|
700
|
+
*
|
|
541
701
|
* @returns True if this balance container if from an [[Account]]
|
|
542
702
|
*/
|
|
543
703
|
isFromAccount: () => boolean;
|
|
544
704
|
/**
|
|
705
|
+
* Gets whether this balance container is from a [[Group]].
|
|
706
|
+
*
|
|
545
707
|
* @returns True if this balance container if from a [[Group]]
|
|
546
708
|
*/
|
|
547
709
|
isFromGroup: () => boolean;
|
|
548
710
|
/**
|
|
711
|
+
* Gets whether the balance container is from a parent group.
|
|
712
|
+
*
|
|
549
713
|
* @returns True if the balance container is from a parent group
|
|
550
714
|
*/
|
|
551
715
|
hasGroupBalances: () => boolean;
|
|
552
716
|
/**
|
|
553
|
-
*
|
|
717
|
+
* Gets the cumulative balance to the date.
|
|
718
|
+
*
|
|
719
|
+
* @returns The cumulative balance to the date
|
|
554
720
|
*/
|
|
555
721
|
getCumulativeBalance: () => Amount;
|
|
556
722
|
/**
|
|
557
|
-
*
|
|
723
|
+
* Gets the cumulative raw balance to the date.
|
|
724
|
+
*
|
|
725
|
+
* @returns The cumulative raw balance to the date
|
|
558
726
|
*/
|
|
559
727
|
getCumulativeBalanceRaw: () => Amount;
|
|
560
728
|
/**
|
|
561
|
-
*
|
|
729
|
+
* Gets the cumulative balance formatted according to [[Book]] decimal format and fraction digits.
|
|
730
|
+
*
|
|
731
|
+
* @returns The cumulative balance formatted according to [[Book]] decimal format and fraction digits
|
|
562
732
|
*/
|
|
563
733
|
getCumulativeBalanceText: () => string;
|
|
564
734
|
/**
|
|
565
|
-
*
|
|
735
|
+
* Gets the cumulative raw balance formatted according to [[Book]] decimal format and fraction digits.
|
|
736
|
+
*
|
|
737
|
+
* @returns The cumulative raw balance formatted according to [[Book]] decimal format and fraction digits
|
|
566
738
|
*/
|
|
567
739
|
getCumulativeBalanceRawText: () => string;
|
|
568
740
|
/**
|
|
569
|
-
*
|
|
741
|
+
* Gets the balance on the date period.
|
|
742
|
+
*
|
|
743
|
+
* @returns The balance on the date period
|
|
570
744
|
*/
|
|
571
745
|
getPeriodBalance: () => Amount;
|
|
572
746
|
/**
|
|
573
|
-
*
|
|
747
|
+
* Gets the raw balance on the date period.
|
|
748
|
+
*
|
|
749
|
+
* @returns The raw balance on the date period
|
|
574
750
|
*/
|
|
575
751
|
getPeriodBalanceRaw: () => Amount;
|
|
576
752
|
/**
|
|
753
|
+
* Gets the balance on the date period formatted according to [[Book]] decimal format and fraction digits.
|
|
754
|
+
*
|
|
577
755
|
* @returns The balance on the date period formatted according to [[Book]] decimal format and fraction digits
|
|
578
756
|
*/
|
|
579
757
|
getPeriodBalanceText: () => string;
|
|
580
758
|
/**
|
|
759
|
+
* Gets the raw balance on the date period formatted according to [[Book]] decimal format and fraction digits.
|
|
760
|
+
*
|
|
581
761
|
* @returns The raw balance on the date period formatted according to [[Book]] decimal format and fraction digits
|
|
582
762
|
*/
|
|
583
763
|
getPeriodBalanceRawText: () => string;
|
|
584
764
|
/**
|
|
585
|
-
*
|
|
765
|
+
* Gets all child [[BalancesContainers]].
|
|
586
766
|
*
|
|
587
767
|
* **NOTE**: Only for Group balance containers. Accounts returns null.
|
|
768
|
+
*
|
|
769
|
+
* @returns All child [[BalancesContainers]]
|
|
588
770
|
*/
|
|
589
771
|
getBalancesContainers: () => BalancesContainer[];
|
|
590
772
|
/**
|
|
591
773
|
* Gets a specific [[BalancesContainer]].
|
|
592
774
|
*
|
|
593
|
-
* @param name The [[Account]] or [[Group]] name
|
|
775
|
+
* @param name - The [[Account]] or [[Group]] name
|
|
594
776
|
*
|
|
595
|
-
* @returns The retrieved [[BalancesContainer]]
|
|
777
|
+
* @returns The retrieved [[BalancesContainer]]
|
|
596
778
|
*/
|
|
597
779
|
getBalancesContainer: (name: string) => BalancesContainer;
|
|
598
780
|
}
|
|
@@ -610,23 +792,29 @@ export declare class BalancesReport {
|
|
|
610
792
|
|
|
611
793
|
constructor(book: Book, payload: bkper.Balances);
|
|
612
794
|
/**
|
|
613
|
-
*
|
|
795
|
+
* Gets the [[Book]] that generated the report.
|
|
796
|
+
*
|
|
797
|
+
* @returns The [[Book]] that generated the report
|
|
614
798
|
*/
|
|
615
799
|
getBook(): Book;
|
|
616
800
|
/**
|
|
617
|
-
*
|
|
801
|
+
* Gets the [[Periodicity]] of the query used to generate the report.
|
|
802
|
+
*
|
|
803
|
+
* @returns The [[Periodicity]] of the query used to generate the report
|
|
618
804
|
*/
|
|
619
805
|
getPeriodicity(): Periodicity;
|
|
620
806
|
/**
|
|
621
|
-
*
|
|
807
|
+
* Gets all [[BalancesContainers]] of the report.
|
|
808
|
+
*
|
|
809
|
+
* @returns All [[BalancesContainers]] of the report
|
|
622
810
|
*/
|
|
623
811
|
getBalancesContainers(): BalancesContainer[];
|
|
624
812
|
/**
|
|
625
813
|
* Gets a specific [[BalancesContainer]].
|
|
626
814
|
*
|
|
627
|
-
* @param name The [[Account]] or [[Group]] name
|
|
815
|
+
* @param name - The [[Account]] or [[Group]] name
|
|
628
816
|
*
|
|
629
|
-
* @returns The retrieved [[BalancesContainer]]
|
|
817
|
+
* @returns The retrieved [[BalancesContainer]]
|
|
630
818
|
*/
|
|
631
819
|
getBalancesContainer(name: string): BalancesContainer;
|
|
632
820
|
|
|
@@ -642,7 +830,7 @@ export declare class BalancesReport {
|
|
|
642
830
|
* Example:
|
|
643
831
|
*
|
|
644
832
|
* ```javascript
|
|
645
|
-
* Bkper.setConfig({
|
|
833
|
+
* Bkper.get().setConfig({
|
|
646
834
|
* apiKeyProvider: () => process.env.BKPER_API_KEY,
|
|
647
835
|
* oauthTokenProvider: () => process.env.BKPER_OAUTH_TOKEN
|
|
648
836
|
* })
|
|
@@ -653,52 +841,58 @@ export declare class BalancesReport {
|
|
|
653
841
|
* @public
|
|
654
842
|
*/
|
|
655
843
|
export declare class Bkper {
|
|
844
|
+
/**
|
|
845
|
+
* Creates a new Bkper instance with the specified API configuration.
|
|
846
|
+
*
|
|
847
|
+
* @param config - The Config object
|
|
848
|
+
*/
|
|
849
|
+
constructor(config: Config);
|
|
656
850
|
/**
|
|
657
851
|
* Gets the [[Book]] with the specified bookId from url param.
|
|
658
852
|
*
|
|
659
853
|
* @param id - The universal book id - The same bookId param of URL you access at app.bkper.com
|
|
660
854
|
* @param includeAccounts - Optional parameter to include accounts in the retrieved Book
|
|
661
855
|
*
|
|
662
|
-
* @returns The retrieved Book
|
|
856
|
+
* @returns The retrieved Book
|
|
663
857
|
*/
|
|
664
|
-
|
|
858
|
+
getBook(id: string, includeAccounts?: boolean): Promise<Book>;
|
|
665
859
|
/**
|
|
666
860
|
* Gets all [[Books]] the user has access to.
|
|
667
861
|
*
|
|
668
862
|
* @param query - Optional search term to filter books
|
|
669
863
|
* @returns The retrieved list of Books
|
|
670
864
|
*/
|
|
671
|
-
|
|
865
|
+
getBooks(query?: string): Promise<Book[]>;
|
|
672
866
|
/**
|
|
673
867
|
* Gets all [[Collections]] the user has access to.
|
|
674
868
|
*
|
|
675
869
|
* @returns The retrieved list of Collections
|
|
676
870
|
*/
|
|
677
|
-
|
|
871
|
+
getCollections(): Promise<Collection[]>;
|
|
678
872
|
/**
|
|
679
873
|
* Gets all [[Apps]] available for the user.
|
|
680
874
|
*
|
|
681
875
|
* @returns The retrieved list of Apps
|
|
682
876
|
*/
|
|
683
|
-
|
|
877
|
+
getApps(): Promise<App[]>;
|
|
684
878
|
/**
|
|
685
879
|
* Gets all [[Conversations]] available for the user.
|
|
686
880
|
*
|
|
687
881
|
* @returns The retrieved list of Conversations
|
|
688
882
|
*/
|
|
689
|
-
|
|
883
|
+
getConversations(): Promise<Conversation[]>;
|
|
690
884
|
/**
|
|
691
885
|
* Gets all [[Templates]] available for the user.
|
|
692
886
|
*
|
|
693
887
|
* @returns The retrieved list of Templates
|
|
694
888
|
*/
|
|
695
|
-
|
|
889
|
+
getTemplates(): Promise<Template[]>;
|
|
696
890
|
/**
|
|
697
891
|
* Gets the current logged [[User]].
|
|
698
892
|
*
|
|
699
|
-
* @returns The retrieved User
|
|
893
|
+
* @returns The retrieved User
|
|
700
894
|
*/
|
|
701
|
-
|
|
895
|
+
getUser(): Promise<User>;
|
|
702
896
|
/**
|
|
703
897
|
* Gets the URL to redirect the User to the billing portal.
|
|
704
898
|
*
|
|
@@ -706,34 +900,11 @@ export declare class Bkper {
|
|
|
706
900
|
*
|
|
707
901
|
* @returns The URL to redirect the User to the billing portal
|
|
708
902
|
*/
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Sets the API [[Config]] object.
|
|
712
|
-
*
|
|
713
|
-
* @param config - The Config object
|
|
714
|
-
*/
|
|
715
|
-
static setConfig(config: Config): void;
|
|
716
|
-
/**
|
|
717
|
-
* Sets the API key to identify the agent.
|
|
718
|
-
*
|
|
719
|
-
* @param key - The API key
|
|
720
|
-
*
|
|
721
|
-
* @returns The defined [[App]] object
|
|
722
|
-
*
|
|
723
|
-
* @deprecated Use `setConfig()` instead
|
|
724
|
-
*/
|
|
725
|
-
static setApiKey(key: string): App;
|
|
726
|
-
/**
|
|
727
|
-
* Sets the provider of the valid OAuth2 access token
|
|
728
|
-
*
|
|
729
|
-
* @deprecated Use `setConfig()` instead
|
|
730
|
-
*/
|
|
731
|
-
static setOAuthTokenProvider(oauthTokenProvider: () => Promise<string>): Promise<void>;
|
|
903
|
+
getBillingPortalUrl(returnUrl: string): Promise<string | undefined>;
|
|
732
904
|
}
|
|
733
905
|
|
|
734
906
|
/**
|
|
735
|
-
*
|
|
736
|
-
* A Book represents [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
|
|
907
|
+
* 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
|
|
737
908
|
*
|
|
738
909
|
* It contains all [[Accounts]] where [[Transactions]] are recorded/posted;
|
|
739
910
|
*
|
|
@@ -750,189 +921,241 @@ export declare class Book {
|
|
|
750
921
|
|
|
751
922
|
constructor(payload?: bkper.Book);
|
|
752
923
|
/**
|
|
753
|
-
*
|
|
924
|
+
* Gets an immutable copy of the JSON payload for this Book.
|
|
925
|
+
*
|
|
926
|
+
* @returns An immutable copy of the JSON payload
|
|
754
927
|
*/
|
|
755
928
|
json(): bkper.Book;
|
|
756
929
|
/**
|
|
757
|
-
*
|
|
930
|
+
* Gets the unique identifier of this Book.
|
|
931
|
+
*
|
|
932
|
+
* @returns This Book's unique identifier
|
|
758
933
|
*/
|
|
759
934
|
getId(): string;
|
|
760
935
|
/**
|
|
936
|
+
* Gets the name of this Book.
|
|
937
|
+
*
|
|
761
938
|
* @returns The name of this Book
|
|
762
939
|
*/
|
|
763
940
|
getName(): string | undefined;
|
|
764
941
|
/**
|
|
765
|
-
*
|
|
766
942
|
* Sets the name of the Book.
|
|
767
943
|
*
|
|
768
|
-
* @
|
|
944
|
+
* @param name - The name to set
|
|
945
|
+
*
|
|
946
|
+
* @returns This Book, for chaining
|
|
769
947
|
*/
|
|
770
948
|
setName(name: string): Book;
|
|
771
949
|
/**
|
|
950
|
+
* Gets the number of fraction digits supported by this Book.
|
|
951
|
+
*
|
|
772
952
|
* @returns The number of fraction digits supported by this Book. Same as getDecimalPlaces
|
|
773
953
|
*/
|
|
774
954
|
getFractionDigits(): number | undefined;
|
|
775
955
|
/**
|
|
956
|
+
* Gets the number of decimal places supported by this Book.
|
|
957
|
+
*
|
|
776
958
|
* @returns The number of decimal places supported by this Book. Same as getFractionDigits
|
|
777
959
|
*/
|
|
778
960
|
getDecimalPlaces(): number | undefined;
|
|
779
961
|
/**
|
|
962
|
+
* Sets the number of fraction digits (decimal places) supported by this Book.
|
|
780
963
|
*
|
|
781
|
-
*
|
|
964
|
+
* @param fractionDigits - The number of fraction digits to set (0 to 8)
|
|
782
965
|
*
|
|
783
|
-
* @returns This Book, for
|
|
966
|
+
* @returns This Book, for chaining
|
|
784
967
|
*/
|
|
785
968
|
setFractionDigits(fractionDigits: number): Book;
|
|
786
969
|
/**
|
|
970
|
+
* Gets the period slice for balances visualization.
|
|
971
|
+
*
|
|
787
972
|
* @returns The period slice for balances visualization
|
|
788
973
|
*/
|
|
789
974
|
getPeriod(): Period;
|
|
790
975
|
/**
|
|
791
|
-
* Sets the period slice for balances visualization
|
|
976
|
+
* Sets the period slice for balances visualization.
|
|
792
977
|
*
|
|
793
|
-
* @
|
|
978
|
+
* @param period - The period to set
|
|
979
|
+
*
|
|
980
|
+
* @returns This Book, for chaining
|
|
794
981
|
*/
|
|
795
982
|
setPeriod(period: Period): Book;
|
|
796
983
|
/**
|
|
797
|
-
*
|
|
984
|
+
* Gets the start month when YEAR period is set.
|
|
985
|
+
*
|
|
986
|
+
* @returns The start month when YEAR period is set
|
|
798
987
|
*/
|
|
799
988
|
getPeriodStartMonth(): Month;
|
|
800
989
|
/**
|
|
801
|
-
* Sets the start month when YEAR period set
|
|
990
|
+
* Sets the start month when YEAR period is set.
|
|
802
991
|
*
|
|
803
|
-
* @
|
|
992
|
+
* @param month - The start month to set
|
|
993
|
+
*
|
|
994
|
+
* @returns This Book, for chaining
|
|
804
995
|
*/
|
|
805
996
|
setPeriodStartMonth(month: Month): Book;
|
|
806
997
|
/**
|
|
998
|
+
* Gets the transactions pagination page size.
|
|
999
|
+
*
|
|
807
1000
|
* @returns The transactions pagination page size
|
|
808
1001
|
*/
|
|
809
1002
|
getPageSize(): number | undefined;
|
|
810
1003
|
/**
|
|
811
|
-
* Sets the transactions pagination page size
|
|
1004
|
+
* Sets the transactions pagination page size.
|
|
1005
|
+
*
|
|
1006
|
+
* @param pageSize - The page size to set
|
|
812
1007
|
*
|
|
813
|
-
* @returns This Book, for
|
|
1008
|
+
* @returns This Book, for chaining
|
|
814
1009
|
*/
|
|
815
1010
|
setPageSize(pageSize: number): Book;
|
|
816
1011
|
/**
|
|
1012
|
+
* Gets the name of the owner of the Book.
|
|
1013
|
+
*
|
|
817
1014
|
* @returns The name of the owner of the Book
|
|
818
1015
|
*/
|
|
819
1016
|
getOwnerName(): string | undefined;
|
|
820
1017
|
/**
|
|
821
|
-
*
|
|
1018
|
+
* Gets the permission for the current user in this Book.
|
|
1019
|
+
*
|
|
1020
|
+
* @returns The permission for the current user in this Book
|
|
822
1021
|
*/
|
|
823
1022
|
getPermission(): Permission;
|
|
824
1023
|
/**
|
|
825
|
-
*
|
|
1024
|
+
* Gets the collection of this Book, if any.
|
|
1025
|
+
*
|
|
1026
|
+
* @returns The collection of this Book, if any
|
|
826
1027
|
*/
|
|
827
1028
|
getCollection(): Collection | undefined;
|
|
828
1029
|
/**
|
|
1030
|
+
* Gets the date pattern of the Book.
|
|
1031
|
+
*
|
|
829
1032
|
* @returns The date pattern of the Book. Current: dd/MM/yyyy | MM/dd/yyyy | yyyy/MM/dd
|
|
830
1033
|
*/
|
|
831
1034
|
getDatePattern(): string | undefined;
|
|
832
1035
|
/**
|
|
833
|
-
*
|
|
834
1036
|
* Sets the date pattern of the Book. Current: dd/MM/yyyy | MM/dd/yyyy | yyyy/MM/dd
|
|
835
1037
|
*
|
|
836
|
-
* @returns This Book, for
|
|
1038
|
+
* @returns This Book, for chaining
|
|
837
1039
|
*/
|
|
838
1040
|
setDatePattern(datePattern: string): Book;
|
|
839
1041
|
/**
|
|
1042
|
+
* Gets the lock date of the Book in ISO format yyyy-MM-dd.
|
|
1043
|
+
*
|
|
840
1044
|
* @returns The lock date of the Book in ISO format yyyy-MM-dd
|
|
841
1045
|
*/
|
|
842
1046
|
getLockDate(): string | undefined;
|
|
843
1047
|
/**
|
|
844
|
-
*
|
|
845
1048
|
* Sets the lock date of the Book in ISO format yyyy-MM-dd.
|
|
846
1049
|
*
|
|
847
|
-
* @returns This Book, for
|
|
1050
|
+
* @returns This Book, for chaining
|
|
848
1051
|
*/
|
|
849
1052
|
setLockDate(lockDate: string | null): Book;
|
|
850
1053
|
/**
|
|
1054
|
+
* Gets the closing date of the Book in ISO format yyyy-MM-dd.
|
|
1055
|
+
*
|
|
851
1056
|
* @returns The closing date of the Book in ISO format yyyy-MM-dd
|
|
852
1057
|
*/
|
|
853
1058
|
getClosingDate(): string | undefined;
|
|
854
1059
|
/**
|
|
855
|
-
*
|
|
856
1060
|
* Sets the closing date of the Book in ISO format yyyy-MM-dd.
|
|
857
1061
|
*
|
|
858
|
-
* @returns This Book, for
|
|
1062
|
+
* @returns This Book, for chaining
|
|
859
1063
|
*/
|
|
860
1064
|
setClosingDate(closingDate: string | null): Book;
|
|
861
1065
|
/**
|
|
1066
|
+
* Gets the decimal separator of the Book.
|
|
1067
|
+
*
|
|
862
1068
|
* @returns The decimal separator of the Book
|
|
863
1069
|
*/
|
|
864
1070
|
getDecimalSeparator(): DecimalSeparator;
|
|
865
1071
|
/**
|
|
866
|
-
*
|
|
867
1072
|
* Sets the decimal separator of the Book
|
|
868
1073
|
*
|
|
869
|
-
* @returns This Book, for
|
|
1074
|
+
* @returns This Book, for chaining
|
|
870
1075
|
*/
|
|
871
1076
|
setDecimalSeparator(decimalSeparator: DecimalSeparator): Book;
|
|
872
1077
|
/**
|
|
1078
|
+
* Gets the time zone of the Book.
|
|
1079
|
+
*
|
|
873
1080
|
* @returns The time zone of the Book
|
|
874
1081
|
*/
|
|
875
1082
|
getTimeZone(): string | undefined;
|
|
876
1083
|
/**
|
|
1084
|
+
* Sets the time zone of the Book.
|
|
877
1085
|
*
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
* @returns This Book, for chainning.
|
|
1086
|
+
* @returns This Book, for chaining
|
|
881
1087
|
*/
|
|
882
1088
|
setTimeZone(timeZone: string): Book;
|
|
883
1089
|
/**
|
|
1090
|
+
* Gets the time zone offset of the book, in minutes.
|
|
1091
|
+
*
|
|
884
1092
|
* @returns The time zone offset of the book, in minutes
|
|
885
1093
|
*/
|
|
886
1094
|
getTimeZoneOffset(): number | undefined;
|
|
887
1095
|
/**
|
|
1096
|
+
* Gets the auto post status of the Book.
|
|
1097
|
+
*
|
|
888
1098
|
* @returns The auto post status of the Book
|
|
889
1099
|
*/
|
|
890
1100
|
getAutoPost(): boolean | undefined;
|
|
891
1101
|
/**
|
|
1102
|
+
* Sets the auto post status of the Book.
|
|
892
1103
|
*
|
|
893
|
-
*
|
|
894
|
-
*
|
|
895
|
-
* @returns This Book, for chainning.
|
|
1104
|
+
* @returns This Book, for chaining
|
|
896
1105
|
*/
|
|
897
1106
|
setAutoPost(autoPost: boolean): Book;
|
|
898
1107
|
/**
|
|
899
|
-
*
|
|
1108
|
+
* Gets the last update date of the book, in milliseconds.
|
|
1109
|
+
*
|
|
1110
|
+
* @returns The last update date of the book, in milliseconds
|
|
900
1111
|
*/
|
|
901
1112
|
getLastUpdateMs(): number | undefined;
|
|
902
1113
|
/**
|
|
1114
|
+
* Gets the total number of posted transactions.
|
|
1115
|
+
*
|
|
903
1116
|
* @returns The total number of posted transactions
|
|
904
1117
|
*/
|
|
905
1118
|
getTotalTransactions(): number;
|
|
906
1119
|
/**
|
|
1120
|
+
* Gets the total number of posted transactions on current month.
|
|
1121
|
+
*
|
|
907
1122
|
* @returns The total number of posted transactions on current month
|
|
908
1123
|
*/
|
|
909
1124
|
getTotalTransactionsCurrentMonth(): number;
|
|
910
1125
|
/**
|
|
1126
|
+
* Gets the total number of posted transactions on current year.
|
|
1127
|
+
*
|
|
911
1128
|
* @returns The total number of posted transactions on current year
|
|
912
1129
|
*/
|
|
913
1130
|
getTotalTransactionsCurrentYear(): number;
|
|
914
1131
|
/**
|
|
1132
|
+
* Gets the visibility of the book.
|
|
1133
|
+
*
|
|
915
1134
|
* @returns The visibility of the book
|
|
916
1135
|
*/
|
|
917
1136
|
getVisibility(): Visibility;
|
|
918
1137
|
/**
|
|
919
|
-
* Gets the custom properties stored in this Book
|
|
1138
|
+
* Gets the custom properties stored in this Book.
|
|
1139
|
+
*
|
|
1140
|
+
* @returns The custom properties object
|
|
920
1141
|
*/
|
|
921
1142
|
getProperties(): {
|
|
922
1143
|
[key: string]: string;
|
|
923
1144
|
};
|
|
924
1145
|
/**
|
|
925
|
-
* Gets the property value for given keys. First property found will be retrieved
|
|
1146
|
+
* Gets the property value for given keys. First property found will be retrieved.
|
|
926
1147
|
*
|
|
927
|
-
* @param keys - The property
|
|
1148
|
+
* @param keys - The property keys to search for
|
|
1149
|
+
*
|
|
1150
|
+
* @returns The property value or undefined if not found
|
|
928
1151
|
*/
|
|
929
1152
|
getProperty(...keys: string[]): string | undefined;
|
|
930
1153
|
/**
|
|
931
|
-
* Sets the custom properties of the Book
|
|
1154
|
+
* Sets the custom properties of the Book.
|
|
932
1155
|
*
|
|
933
1156
|
* @param properties - Object with key/value pair properties
|
|
934
1157
|
*
|
|
935
|
-
* @returns This Book, for
|
|
1158
|
+
* @returns This Book, for chaining
|
|
936
1159
|
*/
|
|
937
1160
|
setProperties(properties: {
|
|
938
1161
|
[key: string]: string;
|
|
@@ -943,7 +1166,7 @@ export declare class Book {
|
|
|
943
1166
|
* @param key - The property key
|
|
944
1167
|
* @param value - The property value
|
|
945
1168
|
*
|
|
946
|
-
* @returns This Book, for
|
|
1169
|
+
* @returns This Book, for chaining
|
|
947
1170
|
*/
|
|
948
1171
|
setProperty(key: string, value: string | null): Book;
|
|
949
1172
|
/**
|
|
@@ -952,13 +1175,15 @@ export declare class Book {
|
|
|
952
1175
|
* @param date - The date to format as string.
|
|
953
1176
|
* @param timeZone - The output timezone of the result. Default to script's timeZone
|
|
954
1177
|
*
|
|
955
|
-
* @returns The date
|
|
1178
|
+
* @returns The formatted date
|
|
956
1179
|
*/
|
|
957
1180
|
formatDate(date: Date, timeZone?: string): string;
|
|
958
1181
|
/**
|
|
959
|
-
* Parse a date string according to date pattern and timezone of the Book.
|
|
1182
|
+
* Parse a date string according to date pattern and timezone of the Book. Also parse ISO yyyy-mm-dd format.
|
|
960
1183
|
*
|
|
961
|
-
*
|
|
1184
|
+
* @param date - The date string to parse
|
|
1185
|
+
*
|
|
1186
|
+
* @returns The parsed Date object
|
|
962
1187
|
*/
|
|
963
1188
|
parseDate(date: string): Date;
|
|
964
1189
|
/**
|
|
@@ -966,25 +1191,29 @@ export declare class Book {
|
|
|
966
1191
|
*
|
|
967
1192
|
* @param value - The value to be formatted.
|
|
968
1193
|
*
|
|
969
|
-
* @returns The value
|
|
1194
|
+
* @returns The formatted value
|
|
970
1195
|
*/
|
|
971
1196
|
formatValue(value: Amount | number | null | undefined): string;
|
|
972
1197
|
/**
|
|
973
1198
|
* Parse a value string according to [[DecimalSeparator]] and fraction digits of the Book.
|
|
1199
|
+
*
|
|
1200
|
+
* @param value - The value string to parse
|
|
1201
|
+
*
|
|
1202
|
+
* @returns The parsed Amount or undefined if parsing fails
|
|
974
1203
|
*/
|
|
975
1204
|
parseValue(value: string): Amount | undefined;
|
|
976
1205
|
/**
|
|
977
|
-
* Rounds a value according to the number of fraction digits of the Book
|
|
1206
|
+
* Rounds a value according to the number of fraction digits of the Book.
|
|
978
1207
|
*
|
|
979
1208
|
* @param value - The value to be rounded
|
|
980
1209
|
*
|
|
981
|
-
* @returns The value
|
|
1210
|
+
* @returns The rounded value
|
|
982
1211
|
*/
|
|
983
1212
|
round(value: Amount | number): Amount;
|
|
984
1213
|
/**
|
|
985
1214
|
* Batch create [[Transactions]] on the Book.
|
|
986
1215
|
*
|
|
987
|
-
* @param transactions The transactions to be created
|
|
1216
|
+
* @param transactions - The transactions to be created
|
|
988
1217
|
*
|
|
989
1218
|
* @returns The created Transactions
|
|
990
1219
|
*/
|
|
@@ -992,65 +1221,65 @@ export declare class Book {
|
|
|
992
1221
|
/**
|
|
993
1222
|
* Batch post [[Transactions]] on the Book.
|
|
994
1223
|
*
|
|
995
|
-
* @param transactions The transactions to be posted
|
|
996
|
-
*
|
|
1224
|
+
* @param transactions - The transactions to be posted
|
|
997
1225
|
*/
|
|
998
1226
|
batchPostTransactions(transactions: Transaction[]): Promise<void>;
|
|
999
1227
|
/**
|
|
1000
1228
|
* Batch update [[Transactions]] on the Book.
|
|
1001
1229
|
*
|
|
1002
|
-
* @param transactions The transactions to be updated
|
|
1230
|
+
* @param transactions - The transactions to be updated
|
|
1003
1231
|
*
|
|
1004
|
-
* @param updateChecked True to also update checked transactions
|
|
1232
|
+
* @param updateChecked - True to also update checked transactions
|
|
1005
1233
|
*
|
|
1006
1234
|
* @returns The updated draft Transactions
|
|
1007
|
-
*
|
|
1008
1235
|
*/
|
|
1009
1236
|
batchUpdateTransactions(transactions: Transaction[], updateChecked?: boolean): Promise<Transaction[]>;
|
|
1010
1237
|
/**
|
|
1011
1238
|
* Batch check [[Transactions]] on the Book.
|
|
1012
1239
|
*
|
|
1013
|
-
* @param transactions The transactions to be checked
|
|
1014
|
-
*
|
|
1240
|
+
* @param transactions - The transactions to be checked
|
|
1015
1241
|
*/
|
|
1016
1242
|
batchCheckTransactions(transactions: Transaction[]): Promise<void>;
|
|
1017
1243
|
/**
|
|
1018
1244
|
* Batch uncheck [[Transactions]] on the Book.
|
|
1019
1245
|
*
|
|
1020
|
-
* @param transactions The transactions to be unchecked
|
|
1021
|
-
*
|
|
1246
|
+
* @param transactions - The transactions to be unchecked
|
|
1022
1247
|
*/
|
|
1023
1248
|
batchUncheckTransactions(transactions: Transaction[]): Promise<void>;
|
|
1024
1249
|
/**
|
|
1025
1250
|
* Batch trash [[Transactions]] on the Book.
|
|
1026
1251
|
*
|
|
1027
|
-
* @param transactions The transactions to be trashed
|
|
1028
|
-
*
|
|
1029
|
-
* @param trashChecked True to also trash checked transactions
|
|
1030
|
-
*
|
|
1252
|
+
* @param transactions - The transactions to be trashed
|
|
1253
|
+
* @param trashChecked - True to also trash checked transactions
|
|
1031
1254
|
*/
|
|
1032
1255
|
batchTrashTransactions(transactions: Transaction[], trashChecked?: boolean): Promise<void>;
|
|
1033
1256
|
/**
|
|
1034
1257
|
* Batch untrash [[Transactions]] on the Book.
|
|
1035
1258
|
*
|
|
1036
|
-
* @param transactions The transactions to be untrashed
|
|
1037
|
-
*
|
|
1259
|
+
* @param transactions - The transactions to be untrashed
|
|
1038
1260
|
*/
|
|
1039
1261
|
batchUntrashTransactions(transactions: Transaction[]): Promise<void>;
|
|
1040
1262
|
/**
|
|
1041
1263
|
* Replay [[Events]] on the Book, in batch.
|
|
1264
|
+
*
|
|
1265
|
+
* @param events - The events to be replayed
|
|
1266
|
+
* @param errorOnly - True to only replay events with errors
|
|
1042
1267
|
*/
|
|
1043
1268
|
batchReplayEvents(events: Event[], errorOnly?: boolean): Promise<void>;
|
|
1044
1269
|
/**
|
|
1045
1270
|
* Create [[Accounts]] on the Book, in batch.
|
|
1046
1271
|
*
|
|
1047
|
-
* @
|
|
1272
|
+
* @param accounts - The accounts to be created
|
|
1273
|
+
*
|
|
1274
|
+
* @returns The created Accounts
|
|
1048
1275
|
*/
|
|
1049
1276
|
batchCreateAccounts(accounts: Account[]): Promise<Account[]>;
|
|
1050
1277
|
/**
|
|
1051
1278
|
* Create [[Groups]] on the Book, in batch.
|
|
1052
1279
|
*
|
|
1053
|
-
* @
|
|
1280
|
+
* @param groups - The groups to be created
|
|
1281
|
+
*
|
|
1282
|
+
* @returns The created Groups
|
|
1054
1283
|
*/
|
|
1055
1284
|
batchCreateGroups(groups: Group[]): Promise<Group[]>;
|
|
1056
1285
|
/**
|
|
@@ -1058,35 +1287,35 @@ export declare class Book {
|
|
|
1058
1287
|
*/
|
|
1059
1288
|
audit(): void;
|
|
1060
1289
|
/**
|
|
1061
|
-
* Retrieve installed [[Apps]] for this Book
|
|
1290
|
+
* Retrieve installed [[Apps]] for this Book.
|
|
1062
1291
|
*
|
|
1063
|
-
* @returns The Apps objects
|
|
1292
|
+
* @returns The retrieved Apps objects
|
|
1064
1293
|
*/
|
|
1065
1294
|
getApps(): Promise<App[]>;
|
|
1066
1295
|
/**
|
|
1067
1296
|
* Gets the existing [[Integrations]] in the Book.
|
|
1068
1297
|
*
|
|
1069
|
-
* @returns The
|
|
1298
|
+
* @returns The retrieved Integration objects
|
|
1070
1299
|
*/
|
|
1071
1300
|
getIntegrations(): Promise<Integration[]>;
|
|
1072
1301
|
/**
|
|
1073
1302
|
* Creates a new [[Integration]] in the Book.
|
|
1074
1303
|
*
|
|
1075
|
-
* @param integration - The Integration object or wrapped plain json
|
|
1304
|
+
* @param integration - The [[Integration]] object or wrapped plain json
|
|
1076
1305
|
*
|
|
1077
|
-
* @returns The created Integration object
|
|
1306
|
+
* @returns The created [[Integration]] object
|
|
1078
1307
|
*/
|
|
1079
1308
|
createIntegration(integration: bkper.Integration | Integration): Promise<Integration>;
|
|
1080
1309
|
/**
|
|
1081
1310
|
* Updates an existing [[Integration]] in the Book.
|
|
1082
1311
|
*
|
|
1083
|
-
* @param integration - The Integration wrapped plain json
|
|
1312
|
+
* @param integration - The [[Integration]] wrapped plain json
|
|
1084
1313
|
*
|
|
1085
|
-
* @returns The updated Integration object
|
|
1314
|
+
* @returns The updated [[Integration]] object
|
|
1086
1315
|
*/
|
|
1087
1316
|
updateIntegration(integration: bkper.Integration): Promise<Integration>;
|
|
1088
1317
|
/**
|
|
1089
|
-
* Gets an [[Account]] object
|
|
1318
|
+
* Gets an [[Account]] object.
|
|
1090
1319
|
*
|
|
1091
1320
|
* @param idOrName - The id or name of the Account
|
|
1092
1321
|
*
|
|
@@ -1102,7 +1331,7 @@ export declare class Book {
|
|
|
1102
1331
|
|
|
1103
1332
|
|
|
1104
1333
|
/**
|
|
1105
|
-
* Gets a [[Group]] object
|
|
1334
|
+
* Gets a [[Group]] object.
|
|
1106
1335
|
*
|
|
1107
1336
|
* @param idOrName - The id or name of the Group
|
|
1108
1337
|
*
|
|
@@ -1110,16 +1339,16 @@ export declare class Book {
|
|
|
1110
1339
|
*/
|
|
1111
1340
|
getGroup(idOrName?: string): Promise<Group | undefined>;
|
|
1112
1341
|
/**
|
|
1113
|
-
* Gets all [[Groups]] of this Book
|
|
1342
|
+
* Gets all [[Groups]] of this Book.
|
|
1114
1343
|
*
|
|
1115
|
-
* @returns The retrieved Group objects
|
|
1344
|
+
* @returns The retrieved [[Group]] objects
|
|
1116
1345
|
*/
|
|
1117
1346
|
getGroups(): Promise<Group[]>;
|
|
1118
1347
|
|
|
1119
1348
|
/**
|
|
1120
|
-
* Gets all [[Accounts]] of this Book
|
|
1349
|
+
* Gets all [[Accounts]] of this Book.
|
|
1121
1350
|
*
|
|
1122
|
-
* @returns The retrieved Account objects
|
|
1351
|
+
* @returns The retrieved [[Account]] objects
|
|
1123
1352
|
*/
|
|
1124
1353
|
getAccounts(): Promise<Account[]>;
|
|
1125
1354
|
|
|
@@ -1133,31 +1362,39 @@ export declare class Book {
|
|
|
1133
1362
|
* Lists transactions in the Book based on the provided query, limit, and cursor, for pagination.
|
|
1134
1363
|
*
|
|
1135
1364
|
* @param query - The query string to filter transactions
|
|
1136
|
-
* @param limit - The maximum number of transactions to return. Default to 100, max to 1000
|
|
1365
|
+
* @param limit - The maximum number of transactions to return. Default to 100, max to 1000
|
|
1137
1366
|
* @param cursor - The cursor for pagination
|
|
1138
1367
|
*
|
|
1139
|
-
* @returns A
|
|
1368
|
+
* @returns A [[TransactionList]] object containing the list of transactions
|
|
1140
1369
|
*/
|
|
1141
1370
|
listTransactions(query?: string, limit?: number, cursor?: string): Promise<TransactionList>;
|
|
1142
1371
|
/**
|
|
1143
1372
|
* Lists events in the Book based on the provided parameters.
|
|
1144
1373
|
*
|
|
1145
|
-
* @param afterDate - The start date (inclusive) for the events search range, in [RFC3339](https://en.wikipedia.org/wiki/ISO_8601#RFC_3339) format. Can be null
|
|
1146
|
-
* @param beforeDate - The end date (exclusive) for the events search range, in [RFC3339](https://en.wikipedia.org/wiki/ISO_8601#RFC_3339) format. Can be null
|
|
1147
|
-
* @param onError - True to search only for events on error
|
|
1148
|
-
* @param resourceId - The ID of the event's resource (Transaction, Account, or Group). Can be null
|
|
1149
|
-
* @param limit - The maximum number of events to return
|
|
1150
|
-
* @param cursor - The cursor for pagination. Can be null
|
|
1374
|
+
* @param afterDate - The start date (inclusive) for the events search range, in [RFC3339](https://en.wikipedia.org/wiki/ISO_8601#RFC_3339) format. Can be null
|
|
1375
|
+
* @param beforeDate - The end date (exclusive) for the events search range, in [RFC3339](https://en.wikipedia.org/wiki/ISO_8601#RFC_3339) format. Can be null
|
|
1376
|
+
* @param onError - True to search only for events on error
|
|
1377
|
+
* @param resourceId - The ID of the event's resource (Transaction, Account, or Group). Can be null
|
|
1378
|
+
* @param limit - The maximum number of events to return
|
|
1379
|
+
* @param cursor - The cursor for pagination. Can be null
|
|
1151
1380
|
*
|
|
1152
|
-
* @returns An EventList object containing the list of events
|
|
1381
|
+
* @returns An [[EventList]] object containing the list of events
|
|
1153
1382
|
*/
|
|
1154
1383
|
listEvents(afterDate: string | null, beforeDate: string | null, onError: boolean, resourceId: string | null, limit: number, cursor?: string): Promise<EventList>;
|
|
1155
1384
|
/**
|
|
1156
|
-
* Retrieve a transaction by id
|
|
1385
|
+
* Retrieve a transaction by id.
|
|
1386
|
+
*
|
|
1387
|
+
* @param id - The transaction ID
|
|
1388
|
+
*
|
|
1389
|
+
* @returns The [[Transaction]] object
|
|
1157
1390
|
*/
|
|
1158
1391
|
getTransaction(id: string): Promise<Transaction | undefined>;
|
|
1159
1392
|
/**
|
|
1160
|
-
* Retrieve a file by id
|
|
1393
|
+
* Retrieve a file by id.
|
|
1394
|
+
*
|
|
1395
|
+
* @param id - The file ID
|
|
1396
|
+
*
|
|
1397
|
+
* @returns The [[File]] object
|
|
1161
1398
|
*/
|
|
1162
1399
|
getFile(id: string): Promise<File>;
|
|
1163
1400
|
/**
|
|
@@ -1169,24 +1406,25 @@ export declare class Book {
|
|
|
1169
1406
|
/**
|
|
1170
1407
|
* Creates a copy of this Book
|
|
1171
1408
|
*
|
|
1172
|
-
* @param name The name for the copied book
|
|
1173
|
-
* @param copyTransactions True to copy transactions from the source book (user must be the Book owner)
|
|
1174
|
-
* @param fromDate Start date to consider if copying transactions (numeric value in YYYYMMDD format)
|
|
1409
|
+
* @param name - The name for the copied book
|
|
1410
|
+
* @param copyTransactions - True to copy transactions from the source book (user must be the Book owner)
|
|
1411
|
+
* @param fromDate - Start date to consider if copying transactions (numeric value in YYYYMMDD format)
|
|
1175
1412
|
*
|
|
1176
1413
|
* @returns The copied Book object
|
|
1177
1414
|
*/
|
|
1178
1415
|
copy(name: string, copyTransactions?: boolean, fromDate?: number): Promise<Book>;
|
|
1179
1416
|
/**
|
|
1180
1417
|
* Perform update Book, applying pending changes.
|
|
1418
|
+
*
|
|
1419
|
+
* @returns The updated Book object
|
|
1181
1420
|
*/
|
|
1182
1421
|
update(): Promise<Book>;
|
|
1183
1422
|
/**
|
|
1423
|
+
* Create a [[BalancesReport]] based on query.
|
|
1184
1424
|
*
|
|
1185
|
-
*
|
|
1425
|
+
* @param query - The balances report query
|
|
1186
1426
|
*
|
|
1187
|
-
* @
|
|
1188
|
-
*
|
|
1189
|
-
* @return The balances report
|
|
1427
|
+
* @returns The balances report
|
|
1190
1428
|
*
|
|
1191
1429
|
* Example:
|
|
1192
1430
|
*
|
|
@@ -1197,10 +1435,14 @@ export declare class Book {
|
|
|
1197
1435
|
*
|
|
1198
1436
|
* var accountBalance = balancesReport.getBalancesContainer("Bank Account").getCumulativeBalance();
|
|
1199
1437
|
* ```
|
|
1438
|
+
*
|
|
1439
|
+
* @returns The retrieved [[BalancesReport]] object
|
|
1200
1440
|
*/
|
|
1201
1441
|
getBalancesReport(query: string): Promise<BalancesReport>;
|
|
1202
1442
|
/**
|
|
1203
|
-
*
|
|
1443
|
+
* Gets the saved queries from this book.
|
|
1444
|
+
*
|
|
1445
|
+
* @returns The saved queries from this book
|
|
1204
1446
|
*/
|
|
1205
1447
|
getSavedQueries(): Promise<Query[]>;
|
|
1206
1448
|
}
|
|
@@ -1216,22 +1458,32 @@ export declare class BotResponse {
|
|
|
1216
1458
|
|
|
1217
1459
|
constructor(event: Event, payload?: bkper.BotResponse);
|
|
1218
1460
|
/**
|
|
1219
|
-
*
|
|
1461
|
+
* Gets the type of this Bot Response.
|
|
1462
|
+
*
|
|
1463
|
+
* @returns The type of this Bot Response
|
|
1220
1464
|
*/
|
|
1221
1465
|
getType(): BotResponseType | undefined;
|
|
1222
1466
|
/**
|
|
1223
|
-
*
|
|
1467
|
+
* Gets the agent id of this Bot Response.
|
|
1468
|
+
*
|
|
1469
|
+
* @returns The agent id of this Bot Response
|
|
1224
1470
|
*/
|
|
1225
1471
|
getAgentId(): string | undefined;
|
|
1226
1472
|
/**
|
|
1227
|
-
*
|
|
1473
|
+
* Gets the message of this Bot Response.
|
|
1474
|
+
*
|
|
1475
|
+
* @returns The message of this Bot Response
|
|
1228
1476
|
*/
|
|
1229
1477
|
getMessage(): string | undefined;
|
|
1230
1478
|
/**
|
|
1479
|
+
* Gets the date this Bot Response was created.
|
|
1480
|
+
*
|
|
1231
1481
|
* @returns The date this Bot Response was created
|
|
1232
1482
|
*/
|
|
1233
1483
|
getCreatedAt(): Date | undefined;
|
|
1234
1484
|
/**
|
|
1485
|
+
* Gets the Event this Bot Response is associated to.
|
|
1486
|
+
*
|
|
1235
1487
|
* @returns The Event this Bot Response is associated to
|
|
1236
1488
|
*/
|
|
1237
1489
|
getEvent(): Event;
|
|
@@ -1240,13 +1492,13 @@ export declare class BotResponse {
|
|
|
1240
1492
|
*
|
|
1241
1493
|
* @returns The updated Bot Response
|
|
1242
1494
|
*/
|
|
1243
|
-
replay(): Promise<
|
|
1495
|
+
replay(): Promise<BotResponse>;
|
|
1244
1496
|
/**
|
|
1245
1497
|
* Delete this Bot Response.
|
|
1246
1498
|
*
|
|
1247
1499
|
* @returns The deleted Bot Response
|
|
1248
1500
|
*/
|
|
1249
|
-
remove(): Promise<
|
|
1501
|
+
remove(): Promise<BotResponse>;
|
|
1250
1502
|
|
|
1251
1503
|
}
|
|
1252
1504
|
|
|
@@ -1279,21 +1531,29 @@ export declare class Collection {
|
|
|
1279
1531
|
payload: bkper.Collection;
|
|
1280
1532
|
constructor(payload?: bkper.Collection);
|
|
1281
1533
|
/**
|
|
1534
|
+
* Gets an immutable copy of the JSON payload for this Collection.
|
|
1535
|
+
*
|
|
1282
1536
|
* @returns The wrapped plain json object
|
|
1283
1537
|
*/
|
|
1284
1538
|
json(): bkper.Collection;
|
|
1285
1539
|
/**
|
|
1540
|
+
* Gets the unique identifier of this Collection.
|
|
1541
|
+
*
|
|
1286
1542
|
* @returns The id of this Collection
|
|
1287
1543
|
*/
|
|
1288
1544
|
getId(): string | undefined;
|
|
1289
1545
|
/**
|
|
1546
|
+
* Gets the name of this Collection.
|
|
1547
|
+
*
|
|
1290
1548
|
* @returns The name of this Collection
|
|
1291
1549
|
*/
|
|
1292
1550
|
getName(): string | undefined;
|
|
1293
1551
|
/**
|
|
1294
1552
|
* Sets the name of the Collection.
|
|
1295
1553
|
*
|
|
1296
|
-
* @
|
|
1554
|
+
* @param name - The name to set
|
|
1555
|
+
*
|
|
1556
|
+
* @returns This Collection, for chaining
|
|
1297
1557
|
*/
|
|
1298
1558
|
setName(name: string): Collection;
|
|
1299
1559
|
/**
|
|
@@ -1309,18 +1569,24 @@ export declare class Collection {
|
|
|
1309
1569
|
*/
|
|
1310
1570
|
getPermission(): Permission | undefined;
|
|
1311
1571
|
/**
|
|
1312
|
-
*
|
|
1572
|
+
* Gets all Books of this collection.
|
|
1573
|
+
*
|
|
1574
|
+
* @returns All Books of this collection
|
|
1313
1575
|
*/
|
|
1314
1576
|
getBooks(): Book[];
|
|
1315
1577
|
/**
|
|
1316
1578
|
* Adds Books to this Collection.
|
|
1317
1579
|
*
|
|
1580
|
+
* @param books - The Books to add to this Collection
|
|
1581
|
+
*
|
|
1318
1582
|
* @returns The added Book objects
|
|
1319
1583
|
*/
|
|
1320
1584
|
addBooks(books: Book[]): Promise<Book[]>;
|
|
1321
1585
|
/**
|
|
1322
1586
|
* Removes Books from this Collection.
|
|
1323
1587
|
*
|
|
1588
|
+
* @param books - The Books to remove from this Collection
|
|
1589
|
+
*
|
|
1324
1590
|
* @returns The removed Book objects
|
|
1325
1591
|
*/
|
|
1326
1592
|
removeBooks(books: Book[]): Promise<Book[]>;
|
|
@@ -1406,6 +1672,8 @@ export declare class Connection {
|
|
|
1406
1672
|
payload: bkper.Connection;
|
|
1407
1673
|
constructor(payload?: bkper.Connection);
|
|
1408
1674
|
/**
|
|
1675
|
+
* Gets an immutable copy of the JSON payload for this Connection.
|
|
1676
|
+
*
|
|
1409
1677
|
* @returns An immutable copy of the json payload
|
|
1410
1678
|
*/
|
|
1411
1679
|
json(): bkper.Connection;
|
|
@@ -1426,7 +1694,7 @@ export declare class Connection {
|
|
|
1426
1694
|
*
|
|
1427
1695
|
* @param agentId - The Connection agentId
|
|
1428
1696
|
*
|
|
1429
|
-
* @returns The Connection, for
|
|
1697
|
+
* @returns The Connection, for chaining
|
|
1430
1698
|
*/
|
|
1431
1699
|
setAgentId(agentId: string): Connection;
|
|
1432
1700
|
/**
|
|
@@ -1458,7 +1726,7 @@ export declare class Connection {
|
|
|
1458
1726
|
*
|
|
1459
1727
|
* @param name - The name of the Connection
|
|
1460
1728
|
*
|
|
1461
|
-
* @returns The Connection, for
|
|
1729
|
+
* @returns The Connection, for chaining
|
|
1462
1730
|
*/
|
|
1463
1731
|
setName(name: string): Connection;
|
|
1464
1732
|
/**
|
|
@@ -1466,7 +1734,7 @@ export declare class Connection {
|
|
|
1466
1734
|
*
|
|
1467
1735
|
* @param uuid - The universal unique identifier of the Connection
|
|
1468
1736
|
*
|
|
1469
|
-
* @returns The Connection, for
|
|
1737
|
+
* @returns The Connection, for chaining
|
|
1470
1738
|
*/
|
|
1471
1739
|
setUUID(uuid: string): Connection;
|
|
1472
1740
|
/**
|
|
@@ -1486,7 +1754,7 @@ export declare class Connection {
|
|
|
1486
1754
|
*
|
|
1487
1755
|
* @param type - The Connection type
|
|
1488
1756
|
*
|
|
1489
|
-
* @returns The Connection, for
|
|
1757
|
+
* @returns The Connection, for chaining
|
|
1490
1758
|
*/
|
|
1491
1759
|
setType(type: "APP" | "BANK"): Connection;
|
|
1492
1760
|
/**
|
|
@@ -1502,7 +1770,7 @@ export declare class Connection {
|
|
|
1502
1770
|
*
|
|
1503
1771
|
* @param properties - Object with key/value pair properties
|
|
1504
1772
|
*
|
|
1505
|
-
* @returns The Connection, for
|
|
1773
|
+
* @returns The Connection, for chaining
|
|
1506
1774
|
*/
|
|
1507
1775
|
setProperties(properties: {
|
|
1508
1776
|
[key: string]: string;
|
|
@@ -1529,7 +1797,7 @@ export declare class Connection {
|
|
|
1529
1797
|
*
|
|
1530
1798
|
* @param key - The property key
|
|
1531
1799
|
*
|
|
1532
|
-
* @returns The Connection, for
|
|
1800
|
+
* @returns The Connection, for chaining
|
|
1533
1801
|
*/
|
|
1534
1802
|
deleteProperty(key: string): Connection;
|
|
1535
1803
|
/**
|
|
@@ -1575,36 +1843,43 @@ export declare class Conversation {
|
|
|
1575
1843
|
|
|
1576
1844
|
constructor(agent: Agent, payload?: bkper.Conversation);
|
|
1577
1845
|
/**
|
|
1846
|
+
* Gets an immutable copy of the JSON payload for this Conversation.
|
|
1847
|
+
*
|
|
1578
1848
|
* @returns The wrapped plain json object
|
|
1579
1849
|
*/
|
|
1580
1850
|
json(): bkper.Conversation;
|
|
1581
1851
|
/**
|
|
1852
|
+
* Gets the Agent associated to this Conversation.
|
|
1582
1853
|
*
|
|
1583
1854
|
* @returns The Agent associated to this Conversation
|
|
1584
1855
|
*/
|
|
1585
1856
|
getAgent(): Agent;
|
|
1586
1857
|
/**
|
|
1858
|
+
* Gets the Conversation universal identifier.
|
|
1587
1859
|
*
|
|
1588
1860
|
* @returns The Conversation universal identifier
|
|
1589
1861
|
*/
|
|
1590
1862
|
getId(): string | undefined;
|
|
1591
1863
|
/**
|
|
1864
|
+
* Gets the title of the Conversation.
|
|
1592
1865
|
*
|
|
1593
1866
|
* @returns The title of the Conversation
|
|
1594
1867
|
*/
|
|
1595
1868
|
getTitle(): string | undefined;
|
|
1596
1869
|
/**
|
|
1870
|
+
* Gets the Date the Conversation was created.
|
|
1597
1871
|
*
|
|
1598
1872
|
* @returns The Date the Conversation was created
|
|
1599
1873
|
*/
|
|
1600
1874
|
getCreatedAt(): Date | undefined;
|
|
1601
1875
|
/**
|
|
1876
|
+
* Gets the Date the Conversation was last updated.
|
|
1602
1877
|
*
|
|
1603
1878
|
* @returns The Date the Conversation was last updated
|
|
1604
1879
|
*/
|
|
1605
1880
|
getUpdatedAt(): Date | undefined;
|
|
1606
1881
|
/**
|
|
1607
|
-
* Gets the Messages that compose this Conversation
|
|
1882
|
+
* Gets the Messages that compose this Conversation.
|
|
1608
1883
|
*
|
|
1609
1884
|
* @returns The Messages in this Conversation
|
|
1610
1885
|
*/
|
|
@@ -1612,7 +1887,7 @@ export declare class Conversation {
|
|
|
1612
1887
|
|
|
1613
1888
|
|
|
1614
1889
|
/**
|
|
1615
|
-
* Performs create Conversation
|
|
1890
|
+
* Performs create Conversation.
|
|
1616
1891
|
*
|
|
1617
1892
|
* @returns The created Conversation object
|
|
1618
1893
|
*/
|
|
@@ -1649,38 +1924,56 @@ export declare class Event {
|
|
|
1649
1924
|
|
|
1650
1925
|
constructor(book: Book, payload?: bkper.Event);
|
|
1651
1926
|
/**
|
|
1927
|
+
* Gets an immutable copy of the JSON payload for this Event.
|
|
1928
|
+
*
|
|
1652
1929
|
* @returns The wrapped plain json object
|
|
1653
1930
|
*/
|
|
1654
1931
|
json(): bkper.Event;
|
|
1655
1932
|
/**
|
|
1933
|
+
* Gets the book in which the Event was created.
|
|
1934
|
+
*
|
|
1656
1935
|
* @returns The book in which the Event was created
|
|
1657
1936
|
*/
|
|
1658
1937
|
getBook(): Book;
|
|
1659
1938
|
/**
|
|
1939
|
+
* Gets the id of the Event.
|
|
1940
|
+
*
|
|
1660
1941
|
* @returns The id of the Event
|
|
1661
1942
|
*/
|
|
1662
1943
|
getId(): string | undefined;
|
|
1663
1944
|
/**
|
|
1945
|
+
* Gets the user who performed the Event.
|
|
1946
|
+
*
|
|
1664
1947
|
* @returns The user who performed the Event
|
|
1665
1948
|
*/
|
|
1666
1949
|
getUser(): User | undefined;
|
|
1667
1950
|
/**
|
|
1951
|
+
* Gets the Agent who performed the Event.
|
|
1952
|
+
*
|
|
1668
1953
|
* @returns The Agent who performed the Event
|
|
1669
1954
|
*/
|
|
1670
1955
|
getAgent(): Agent | undefined;
|
|
1671
1956
|
/**
|
|
1957
|
+
* Gets the date the Event was created.
|
|
1958
|
+
*
|
|
1672
1959
|
* @returns The date the Event was created
|
|
1673
1960
|
*/
|
|
1674
1961
|
getCreatedAt(): Date | undefined;
|
|
1675
1962
|
/**
|
|
1963
|
+
* Gets the type of the Event.
|
|
1964
|
+
*
|
|
1676
1965
|
* @returns The type of the Event
|
|
1677
1966
|
*/
|
|
1678
1967
|
getType(): EventType | undefined;
|
|
1679
1968
|
/**
|
|
1969
|
+
* Gets the Bot Responses associated to this Event.
|
|
1970
|
+
*
|
|
1680
1971
|
* @returns The Bot Responses associated to this Event
|
|
1681
1972
|
*/
|
|
1682
1973
|
getBotResponses(): BotResponse[];
|
|
1683
1974
|
/**
|
|
1975
|
+
* Checks if this Event has at least one Bot Response of type ERROR.
|
|
1976
|
+
*
|
|
1684
1977
|
* @returns True if this Event has at least one Bot Response of type ERROR
|
|
1685
1978
|
*/
|
|
1686
1979
|
hasErrorResponse(): boolean;
|
|
@@ -1688,30 +1981,35 @@ export declare class Event {
|
|
|
1688
1981
|
|
|
1689
1982
|
/**
|
|
1690
1983
|
* A list associated with an event query.
|
|
1984
|
+
*
|
|
1985
|
+
* @public
|
|
1691
1986
|
*/
|
|
1692
1987
|
export declare class EventList {
|
|
1693
1988
|
private payload;
|
|
1694
1989
|
|
|
1695
1990
|
constructor(book: Book, payload: bkper.EventList);
|
|
1696
1991
|
/**
|
|
1697
|
-
*
|
|
1992
|
+
* Gets the cursor associated with the query for pagination.
|
|
1993
|
+
*
|
|
1994
|
+
* @returns The cursor associated with the query for pagination
|
|
1698
1995
|
*/
|
|
1699
1996
|
getCursor(): string | undefined;
|
|
1700
1997
|
/**
|
|
1701
|
-
*
|
|
1998
|
+
* Gets the first Event in the list.
|
|
1999
|
+
*
|
|
2000
|
+
* @returns The first Event in the list
|
|
1702
2001
|
*/
|
|
1703
2002
|
getFirst(): Event | undefined;
|
|
1704
2003
|
/**
|
|
1705
|
-
*
|
|
1706
2004
|
* Get the total number of events in the list.
|
|
1707
2005
|
*
|
|
1708
|
-
* @returns The total number of events
|
|
2006
|
+
* @returns The total number of events
|
|
1709
2007
|
*/
|
|
1710
2008
|
size(): number;
|
|
1711
2009
|
/**
|
|
1712
2010
|
* Get the events in the list.
|
|
1713
2011
|
*
|
|
1714
|
-
* @returns An array of Event objects
|
|
2012
|
+
* @returns An array of Event objects
|
|
1715
2013
|
*/
|
|
1716
2014
|
getItems(): Event[];
|
|
1717
2015
|
}
|
|
@@ -1764,56 +2062,75 @@ export declare class File {
|
|
|
1764
2062
|
|
|
1765
2063
|
constructor(book: Book, payload?: bkper.File);
|
|
1766
2064
|
/**
|
|
2065
|
+
* Gets an immutable copy of the JSON payload for this File.
|
|
2066
|
+
*
|
|
1767
2067
|
* @returns An immutable copy of the json payload
|
|
1768
2068
|
*/
|
|
1769
2069
|
json(): bkper.File;
|
|
1770
2070
|
/**
|
|
1771
|
-
* Gets the File id
|
|
2071
|
+
* Gets the File id.
|
|
2072
|
+
*
|
|
2073
|
+
* @returns The File id
|
|
1772
2074
|
*/
|
|
1773
2075
|
getId(): string | undefined;
|
|
1774
2076
|
/**
|
|
1775
|
-
* Gets the File name
|
|
2077
|
+
* Gets the File name.
|
|
2078
|
+
*
|
|
2079
|
+
* @returns The File name
|
|
1776
2080
|
*/
|
|
1777
2081
|
getName(): string | undefined;
|
|
1778
2082
|
/**
|
|
1779
|
-
*
|
|
1780
2083
|
* Sets the name of the File.
|
|
1781
2084
|
*
|
|
1782
|
-
* @
|
|
2085
|
+
* @param name - The name to set
|
|
2086
|
+
*
|
|
2087
|
+
* @returns This File, for chaining
|
|
1783
2088
|
*/
|
|
1784
2089
|
setName(name: string): File;
|
|
1785
2090
|
/**
|
|
1786
|
-
* Gets the File content type
|
|
2091
|
+
* Gets the File content type.
|
|
2092
|
+
*
|
|
2093
|
+
* @returns The File content type
|
|
1787
2094
|
*/
|
|
1788
2095
|
getContentType(): string | undefined;
|
|
1789
2096
|
/**
|
|
1790
|
-
*
|
|
1791
2097
|
* Sets the File content type.
|
|
1792
2098
|
*
|
|
1793
|
-
* @
|
|
2099
|
+
* @param contentType - The content type to set
|
|
2100
|
+
*
|
|
2101
|
+
* @returns This File, for chaining
|
|
1794
2102
|
*/
|
|
1795
2103
|
setContentType(contentType: string): File;
|
|
1796
2104
|
/**
|
|
1797
|
-
* Gets the file content Base64 encoded
|
|
2105
|
+
* Gets the file content Base64 encoded.
|
|
2106
|
+
*
|
|
2107
|
+
* @returns The file content Base64 encoded
|
|
1798
2108
|
*/
|
|
1799
2109
|
getContent(): Promise<string | undefined>;
|
|
1800
2110
|
/**
|
|
1801
|
-
*
|
|
1802
2111
|
* Sets the File content Base64 encoded.
|
|
1803
2112
|
*
|
|
1804
|
-
* @
|
|
2113
|
+
* @param content - The content to set (Base64 encoded)
|
|
2114
|
+
*
|
|
2115
|
+
* @returns This File, for chaining
|
|
1805
2116
|
*/
|
|
1806
2117
|
setContent(content: string): File;
|
|
1807
2118
|
/**
|
|
1808
|
-
* Gets the file serving url for accessing via browser
|
|
2119
|
+
* Gets the file serving url for accessing via browser.
|
|
2120
|
+
*
|
|
2121
|
+
* @returns The file serving url
|
|
1809
2122
|
*/
|
|
1810
2123
|
getUrl(): string | undefined;
|
|
1811
2124
|
/**
|
|
1812
|
-
* Gets the file size in bytes
|
|
2125
|
+
* Gets the file size in bytes.
|
|
2126
|
+
*
|
|
2127
|
+
* @returns The file size in bytes
|
|
1813
2128
|
*/
|
|
1814
2129
|
getSize(): number | undefined;
|
|
1815
2130
|
/**
|
|
1816
2131
|
* Perform create new File.
|
|
2132
|
+
*
|
|
2133
|
+
* @returns The created File object
|
|
1817
2134
|
*/
|
|
1818
2135
|
create(): Promise<File>;
|
|
1819
2136
|
}
|
|
@@ -1837,27 +2154,33 @@ export declare class Group {
|
|
|
1837
2154
|
|
|
1838
2155
|
constructor(book: Book, payload?: bkper.Group);
|
|
1839
2156
|
/**
|
|
2157
|
+
* Gets an immutable copy of the json payload.
|
|
2158
|
+
*
|
|
1840
2159
|
* @returns An immutable copy of the json payload
|
|
1841
2160
|
*/
|
|
1842
2161
|
json(): bkper.Group;
|
|
1843
2162
|
/**
|
|
2163
|
+
* Gets the id of this Group.
|
|
2164
|
+
*
|
|
1844
2165
|
* @returns The id of this Group
|
|
1845
2166
|
*/
|
|
1846
2167
|
getId(): string | undefined;
|
|
1847
2168
|
/**
|
|
2169
|
+
* Gets the name of this Group.
|
|
2170
|
+
*
|
|
1848
2171
|
* @returns The name of this Group
|
|
1849
2172
|
*/
|
|
1850
2173
|
getName(): string | undefined;
|
|
1851
2174
|
/**
|
|
1852
2175
|
* Sets the name of the Group.
|
|
1853
2176
|
*
|
|
1854
|
-
* @returns This Group, for
|
|
2177
|
+
* @returns This Group, for chaining
|
|
1855
2178
|
*/
|
|
1856
2179
|
setName(name: string): Group;
|
|
1857
2180
|
/**
|
|
1858
2181
|
* Tells if the Group is locked by the Book owner.
|
|
1859
2182
|
*
|
|
1860
|
-
* @returns True if the Group is locked
|
|
2183
|
+
* @returns True if the Group is locked
|
|
1861
2184
|
*/
|
|
1862
2185
|
isLocked(): boolean;
|
|
1863
2186
|
/**
|
|
@@ -1865,23 +2188,31 @@ export declare class Group {
|
|
|
1865
2188
|
*
|
|
1866
2189
|
* @param locked - The locked state of the Group.
|
|
1867
2190
|
*
|
|
1868
|
-
* @returns This Group, for
|
|
2191
|
+
* @returns This Group, for chaining
|
|
1869
2192
|
*/
|
|
1870
2193
|
setLocked(locked: boolean): Group;
|
|
1871
2194
|
/**
|
|
2195
|
+
* Gets the normalized name of this group without spaces and special characters.
|
|
2196
|
+
*
|
|
1872
2197
|
* @returns The name of this group without spaces and special characters
|
|
1873
2198
|
*/
|
|
1874
2199
|
getNormalizedName(): string;
|
|
1875
2200
|
/**
|
|
1876
|
-
*
|
|
2201
|
+
* Gets all Accounts of this group.
|
|
2202
|
+
*
|
|
2203
|
+
* @returns All Accounts of this group
|
|
1877
2204
|
*/
|
|
1878
2205
|
getAccounts(): Promise<Account[]>;
|
|
1879
2206
|
/**
|
|
2207
|
+
* Gets the type of the accounts of this group.
|
|
2208
|
+
*
|
|
1880
2209
|
* @returns The type for of the accounts of this group. Null if mixed
|
|
1881
2210
|
*/
|
|
1882
2211
|
getType(): AccountType;
|
|
1883
2212
|
/**
|
|
1884
|
-
* Gets the custom properties stored in this Group
|
|
2213
|
+
* Gets the custom properties stored in this Group.
|
|
2214
|
+
*
|
|
2215
|
+
* @returns The custom properties as a key/value object
|
|
1885
2216
|
*/
|
|
1886
2217
|
getProperties(): {
|
|
1887
2218
|
[key: string]: string;
|
|
@@ -1891,15 +2222,17 @@ export declare class Group {
|
|
|
1891
2222
|
*
|
|
1892
2223
|
* @param properties - Object with key/value pair properties
|
|
1893
2224
|
*
|
|
1894
|
-
* @returns This Group, for
|
|
2225
|
+
* @returns This Group, for chaining
|
|
1895
2226
|
*/
|
|
1896
2227
|
setProperties(properties: {
|
|
1897
2228
|
[key: string]: string;
|
|
1898
2229
|
}): Group;
|
|
1899
2230
|
/**
|
|
1900
|
-
* Gets the property value for given keys. First property found will be retrieved
|
|
2231
|
+
* Gets the property value for given keys. First property found will be retrieved.
|
|
1901
2232
|
*
|
|
1902
2233
|
* @param keys - The property key
|
|
2234
|
+
*
|
|
2235
|
+
* @returns The property value, or undefined if not found
|
|
1903
2236
|
*/
|
|
1904
2237
|
getProperty(...keys: string[]): string | undefined;
|
|
1905
2238
|
/**
|
|
@@ -1907,6 +2240,8 @@ export declare class Group {
|
|
|
1907
2240
|
*
|
|
1908
2241
|
* @param key - The property key
|
|
1909
2242
|
* @param value - The property value
|
|
2243
|
+
*
|
|
2244
|
+
* @returns This Group, for chaining
|
|
1910
2245
|
*/
|
|
1911
2246
|
setProperty(key: string, value: string | null): Group;
|
|
1912
2247
|
/**
|
|
@@ -1914,117 +2249,141 @@ export declare class Group {
|
|
|
1914
2249
|
*
|
|
1915
2250
|
* @param key - The property key
|
|
1916
2251
|
*
|
|
1917
|
-
* @returns This Group, for
|
|
2252
|
+
* @returns This Group, for chaining
|
|
1918
2253
|
*/
|
|
1919
2254
|
deleteProperty(key: string): Group;
|
|
1920
2255
|
/**
|
|
1921
|
-
*
|
|
2256
|
+
* Tells if the Group is hidden on main transactions menu.
|
|
2257
|
+
*
|
|
2258
|
+
* @returns True if the Group is hidden, false otherwise
|
|
1922
2259
|
*/
|
|
1923
2260
|
isHidden(): boolean | undefined;
|
|
1924
2261
|
/**
|
|
1925
|
-
*
|
|
2262
|
+
* Hide/Show group on main menu.
|
|
2263
|
+
*
|
|
2264
|
+
* @param hidden - Whether to hide the group
|
|
2265
|
+
*
|
|
2266
|
+
* @returns This Group, for chaining
|
|
1926
2267
|
*/
|
|
1927
2268
|
setHidden(hidden: boolean): Group;
|
|
1928
2269
|
/**
|
|
1929
|
-
*
|
|
2270
|
+
* Tells if this is a credit (Incoming and Liabilities) group.
|
|
2271
|
+
*
|
|
2272
|
+
* @returns True if this is a credit group
|
|
1930
2273
|
*/
|
|
1931
2274
|
isCredit(): boolean | undefined;
|
|
1932
2275
|
/**
|
|
1933
|
-
*
|
|
2276
|
+
* Tells if this is a mixed (Assets/Liabilities or Incoming/Outgoing) group.
|
|
2277
|
+
*
|
|
2278
|
+
* @returns True if this is a mixed group
|
|
1934
2279
|
*/
|
|
1935
2280
|
isMixed(): boolean | undefined;
|
|
1936
2281
|
/**
|
|
1937
|
-
*
|
|
2282
|
+
* Tells if the Group is permanent.
|
|
2283
|
+
*
|
|
2284
|
+
* @returns True if the Group is permanent
|
|
1938
2285
|
*/
|
|
1939
2286
|
isPermanent(): boolean | undefined;
|
|
1940
2287
|
/**
|
|
2288
|
+
* Gets the parent Group.
|
|
2289
|
+
*
|
|
1941
2290
|
* @returns The parent Group
|
|
1942
2291
|
*/
|
|
1943
2292
|
getParent(): Group | undefined;
|
|
1944
2293
|
/**
|
|
1945
2294
|
* Sets the parent Group.
|
|
1946
2295
|
*
|
|
1947
|
-
* @
|
|
2296
|
+
* @param group - The parent Group to set
|
|
2297
|
+
*
|
|
2298
|
+
* @returns This Group, for chaining
|
|
1948
2299
|
*/
|
|
1949
2300
|
setParent(group: Group | null | undefined): Group;
|
|
1950
2301
|
/**
|
|
1951
2302
|
* Checks if the Group has a parent.
|
|
1952
2303
|
*
|
|
1953
|
-
* @returns True if the Group has a parent, otherwise false
|
|
2304
|
+
* @returns True if the Group has a parent, otherwise false
|
|
1954
2305
|
*/
|
|
1955
2306
|
hasParent(): boolean;
|
|
1956
2307
|
/**
|
|
1957
|
-
*
|
|
2308
|
+
* Gets the children of the Group.
|
|
1958
2309
|
*
|
|
1959
|
-
* @returns An array of child Groups
|
|
2310
|
+
* @returns An array of child Groups
|
|
1960
2311
|
*/
|
|
1961
2312
|
getChildren(): Group[];
|
|
1962
2313
|
|
|
1963
2314
|
/**
|
|
1964
|
-
*
|
|
2315
|
+
* Gets all descendant Groups of the current Group.
|
|
1965
2316
|
*
|
|
1966
|
-
* @returns A set of descendant Groups
|
|
2317
|
+
* @returns A set of descendant Groups
|
|
1967
2318
|
*/
|
|
1968
2319
|
getDescendants(): Set<Group>;
|
|
1969
2320
|
/**
|
|
1970
|
-
*
|
|
2321
|
+
* Gets the IDs of all descendant Groups in a tree structure.
|
|
1971
2322
|
*
|
|
1972
|
-
* @returns A set of descendant Group IDs
|
|
2323
|
+
* @returns A set of descendant Group IDs
|
|
1973
2324
|
*/
|
|
1974
2325
|
getDescendantTreeIds(): Set<string>;
|
|
1975
2326
|
/**
|
|
1976
2327
|
* Checks if the Group has any children.
|
|
1977
2328
|
*
|
|
1978
|
-
* @returns True if the Group has children, otherwise false
|
|
2329
|
+
* @returns True if the Group has children, otherwise false
|
|
1979
2330
|
*/
|
|
1980
2331
|
hasChildren(): boolean;
|
|
1981
2332
|
/**
|
|
1982
2333
|
* Checks if the Group is a leaf node (i.e., has no children).
|
|
1983
2334
|
*
|
|
1984
|
-
* @returns True if the Group is a leaf, otherwise false
|
|
2335
|
+
* @returns True if the Group is a leaf, otherwise false
|
|
1985
2336
|
*/
|
|
1986
2337
|
isLeaf(): boolean;
|
|
1987
2338
|
/**
|
|
1988
2339
|
* Checks if the Group is a root node (i.e., has no parent).
|
|
1989
2340
|
*
|
|
1990
|
-
* @returns True if the Group is a root, otherwise false
|
|
2341
|
+
* @returns True if the Group is a root, otherwise false
|
|
1991
2342
|
*/
|
|
1992
2343
|
isRoot(): boolean;
|
|
1993
2344
|
/**
|
|
1994
|
-
*
|
|
2345
|
+
* Gets the depth of the Group in the hierarchy.
|
|
1995
2346
|
*
|
|
1996
|
-
* @returns The depth of the Group
|
|
2347
|
+
* @returns The depth of the Group
|
|
1997
2348
|
*/
|
|
1998
2349
|
getDepth(): number;
|
|
1999
2350
|
/**
|
|
2000
|
-
*
|
|
2351
|
+
* Gets the root Group of the current Group.
|
|
2001
2352
|
*
|
|
2002
|
-
* @returns The root Group
|
|
2353
|
+
* @returns The root Group
|
|
2003
2354
|
*/
|
|
2004
2355
|
getRoot(): Group;
|
|
2005
2356
|
/**
|
|
2006
|
-
*
|
|
2357
|
+
* Gets the name of the root Group.
|
|
2007
2358
|
*
|
|
2008
|
-
* @returns The name of the root Group
|
|
2359
|
+
* @returns The name of the root Group
|
|
2009
2360
|
*/
|
|
2010
2361
|
getRootName(): string;
|
|
2011
2362
|
|
|
2012
2363
|
|
|
2013
2364
|
|
|
2014
2365
|
/**
|
|
2366
|
+
* Tells if this group has any account in it.
|
|
2367
|
+
*
|
|
2015
2368
|
* @returns True if this group has any account in it
|
|
2016
2369
|
*/
|
|
2017
2370
|
hasAccounts(): boolean | undefined;
|
|
2018
2371
|
/**
|
|
2019
|
-
*
|
|
2372
|
+
* Performs create new group.
|
|
2373
|
+
*
|
|
2374
|
+
* @returns A promise that resolves to this Group
|
|
2020
2375
|
*/
|
|
2021
2376
|
create(): Promise<Group>;
|
|
2022
2377
|
/**
|
|
2023
|
-
*
|
|
2378
|
+
* Performs update group, applying pending changes.
|
|
2379
|
+
*
|
|
2380
|
+
* @returns A promise that resolves to this Group
|
|
2024
2381
|
*/
|
|
2025
2382
|
update(): Promise<Group>;
|
|
2026
2383
|
/**
|
|
2027
|
-
*
|
|
2384
|
+
* Performs delete group.
|
|
2385
|
+
*
|
|
2386
|
+
* @returns A promise that resolves to this Group
|
|
2028
2387
|
*/
|
|
2029
2388
|
remove(): Promise<Group>;
|
|
2030
2389
|
|
|
@@ -2039,6 +2398,8 @@ export declare class Integration {
|
|
|
2039
2398
|
payload: bkper.Integration;
|
|
2040
2399
|
constructor(payload?: bkper.Integration);
|
|
2041
2400
|
/**
|
|
2401
|
+
* Gets an immutable copy of the JSON payload for this Integration.
|
|
2402
|
+
*
|
|
2042
2403
|
* @returns An immutable copy of the json payload
|
|
2043
2404
|
*/
|
|
2044
2405
|
json(): bkper.Integration;
|
|
@@ -2103,7 +2464,7 @@ export declare class Integration {
|
|
|
2103
2464
|
*
|
|
2104
2465
|
* @param properties - Object with key/value pair properties
|
|
2105
2466
|
*
|
|
2106
|
-
* @returns The Integration, for
|
|
2467
|
+
* @returns The Integration, for chaining
|
|
2107
2468
|
*/
|
|
2108
2469
|
setProperties(properties: {
|
|
2109
2470
|
[key: string]: string;
|
|
@@ -2130,7 +2491,7 @@ export declare class Integration {
|
|
|
2130
2491
|
*
|
|
2131
2492
|
* @param key - The property key
|
|
2132
2493
|
*
|
|
2133
|
-
* @returns The Integration, for
|
|
2494
|
+
* @returns The Integration, for chaining
|
|
2134
2495
|
*/
|
|
2135
2496
|
deleteProperty(key: string): Integration;
|
|
2136
2497
|
/**
|
|
@@ -2154,47 +2515,58 @@ export declare class Message {
|
|
|
2154
2515
|
|
|
2155
2516
|
constructor(conversation: Conversation, payload?: bkper.Message);
|
|
2156
2517
|
/**
|
|
2518
|
+
* Gets the wrapped plain json object.
|
|
2519
|
+
*
|
|
2157
2520
|
* @returns The wrapped plain json object
|
|
2158
2521
|
*/
|
|
2159
2522
|
json(): bkper.Message;
|
|
2160
2523
|
/**
|
|
2524
|
+
* Gets the Message universal identifier.
|
|
2161
2525
|
*
|
|
2162
2526
|
* @returns The Message universal identifier
|
|
2163
2527
|
*/
|
|
2164
2528
|
getId(): string | undefined;
|
|
2165
2529
|
/**
|
|
2530
|
+
* Gets the Agent associated with the Message.
|
|
2166
2531
|
*
|
|
2167
|
-
* @returns The Agent associated with the Message,
|
|
2532
|
+
* @returns The Agent associated with the Message, if any
|
|
2168
2533
|
*/
|
|
2169
2534
|
getAgent(): Agent | undefined;
|
|
2170
2535
|
/**
|
|
2536
|
+
* Gets the Conversation of the Message.
|
|
2171
2537
|
*
|
|
2172
2538
|
* @returns The Conversation of the Message
|
|
2173
2539
|
*/
|
|
2174
2540
|
getConversation(): Conversation;
|
|
2175
2541
|
/**
|
|
2542
|
+
* Gets the User associated with the Message.
|
|
2176
2543
|
*
|
|
2177
2544
|
* @returns The User associated with the Message
|
|
2178
2545
|
*/
|
|
2179
2546
|
getUser(): User | undefined;
|
|
2180
2547
|
/**
|
|
2548
|
+
* Gets the Date the Message was created.
|
|
2181
2549
|
*
|
|
2182
2550
|
* @returns The Date the Message was created
|
|
2183
2551
|
*/
|
|
2184
2552
|
getCreatedAt(): Date | undefined;
|
|
2185
2553
|
/**
|
|
2554
|
+
* Gets the text content of the Message.
|
|
2186
2555
|
*
|
|
2187
2556
|
* @returns The text content of the Message
|
|
2188
2557
|
*/
|
|
2189
2558
|
getContent(): string | undefined;
|
|
2190
2559
|
/**
|
|
2560
|
+
* Sets the text content of the Message.
|
|
2191
2561
|
*
|
|
2192
|
-
* @param content The text content of the Message
|
|
2562
|
+
* @param content - The text content of the Message
|
|
2193
2563
|
*
|
|
2194
2564
|
* @returns This Message, for chaining
|
|
2195
2565
|
*/
|
|
2196
2566
|
setContent(content: string): Message;
|
|
2197
2567
|
/**
|
|
2568
|
+
* Gets the custom properties stored in this Message.
|
|
2569
|
+
*
|
|
2198
2570
|
* @returns The custom properties stored in this Message
|
|
2199
2571
|
*/
|
|
2200
2572
|
getProperties(): {
|
|
@@ -2205,7 +2577,7 @@ export declare class Message {
|
|
|
2205
2577
|
*
|
|
2206
2578
|
* @param properties - Object with key/value pair properties
|
|
2207
2579
|
*
|
|
2208
|
-
* @returns This Message, for
|
|
2580
|
+
* @returns This Message, for chaining
|
|
2209
2581
|
*/
|
|
2210
2582
|
setProperties(properties: {
|
|
2211
2583
|
[key: string]: string;
|
|
@@ -2224,7 +2596,7 @@ export declare class Message {
|
|
|
2224
2596
|
* @param key - The property key
|
|
2225
2597
|
* @param value - The property value
|
|
2226
2598
|
*
|
|
2227
|
-
* @returns This Message, for
|
|
2599
|
+
* @returns This Message, for chaining
|
|
2228
2600
|
*/
|
|
2229
2601
|
setProperty(key: string, value: string | null): Message;
|
|
2230
2602
|
/**
|
|
@@ -2232,7 +2604,7 @@ export declare class Message {
|
|
|
2232
2604
|
*
|
|
2233
2605
|
* @param key - The property key
|
|
2234
2606
|
*
|
|
2235
|
-
* @returns This Message, for
|
|
2607
|
+
* @returns This Message, for chaining
|
|
2236
2608
|
*/
|
|
2237
2609
|
deleteProperty(key: string): Message;
|
|
2238
2610
|
/**
|
|
@@ -2243,6 +2615,8 @@ export declare class Message {
|
|
|
2243
2615
|
create(): Promise<Message>;
|
|
2244
2616
|
/**
|
|
2245
2617
|
* Streams the Message to the Bkper API.
|
|
2618
|
+
*
|
|
2619
|
+
* @returns A Promise that resolves when the streaming is complete
|
|
2246
2620
|
*/
|
|
2247
2621
|
stream(): Promise<void>;
|
|
2248
2622
|
}
|
|
@@ -2353,47 +2727,61 @@ export declare class Query {
|
|
|
2353
2727
|
|
|
2354
2728
|
constructor(book: Book, payload?: bkper.Query);
|
|
2355
2729
|
/**
|
|
2730
|
+
* Gets the wrapped plain json object.
|
|
2731
|
+
*
|
|
2356
2732
|
* @returns The wrapped plain json object
|
|
2357
2733
|
*/
|
|
2358
2734
|
json(): bkper.Query;
|
|
2359
2735
|
/**
|
|
2736
|
+
* Gets the Query universal identifier.
|
|
2737
|
+
*
|
|
2360
2738
|
* @returns The Query universal identifier
|
|
2361
2739
|
*/
|
|
2362
2740
|
getId(): string | undefined;
|
|
2363
2741
|
/**
|
|
2364
|
-
*
|
|
2742
|
+
* Gets the title of this saved Query.
|
|
2743
|
+
*
|
|
2744
|
+
* @returns The title of this saved Query
|
|
2365
2745
|
*/
|
|
2366
2746
|
getTitle(): string | undefined;
|
|
2367
2747
|
/**
|
|
2368
2748
|
* Sets the title of this saved Query.
|
|
2369
2749
|
*
|
|
2370
|
-
* @param title The title of this saved Query
|
|
2750
|
+
* @param title - The title of this saved Query
|
|
2371
2751
|
*
|
|
2372
2752
|
* @returns This Query, for chaining
|
|
2373
2753
|
*/
|
|
2374
2754
|
setTitle(title: string): Query;
|
|
2375
2755
|
/**
|
|
2376
|
-
*
|
|
2756
|
+
* Gets the query string to be executed.
|
|
2757
|
+
*
|
|
2758
|
+
* @returns This Query string to be executed
|
|
2377
2759
|
*/
|
|
2378
2760
|
getQuery(): string | undefined;
|
|
2379
2761
|
/**
|
|
2380
2762
|
* Sets the query string associated with this saved Query.
|
|
2381
2763
|
*
|
|
2382
|
-
* @param query The query string to be executed
|
|
2764
|
+
* @param query - The query string to be executed
|
|
2383
2765
|
*
|
|
2384
2766
|
* @returns This Query, for chaining
|
|
2385
2767
|
*/
|
|
2386
2768
|
setQuery(query: string): Query;
|
|
2387
2769
|
/**
|
|
2388
2770
|
* Perform create new Query.
|
|
2771
|
+
*
|
|
2772
|
+
* @returns This Query, for chaining
|
|
2389
2773
|
*/
|
|
2390
2774
|
create(): Promise<Query>;
|
|
2391
2775
|
/**
|
|
2392
2776
|
* Perform update Query, applying pending changes.
|
|
2777
|
+
*
|
|
2778
|
+
* @returns This Query, for chaining
|
|
2393
2779
|
*/
|
|
2394
2780
|
update(): Promise<Query>;
|
|
2395
2781
|
/**
|
|
2396
2782
|
* Perform delete Query.
|
|
2783
|
+
*
|
|
2784
|
+
* @returns This Query, for chaining
|
|
2397
2785
|
*/
|
|
2398
2786
|
remove(): Promise<Query>;
|
|
2399
2787
|
|
|
@@ -2410,6 +2798,8 @@ export declare class Template {
|
|
|
2410
2798
|
payload: bkper.Template;
|
|
2411
2799
|
constructor(json?: bkper.Template);
|
|
2412
2800
|
/**
|
|
2801
|
+
* Gets an immutable copy of the JSON payload for this Template.
|
|
2802
|
+
*
|
|
2413
2803
|
* @returns An immutable copy of the json payload
|
|
2414
2804
|
*/
|
|
2415
2805
|
json(): bkper.Template;
|
|
@@ -2476,116 +2866,149 @@ export declare class Transaction {
|
|
|
2476
2866
|
|
|
2477
2867
|
constructor(book: Book, payload?: bkper.Transaction);
|
|
2478
2868
|
/**
|
|
2869
|
+
* Gets the JSON representation of the transaction.
|
|
2870
|
+
*
|
|
2479
2871
|
* @returns An immutable copy of the json payload
|
|
2480
2872
|
*/
|
|
2481
2873
|
json(): bkper.Transaction;
|
|
2482
2874
|
/**
|
|
2483
|
-
*
|
|
2875
|
+
* Gets the book associated with this transaction.
|
|
2876
|
+
*
|
|
2877
|
+
* @returns The book of the Transaction
|
|
2484
2878
|
*/
|
|
2485
2879
|
getBook(): Book;
|
|
2486
2880
|
/**
|
|
2487
|
-
*
|
|
2881
|
+
* Gets the unique identifier of the transaction.
|
|
2882
|
+
*
|
|
2883
|
+
* @returns The id of the Transaction
|
|
2488
2884
|
*/
|
|
2489
2885
|
getId(): string | undefined;
|
|
2490
2886
|
/**
|
|
2887
|
+
* Gets the unique identifier of the agent that created this transaction.
|
|
2888
|
+
*
|
|
2491
2889
|
* @returns The id of the agent that created this transaction
|
|
2492
2890
|
*/
|
|
2493
2891
|
getAgentId(): string | undefined;
|
|
2494
2892
|
/**
|
|
2893
|
+
* Gets the name of the agent that created this transaction.
|
|
2894
|
+
*
|
|
2495
2895
|
* @returns The name of the agent that created this transaction
|
|
2496
2896
|
*/
|
|
2497
2897
|
getAgentName(): string | undefined;
|
|
2498
2898
|
/**
|
|
2899
|
+
* Gets the logo URL of the agent that created this transaction.
|
|
2900
|
+
*
|
|
2499
2901
|
* @returns The logo of the agent that created this transaction
|
|
2500
2902
|
*/
|
|
2501
2903
|
getAgentLogoUrl(): string | undefined;
|
|
2502
2904
|
/**
|
|
2905
|
+
* Gets the dark mode logo URL of the agent that created this transaction.
|
|
2906
|
+
*
|
|
2503
2907
|
* @returns The logo of the agent that created this transaction in dark mode
|
|
2504
2908
|
*/
|
|
2505
2909
|
getAgentLogoUrlDark(): string | undefined;
|
|
2506
2910
|
/**
|
|
2507
|
-
* Remote ids are used to avoid duplication.
|
|
2911
|
+
* Gets the remote IDs associated with this transaction. Remote ids are used to avoid duplication.
|
|
2508
2912
|
*
|
|
2509
|
-
* @returns The remote ids of the Transaction
|
|
2913
|
+
* @returns The remote ids of the Transaction
|
|
2510
2914
|
*/
|
|
2511
2915
|
getRemoteIds(): string[];
|
|
2512
2916
|
/**
|
|
2513
2917
|
* Add a remote id to the Transaction.
|
|
2514
2918
|
*
|
|
2515
|
-
* @param remoteId - The remote id to add
|
|
2919
|
+
* @param remoteId - The remote id to add
|
|
2516
2920
|
*
|
|
2517
|
-
* @returns This Transaction, for
|
|
2921
|
+
* @returns This Transaction, for chaining
|
|
2518
2922
|
*/
|
|
2519
2923
|
addRemoteId(remoteId: string): Transaction;
|
|
2520
2924
|
/**
|
|
2521
|
-
*
|
|
2925
|
+
* Checks if the transaction has been posted to the accounts.
|
|
2926
|
+
*
|
|
2927
|
+
* @returns True if transaction was already posted to the accounts. False if is still a Draft
|
|
2522
2928
|
*/
|
|
2523
2929
|
isPosted(): boolean | undefined;
|
|
2524
2930
|
/**
|
|
2525
|
-
*
|
|
2931
|
+
* Checks if the transaction is marked as checked.
|
|
2932
|
+
*
|
|
2933
|
+
* @returns True if transaction is checked
|
|
2526
2934
|
*/
|
|
2527
2935
|
isChecked(): boolean | undefined;
|
|
2528
2936
|
/**
|
|
2529
2937
|
* Set the check state of the Transaction.
|
|
2530
2938
|
*
|
|
2531
|
-
* @param checked - The check state
|
|
2939
|
+
* @param checked - The check state
|
|
2532
2940
|
*
|
|
2533
|
-
* @returns This Transaction, for
|
|
2941
|
+
* @returns This Transaction, for chaining
|
|
2534
2942
|
*/
|
|
2535
2943
|
setChecked(checked: boolean): Transaction;
|
|
2536
2944
|
/**
|
|
2537
|
-
*
|
|
2945
|
+
* Checks if the transaction is in the trash.
|
|
2946
|
+
*
|
|
2947
|
+
* @returns True if transaction is in trash
|
|
2538
2948
|
*/
|
|
2539
2949
|
isTrashed(): boolean | undefined;
|
|
2540
2950
|
/**
|
|
2951
|
+
* Checks if the transaction is locked by the book's lock or closing date.
|
|
2952
|
+
*
|
|
2541
2953
|
* @returns True if a transaction is locked by the book lock/closing date
|
|
2542
2954
|
*/
|
|
2543
2955
|
isLocked(): boolean;
|
|
2544
2956
|
/**
|
|
2545
|
-
*
|
|
2957
|
+
* Gets all hashtags used in the transaction.
|
|
2958
|
+
*
|
|
2959
|
+
* @returns All #hashtags used on the transaction
|
|
2546
2960
|
*/
|
|
2547
2961
|
getTags(): string[];
|
|
2548
2962
|
/**
|
|
2549
|
-
*
|
|
2963
|
+
* Gets all URLs associated with the transaction.
|
|
2964
|
+
*
|
|
2965
|
+
* @returns All urls of the transaction
|
|
2550
2966
|
*/
|
|
2551
2967
|
getUrls(): string[];
|
|
2552
2968
|
/**
|
|
2553
2969
|
* Sets the Transaction urls. Url starts with https://
|
|
2554
2970
|
*
|
|
2555
|
-
* @param urls - The urls array
|
|
2971
|
+
* @param urls - The urls array
|
|
2556
2972
|
*
|
|
2557
|
-
* @returns This Transaction, for
|
|
2973
|
+
* @returns This Transaction, for chaining
|
|
2558
2974
|
*/
|
|
2559
2975
|
setUrls(urls: string[]): Transaction;
|
|
2560
2976
|
/**
|
|
2561
2977
|
* Add a url to the Transaction. Url starts with https://
|
|
2562
2978
|
*
|
|
2563
|
-
* @param url - The url to add
|
|
2979
|
+
* @param url - The url to add
|
|
2564
2980
|
*
|
|
2565
|
-
* @returns This Transaction, for
|
|
2981
|
+
* @returns This Transaction, for chaining
|
|
2566
2982
|
*/
|
|
2567
2983
|
addUrl(url: string): Transaction;
|
|
2568
2984
|
/**
|
|
2569
|
-
*
|
|
2985
|
+
* Gets all files attached to the transaction.
|
|
2986
|
+
*
|
|
2987
|
+
* @returns The files attached to the transaction
|
|
2570
2988
|
*/
|
|
2571
2989
|
getFiles(): File[];
|
|
2572
2990
|
/**
|
|
2573
|
-
*
|
|
2574
2991
|
* Adds a file attachment to the Transaction.
|
|
2575
2992
|
*
|
|
2576
2993
|
* Files MUST be previously created in the Book.
|
|
2577
2994
|
*
|
|
2578
2995
|
* @param file - The file to add
|
|
2579
2996
|
*
|
|
2580
|
-
* @returns This Transaction, for
|
|
2997
|
+
* @returns This Transaction, for chaining
|
|
2581
2998
|
*/
|
|
2582
2999
|
addFile(file: File): Transaction;
|
|
2583
3000
|
/**
|
|
2584
3001
|
* Check if the transaction has the specified tag.
|
|
3002
|
+
*
|
|
3003
|
+
* @param tag - The tag to check for
|
|
3004
|
+
*
|
|
3005
|
+
* @returns True if the transaction has the specified tag
|
|
2585
3006
|
*/
|
|
2586
3007
|
hasTag(tag: string): boolean;
|
|
2587
3008
|
/**
|
|
2588
3009
|
* Gets the custom properties stored in this Transaction.
|
|
3010
|
+
*
|
|
3011
|
+
* @returns Object with key/value pair properties
|
|
2589
3012
|
*/
|
|
2590
3013
|
getProperties(): {
|
|
2591
3014
|
[key: string]: string;
|
|
@@ -2595,7 +3018,7 @@ export declare class Transaction {
|
|
|
2595
3018
|
*
|
|
2596
3019
|
* @param properties - Object with key/value pair properties
|
|
2597
3020
|
*
|
|
2598
|
-
* @returns This Transaction, for
|
|
3021
|
+
* @returns This Transaction, for chaining
|
|
2599
3022
|
*/
|
|
2600
3023
|
setProperties(properties: {
|
|
2601
3024
|
[key: string]: string;
|
|
@@ -2604,10 +3027,14 @@ export declare class Transaction {
|
|
|
2604
3027
|
* Gets the property value for given keys. First property found will be retrieved
|
|
2605
3028
|
*
|
|
2606
3029
|
* @param keys - The property key
|
|
3030
|
+
*
|
|
3031
|
+
* @returns The property value or undefined if not found
|
|
2607
3032
|
*/
|
|
2608
3033
|
getProperty(...keys: string[]): string | undefined;
|
|
2609
3034
|
/**
|
|
2610
3035
|
* Gets the custom properties keys stored in this Transaction.
|
|
3036
|
+
*
|
|
3037
|
+
* @returns Array of property keys
|
|
2611
3038
|
*/
|
|
2612
3039
|
getPropertyKeys(): string[];
|
|
2613
3040
|
/**
|
|
@@ -2616,7 +3043,7 @@ export declare class Transaction {
|
|
|
2616
3043
|
* @param key - The property key
|
|
2617
3044
|
* @param value - The property value
|
|
2618
3045
|
*
|
|
2619
|
-
* @returns This Transaction, for
|
|
3046
|
+
* @returns This Transaction, for chaining
|
|
2620
3047
|
*/
|
|
2621
3048
|
setProperty(key: string, value: string | null): Transaction;
|
|
2622
3049
|
/**
|
|
@@ -2624,165 +3051,202 @@ export declare class Transaction {
|
|
|
2624
3051
|
*
|
|
2625
3052
|
* @param key - The property key
|
|
2626
3053
|
*
|
|
2627
|
-
* @returns This Transaction, for
|
|
3054
|
+
* @returns This Transaction, for chaining
|
|
2628
3055
|
*/
|
|
2629
3056
|
deleteProperty(key: string): Transaction;
|
|
2630
3057
|
/**
|
|
2631
|
-
*
|
|
3058
|
+
* Gets the credit account associated with this Transaction. Same as origin account
|
|
3059
|
+
*
|
|
3060
|
+
* @returns The credit (origin) account
|
|
2632
3061
|
*/
|
|
2633
3062
|
getCreditAccount(): Promise<Account | undefined>;
|
|
2634
3063
|
/**
|
|
2635
|
-
*
|
|
3064
|
+
* Gets the name of this Transaction's credit account.
|
|
3065
|
+
*
|
|
3066
|
+
* @returns The credit account name
|
|
2636
3067
|
*/
|
|
2637
3068
|
getCreditAccountName(): Promise<string | undefined>;
|
|
2638
3069
|
/**
|
|
3070
|
+
* Sets the credit/origin [[Account]] of this Transaction. Same as from()
|
|
2639
3071
|
*
|
|
2640
|
-
*
|
|
3072
|
+
* @param account - The Account object
|
|
2641
3073
|
*
|
|
2642
|
-
* @
|
|
2643
|
-
*
|
|
2644
|
-
* @returns This Transaction, for chainning.
|
|
3074
|
+
* @returns This Transaction, for chaining
|
|
2645
3075
|
*/
|
|
2646
3076
|
setCreditAccount(account: Account | bkper.Account): Transaction;
|
|
2647
3077
|
/**
|
|
3078
|
+
* Sets the credit/origin [[Account]] of this Transaction. Same as setCreditAccount()
|
|
2648
3079
|
*
|
|
2649
|
-
*
|
|
2650
|
-
*
|
|
2651
|
-
* @param account - Account id, name or object.
|
|
3080
|
+
* @param account - The Account object
|
|
2652
3081
|
*
|
|
2653
|
-
* @returns This Transaction, for
|
|
3082
|
+
* @returns This Transaction, for chaining
|
|
2654
3083
|
*/
|
|
2655
3084
|
from(account: Account | bkper.Account): Transaction;
|
|
2656
3085
|
/**
|
|
2657
|
-
*
|
|
3086
|
+
* Gets the debit account associated with this Transaction. Same as destination account
|
|
2658
3087
|
*
|
|
3088
|
+
* @returns The debit (destination) account
|
|
2659
3089
|
*/
|
|
2660
3090
|
getDebitAccount(): Promise<Account | undefined>;
|
|
2661
3091
|
/**
|
|
2662
|
-
*
|
|
3092
|
+
* Gets the name of this Transaction's debit account.
|
|
3093
|
+
*
|
|
3094
|
+
* @returns The debit account name
|
|
2663
3095
|
*/
|
|
2664
3096
|
getDebitAccountName(): Promise<string | undefined>;
|
|
2665
3097
|
/**
|
|
3098
|
+
* Sets the debit/destination [[Account]] of this Transaction. Same as to()
|
|
2666
3099
|
*
|
|
2667
|
-
*
|
|
3100
|
+
* @param account - The Account object
|
|
2668
3101
|
*
|
|
2669
|
-
* @
|
|
2670
|
-
*
|
|
2671
|
-
* @returns This Transaction, for chainning.
|
|
3102
|
+
* @returns This Transaction, for chaining
|
|
2672
3103
|
*/
|
|
2673
3104
|
setDebitAccount(account: Account | bkper.Account): Transaction;
|
|
2674
3105
|
/**
|
|
3106
|
+
* Sets the debit/destination [[Account]] of this Transaction. Same as setDebitAccount()
|
|
2675
3107
|
*
|
|
2676
|
-
*
|
|
2677
|
-
*
|
|
2678
|
-
* @param account - Account id, name or object.
|
|
3108
|
+
* @param account - The Account object
|
|
2679
3109
|
*
|
|
2680
|
-
* @returns This Transaction, for
|
|
3110
|
+
* @returns This Transaction, for chaining
|
|
2681
3111
|
*/
|
|
2682
3112
|
to(account: Account | bkper.Account): Transaction;
|
|
2683
3113
|
/**
|
|
2684
|
-
*
|
|
3114
|
+
* Gets the amount of this Transaction.
|
|
3115
|
+
*
|
|
3116
|
+
* @returns The amount of this Transaction
|
|
2685
3117
|
*/
|
|
2686
3118
|
getAmount(): Amount | undefined;
|
|
2687
3119
|
/**
|
|
2688
|
-
*
|
|
3120
|
+
* Gets the formatted amount of this Transaction according to the Book format.
|
|
3121
|
+
*
|
|
3122
|
+
* @returns The amount of this Transaction, formatted according to the Book format
|
|
2689
3123
|
*/
|
|
2690
3124
|
getAmountFormatted(): string | undefined;
|
|
2691
3125
|
/**
|
|
3126
|
+
* Sets the amount of this Transaction.
|
|
2692
3127
|
*
|
|
2693
|
-
*
|
|
3128
|
+
* @param amount - The amount to set
|
|
2694
3129
|
*
|
|
2695
|
-
* @returns This Transaction, for
|
|
3130
|
+
* @returns This Transaction, for chaining
|
|
2696
3131
|
*/
|
|
2697
3132
|
setAmount(amount: Amount | number | string): Transaction;
|
|
2698
3133
|
/**
|
|
2699
|
-
* Get the absolute amount of this
|
|
3134
|
+
* Get the absolute amount of this Transaction if the given account is at the credit side.
|
|
3135
|
+
*
|
|
3136
|
+
* @param account - The account object, id or name
|
|
2700
3137
|
*
|
|
2701
|
-
* @
|
|
3138
|
+
* @returns The credit amount or undefined
|
|
2702
3139
|
*/
|
|
2703
3140
|
getCreditAmount(account: Account | string): Promise<Amount | undefined>;
|
|
2704
3141
|
/**
|
|
2705
|
-
* Gets the absolute amount of this
|
|
3142
|
+
* Gets the absolute amount of this Transaction if the given account is at the debit side.
|
|
2706
3143
|
*
|
|
2707
|
-
* @param account - The account object, id or name
|
|
3144
|
+
* @param account - The account object, id or name
|
|
3145
|
+
*
|
|
3146
|
+
* @returns The debit amount or undefined
|
|
2708
3147
|
*/
|
|
2709
3148
|
getDebitAmount(account: Account | string): Promise<Amount | undefined>;
|
|
2710
3149
|
/**
|
|
2711
3150
|
* Gets the [[Account]] at the other side of the transaction given the one in one side.
|
|
2712
3151
|
*
|
|
2713
|
-
* @param account - The account object, id or name
|
|
3152
|
+
* @param account - The account object, id or name
|
|
3153
|
+
*
|
|
3154
|
+
* @returns The account at the other side of the transaction
|
|
2714
3155
|
*/
|
|
2715
3156
|
getOtherAccount(account: Account | string): Promise<Account | undefined>;
|
|
2716
3157
|
/**
|
|
3158
|
+
* The Account name at the other side of this Transaction given the one in one side.
|
|
2717
3159
|
*
|
|
2718
|
-
*
|
|
3160
|
+
* @param account - The Account object, id or name
|
|
2719
3161
|
*
|
|
2720
|
-
* @
|
|
3162
|
+
* @returns The name of the Account at the other side
|
|
2721
3163
|
*/
|
|
2722
3164
|
getOtherAccountName(account: string | Account): Promise<string | undefined>;
|
|
2723
3165
|
/**
|
|
3166
|
+
* Tell if the given account is credit on this Transaction
|
|
2724
3167
|
*
|
|
2725
|
-
*
|
|
3168
|
+
* @param account - The Account object
|
|
2726
3169
|
*
|
|
2727
|
-
* @
|
|
3170
|
+
* @returns True if the account is the credit account
|
|
2728
3171
|
*/
|
|
2729
3172
|
isCredit(account?: Account): Promise<boolean>;
|
|
2730
3173
|
/**
|
|
3174
|
+
* Tell if the given account is debit on the Transaction
|
|
2731
3175
|
*
|
|
2732
|
-
*
|
|
3176
|
+
* @param account - The [[Account]] object
|
|
2733
3177
|
*
|
|
2734
|
-
* @
|
|
3178
|
+
* @returns True if the Account is the debit account
|
|
2735
3179
|
*/
|
|
2736
3180
|
isDebit(account?: Account): Promise<boolean>;
|
|
2737
3181
|
|
|
2738
3182
|
/**
|
|
2739
|
-
*
|
|
3183
|
+
* Gets the description of this Transaction.
|
|
3184
|
+
*
|
|
3185
|
+
* @returns The description of this Transaction
|
|
2740
3186
|
*/
|
|
2741
3187
|
getDescription(): string;
|
|
2742
3188
|
/**
|
|
2743
|
-
*
|
|
2744
3189
|
* Sets the description of the Transaction.
|
|
2745
3190
|
*
|
|
2746
|
-
* @
|
|
3191
|
+
* @param description - The description to set
|
|
3192
|
+
*
|
|
3193
|
+
* @returns This Transaction, for chaining
|
|
2747
3194
|
*/
|
|
2748
3195
|
setDescription(description: string): Transaction;
|
|
2749
3196
|
/**
|
|
2750
|
-
*
|
|
3197
|
+
* Gets the transaction date in ISO format.
|
|
3198
|
+
*
|
|
3199
|
+
* @returns The Transaction date, in ISO format yyyy-MM-dd
|
|
2751
3200
|
*/
|
|
2752
3201
|
getDate(): string | undefined;
|
|
2753
3202
|
/**
|
|
2754
|
-
*
|
|
2755
3203
|
* Sets the date of the Transaction.
|
|
2756
3204
|
*
|
|
2757
|
-
* @
|
|
3205
|
+
* @param date - The date to set as string or Date object
|
|
3206
|
+
*
|
|
3207
|
+
* @returns This Transaction, for chaining
|
|
2758
3208
|
*/
|
|
2759
3209
|
setDate(date: string | Date): Transaction;
|
|
2760
3210
|
/**
|
|
2761
|
-
*
|
|
3211
|
+
* Gets the transaction date as a Date object in the book's timezone.
|
|
3212
|
+
*
|
|
3213
|
+
* @returns The Transaction Date object, on the time zone of the [[Book]]
|
|
2762
3214
|
*/
|
|
2763
3215
|
getDateObject(): Date;
|
|
2764
3216
|
/**
|
|
2765
|
-
*
|
|
3217
|
+
* Gets the transaction date as a numeric value.
|
|
3218
|
+
*
|
|
3219
|
+
* @returns The Transaction date number, in format YYYYMMDD
|
|
2766
3220
|
*/
|
|
2767
3221
|
getDateValue(): number | undefined;
|
|
2768
3222
|
/**
|
|
2769
|
-
*
|
|
3223
|
+
* Gets the transaction date formatted according to the book's date pattern.
|
|
3224
|
+
*
|
|
3225
|
+
* @returns The Transaction date, formatted on the date pattern of the [[Book]]
|
|
2770
3226
|
*/
|
|
2771
3227
|
getDateFormatted(): string | undefined;
|
|
2772
3228
|
/**
|
|
2773
|
-
*
|
|
3229
|
+
* Gets the date when the transaction was created.
|
|
3230
|
+
*
|
|
3231
|
+
* @returns The date the transaction was created
|
|
2774
3232
|
*/
|
|
2775
3233
|
getCreatedAt(): Date;
|
|
2776
3234
|
/**
|
|
2777
|
-
*
|
|
3235
|
+
* Gets the formatted creation date of the transaction.
|
|
3236
|
+
*
|
|
3237
|
+
* @returns The date the transaction was created, formatted according to the date pattern of the [[Book]]
|
|
2778
3238
|
*/
|
|
2779
3239
|
getCreatedAtFormatted(): string;
|
|
2780
3240
|
/**
|
|
2781
|
-
*
|
|
3241
|
+
* Gets the date when the transaction was last updated.
|
|
3242
|
+
*
|
|
3243
|
+
* @returns The date the transaction was last updated
|
|
2782
3244
|
*/
|
|
2783
3245
|
getUpdatedAt(): Date;
|
|
2784
3246
|
/**
|
|
2785
|
-
*
|
|
3247
|
+
* Gets the formatted last update date of the transaction.
|
|
3248
|
+
*
|
|
3249
|
+
* @returns The date the transaction was last updated, formatted according to the date pattern of the [[Book]]
|
|
2786
3250
|
*/
|
|
2787
3251
|
getUpdatedAtFormatted(): string;
|
|
2788
3252
|
|
|
@@ -2794,79 +3258,102 @@ export declare class Transaction {
|
|
|
2794
3258
|
*
|
|
2795
3259
|
* Only comes with the last posted transaction of the day.
|
|
2796
3260
|
*
|
|
2797
|
-
* @param raw - True to get the raw balance, no matter the credit nature of the [[Account]]
|
|
3261
|
+
* @param raw - True to get the raw balance, no matter the credit nature of the [[Account]]
|
|
3262
|
+
*
|
|
3263
|
+
* @returns The account balance at the transaction date
|
|
2798
3264
|
*/
|
|
2799
3265
|
getAccountBalance(raw?: boolean): Promise<Amount | undefined>;
|
|
2800
3266
|
/**
|
|
2801
3267
|
* Perform create new draft transaction.
|
|
3268
|
+
*
|
|
3269
|
+
* @returns This Transaction, for chaining
|
|
2802
3270
|
*/
|
|
2803
3271
|
create(): Promise<Transaction>;
|
|
2804
3272
|
/**
|
|
2805
|
-
*
|
|
3273
|
+
* Update transaction, applying pending changes.
|
|
3274
|
+
*
|
|
3275
|
+
* @returns This Transaction, for chaining
|
|
2806
3276
|
*/
|
|
2807
3277
|
update(): Promise<Transaction>;
|
|
2808
3278
|
/**
|
|
2809
3279
|
* Perform check transaction.
|
|
3280
|
+
*
|
|
3281
|
+
* @returns This Transaction, for chaining
|
|
2810
3282
|
*/
|
|
2811
3283
|
check(): Promise<Transaction>;
|
|
2812
3284
|
/**
|
|
2813
3285
|
* Perform uncheck transaction.
|
|
3286
|
+
*
|
|
3287
|
+
* @returns This Transaction, for chaining
|
|
2814
3288
|
*/
|
|
2815
3289
|
uncheck(): Promise<Transaction>;
|
|
2816
3290
|
/**
|
|
2817
3291
|
* Perform post transaction, changing credit and debit [[Account]] balances.
|
|
3292
|
+
*
|
|
3293
|
+
* @returns This Transaction, for chaining
|
|
2818
3294
|
*/
|
|
2819
3295
|
post(): Promise<Transaction>;
|
|
2820
3296
|
/**
|
|
2821
3297
|
* Trash the transaction.
|
|
3298
|
+
*
|
|
3299
|
+
* @returns This Transaction, for chaining
|
|
2822
3300
|
*/
|
|
2823
3301
|
trash(): Promise<Transaction>;
|
|
2824
3302
|
/**
|
|
2825
3303
|
* Untrash the transaction.
|
|
3304
|
+
*
|
|
3305
|
+
* @returns This Transaction, for chaining
|
|
2826
3306
|
*/
|
|
2827
3307
|
untrash(): Promise<Transaction>;
|
|
2828
|
-
/** @deprecated */
|
|
2829
|
-
remove(): Promise<Transaction>;
|
|
2830
|
-
/** @deprecated */
|
|
2831
|
-
restore(): Promise<Transaction>;
|
|
2832
3308
|
}
|
|
2833
3309
|
|
|
2834
3310
|
/**
|
|
2835
3311
|
* A list associated with a transaction query.
|
|
3312
|
+
*
|
|
3313
|
+
* @public
|
|
2836
3314
|
*/
|
|
2837
3315
|
export declare class TransactionList {
|
|
2838
3316
|
private payload;
|
|
2839
3317
|
|
|
2840
3318
|
constructor(book: Book, payload: bkper.TransactionList);
|
|
2841
3319
|
/**
|
|
2842
|
-
*
|
|
3320
|
+
* Gets the cursor associated with the query for pagination.
|
|
3321
|
+
*
|
|
3322
|
+
* @returns The cursor associated with the query for pagination
|
|
2843
3323
|
*/
|
|
2844
3324
|
getCursor(): string | undefined;
|
|
2845
3325
|
/**
|
|
2846
3326
|
* Retrieves the account associated with the query, when filtering by account.
|
|
3327
|
+
*
|
|
3328
|
+
* @returns The account associated with the query, or undefined if not set
|
|
2847
3329
|
*/
|
|
2848
3330
|
getAccount(): Promise<Account | undefined>;
|
|
2849
3331
|
/**
|
|
2850
|
-
*
|
|
3332
|
+
* Gets the first Transaction in the list.
|
|
3333
|
+
*
|
|
3334
|
+
* @returns The first Transaction in the list
|
|
2851
3335
|
*/
|
|
2852
3336
|
getFirst(): Transaction | undefined;
|
|
2853
3337
|
/**
|
|
3338
|
+
* Gets the total number of transactions in the list.
|
|
2854
3339
|
*
|
|
2855
|
-
*
|
|
2856
|
-
*
|
|
2857
|
-
* @returns The total number of transactions.
|
|
3340
|
+
* @returns The total number of transactions
|
|
2858
3341
|
*/
|
|
2859
3342
|
size(): number;
|
|
2860
3343
|
/**
|
|
2861
|
-
*
|
|
3344
|
+
* Gets the transactions in the list.
|
|
2862
3345
|
*
|
|
2863
|
-
* @returns An array of Transaction objects
|
|
3346
|
+
* @returns An array of Transaction objects
|
|
2864
3347
|
*/
|
|
2865
3348
|
getItems(): Transaction[];
|
|
2866
3349
|
}
|
|
2867
3350
|
|
|
2868
3351
|
/**
|
|
2869
|
-
* This class defines a User.
|
|
3352
|
+
* This class defines a User on the Bkper platform.
|
|
3353
|
+
*
|
|
3354
|
+
* Users can own and collaborate on [[Books]], manage [[Collections]], and connect to external services through [[Connections]].
|
|
3355
|
+
*
|
|
3356
|
+
* Each User has a unique identity, subscription plan details, and access permissions across the platform.
|
|
2870
3357
|
*
|
|
2871
3358
|
* @public
|
|
2872
3359
|
*/
|
|
@@ -2874,6 +3361,8 @@ export declare class User {
|
|
|
2874
3361
|
payload: bkper.User;
|
|
2875
3362
|
constructor(payload?: bkper.User);
|
|
2876
3363
|
/**
|
|
3364
|
+
* Gets an immutable copy of the JSON payload for this User.
|
|
3365
|
+
*
|
|
2877
3366
|
* @returns An immutable copy of the json payload
|
|
2878
3367
|
*/
|
|
2879
3368
|
json(): bkper.User;
|