bkper 4.12.5 → 4.12.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/agent/system-prompt.ts"],"names":[],"mappings":"AAaA,wBAAgB,yBAAyB,IAAI,MAAM,CAsBlD;AAED,eAAO,MAAM,yBAAyB,2lDAgCrC,CAAC"}
1
+ {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/agent/system-prompt.ts"],"names":[],"mappings":"AAQA,wBAAgB,yBAAyB,IAAI,MAAM,CAuClD;AAED,eAAO,MAAM,yBAAyB,2lDAgCrC,CAAC"}
@@ -1,34 +1,47 @@
1
1
  import { fileURLToPath } from 'node:url';
2
2
  import path from 'node:path';
3
- function resolveCliReferencePath() {
3
+ function resolveDocPath(filename) {
4
4
  const thisDir = path.dirname(fileURLToPath(import.meta.url));
5
- return path.resolve(thisDir, '..', 'docs', 'cli-reference.md');
6
- }
7
- function resolveCoreConceptsPath() {
8
- const thisDir = path.dirname(fileURLToPath(import.meta.url));
9
- return path.resolve(thisDir, '..', 'docs', 'core-concepts.md');
5
+ return path.resolve(thisDir, '..', 'docs', filename);
10
6
  }
11
7
  export function getBkperAgentSystemPrompt() {
12
- const cliRefPath = resolveCliReferencePath();
13
- const coreConceptsPath = resolveCoreConceptsPath();
8
+ const cliRefPath = resolveDocPath('cli-reference.md');
9
+ const coreConceptsPath = resolveDocPath('core-concepts.md');
10
+ const bkperJsPath = resolveDocPath('bkper-js.md');
11
+ const bkperApiTypesPath = resolveDocPath('bkper-api-types.md');
14
12
  return `${BKPER_AGENT_SYSTEM_PROMPT}
15
13
  ## Reference Routing
16
14
 
17
15
  - Read local \`AGENTS.md\`, nearby files, and existing tests first for project-specific work.
18
- - If the task touches Bkper accounting semantics or data modeling — such as Accounts, Transactions, balances, account types, groups, books, or mapping real-world flows into Bkper — read:
16
+ - If the task touches Bkper accounting semantics or data modeling — such as Accounts, Transactions, balances, account types, groups, books, or mapping real-world flows into Bkper — read full file:
19
17
 
20
18
  \`\`\`
21
19
  ${coreConceptsPath}
22
20
  \`\`\`
23
21
 
24
- - If the task involves using, generating, or executing \`bkper\` CLI commands, read:
22
+ - If the task involves using, generating, or executing \`bkper\` CLI commands, read full file:
25
23
 
26
24
  \`\`\`
27
25
  ${cliRefPath}
28
26
  \`\`\`
29
27
 
28
+ - If the task involves writing, reviewing, or debugging code that uses the \`bkper-js\` library — such as Bkper, Book, Account, Transaction, Group classes, or any import from \`bkper-js\` — read both files:
29
+
30
+ \`\`\`
31
+ ${bkperJsPath}
32
+ \`\`\`
33
+
34
+ \`\`\`
35
+ ${bkperApiTypesPath}
36
+ \`\`\`
37
+
30
38
  - For generic engineering work, do not load Bkper reference docs unless directly relevant.
31
39
  - When scope is unclear, inspect local files and project instructions first; load reference docs only after identifying a concrete need.
40
+ - For any other question about Bkper — product features, accounting guides, app architecture, integrations, or general usage — fetch and read:
41
+
42
+ https://bkper.com/llms.txt
43
+
44
+ Then follow the most relevant link to find the answer.
32
45
  `;
33
46
  }
34
47
  export const BKPER_AGENT_SYSTEM_PROMPT = `# Bkper Context
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/agent/system-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,SAAS,uBAAuB;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,uBAAuB;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa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;;;;;;;;;;CAUlB,CAAC;AACF,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxC,CAAC"}
@@ -26,7 +26,7 @@ export function batchCreateAccounts(bookId, items, propertyOverrides) {
26
26
  const book = yield bkper.getBook(bookId);
27
27
  const accounts = [];
28
28
  for (const item of items) {
29
- const account = new Account(book, item);
29
+ const account = yield buildAccountFromStdin(book, item);
30
30
  // CLI --property flags override stdin properties
31
31
  if (propertyOverrides) {
32
32
  for (const raw of propertyOverrides) {
@@ -46,4 +46,26 @@ export function batchCreateAccounts(bookId, items, propertyOverrides) {
46
46
  console.log(JSON.stringify(allResults, null, 2));
47
47
  });
48
48
  }
49
+ function buildAccountFromStdin(book, item) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const payload = Object.assign({}, item);
52
+ const groupRefs = payload.groups;
53
+ delete payload.groups;
54
+ const account = new Account(book, payload);
55
+ if (groupRefs) {
56
+ for (const groupRef of groupRefs) {
57
+ const idOrName = groupRef.id || groupRef.name;
58
+ if (!idOrName || idOrName.trim() === '') {
59
+ throw new Error('Account group reference must include id or name');
60
+ }
61
+ const group = yield book.getGroup(idOrName);
62
+ if (!group) {
63
+ throw new Error(`Group not found: ${idOrName}`);
64
+ }
65
+ account.addGroup(group);
66
+ }
67
+ }
68
+ return account;
69
+ });
70
+ }
49
71
  //# sourceMappingURL=batch-create.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"batch-create.js","sourceRoot":"","sources":["../../../src/commands/accounts/batch-create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;;;;;GASG;AACH,MAAM,UAAgB,mBAAmB,CACrC,MAAc,EACd,KAAgC,EAChC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AE,IAA6B;;QAC1E,MAAM,OAAO,qBAAuB,IAAsB,CAAC,CAAC;QAC5D,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;QACjC,OAAO,OAAO,CAAC,MAAM,CAAC;QAEtB,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,IAAI,SAAS,EAAE,CAAC;YACZ,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBAC/B,MAAM,QAAQ,GAAG,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC;gBAC9C,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;oBACtC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACvE,CAAC;gBAED,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAC5C,IAAI,CAAC,KAAK,EAAE,CAAC;oBACT,MAAM,IAAI,KAAK,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;gBACpD,CAAC;gBAED,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CAAA"}
@@ -0,0 +1,542 @@
1
+ # bkper-api-types
2
+
3
+ > TypeScript type definitions for the Bkper API — shared interfaces and enumerations.
4
+
5
+ This package contains Typescript definitions for the [Bkper REST API](https://bkper.com/docs/#rest-api).
6
+
7
+ The types are generated based on the Bkper [Open API spec](https://bkper.com/docs/api/rest/openapi.json) using the [dtsgenerator](https://github.com/horiuchi/dtsgenerator) tool.
8
+
9
+ More information at the [Bkper Developer Documentation](https://bkper.com/docs/#rest-api)
10
+
11
+ [![npm (scoped)](https://img.shields.io/npm/v/@bkper/bkper-api-types?color=%235889e4)](https://www.npmjs.com/package/@bkper/bkper-api-types) [![GitHub](https://img.shields.io/badge/bkper%2Fbkper--api--types-blue?logo=github)](https://github.com/bkper/bkper-api-types)
12
+
13
+ ### 2) Configure tsconfig.json:
14
+
15
+ ```
16
+ {
17
+ "compilerOptions": {
18
+ "typeRoots" : ["node_modules/@bkper", "node_modules/@types" ]
19
+ }
20
+ }
21
+ ```
22
+
23
+ [Learn more](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#types-typeroots-and-types) about **@types**, **typeRoots** and **types**
24
+
25
+ ## Interfaces
26
+
27
+ ### Account
28
+
29
+ **Properties:**
30
+
31
+ - `agentId?`: `string` — The id of agent that created the resource
32
+ - `archived?`: `boolean` — Archived accounts are kept for history
33
+ - `balance?`: `string` — The current account balance, when querying transactions.
34
+ - `balanceVerified?`: `boolean` — Whether the account balance has been verified/audited
35
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
36
+ - `credit?`: `boolean` — Credit nature or Debit otherwise
37
+ - `groups?`: `bkper.Group[]` — The groups of the account
38
+ - `hasTransactionPosted?`: `boolean` — Tell if the account has transaction posted
39
+ - `id?`: `string` — The unique id that identifies the Account in the Book
40
+ - `name?`: `string` — The name of the Account
41
+ - `normalizedName?`: `string` — The name of the Account, lowercase, without spaces or special characters
42
+ - `permanent?`: `boolean` — Permanent are such as bank accounts, customers or the like
43
+ - `properties?`: `{ [name: string]: string }` — The key/value custom properties of the Account
44
+ - `type?`: `"ASSET" | "LIABILITY" | "INCOMING" | "OUTGOING"` — The type of the account
45
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
46
+
47
+ ### AccountBalances
48
+
49
+ **Properties:**
50
+
51
+ - `archived?`: `boolean`
52
+ - `balances?`: `bkper.Balance[]`
53
+ - `credit?`: `boolean`
54
+ - `cumulativeBalance?`: `string`
55
+ - `cumulativeCredit?`: `string`
56
+ - `cumulativeDebit?`: `string`
57
+ - `empty?`: `boolean`
58
+ - `name?`: `string`
59
+ - `normalizedName?`: `string`
60
+ - `periodBalance?`: `string`
61
+ - `periodCredit?`: `string`
62
+ - `periodDebit?`: `string`
63
+ - `permanent?`: `boolean`
64
+ - `properties?`: `{ [name: string]: string }`
65
+
66
+ ### AccountList
67
+
68
+ **Properties:**
69
+
70
+ - `items?`: `bkper.Account[]` — List items
71
+
72
+ ### Agent
73
+
74
+ **Properties:**
75
+
76
+ - `id?`: `string` — The agent id
77
+ - `logo?`: `string` — The agent logo. Public url or Base64 encoded
78
+ - `logoDark?`: `string` — The agent logo on dark mode. Public url or Base64 encoded
79
+ - `name?`: `string` — The agent name
80
+
81
+ ### App
82
+
83
+ **Properties:**
84
+
85
+ - `apiVersion?`: `"v0" | "v1" | "v2" | "v3" | "v4" | "v5"` — The API version of the event payload
86
+ - `clientId?`: `string` — The Google OAuth Client ID
87
+ - `clientSecret?`: `string` — The Google OAuth Client Secret
88
+ - `connectable?`: `boolean` — Tell if this app is connectable by a user
89
+ - `deprecated?`: `boolean` — Tell if the code app is deprecated
90
+ - `description?`: `string` — The App description
91
+ - `developers?`: `string` — The developers (usernames and domain patterns), comma or space separated
92
+ - `events?`: `("FILE_CREATED" | "FILE_UPDATED" | "TRANSACTION_CREATED" | "TRANSACTION_UPDATED" | "TRANSACTION_DELETED" | "TRANSACTION_POSTED" | "TRANSACTION_CHECKED" | "TRANSACTION_UNCHECKED" | "TRANSACTION_RESTORED" | "ACCOUNT_CREATED" | "ACCOUNT_UPDATED" | "ACCOUNT_DELETED" | "QUERY_CREATED" | "QUERY_UPDATED" | "QUERY_DELETED" | "GROUP_CREATED" | "GROUP_UPDATED" | "GROUP_DELETED" | "COMMENT_CREATED" | "COMMENT_DELETED" | "COLLABORATOR_ADDED" | "COLLABORATOR_UPDATED" | "COLLABORATOR_REMOVED" | "INTEGRATION_CREATED" | "INTEGRATION_UPDATED" | "INTEGRATION_DELETED" | "BOOK_CREATED" | "BOOK_AUDITED" | "BOOK_UPDATED" | "BOOK_DELETED")[]` — Event types the App listen to
93
+ - `filePatterns?`: `string[]` — File patters the App handles - wildcard accepted - E.g *.pdf *-bank.csv
94
+ - `id?`: `string` — The unique agent id of the App - this can't be changed after created
95
+ - `installable?`: `boolean` — Tell if this app is installable in a book
96
+ - `logoUrl?`: `string` — The App logo url
97
+ - `logoUrlDark?`: `string` — The App logo url in dark mode
98
+ - `menuPopupHeight?`: `string` — The menu popup window height
99
+ - `menuPopupWidth?`: `string` — The menu popup window width
100
+ - `menuText?`: `string` — The contex menu text - default to the App name
101
+ - `menuUrl?`: `string` — The context menu url
102
+ - `menuUrlDev?`: `string` — The context menu url in dev mode
103
+ - `name?`: `string` — The App name
104
+ - `ownerEmail?`: `string` — The owner user email
105
+ - `ownerId?`: `string` — The owner user id
106
+ - `ownerLogoUrl?`: `string` — The owner company logo url
107
+ - `ownerName?`: `string` — The owner company name
108
+ - `ownerWebsite?`: `string` — The owner company website url
109
+ - `propertiesSchema?`: `bkper.AppPropertiesSchema`
110
+ - `published?`: `boolean` — Tell if this app already published
111
+ - `readme?`: `string` — The readme.md file as string
112
+ - `readmeMd?`: `string` — The readme.md file as raw markdown string
113
+ - `repoPrivate?`: `boolean` — Tell if the code repository is private
114
+ - `repoUrl?`: `string` — The code repository url
115
+ - `scopes?`: `string[]` — The Google OAuth Scopes used by the app
116
+ - `users?`: `string` — The users (usernames and domain patterns) to enable the App while not yet published
117
+ - `webhookUrl?`: `string` — The Webhook endpoint URL to listen for book events
118
+ - `webhookUrlDev?`: `string` — The Webhook endpoint URL to listen for book events in dev mode
119
+ - `website?`: `string` — The App website url
120
+
121
+ ### AppList
122
+
123
+ **Properties:**
124
+
125
+ - `items?`: `bkper.App[]`
126
+
127
+ ### AppPropertiesSchema
128
+
129
+ **Properties:**
130
+
131
+ - `account?`: `bkper.AppPropertySchema`
132
+ - `book?`: `bkper.AppPropertySchema`
133
+ - `group?`: `bkper.AppPropertySchema`
134
+ - `transaction?`: `bkper.AppPropertySchema`
135
+
136
+ ### AppPropertySchema
137
+
138
+ **Properties:**
139
+
140
+ - `keys?`: `string[]` — The property keys schema
141
+ - `values?`: `string[]` — The property values schema
142
+
143
+ ### Backlog
144
+
145
+ **Properties:**
146
+
147
+ - `count?`: `number`
148
+
149
+ ### Balance
150
+
151
+ **Properties:**
152
+
153
+ - `cumulativeBalance?`: `string`
154
+ - `cumulativeCredit?`: `string`
155
+ - `cumulativeDebit?`: `string`
156
+ - `day?`: `number`
157
+ - `fuzzyDate?`: `number`
158
+ - `month?`: `number`
159
+ - `periodBalance?`: `string`
160
+ - `periodCredit?`: `string`
161
+ - `periodDebit?`: `string`
162
+ - `year?`: `number`
163
+
164
+ ### Balances
165
+
166
+ **Properties:**
167
+
168
+ - `accountBalances?`: `bkper.AccountBalances[]`
169
+ - `balancesUrl?`: `string`
170
+ - `groupBalances?`: `bkper.GroupBalances[]`
171
+ - `nextRange?`: `string`
172
+ - `periodicity?`: `"DAILY" | "MONTHLY" | "YEARLY"`
173
+ - `previousRange?`: `string`
174
+ - `range?`: `string`
175
+ - `rangeBeginLabel?`: `string`
176
+ - `rangeEndLabel?`: `string`
177
+
178
+ ### Billing
179
+
180
+ **Properties:**
181
+
182
+ - `adminEmail?`: `string` — The billing admin email for the user's billing account
183
+ - `daysLeftInTrial?`: `number` — How many days the user has left in the trial period
184
+ - `email?`: `string` — The user's email address
185
+ - `enabled?`: `boolean` — True if billing is enabled for the user
186
+ - `hostedDomain?`: `string` — The user hosted domain
187
+ - `plan?`: `string` — The user's current plan
188
+ - `planOverdue?`: `boolean` — True if subscription payment is overdue
189
+ - `startedTrial?`: `boolean` — True if the user has started the trial period
190
+ - `totalTransactionsThisMonth?`: `number` — User-level total transactions this month
191
+ - `totalTransactionsThisYear?`: `number` — User-level total transactions this year
192
+
193
+ ### Book
194
+
195
+ **Properties:**
196
+
197
+ - `accounts?`: `bkper.Account[]` — The book Accounts
198
+ - `agentId?`: `string` — The id of agent that created the resource
199
+ - `autoPost?`: `boolean` — Tells if the Book has auto post enabled
200
+ - `closingDate?`: `string` — The book closing date
201
+ - `collection?`: `bkper.Collection`
202
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
203
+ - `datePattern?`: `string` — The date pattern of the Book. Example: dd/MM/yyyy
204
+ - `decimalSeparator?`: `"DOT" | "COMMA"` — The decimal separator of the Book
205
+ - `fractionDigits?`: `number` — The number of fraction digits (decimal places) of the Book
206
+ - `groups?`: `bkper.Group[]` — The book account Groups
207
+ - `id?`: `string` — The unique id that identifies the Book in the system. Found at bookId url param
208
+ - `lastUpdateMs?`: `string` — The last update date of the Book, in in milliseconds
209
+ - `lockDate?`: `string` — The book lock date
210
+ - `name?`: `string` — The name of the Book
211
+ - `ownerName?`: `string` — The Book owner username
212
+ - `pageSize?`: `number` — The transactions pagination page size
213
+ - `period?`: `"MONTH" | "QUARTER" | "YEAR"` — The period slice for balances visualization
214
+ - `periodStartMonth?`: `"JANUARY" | "FEBRUARY" | "MARCH" | "APRIL" | "MAY" | "JUNE" | "JULY" | "AUGUST" | "SEPTEMBER" | "OCTOBER" | "NOVEMBER" | "DECEMBER"` — The start month when YEAR period set
215
+ - `permission?`: `"OWNER" | "EDITOR" | "POSTER" | "RECORDER" | "VIEWER" | "NONE"` — The Permission the current user has in the Book
216
+ - `properties?`: `{ [name: string]: string }` — The key/value custom properties of the Book
217
+ - `timeZone?`: `string` — The time zone of the Book
218
+ - `timeZoneOffset?`: `number` — The time zone offset of the Book, in minutes
219
+ - `totalTransactions?`: `number` — The total transactions posted
220
+ - `totalTransactionsCurrentMonth?`: `number` — The total transactions posted on current month
221
+ - `totalTransactionsCurrentYear?`: `number` — The total transactions posted on current year
222
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
223
+ - `visibility?`: `"PUBLIC" | "PRIVATE"` — The Visibility of the Book
224
+
225
+ ### BookList
226
+
227
+ **Properties:**
228
+
229
+ - `items?`: `bkper.Book[]` — List items
230
+
231
+ ### BotResponse
232
+
233
+ **Properties:**
234
+
235
+ - `agentId?`: `string`
236
+ - `createdAt?`: `string`
237
+ - `message?`: `string`
238
+ - `type?`: `"INFO" | "WARNING" | "ERROR"`
239
+
240
+ ### Collaborator
241
+
242
+ **Properties:**
243
+
244
+ - `agentId?`: `string` — The id of agent that created the resource
245
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
246
+ - `email?`: `string` — The email of the Collaborator
247
+ - `id?`: `string` — The unique id that identifies the Collaborator in the Book
248
+ - `permission?`: `"OWNER" | "EDITOR" | "POSTER" | "RECORDER" | "VIEWER" | "NONE"` — The permission the Collaborator has in the Book
249
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
250
+
251
+ ### CollaboratorPayloadCollection
252
+
253
+ **Properties:**
254
+
255
+ - `items?`: `bkper.Collaborator[]`
256
+
257
+ ### Collection
258
+
259
+ **Properties:**
260
+
261
+ - `agentId?`: `string` — The id of agent that created the resource
262
+ - `books?`: `bkper.Book[]` — The Books contained in the Collection
263
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
264
+ - `id?`: `string` — The unique id of the Collection
265
+ - `name?`: `string` — The name of the Collection
266
+ - `ownerUsername?`: `string` — The username of the Collection owner
267
+ - `permission?`: `"OWNER" | "EDITOR" | "POSTER" | "RECORDER" | "VIEWER" | "NONE"`
268
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
269
+
270
+ ### CollectionList
271
+
272
+ **Properties:**
273
+
274
+ - `items?`: `bkper.Collection[]` — List items
275
+
276
+ ### Connection
277
+
278
+ **Properties:**
279
+
280
+ - `agentId?`: `string` — The id of agent that created the resource
281
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
282
+ - `dateAddedMs?`: `string`
283
+ - `email?`: `string`
284
+ - `id?`: `string`
285
+ - `logo?`: `string`
286
+ - `name?`: `string`
287
+ - `properties?`: `{ [name: string]: string }`
288
+ - `type?`: `"APP" | "BANK"`
289
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
290
+ - `userId?`: `string`
291
+ - `uuid?`: `string`
292
+
293
+ ### ConnectionList
294
+
295
+ **Properties:**
296
+
297
+ - `items?`: `bkper.Connection[]` — List items
298
+
299
+ ### Count
300
+
301
+ **Properties:**
302
+
303
+ - `day?`: `number`
304
+ - `fuzzyDate?`: `number`
305
+ - `month?`: `number`
306
+ - `total?`: `number`
307
+ - `year?`: `number`
308
+
309
+ ### Counts
310
+
311
+ **Properties:**
312
+
313
+ - `posted?`: `bkper.Count[]`
314
+ - `trashed?`: `bkper.Count[]`
315
+
316
+ ### Event
317
+
318
+ **Properties:**
319
+
320
+ - `agent?`: `bkper.Agent`
321
+ - `book?`: `bkper.Book`
322
+ - `bookId?`: `string` — The id of the Book associated to the Event
323
+ - `botResponses?`: `bkper.BotResponse[]` — The list of bot responses associated to the Event
324
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
325
+ - `createdOn?`: `string` — The creation date time on RFC3339 format
326
+ - `data?`: `bkper.EventData`
327
+ - `id?`: `string` — The unique id that identifies the Event
328
+ - `resource?`: `string` — The resource associated to the Event
329
+ - `type?`: `"FILE_CREATED" | "FILE_UPDATED" | "TRANSACTION_CREATED" | "TRANSACTION_UPDATED" | "TRANSACTION_DELETED" | "TRANSACTION_POSTED" | "TRANSACTION_CHECKED" | "TRANSACTION_UNCHECKED" | "TRANSACTION_RESTORED" | "ACCOUNT_CREATED" | "ACCOUNT_UPDATED" | "ACCOUNT_DELETED" | "QUERY_CREATED" | "QUERY_UPDATED" | "QUERY_DELETED" | "GROUP_CREATED" | "GROUP_UPDATED" | "GROUP_DELETED" | "COMMENT_CREATED" | "COMMENT_DELETED" | "COLLABORATOR_ADDED" | "COLLABORATOR_UPDATED" | "COLLABORATOR_REMOVED" | "INTEGRATION_CREATED" | "INTEGRATION_UPDATED" | "INTEGRATION_DELETED" | "BOOK_CREATED" | "BOOK_AUDITED" | "BOOK_UPDATED" | "BOOK_DELETED"` — The type of the Event
330
+ - `user?`: `bkper.User`
331
+
332
+ ### EventData
333
+
334
+ **Properties:**
335
+
336
+ - `object?`: `bkper.Any`
337
+ - `previousAttributes?`: `{ [name: string]: string }` — The object previous attributes when updated
338
+
339
+ ### EventList
340
+
341
+ **Properties:**
342
+
343
+ - `cursor?`: `string` — The cursor, for pagination
344
+ - `items?`: `bkper.Event[]` — List items
345
+
346
+ ### File
347
+
348
+ **Properties:**
349
+
350
+ - `agentId?`: `string` — The id of agent that created the resource
351
+ - `content?`: `string` — The file content Base64 encoded
352
+ - `contentType?`: `string` — The file content type
353
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
354
+ - `id?`: `string` — The unique id that identifies the file in the book
355
+ - `name?`: `string` — The file name
356
+ - `properties?`: `{ [name: string]: string }` — The key/value custom properties of the File
357
+ - `size?`: `number` — The file size in bytes
358
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
359
+ - `url?`: `string` — The file serving url
360
+
361
+ ### Group
362
+
363
+ **Properties:**
364
+
365
+ - `agentId?`: `string` — The id of agent that created the resource
366
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
367
+ - `credit?`: `boolean` — Tell if the group is credit
368
+ - `hasAccounts?`: `boolean` — Tell if the group is has any accounts
369
+ - `hasGroups?`: `boolean` — Tell if the group is has any children groups
370
+ - `hidden?`: `boolean` — Tell if the group is hidden on transactions main menu
371
+ - `id?`: `string` — The unique id that identifies the Group in the Book
372
+ - `locked?`: `boolean` — Tell if the group is locked by the Book owner
373
+ - `mixed?`: `boolean` — Tell if has mixed type of accounts
374
+ - `name?`: `string` — The name of the Group
375
+ - `normalizedName?`: `string` — The name of the Group, lowercase, without spaces or special characters
376
+ - `parent?`: `bkper.Group`
377
+ - `permanent?`: `boolean` — Tell if the group is permanent
378
+ - `properties?`: `{ [name: string]: string }` — The key/value custom properties of the Group
379
+ - `type?`: `"ASSET" | "LIABILITY" | "INCOMING" | "OUTGOING"`
380
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
381
+
382
+ ### GroupBalances
383
+
384
+ **Properties:**
385
+
386
+ - `accountBalances?`: `bkper.AccountBalances[]`
387
+ - `balances?`: `bkper.Balance[]`
388
+ - `credit?`: `boolean`
389
+ - `cumulativeBalance?`: `string`
390
+ - `cumulativeCredit?`: `string`
391
+ - `cumulativeDebit?`: `string`
392
+ - `groupBalances?`: `bkper.GroupBalances[]`
393
+ - `name?`: `string`
394
+ - `normalizedName?`: `string`
395
+ - `periodBalance?`: `string`
396
+ - `periodCredit?`: `string`
397
+ - `periodDebit?`: `string`
398
+ - `permanent?`: `boolean`
399
+ - `properties?`: `{ [name: string]: string }`
400
+
401
+ ### GroupList
402
+
403
+ **Properties:**
404
+
405
+ - `items?`: `bkper.Group[]` — List items
406
+
407
+ ### Integration
408
+
409
+ **Properties:**
410
+
411
+ - `addedBy?`: `string`
412
+ - `agentId?`: `string` — The id of agent that created the resource
413
+ - `bookId?`: `string`
414
+ - `connectionId?`: `string`
415
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
416
+ - `dateAddedMs?`: `string`
417
+ - `id?`: `string`
418
+ - `lastUpdateMs?`: `string`
419
+ - `logo?`: `string`
420
+ - `logoDark?`: `string`
421
+ - `name?`: `string`
422
+ - `normalizedName?`: `string`
423
+ - `properties?`: `{ [name: string]: string }`
424
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
425
+ - `userId?`: `string`
426
+
427
+ ### IntegrationList
428
+
429
+ **Properties:**
430
+
431
+ - `items?`: `bkper.Integration[]` — List items
432
+
433
+ ### Query
434
+
435
+ **Properties:**
436
+
437
+ - `agentId?`: `string` — The id of agent that created the resource
438
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
439
+ - `id?`: `string` — The unique id that identifies the saved Query in the Book
440
+ - `query?`: `string` — The Query string to be executed
441
+ - `title?`: `string` — The title of the saved Query
442
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
443
+
444
+ ### QueryList
445
+
446
+ **Properties:**
447
+
448
+ - `items?`: `bkper.Query[]` — List items
449
+
450
+ ### Template
451
+
452
+ **Properties:**
453
+
454
+ - `bookId?`: `string`
455
+ - `bookLink?`: `string`
456
+ - `category?`: `string`
457
+ - `description?`: `string`
458
+ - `imageUrl?`: `string`
459
+ - `name?`: `string`
460
+ - `sheetsLink?`: `string`
461
+ - `timesUsed?`: `number`
462
+
463
+ ### TemplateList
464
+
465
+ **Properties:**
466
+
467
+ - `items?`: `bkper.Template[]` — List items
468
+
469
+ ### Transaction
470
+
471
+ **Properties:**
472
+
473
+ - `agentId?`: `string` — The id of agent that created the resource
474
+ - `agentLogo?`: `string` — The logo of the agent that created the transaction
475
+ - `agentLogoDark?`: `string` — The logo in dark mode, of the agent that created the transaction
476
+ - `agentName?`: `string` — The name of the agent that created the transaction
477
+ - `amount?`: `string` — The amount on format ####.##
478
+ - `checked?`: `boolean` — Tell if the transaction is a checked
479
+ - `createdAt?`: `string` — The creation timestamp, in milliseconds
480
+ - `createdBy?`: `string` — The actor username that created the transaction
481
+ - `creditAccount?`: `bkper.Account`
482
+ - `date?`: `string` — The date on ISO format yyyy-MM-dd
483
+ - `dateFormatted?`: `string` — The date on format of the Book
484
+ - `dateValue?`: `number` — The date number representation on format YYYYMMDD
485
+ - `debitAccount?`: `bkper.Account`
486
+ - `description?`: `string` — The transaction description
487
+ - `draft?`: `boolean` — Tell if its a draft transaction
488
+ - `files?`: `bkper.File[]` — The files attached to the transaction
489
+ - `id?`: `string` — The unique id that identifies the transaction in the book
490
+ - `posted?`: `boolean` — Tell if the transaction is already posted on accounts, otherwise is a draft
491
+ - `properties?`: `{ [name: string]: string }` — The key/value custom properties of the Transaction
492
+ - `remoteIds?`: `string[]` — The transaction remote ids, to avoid duplication
493
+ - `tags?`: `string[]` — The transaction #hashtags
494
+ - `trashed?`: `boolean` — Tell if transaction is trashed
495
+ - `updatedAt?`: `string` — The last update timestamp, in milliseconds
496
+ - `urls?`: `string[]` — The transaction urls
497
+
498
+ ### TransactionList
499
+
500
+ **Properties:**
501
+
502
+ - `account?`: `string` — The account id when filtering by a single account. E.g. account='Bank'
503
+ - `cursor?`: `string` — The cursor, for pagination
504
+ - `items?`: `bkper.Transaction[]` — List items
505
+
506
+ ### TransactionOperation
507
+
508
+ **Properties:**
509
+
510
+ - `accounts?`: `bkper.Account[]` — The affected accounts
511
+ - `transaction?`: `bkper.Transaction`
512
+
513
+ ### Url
514
+
515
+ **Properties:**
516
+
517
+ - `url?`: `string`
518
+
519
+ ### User
520
+
521
+ **Properties:**
522
+
523
+ - `avatarUrl?`: `string` — The user public avatar url
524
+ - `bankConnections?`: `boolean` — True if user already had any bank connection
525
+ - `billingAdminEmail?`: `string` — The billing admin email for this user's billing account
526
+ - `billingEnabled?`: `boolean` — True if billing is enabled for the user
527
+ - `daysLeftInTrial?`: `number` — How many days left in trial
528
+ - `email?`: `string` — The user email
529
+ - `free?`: `boolean` — True if user is in the free plan
530
+ - `fullName?`: `string` — The user full name
531
+ - `givenName?`: `string` — The user given name
532
+ - `hash?`: `string` — The user hash
533
+ - `hostedDomain?`: `string` — The user hosted domain
534
+ - `id?`: `string` — The user unique id
535
+ - `name?`: `string` — The user display name
536
+ - `plan?`: `string` — The user plan
537
+ - `planOverdue?`: `boolean` — True if subscription payment is overdue
538
+ - `startedTrial?`: `boolean` — True if user started trial
539
+ - `totalTransactionsThisMonth?`: `number` — User-level total transactions this month
540
+ - `totalTransactionsThisYear?`: `number` — User-level total transactions this year
541
+ - `username?`: `string` — The Bkper username of the user
542
+