@bkper/bkper-api-types 5.2.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.d.ts +260 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@ declare namespace bkper {
9
9
  */
10
10
  archived?: boolean;
11
11
  /**
12
- * The overall account balance
12
+ * The current account balance, when querying transactions.
13
13
  */
14
14
  balance?: string;
15
15
  /**
@@ -56,6 +56,7 @@ declare namespace bkper {
56
56
  type?: "ASSET" | "LIABILITY" | "INCOMING" | "OUTGOING";
57
57
  }
58
58
  export interface AccountBalances {
59
+ archived?: boolean;
59
60
  balances?: Balance[];
60
61
  checkedCumulativeBalance?: string;
61
62
  checkedPeriodBalance?: string;
@@ -63,6 +64,7 @@ declare namespace bkper {
63
64
  cumulativeBalance?: string;
64
65
  cumulativeCredit?: string;
65
66
  cumulativeDebit?: string;
67
+ empty?: boolean;
66
68
  name?: string;
67
69
  normalizedName?: string;
68
70
  periodBalance?: string;
@@ -110,6 +112,10 @@ declare namespace bkper {
110
112
  * The Google OAuth Client Secret
111
113
  */
112
114
  clientSecret?: string;
115
+ /**
116
+ * Tell if this app is connectable by a user
117
+ */
118
+ connectable?: boolean;
113
119
  /**
114
120
  * The executable Google Apps Script deployment ID
115
121
  */
@@ -129,7 +135,7 @@ declare namespace bkper {
129
135
  /**
130
136
  * Event types the App listen to
131
137
  */
132
- events?: ("FILE_CREATED" | "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" | "BOOK_UPDATED" | "BOOK_DELETED")[];
138
+ events?: ("FILE_CREATED" | "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_UPDATED" | "BOOK_DELETED")[];
133
139
  /**
134
140
  * File patters the App handles - wildcard accepted - E.g *.pdf *-bank.csv
135
141
  */
@@ -138,6 +144,10 @@ declare namespace bkper {
138
144
  * The unique agent id of the App - this can't be changed after created
139
145
  */
140
146
  id?: string;
147
+ /**
148
+ * Tell if this app is installable in a book
149
+ */
150
+ installable?: boolean;
141
151
  /**
142
152
  * The App logo url
143
153
  */
@@ -166,6 +176,10 @@ declare namespace bkper {
166
176
  * The App name
167
177
  */
168
178
  name?: string;
179
+ /**
180
+ * The owner email
181
+ */
182
+ ownerEmail?: string;
169
183
  /**
170
184
  * The owner company logo url
171
185
  */
@@ -179,6 +193,10 @@ declare namespace bkper {
179
193
  */
180
194
  ownerWebsite?: string;
181
195
  propertiesSchema?: AppPropertiesSchema;
196
+ /**
197
+ * Tell if this app already published
198
+ */
199
+ published?: boolean;
182
200
  /**
183
201
  * The readme.md file as string
184
202
  */
@@ -216,6 +234,9 @@ declare namespace bkper {
216
234
  */
217
235
  website?: string;
218
236
  }
237
+ export interface AppList {
238
+ items?: App[];
239
+ }
219
240
  export interface AppPropertiesSchema {
220
241
  account?: AppPropertySchema;
221
242
  book?: AppPropertySchema;
@@ -361,6 +382,28 @@ declare namespace bkper {
361
382
  */
362
383
  items?: Book[];
363
384
  }
385
+ export interface Collaborator {
386
+ /**
387
+ * The id of agent that created the resource
388
+ */
389
+ agentId?: string;
390
+ /**
391
+ * The creation timestamp, in milliseconds
392
+ */
393
+ createdAt?: string;
394
+ /**
395
+ * The email of the Collaborator
396
+ */
397
+ email?: string;
398
+ /**
399
+ * The unique id that identifies the Collaborator in the Book
400
+ */
401
+ id?: string;
402
+ /**
403
+ * The permission the Collaborator has in the Book
404
+ */
405
+ permission?: "OWNER" | "EDITOR" | "POSTER" | "RECORDER" | "VIEWER" | "NONE";
406
+ }
364
407
  export interface Collection {
365
408
  /**
366
409
  * The id of agent that created the resource
@@ -387,6 +430,34 @@ declare namespace bkper {
387
430
  */
388
431
  ownerUsername?: string;
389
432
  }
433
+ export interface Connection {
434
+ /**
435
+ * The id of agent that created the resource
436
+ */
437
+ agentId?: string;
438
+ /**
439
+ * The creation timestamp, in milliseconds
440
+ */
441
+ createdAt?: string;
442
+ dateAddedMs?: string;
443
+ email?: string;
444
+ error?: string;
445
+ id?: string;
446
+ logo?: string;
447
+ name?: string;
448
+ properties?: {
449
+ [name: string]: string;
450
+ };
451
+ status?: "CONNECTED" | "DISCONNECTED";
452
+ userId?: string;
453
+ uuid?: string;
454
+ }
455
+ export interface ConnectionList {
456
+ /**
457
+ * List items
458
+ */
459
+ items?: Connection[];
460
+ }
390
461
  export interface Event {
391
462
  agent?: Agent;
392
463
  book?: Book;
@@ -410,7 +481,7 @@ declare namespace bkper {
410
481
  /**
411
482
  * The type of the Event
412
483
  */
413
- type?: "FILE_CREATED" | "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" | "BOOK_UPDATED" | "BOOK_DELETED";
484
+ type?: "FILE_CREATED" | "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_UPDATED" | "BOOK_DELETED";
414
485
  user?: User;
415
486
  }
416
487
  export interface EventData {
@@ -548,6 +619,35 @@ declare namespace bkper {
548
619
  */
549
620
  items?: Group[];
550
621
  }
622
+ export interface Integration {
623
+ addedBy?: string;
624
+ /**
625
+ * The id of agent that created the resource
626
+ */
627
+ agentId?: string;
628
+ bookId?: string;
629
+ connectionId?: string;
630
+ /**
631
+ * The creation timestamp, in milliseconds
632
+ */
633
+ createdAt?: string;
634
+ dateAddedMs?: string;
635
+ id?: string;
636
+ lastUpdateMs?: string;
637
+ logo?: string;
638
+ name?: string;
639
+ normalizedName?: string;
640
+ properties?: {
641
+ [name: string]: string;
642
+ };
643
+ userId?: string;
644
+ }
645
+ export interface IntegrationList {
646
+ /**
647
+ * List items
648
+ */
649
+ items?: Integration[];
650
+ }
551
651
  export interface Query {
552
652
  /**
553
653
  * The id of agent that created the resource
@@ -667,15 +767,58 @@ declare namespace bkper {
667
767
  accounts?: Account[];
668
768
  transaction?: Transaction;
669
769
  }
770
+ export interface Url {
771
+ url?: string;
772
+ }
670
773
  export interface User {
671
774
  /**
672
775
  * The user public avatar url
673
776
  */
674
777
  avatarUrl?: string;
778
+ /**
779
+ * True if billing is enabled for the user
780
+ */
781
+ billingEnabled?: boolean;
782
+ /**
783
+ * How many days left in trial
784
+ */
785
+ daysLeftInTrial?: number; // int32
786
+ /**
787
+ * The user email
788
+ */
789
+ email?: string;
790
+ /**
791
+ * True if user is in the free plan
792
+ */
793
+ free?: boolean;
794
+ /**
795
+ * The user full name
796
+ */
797
+ fullName?: string;
798
+ /**
799
+ * The user given name
800
+ */
801
+ givenName?: string;
802
+ /**
803
+ * The user hash
804
+ */
805
+ hash?: string;
806
+ /**
807
+ * The user hosted domain
808
+ */
809
+ hostedDomain?: string;
810
+ /**
811
+ * The user unique id
812
+ */
813
+ id?: string;
675
814
  /**
676
815
  * The user display name
677
816
  */
678
817
  name?: string;
818
+ /**
819
+ * True if user started trial
820
+ */
821
+ startedTrial?: boolean;
679
822
  /**
680
823
  * The Bkper username of the user
681
824
  */
@@ -683,6 +826,17 @@ declare namespace bkper {
683
826
  }
684
827
  }
685
828
  declare namespace Paths {
829
+ namespace BkperV5AddCollaborator {
830
+ export interface BodyParameters {
831
+ Collaborator: Parameters.Collaborator;
832
+ }
833
+ namespace Parameters {
834
+ export type Collaborator = bkper.Collaborator;
835
+ }
836
+ namespace Responses {
837
+ export type $200 = bkper.Collaborator;
838
+ }
839
+ }
686
840
  namespace BkperV5CheckTransaction {
687
841
  export interface BodyParameters {
688
842
  Transaction: Parameters.Transaction;
@@ -735,6 +889,17 @@ declare namespace Paths {
735
889
  export type $200 = bkper.App;
736
890
  }
737
891
  }
892
+ namespace BkperV5CreateConnection {
893
+ export interface BodyParameters {
894
+ Connection: Parameters.Connection;
895
+ }
896
+ namespace Parameters {
897
+ export type Connection = bkper.Connection;
898
+ }
899
+ namespace Responses {
900
+ export type $200 = bkper.Connection;
901
+ }
902
+ }
738
903
  namespace BkperV5CreateFile {
739
904
  export interface BodyParameters {
740
905
  File: Parameters.File;
@@ -768,6 +933,17 @@ declare namespace Paths {
768
933
  export type $200 = bkper.GroupList;
769
934
  }
770
935
  }
936
+ namespace BkperV5CreateIntegration {
937
+ export interface BodyParameters {
938
+ Integration: Parameters.Integration;
939
+ }
940
+ namespace Parameters {
941
+ export type Integration = bkper.Integration;
942
+ }
943
+ namespace Responses {
944
+ export type $200 = bkper.Integration;
945
+ }
946
+ }
771
947
  namespace BkperV5CreateTransaction {
772
948
  export interface BodyParameters {
773
949
  Transaction: Parameters.Transaction;
@@ -795,16 +971,41 @@ declare namespace Paths {
795
971
  export type $200 = bkper.Account;
796
972
  }
797
973
  }
974
+ namespace BkperV5DeleteConnection {
975
+ namespace Responses {
976
+ export type $200 = bkper.Connection;
977
+ }
978
+ }
798
979
  namespace BkperV5DeleteGroup {
799
980
  namespace Responses {
800
981
  export type $200 = bkper.Group;
801
982
  }
802
983
  }
984
+ namespace BkperV5DeleteIntegration {
985
+ namespace Responses {
986
+ export type $200 = bkper.Integration;
987
+ }
988
+ }
803
989
  namespace BkperV5GetAccount {
804
990
  namespace Responses {
805
991
  export type $200 = bkper.Account;
806
992
  }
807
993
  }
994
+ namespace BkperV5GetApp {
995
+ namespace Responses {
996
+ export type $200 = bkper.App;
997
+ }
998
+ }
999
+ namespace BkperV5GetBalances {
1000
+ namespace Responses {
1001
+ export type $200 = bkper.Balances;
1002
+ }
1003
+ }
1004
+ namespace BkperV5GetBillingPortal {
1005
+ namespace Responses {
1006
+ export type $200 = bkper.Url;
1007
+ }
1008
+ }
808
1009
  namespace BkperV5GetBook {
809
1010
  namespace Responses {
810
1011
  export type $200 = bkper.Book;
@@ -825,6 +1026,16 @@ declare namespace Paths {
825
1026
  export type $200 = bkper.Transaction;
826
1027
  }
827
1028
  }
1029
+ namespace BkperV5GetUser {
1030
+ namespace Responses {
1031
+ export type $200 = bkper.User;
1032
+ }
1033
+ }
1034
+ namespace BkperV5GetUserCredentials {
1035
+ namespace Responses {
1036
+ export type $200 = bkper.Connection;
1037
+ }
1038
+ }
828
1039
  namespace BkperV5ListAccountGroups {
829
1040
  namespace Responses {
830
1041
  export type $200 = bkper.GroupList;
@@ -835,9 +1046,14 @@ declare namespace Paths {
835
1046
  export type $200 = bkper.AccountList;
836
1047
  }
837
1048
  }
838
- namespace BkperV5ListActivities {
1049
+ namespace BkperV5ListApps {
839
1050
  namespace Responses {
840
- export type $200 = bkper.EventList;
1051
+ export type $200 = bkper.AppList;
1052
+ }
1053
+ }
1054
+ namespace BkperV5ListBookApps {
1055
+ namespace Responses {
1056
+ export type $200 = bkper.AppList;
841
1057
  }
842
1058
  }
843
1059
  namespace BkperV5ListBooks {
@@ -845,6 +1061,16 @@ declare namespace Paths {
845
1061
  export type $200 = bkper.BookList;
846
1062
  }
847
1063
  }
1064
+ namespace BkperV5ListConnections {
1065
+ namespace Responses {
1066
+ export type $200 = bkper.ConnectionList;
1067
+ }
1068
+ }
1069
+ namespace BkperV5ListEvents {
1070
+ namespace Responses {
1071
+ export type $200 = bkper.EventList;
1072
+ }
1073
+ }
848
1074
  namespace BkperV5ListGroupAccounts {
849
1075
  namespace Responses {
850
1076
  export type $200 = bkper.AccountList;
@@ -855,6 +1081,11 @@ declare namespace Paths {
855
1081
  export type $200 = bkper.GroupList;
856
1082
  }
857
1083
  }
1084
+ namespace BkperV5ListIntegrations {
1085
+ namespace Responses {
1086
+ export type $200 = bkper.IntegrationList;
1087
+ }
1088
+ }
858
1089
  namespace BkperV5ListQueries {
859
1090
  namespace Responses {
860
1091
  export type $200 = bkper.QueryList;
@@ -887,9 +1118,9 @@ declare namespace Paths {
887
1118
  export type $200 = bkper.TransactionOperation;
888
1119
  }
889
1120
  }
890
- namespace BkperV5QueryBalances {
1121
+ namespace BkperV5RemoveCollaborator {
891
1122
  namespace Responses {
892
- export type $200 = bkper.Balances;
1123
+ export type $200 = bkper.Collaborator;
893
1124
  }
894
1125
  }
895
1126
  namespace BkperV5RemoveTransaction {
@@ -996,6 +1227,17 @@ declare namespace Paths {
996
1227
  export type $200 = bkper.Book;
997
1228
  }
998
1229
  }
1230
+ namespace BkperV5UpdateConnection {
1231
+ export interface BodyParameters {
1232
+ Connection: Parameters.Connection;
1233
+ }
1234
+ namespace Parameters {
1235
+ export type Connection = bkper.Connection;
1236
+ }
1237
+ namespace Responses {
1238
+ export type $200 = bkper.Connection;
1239
+ }
1240
+ }
999
1241
  namespace BkperV5UpdateGroup {
1000
1242
  export interface BodyParameters {
1001
1243
  Group: Parameters.Group;
@@ -1007,6 +1249,17 @@ declare namespace Paths {
1007
1249
  export type $200 = bkper.Group;
1008
1250
  }
1009
1251
  }
1252
+ namespace BkperV5UpdateIntegration {
1253
+ export interface BodyParameters {
1254
+ Integration: Parameters.Integration;
1255
+ }
1256
+ namespace Parameters {
1257
+ export type Integration = bkper.Integration;
1258
+ }
1259
+ namespace Responses {
1260
+ export type $200 = bkper.Integration;
1261
+ }
1262
+ }
1010
1263
  namespace BkperV5UpdateTransaction {
1011
1264
  export interface BodyParameters {
1012
1265
  Transaction: Parameters.Transaction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bkper/bkper-api-types",
3
- "version": "5.2.0",
3
+ "version": "5.4.0",
4
4
  "description": "Typescript definitions for Bkper REST API",
5
5
  "homepage": "https://api.bkper.com",
6
6
  "repository": {