bexio 3.8.0 → 4.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.
Files changed (277) hide show
  1. package/coverage/index.html +18 -18
  2. package/jest-html-reporters-attach/jest_html_reporters/result.js +1 -1
  3. package/junit.xml +185 -179
  4. package/lib/index.d.mts +2908 -0
  5. package/lib/index.d.ts +2879 -55
  6. package/lib/index.js +2045 -100
  7. package/lib/index.js.map +1 -1
  8. package/lib/index.mjs +1990 -0
  9. package/lib/index.mjs.map +1 -0
  10. package/package.json +20 -4
  11. package/lib/interfaces/AccountsStatic.d.ts +0 -14
  12. package/lib/interfaces/AccountsStatic.js +0 -3
  13. package/lib/interfaces/AccountsStatic.js.map +0 -1
  14. package/lib/interfaces/BankAccountsStatic.d.ts +0 -25
  15. package/lib/interfaces/BankAccountsStatic.js +0 -3
  16. package/lib/interfaces/BankAccountsStatic.js.map +0 -1
  17. package/lib/interfaces/BaseStatic.d.ts +0 -20
  18. package/lib/interfaces/BaseStatic.js +0 -3
  19. package/lib/interfaces/BaseStatic.js.map +0 -1
  20. package/lib/interfaces/BillsStatic.d.ts +0 -167
  21. package/lib/interfaces/BillsStatic.js +0 -25
  22. package/lib/interfaces/BillsStatic.js.map +0 -1
  23. package/lib/interfaces/BillsV4Static.d.ts +0 -204
  24. package/lib/interfaces/BillsV4Static.js +0 -60
  25. package/lib/interfaces/BillsV4Static.js.map +0 -1
  26. package/lib/interfaces/BusinessActivitiesStatic.d.ts +0 -24
  27. package/lib/interfaces/BusinessActivitiesStatic.js +0 -11
  28. package/lib/interfaces/BusinessActivitiesStatic.js.map +0 -1
  29. package/lib/interfaces/CalendarStatic.d.ts +0 -30
  30. package/lib/interfaces/CalendarStatic.js +0 -18
  31. package/lib/interfaces/CalendarStatic.js.map +0 -1
  32. package/lib/interfaces/ContactGroupsStatic.d.ts +0 -12
  33. package/lib/interfaces/ContactGroupsStatic.js +0 -11
  34. package/lib/interfaces/ContactGroupsStatic.js.map +0 -1
  35. package/lib/interfaces/ContactRelationsStatic.d.ts +0 -24
  36. package/lib/interfaces/ContactRelationsStatic.js +0 -13
  37. package/lib/interfaces/ContactRelationsStatic.js.map +0 -1
  38. package/lib/interfaces/ContactSectorsStatic.d.ts +0 -9
  39. package/lib/interfaces/ContactSectorsStatic.js +0 -11
  40. package/lib/interfaces/ContactSectorsStatic.js.map +0 -1
  41. package/lib/interfaces/ContactTypesStatic.d.ts +0 -9
  42. package/lib/interfaces/ContactTypesStatic.js +0 -11
  43. package/lib/interfaces/ContactTypesStatic.js.map +0 -1
  44. package/lib/interfaces/ContactsStatic.d.ts +0 -118
  45. package/lib/interfaces/ContactsStatic.js +0 -27
  46. package/lib/interfaces/ContactsStatic.js.map +0 -1
  47. package/lib/interfaces/CurrenciesStatic.d.ts +0 -20
  48. package/lib/interfaces/CurrenciesStatic.js +0 -3
  49. package/lib/interfaces/CurrenciesStatic.js.map +0 -1
  50. package/lib/interfaces/ExpensesStatic.d.ts +0 -83
  51. package/lib/interfaces/ExpensesStatic.js +0 -25
  52. package/lib/interfaces/ExpensesStatic.js.map +0 -1
  53. package/lib/interfaces/InvoicesStatic.d.ts +0 -162
  54. package/lib/interfaces/InvoicesStatic.js +0 -46
  55. package/lib/interfaces/InvoicesStatic.js.map +0 -1
  56. package/lib/interfaces/ItemsStatic.d.ts +0 -120
  57. package/lib/interfaces/ItemsStatic.js +0 -47
  58. package/lib/interfaces/ItemsStatic.js.map +0 -1
  59. package/lib/interfaces/ManualEntriesStatic.d.ts +0 -42
  60. package/lib/interfaces/ManualEntriesStatic.js +0 -3
  61. package/lib/interfaces/ManualEntriesStatic.js.map +0 -1
  62. package/lib/interfaces/NotesStatic.d.ts +0 -23
  63. package/lib/interfaces/NotesStatic.js +0 -16
  64. package/lib/interfaces/NotesStatic.js.map +0 -1
  65. package/lib/interfaces/OrdersStatic.d.ts +0 -117
  66. package/lib/interfaces/OrdersStatic.js +0 -25
  67. package/lib/interfaces/OrdersStatic.js.map +0 -1
  68. package/lib/interfaces/OutgoingPaymentsStatic.d.ts +0 -142
  69. package/lib/interfaces/OutgoingPaymentsStatic.js +0 -39
  70. package/lib/interfaces/OutgoingPaymentsStatic.js.map +0 -1
  71. package/lib/interfaces/PaymentsStatic.d.ts +0 -22
  72. package/lib/interfaces/PaymentsStatic.js +0 -3
  73. package/lib/interfaces/PaymentsStatic.js.map +0 -1
  74. package/lib/interfaces/PositionStatic.d.ts +0 -35
  75. package/lib/interfaces/PositionStatic.js +0 -3
  76. package/lib/interfaces/PositionStatic.js.map +0 -1
  77. package/lib/interfaces/PositionsStatic.d.ts +0 -46
  78. package/lib/interfaces/PositionsStatic.js +0 -3
  79. package/lib/interfaces/PositionsStatic.js.map +0 -1
  80. package/lib/interfaces/ProjectStatusesStatic.d.ts +0 -9
  81. package/lib/interfaces/ProjectStatusesStatic.js +0 -11
  82. package/lib/interfaces/ProjectStatusesStatic.js.map +0 -1
  83. package/lib/interfaces/ProjectTypesStatic.d.ts +0 -9
  84. package/lib/interfaces/ProjectTypesStatic.js +0 -11
  85. package/lib/interfaces/ProjectTypesStatic.js.map +0 -1
  86. package/lib/interfaces/ProjectsStatic.d.ts +0 -55
  87. package/lib/interfaces/ProjectsStatic.js +0 -13
  88. package/lib/interfaces/ProjectsStatic.js.map +0 -1
  89. package/lib/interfaces/SalesOrderManagementStatic.d.ts +0 -289
  90. package/lib/interfaces/SalesOrderManagementStatic.js +0 -69
  91. package/lib/interfaces/SalesOrderManagementStatic.js.map +0 -1
  92. package/lib/interfaces/TaxesStatic.d.ts +0 -31
  93. package/lib/interfaces/TaxesStatic.js +0 -3
  94. package/lib/interfaces/TaxesStatic.js.map +0 -1
  95. package/lib/interfaces/TimetrackingStatusesStatic.d.ts +0 -9
  96. package/lib/interfaces/TimetrackingStatusesStatic.js +0 -11
  97. package/lib/interfaces/TimetrackingStatusesStatic.js.map +0 -1
  98. package/lib/interfaces/TimetrackingsStatic.d.ts +0 -69
  99. package/lib/interfaces/TimetrackingsStatic.js +0 -16
  100. package/lib/interfaces/TimetrackingsStatic.js.map +0 -1
  101. package/lib/interfaces/UsersStatic.d.ts +0 -23
  102. package/lib/interfaces/UsersStatic.js +0 -15
  103. package/lib/interfaces/UsersStatic.js.map +0 -1
  104. package/lib/resources/Accounts.d.ts +0 -49
  105. package/lib/resources/Accounts.js +0 -85
  106. package/lib/resources/Accounts.js.map +0 -1
  107. package/lib/resources/BankAccounts.d.ts +0 -49
  108. package/lib/resources/BankAccounts.js +0 -85
  109. package/lib/resources/BankAccounts.js.map +0 -1
  110. package/lib/resources/BaseCrud.d.ts +0 -89
  111. package/lib/resources/BaseCrud.js +0 -181
  112. package/lib/resources/BaseCrud.js.map +0 -1
  113. package/lib/resources/Bills.d.ts +0 -67
  114. package/lib/resources/Bills.js +0 -107
  115. package/lib/resources/Bills.js.map +0 -1
  116. package/lib/resources/BillsV4.d.ts +0 -52
  117. package/lib/resources/BillsV4.js +0 -86
  118. package/lib/resources/BillsV4.js.map +0 -1
  119. package/lib/resources/BusinessActivities.d.ts +0 -5
  120. package/lib/resources/BusinessActivities.js +0 -13
  121. package/lib/resources/BusinessActivities.js.map +0 -1
  122. package/lib/resources/ContactGroups.d.ts +0 -13
  123. package/lib/resources/ContactGroups.js +0 -34
  124. package/lib/resources/ContactGroups.js.map +0 -1
  125. package/lib/resources/ContactRelations.d.ts +0 -5
  126. package/lib/resources/ContactRelations.js +0 -13
  127. package/lib/resources/ContactRelations.js.map +0 -1
  128. package/lib/resources/ContactSectors.d.ts +0 -39
  129. package/lib/resources/ContactSectors.js +0 -72
  130. package/lib/resources/ContactSectors.js.map +0 -1
  131. package/lib/resources/ContactTypes.d.ts +0 -39
  132. package/lib/resources/ContactTypes.js +0 -72
  133. package/lib/resources/ContactTypes.js.map +0 -1
  134. package/lib/resources/Contacts.d.ts +0 -5
  135. package/lib/resources/Contacts.js +0 -13
  136. package/lib/resources/Contacts.js.map +0 -1
  137. package/lib/resources/Currencies.d.ts +0 -33
  138. package/lib/resources/Currencies.js +0 -61
  139. package/lib/resources/Currencies.js.map +0 -1
  140. package/lib/resources/DefaultPositions.d.ts +0 -33
  141. package/lib/resources/DefaultPositions.js +0 -61
  142. package/lib/resources/DefaultPositions.js.map +0 -1
  143. package/lib/resources/Expenses.d.ts +0 -5
  144. package/lib/resources/Expenses.js +0 -13
  145. package/lib/resources/Expenses.js.map +0 -1
  146. package/lib/resources/Invoices.d.ts +0 -103
  147. package/lib/resources/Invoices.js +0 -175
  148. package/lib/resources/Invoices.js.map +0 -1
  149. package/lib/resources/ItemPositions.d.ts +0 -33
  150. package/lib/resources/ItemPositions.js +0 -61
  151. package/lib/resources/ItemPositions.js.map +0 -1
  152. package/lib/resources/Items.d.ts +0 -5
  153. package/lib/resources/Items.js +0 -13
  154. package/lib/resources/Items.js.map +0 -1
  155. package/lib/resources/ManualEntries.d.ts +0 -50
  156. package/lib/resources/ManualEntries.js +0 -84
  157. package/lib/resources/ManualEntries.js.map +0 -1
  158. package/lib/resources/Orders.d.ts +0 -33
  159. package/lib/resources/Orders.js +0 -64
  160. package/lib/resources/Orders.js.map +0 -1
  161. package/lib/resources/OutgoingPayments.d.ts +0 -63
  162. package/lib/resources/OutgoingPayments.js +0 -117
  163. package/lib/resources/OutgoingPayments.js.map +0 -1
  164. package/lib/resources/Payments.d.ts +0 -36
  165. package/lib/resources/Payments.js +0 -64
  166. package/lib/resources/Payments.js.map +0 -1
  167. package/lib/resources/ProjectStatuses.d.ts +0 -39
  168. package/lib/resources/ProjectStatuses.js +0 -72
  169. package/lib/resources/ProjectStatuses.js.map +0 -1
  170. package/lib/resources/ProjectTypes.d.ts +0 -39
  171. package/lib/resources/ProjectTypes.js +0 -72
  172. package/lib/resources/ProjectTypes.js.map +0 -1
  173. package/lib/resources/Projects.d.ts +0 -5
  174. package/lib/resources/Projects.js +0 -13
  175. package/lib/resources/Projects.js.map +0 -1
  176. package/lib/resources/Taxes.d.ts +0 -30
  177. package/lib/resources/Taxes.js +0 -70
  178. package/lib/resources/Taxes.js.map +0 -1
  179. package/lib/resources/TextPositions.d.ts +0 -33
  180. package/lib/resources/TextPositions.js +0 -61
  181. package/lib/resources/TextPositions.js.map +0 -1
  182. package/lib/resources/TimetrackingStatuses.d.ts +0 -39
  183. package/lib/resources/TimetrackingStatuses.js +0 -72
  184. package/lib/resources/TimetrackingStatuses.js.map +0 -1
  185. package/lib/resources/Timetrackings.d.ts +0 -14
  186. package/lib/resources/Timetrackings.js +0 -35
  187. package/lib/resources/Timetrackings.js.map +0 -1
  188. package/lib/resources/Users.d.ts +0 -39
  189. package/lib/resources/Users.js +0 -72
  190. package/lib/resources/Users.js.map +0 -1
  191. package/lib/tests/Accounts.test.d.ts +0 -1
  192. package/lib/tests/Accounts.test.js +0 -86
  193. package/lib/tests/Accounts.test.js.map +0 -1
  194. package/lib/tests/BankAccounts.test.d.ts +0 -1
  195. package/lib/tests/BankAccounts.test.js +0 -86
  196. package/lib/tests/BankAccounts.test.js.map +0 -1
  197. package/lib/tests/BaseCrud.test.d.ts +0 -1
  198. package/lib/tests/BaseCrud.test.js +0 -302
  199. package/lib/tests/BaseCrud.test.js.map +0 -1
  200. package/lib/tests/Bills.test.d.ts +0 -1
  201. package/lib/tests/Bills.test.js +0 -110
  202. package/lib/tests/Bills.test.js.map +0 -1
  203. package/lib/tests/BillsV4.test.d.ts +0 -1
  204. package/lib/tests/BillsV4.test.js +0 -134
  205. package/lib/tests/BillsV4.test.js.map +0 -1
  206. package/lib/tests/BusinessActivities.test.d.ts +0 -1
  207. package/lib/tests/BusinessActivities.test.js +0 -21
  208. package/lib/tests/BusinessActivities.test.js.map +0 -1
  209. package/lib/tests/ContactGroups.test.d.ts +0 -1
  210. package/lib/tests/ContactGroups.test.js +0 -21
  211. package/lib/tests/ContactGroups.test.js.map +0 -1
  212. package/lib/tests/ContactRelations.test.d.ts +0 -1
  213. package/lib/tests/ContactRelations.test.js +0 -21
  214. package/lib/tests/ContactRelations.test.js.map +0 -1
  215. package/lib/tests/ContactSectors.test.d.ts +0 -1
  216. package/lib/tests/ContactSectors.test.js +0 -21
  217. package/lib/tests/ContactSectors.test.js.map +0 -1
  218. package/lib/tests/ContactTypes.test.d.ts +0 -1
  219. package/lib/tests/ContactTypes.test.js +0 -21
  220. package/lib/tests/ContactTypes.test.js.map +0 -1
  221. package/lib/tests/Contacts.test.d.ts +0 -1
  222. package/lib/tests/Contacts.test.js +0 -21
  223. package/lib/tests/Contacts.test.js.map +0 -1
  224. package/lib/tests/Currencies.test.d.ts +0 -1
  225. package/lib/tests/Currencies.test.js +0 -21
  226. package/lib/tests/Currencies.test.js.map +0 -1
  227. package/lib/tests/DefaultPositions.test.d.ts +0 -1
  228. package/lib/tests/DefaultPositions.test.js +0 -22
  229. package/lib/tests/DefaultPositions.test.js.map +0 -1
  230. package/lib/tests/Expenses.test.d.ts +0 -1
  231. package/lib/tests/Expenses.test.js +0 -21
  232. package/lib/tests/Expenses.test.js.map +0 -1
  233. package/lib/tests/Invoices.test.d.ts +0 -1
  234. package/lib/tests/Invoices.test.js +0 -182
  235. package/lib/tests/Invoices.test.js.map +0 -1
  236. package/lib/tests/ItemPositions.test.d.ts +0 -1
  237. package/lib/tests/ItemPositions.test.js +0 -22
  238. package/lib/tests/ItemPositions.test.js.map +0 -1
  239. package/lib/tests/Items.test.d.ts +0 -1
  240. package/lib/tests/Items.test.js +0 -21
  241. package/lib/tests/Items.test.js.map +0 -1
  242. package/lib/tests/ManualEntries.test.d.ts +0 -1
  243. package/lib/tests/ManualEntries.test.js +0 -116
  244. package/lib/tests/ManualEntries.test.js.map +0 -1
  245. package/lib/tests/Orders.test.d.ts +0 -1
  246. package/lib/tests/Orders.test.js +0 -137
  247. package/lib/tests/Orders.test.js.map +0 -1
  248. package/lib/tests/OutgoingPayments.test.d.ts +0 -1
  249. package/lib/tests/OutgoingPayments.test.js +0 -125
  250. package/lib/tests/OutgoingPayments.test.js.map +0 -1
  251. package/lib/tests/Payments.test.d.ts +0 -1
  252. package/lib/tests/Payments.test.js +0 -22
  253. package/lib/tests/Payments.test.js.map +0 -1
  254. package/lib/tests/ProjectStatuses.test.d.ts +0 -1
  255. package/lib/tests/ProjectStatuses.test.js +0 -21
  256. package/lib/tests/ProjectStatuses.test.js.map +0 -1
  257. package/lib/tests/ProjectTypes.test.d.ts +0 -1
  258. package/lib/tests/ProjectTypes.test.js +0 -21
  259. package/lib/tests/ProjectTypes.test.js.map +0 -1
  260. package/lib/tests/Projects.test.d.ts +0 -1
  261. package/lib/tests/Projects.test.js +0 -21
  262. package/lib/tests/Projects.test.js.map +0 -1
  263. package/lib/tests/Taxes.test.d.ts +0 -1
  264. package/lib/tests/Taxes.test.js +0 -107
  265. package/lib/tests/Taxes.test.js.map +0 -1
  266. package/lib/tests/TextPositions.test.d.ts +0 -1
  267. package/lib/tests/TextPositions.test.js +0 -22
  268. package/lib/tests/TextPositions.test.js.map +0 -1
  269. package/lib/tests/TimetrackingStatuses.test.d.ts +0 -1
  270. package/lib/tests/TimetrackingStatuses.test.js +0 -21
  271. package/lib/tests/TimetrackingStatuses.test.js.map +0 -1
  272. package/lib/tests/Timetrackings.test.d.ts +0 -1
  273. package/lib/tests/Timetrackings.test.js +0 -21
  274. package/lib/tests/Timetrackings.test.js.map +0 -1
  275. package/lib/tests/Users.test.d.ts +0 -1
  276. package/lib/tests/Users.test.js +0 -21
  277. package/lib/tests/Users.test.js.map +0 -1
package/lib/index.mjs ADDED
@@ -0,0 +1,1990 @@
1
+ // src/resources/BaseCrud.ts
2
+ import axios from "axios";
3
+ var BaseCrud = class {
4
+ constructor(apiToken, apiEndpoint) {
5
+ this.baseApiUrl = "https://api.bexio.com";
6
+ this.apiToken = apiToken;
7
+ this.apiEndpoint = apiEndpoint;
8
+ }
9
+ /**
10
+ * Lists the ressource
11
+ *
12
+ * @param {BaseStatic.BaseOptions} [options]
13
+ * @returns {Promise<Array<T>>}
14
+ * @memberof BaseCrud
15
+ */
16
+ async list(options) {
17
+ return this.request("GET", this.apiEndpoint, options);
18
+ }
19
+ /**
20
+ * search for resources
21
+ *
22
+ * @param {Array<BaseStatic.SearchParameter<SearchType>>} searchOptions
23
+ * @param {BaseStatic.BaseOptions} [options]
24
+ * @returns {Promise<Array<Search>>}
25
+ * @memberof BaseCrud
26
+ */
27
+ async search(searchOptions, options) {
28
+ return this.request(
29
+ "POST",
30
+ this.apiEndpoint + "/search",
31
+ options,
32
+ searchOptions
33
+ );
34
+ }
35
+ /**
36
+ * show a specific ressource
37
+ *
38
+ * @param {string | number} id
39
+ * @param {BaseStatic.BaseOptions} [options]
40
+ * @returns {Promise<Full>}
41
+ * @memberof BaseCrud
42
+ */
43
+ async show(id, options) {
44
+ return this.request("GET", this.apiEndpoint + "/" + id, options);
45
+ }
46
+ /**
47
+ * create a new ressource
48
+ *
49
+ * @param {Full} ressource
50
+ * @returns {Promise<Full>}
51
+ * @memberof BaseCrud
52
+ */
53
+ async create(ressource) {
54
+ return this.request("POST", this.apiEndpoint, void 0, ressource);
55
+ }
56
+ /**
57
+ * overwrite an existing ressource
58
+ *
59
+ * @param {number} id
60
+ * @param {Overwrite} ressource
61
+ * @returns {Promise<Full>}
62
+ * @memberof BaseCrud
63
+ */
64
+ async overwrite(id, ressource) {
65
+ return this.request(
66
+ "PUT",
67
+ this.apiEndpoint + "/" + id,
68
+ void 0,
69
+ ressource
70
+ );
71
+ }
72
+ /**
73
+ * edit an existing ressource
74
+ *
75
+ * @param {number} id
76
+ * @param {Partial<Overwrite>} ressource
77
+ * @returns {Promise<Full>}
78
+ * @memberof BaseCrud
79
+ */
80
+ async edit(id, ressource) {
81
+ return this.request(
82
+ "POST",
83
+ this.apiEndpoint + "/" + id,
84
+ void 0,
85
+ ressource
86
+ );
87
+ }
88
+ /**
89
+ * delete an ressource
90
+ *
91
+ * @param {string | number} id
92
+ * @returns {Promise<boolean>}
93
+ * @memberof BaseCrud
94
+ */
95
+ async delete(id) {
96
+ return (await this.request(
97
+ "DELETE",
98
+ this.apiEndpoint + "/" + id
99
+ )).success;
100
+ }
101
+ /**
102
+ * Base request to the api
103
+ *
104
+ * @protected
105
+ * @template T
106
+ * @param {string} method
107
+ * @param {string} path
108
+ * @param {BaseStatic.BaseOptions} [options]
109
+ * @param {*} [data]
110
+ * @returns {Promise<T>}
111
+ * @memberof Bexio
112
+ */
113
+ async request(method, path, options, data) {
114
+ let requestOptions = {
115
+ method,
116
+ url: this.baseApiUrl + path + this.optionsToQuery(options),
117
+ headers: {
118
+ Authorization: `Bearer ${this.apiToken}`,
119
+ "Content-Type": "application/json",
120
+ Accept: "application/json"
121
+ }
122
+ };
123
+ if (data) {
124
+ requestOptions.data = data;
125
+ }
126
+ try {
127
+ const reponse = await axios.request(requestOptions);
128
+ return reponse.data;
129
+ } catch (e) {
130
+ const error = e;
131
+ return Promise.reject({
132
+ code: error.response?.status,
133
+ message: error.response?.data
134
+ });
135
+ }
136
+ }
137
+ /**
138
+ * Generates the querystring out of the options
139
+ *
140
+ * @protected
141
+ * @param {BaseStatic.BaseOptions} [options]
142
+ * @returns {string}
143
+ * @memberof Bexio
144
+ */
145
+ optionsToQuery(options) {
146
+ let str = [];
147
+ if (!options) {
148
+ return "";
149
+ }
150
+ for (let i in options) {
151
+ if (options.hasOwnProperty(i)) {
152
+ const value = options[i];
153
+ if (Array.isArray(value)) {
154
+ value.forEach((v) => {
155
+ str.push(encodeURIComponent(i) + "=" + encodeURIComponent(v));
156
+ });
157
+ } else {
158
+ str.push(encodeURIComponent(i) + "=" + encodeURIComponent(value));
159
+ }
160
+ }
161
+ }
162
+ return `?${str.join("&")}`;
163
+ }
164
+ };
165
+
166
+ // src/resources/BusinessActivities.ts
167
+ var ClientServices = class extends BaseCrud {
168
+ constructor(apiToken) {
169
+ super(apiToken, "/2.0/client_service");
170
+ }
171
+ };
172
+
173
+ // src/resources/Contacts.ts
174
+ var Contacts = class extends BaseCrud {
175
+ constructor(apiToken) {
176
+ super(apiToken, "/2.0/contact");
177
+ }
178
+ };
179
+
180
+ // src/resources/ContactTypes.ts
181
+ var ContactTypes = class extends BaseCrud {
182
+ constructor(apiToken) {
183
+ super(apiToken, "/2.0/contact_type");
184
+ }
185
+ /**
186
+ * Not implemented by Bexio yet
187
+ *
188
+ * @param {{}} ressource
189
+ * @returns {Promise<ContactTypesStatic.ContactSector>}
190
+ * @memberof ContactTypes
191
+ */
192
+ async create(ressource) {
193
+ throw new Error("not implemented by Bexio yet");
194
+ }
195
+ /**
196
+ * Not implemented by Bexio yet
197
+ *
198
+ * @param {number} id
199
+ * @param {{}} ressource
200
+ * @returns {Promise<ContactTypesStatic.ContactSector>}
201
+ * @memberof ContactTypes
202
+ */
203
+ async edit(id, ressource) {
204
+ throw new Error("not implemented by Bexio yet");
205
+ }
206
+ /**
207
+ * Not implemented by Bexio yet
208
+ *
209
+ * @param {number} id
210
+ * @param {{}} ressource
211
+ * @returns {Promise<ContactTypesStatic.ContactSector>}
212
+ * @memberof ContactTypes
213
+ */
214
+ async overwrite(id, ressource) {
215
+ throw new Error("not implemented by Bexio yet");
216
+ }
217
+ /**
218
+ * Not implemented by Bexio yet
219
+ *
220
+ * @param {number} id
221
+ * @returns {Promise<boolean>}
222
+ * @memberof ContactTypes
223
+ */
224
+ async delete(id) {
225
+ throw new Error("not implemented by Bexio yet");
226
+ }
227
+ };
228
+
229
+ // src/resources/ContactSectors.ts
230
+ var ContactSectors = class extends BaseCrud {
231
+ constructor(apiToken) {
232
+ super(apiToken, "/2.0/contact_branch");
233
+ }
234
+ /**
235
+ * Not implemented by Bexio yet
236
+ *
237
+ * @param {{}} ressource
238
+ * @returns {Promise<ContactSectorsStatic.ContactSector>}
239
+ * @memberof ContactSectors
240
+ */
241
+ async create(ressource) {
242
+ throw new Error("not implemented by Bexio yet");
243
+ }
244
+ /**
245
+ * Not implemented by Bexio yet
246
+ *
247
+ * @param {number} id
248
+ * @param {{}} ressource
249
+ * @returns {Promise<ContactSectorsStatic.ContactSector>}
250
+ * @memberof ContactSectors
251
+ */
252
+ async edit(id, ressource) {
253
+ throw new Error("not implemented by Bexio yet");
254
+ }
255
+ /**
256
+ * Not implemented by Bexio yet
257
+ *
258
+ * @param {number} id
259
+ * @param {{}} ressource
260
+ * @returns {Promise<ContactSectorsStatic.ContactSector>}
261
+ * @memberof ContactSectors
262
+ */
263
+ async overwrite(id, ressource) {
264
+ throw new Error("not implemented by Bexio yet");
265
+ }
266
+ /**
267
+ * Not implemented by Bexio yet
268
+ *
269
+ * @param {number} id
270
+ * @returns {Promise<boolean>}
271
+ * @memberof ContactSectors
272
+ */
273
+ async delete(id) {
274
+ throw new Error("not implemented by Bexio yet");
275
+ }
276
+ };
277
+
278
+ // src/resources/ContactGroups.ts
279
+ var ContactGroups = class extends BaseCrud {
280
+ constructor(apiToken) {
281
+ super(apiToken, "/2.0/contact_group");
282
+ }
283
+ /**
284
+ * Not implemented by Bexio yet
285
+ *
286
+ * @param {number} id
287
+ * @returns {Promise<boolean>}
288
+ * @memberof ContactGroups
289
+ */
290
+ async delete(id) {
291
+ throw new Error("not implemented by Bexio yet");
292
+ }
293
+ };
294
+
295
+ // src/resources/ContactRelations.ts
296
+ var ContactRelations = class extends BaseCrud {
297
+ constructor(apiToken) {
298
+ super(apiToken, "/2.0/contact_relation");
299
+ }
300
+ };
301
+
302
+ // src/resources/Expenses.ts
303
+ var Expenses = class extends BaseCrud {
304
+ constructor(apiToken) {
305
+ super(apiToken, "/2.0/kb_expense");
306
+ }
307
+ };
308
+
309
+ // src/resources/Payments.ts
310
+ var Payments = class extends BaseCrud {
311
+ constructor(apiToken, billId) {
312
+ super(apiToken, `/2.0/kb_bill/${billId}/payment`);
313
+ }
314
+ /**
315
+ * Not implemented by Bexio yet
316
+ *
317
+ * @param {BaseStatic.BaseOptions} options
318
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
319
+ * @returns {Promise<Array<{}>>}
320
+ * @memberof Payments
321
+ */
322
+ async search(options, searchOptions) {
323
+ throw new Error("not implemented by Bexio yet");
324
+ }
325
+ /**
326
+ * Not implemented by Bexio yet
327
+ *
328
+ * @param {number} id
329
+ * @param {{}} ressource
330
+ * @returns {Promise<PaymentsStatic.Payment>}
331
+ * @memberof Payments
332
+ */
333
+ async overwrite(id, ressource) {
334
+ throw new Error("not implemented by Bexio yet");
335
+ }
336
+ /**
337
+ * Not implemented by Bexio yet
338
+ *
339
+ * @param {number} id
340
+ * @param {Partial<{}>} ressource
341
+ * @returns {Promise<PaymentsStatic.Payment>}
342
+ * @memberof Payments
343
+ */
344
+ async edit(id, ressource) {
345
+ throw new Error("not implemented by Bexio yet");
346
+ }
347
+ };
348
+
349
+ // src/resources/Bills.ts
350
+ var Bills = class extends BaseCrud {
351
+ constructor(apiToken) {
352
+ super(apiToken, "/2.0/kb_bill");
353
+ }
354
+ /**
355
+ * issue a bill
356
+ *
357
+ * @param {number} id
358
+ * @returns {Promise<{ success: boolean }>}
359
+ * @memberof Bills
360
+ */
361
+ async issue(id) {
362
+ return this.request(
363
+ "POST",
364
+ `${this.apiEndpoint}/${id.toString()}/issue`
365
+ );
366
+ }
367
+ /**
368
+ * revert a bill issue
369
+ *
370
+ * @param {number} id
371
+ * @returns {Promise<{ success: boolean }>}
372
+ * @memberof Bills
373
+ */
374
+ async revertIssue(id) {
375
+ return this.request(
376
+ "POST",
377
+ `${this.apiEndpoint}/${id.toString()}/revert_issue`
378
+ );
379
+ }
380
+ /**
381
+ * List all payments for this bill
382
+ *
383
+ * @param {number} billId
384
+ * @param {BaseStatic.BaseOptions} [options]
385
+ * @returns {Promise<PaymentsStatic.Payment[]>}
386
+ * @memberof Bills
387
+ */
388
+ async listPayments(billId, options) {
389
+ const paymentCrud = new Payments(this.apiToken, billId);
390
+ return paymentCrud.list(options);
391
+ }
392
+ /**
393
+ * Show a specific payment for this bill
394
+ *
395
+ * @param {number} billId
396
+ * @param {number} paymentId
397
+ * @param {BaseStatic.BaseOptions} [options]
398
+ * @returns {Promise<PaymentsStatic.Payment>}
399
+ * @memberof Bills
400
+ */
401
+ async showPayment(billId, paymentId, options) {
402
+ const paymentCrud = new Payments(this.apiToken, billId);
403
+ return paymentCrud.show(paymentId, options);
404
+ }
405
+ /**
406
+ * Create a new payment for this bill
407
+ *
408
+ * @param {number} billId
409
+ * @param {PaymentsStatic.PaymentCreate} payment
410
+ * @returns {Promise<PaymentsStatic.Payment>}
411
+ * @memberof Bills
412
+ */
413
+ async createPayment(billId, payment) {
414
+ const paymentCrud = new Payments(this.apiToken, billId);
415
+ return paymentCrud.create(payment);
416
+ }
417
+ /**
418
+ * delete a specific payment for this bill
419
+ *
420
+ * @param {number} billId
421
+ * @param {number} paymentId
422
+ * @returns {Promise<boolean>}
423
+ * @memberof Bills
424
+ */
425
+ async deletePayment(billId, paymentId) {
426
+ const paymentCrud = new Payments(this.apiToken, billId);
427
+ return paymentCrud.delete(paymentId);
428
+ }
429
+ };
430
+
431
+ // src/resources/DefaultPositions.ts
432
+ var DefaultPositions = class extends BaseCrud {
433
+ constructor(apiToken, documentType, documentId) {
434
+ super(
435
+ apiToken,
436
+ `/2.0/${documentType}/${documentId}/kb_position_custom`
437
+ );
438
+ }
439
+ /**
440
+ * Not implemented by Bexio yet
441
+ *
442
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
443
+ * @param {BaseStatic.BaseOptions} [options]
444
+ * @returns {Promise<Array<{}>>}
445
+ * @memberof DefaultPositions
446
+ */
447
+ async search(searchOptions, options) {
448
+ throw new Error("not implemented by Bexio yet");
449
+ }
450
+ /**
451
+ * Not implemented by Bexio yet
452
+ *
453
+ * @param {number} id
454
+ * @param {{}} ressource
455
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
456
+ * @memberof DefaultPositions
457
+ */
458
+ async overwrite(id, ressource) {
459
+ throw new Error("not implemented by Bexio yet");
460
+ }
461
+ /**
462
+ * Not implemented by Bexio yet
463
+ *
464
+ * @param {number} id
465
+ * @param {Partial<{}>} ressource
466
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
467
+ * @memberof DefaultPositions
468
+ */
469
+ async edit(id, ressource) {
470
+ throw new Error("not implemented by Bexio yet");
471
+ }
472
+ };
473
+
474
+ // src/resources/ItemPositions.ts
475
+ var ItemPositions = class extends BaseCrud {
476
+ constructor(apiToken, documentType, documentId) {
477
+ super(
478
+ apiToken,
479
+ `/2.0/${documentType}/${documentId}/kb_position_article`
480
+ );
481
+ }
482
+ /**
483
+ * Not implemented by Bexio yet
484
+ *
485
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
486
+ * @param {BaseStatic.BaseOptions} [options]
487
+ * @returns {Promise<Array<{}>>}
488
+ * @memberof ItemPositions
489
+ */
490
+ async search(searchOptions, options) {
491
+ throw new Error("not implemented by Bexio yet");
492
+ }
493
+ /**
494
+ * Not implemented by Bexio yet
495
+ *
496
+ * @param {number} id
497
+ * @param {{}} ressource
498
+ * @returns {Promise<PositionsStatic.ItemPosition>}
499
+ * @memberof ItemPositions
500
+ */
501
+ async overwrite(id, ressource) {
502
+ throw new Error("not implemented by Bexio yet");
503
+ }
504
+ /**
505
+ * Not implemented by Bexio yet
506
+ *
507
+ * @param {number} id
508
+ * @param {Partial<{}>} ressource
509
+ * @returns {Promise<PositionsStatic.ItemPosition>}
510
+ * @memberof ItemPositions
511
+ */
512
+ async edit(id, ressource) {
513
+ throw new Error("not implemented by Bexio yet");
514
+ }
515
+ };
516
+
517
+ // src/resources/TextPositions.ts
518
+ var TextPositions = class extends BaseCrud {
519
+ constructor(apiToken, documentType, documentId) {
520
+ super(
521
+ apiToken,
522
+ `/2.0/${documentType}/${documentId}/kb_position_text`
523
+ );
524
+ }
525
+ /**
526
+ * Not implemented by Bexio yet
527
+ *
528
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
529
+ * @param {BaseStatic.BaseOptions} [options]
530
+ * @returns {Promise<Array<{}>>}
531
+ * @memberof TextPositions
532
+ */
533
+ async search(searchOptions, options) {
534
+ throw new Error("not implemented by Bexio yet");
535
+ }
536
+ /**
537
+ * Not implemented by Bexio yet
538
+ *
539
+ * @param {number} id
540
+ * @param {{}} ressource
541
+ * @returns {Promise<PositionsStatic.TextPosition>}
542
+ * @memberof TextPositions
543
+ */
544
+ async overwrite(id, ressource) {
545
+ throw new Error("not implemented by Bexio yet");
546
+ }
547
+ /**
548
+ * Not implemented by Bexio yet
549
+ *
550
+ * @param {number} id
551
+ * @param {Partial<{}>} ressource
552
+ * @returns {Promise<PositionsStatic.TextPosition>}
553
+ * @memberof TextPositions
554
+ */
555
+ async edit(id, ressource) {
556
+ throw new Error("not implemented by Bexio yet");
557
+ }
558
+ };
559
+
560
+ // src/resources/Orders.ts
561
+ var Orders = class extends BaseCrud {
562
+ constructor(apiToken) {
563
+ super(apiToken, "/2.0/kb_order");
564
+ }
565
+ /**
566
+ * Create a default position for an order
567
+ *
568
+ * @param {number} orderId
569
+ * @param {PositionsStatic.DefaultPositionCreate} position
570
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
571
+ * @memberof Orders
572
+ */
573
+ async createDefaultPosition(orderId, position) {
574
+ return new DefaultPositions(this.apiToken, "kb_order", orderId).create(
575
+ position
576
+ );
577
+ }
578
+ /**
579
+ * Create an item position for an order
580
+ *
581
+ * @param {number} orderId
582
+ * @param {PositionsStatic.ItemPositionCreate} position
583
+ * @returns {Promise<PositionsStatic.ItemPosition>}
584
+ * @memberof Orders
585
+ */
586
+ async createItemPosition(orderId, position) {
587
+ return new ItemPositions(this.apiToken, "kb_order", orderId).create(
588
+ position
589
+ );
590
+ }
591
+ /**
592
+ * Create a text position for an order
593
+ *
594
+ * @param {number} orderId
595
+ * @param {PositionsStatic.TextPositionCreate} position
596
+ * @returns {Promise<PositionsStatic.TextPosition>}
597
+ * @memberof Orders
598
+ */
599
+ async createTextPosition(orderId, position) {
600
+ return new TextPositions(this.apiToken, "kb_order", orderId).create(
601
+ position
602
+ );
603
+ }
604
+ };
605
+
606
+ // src/resources/Projects.ts
607
+ var Projects = class extends BaseCrud {
608
+ constructor(apiToken) {
609
+ super(apiToken, "/2.0/pr_project");
610
+ }
611
+ };
612
+
613
+ // src/resources/ProjectStatuses.ts
614
+ var ProjectStatuses = class extends BaseCrud {
615
+ constructor(apiToken) {
616
+ super(apiToken, "/2.0/pr_project_state");
617
+ }
618
+ /**
619
+ * Not implemented by Bexio yet
620
+ *
621
+ * @param {number} id
622
+ * @param {{}} ressource
623
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
624
+ * @memberof ProjectStatuses
625
+ */
626
+ async overwrite(id, ressource) {
627
+ throw new Error("not implemented by Bexio yet");
628
+ }
629
+ /**
630
+ * Not implemented by Bexio yet
631
+ *
632
+ * @param {number} id
633
+ * @param {{}} ressource
634
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
635
+ * @memberof ProjectStatuses
636
+ */
637
+ async edit(id, ressource) {
638
+ throw new Error("not implemented by Bexio yet");
639
+ }
640
+ /**
641
+ * Not implemented by Bexio yet
642
+ *
643
+ * @param {{}} ressource
644
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
645
+ * @memberof ProjectStatuses
646
+ */
647
+ async create(ressource) {
648
+ throw new Error("not implemented by Bexio yet");
649
+ }
650
+ /**
651
+ * Not implemented by Bexio yet
652
+ *
653
+ * @param {number} id
654
+ * @returns {Promise<boolean>}
655
+ * @memberof ProjectStatuses
656
+ */
657
+ async delete(id) {
658
+ throw new Error("not implemented by Bexio yet");
659
+ }
660
+ };
661
+
662
+ // src/resources/ProjectTypes.ts
663
+ var ProjectTypes = class extends BaseCrud {
664
+ constructor(apiToken) {
665
+ super(apiToken, "/2.0/pr_project_type");
666
+ }
667
+ /**
668
+ * Not implemented by Bexio yet
669
+ *
670
+ * @param {{}} ressource
671
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
672
+ * @memberof ProjectTypes
673
+ */
674
+ async create(ressource) {
675
+ throw new Error("not implemented by Bexio yet");
676
+ }
677
+ /**
678
+ * Not implemented by Bexio yet
679
+ *
680
+ * @param {number} id
681
+ * @param {{}} ressource
682
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
683
+ * @memberof ProjectTypes
684
+ */
685
+ async edit(id, ressource) {
686
+ throw new Error("not implemented by Bexio yet");
687
+ }
688
+ /**
689
+ * Not implemented by Bexio yet
690
+ *
691
+ * @param {number} id
692
+ * @param {{}} ressource
693
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
694
+ * @memberof ProjectTypes
695
+ */
696
+ async overwrite(id, ressource) {
697
+ throw new Error("not implemented by Bexio yet");
698
+ }
699
+ /**
700
+ * Not implemented by Bexio yet
701
+ *
702
+ * @param {number} id
703
+ * @returns {Promise<boolean>}
704
+ * @memberof ProjectTypes
705
+ */
706
+ async delete(id) {
707
+ throw new Error("not implemented by Bexio yet");
708
+ }
709
+ };
710
+
711
+ // src/resources/Timetrackings.ts
712
+ var Timetrackings = class extends BaseCrud {
713
+ constructor(apiToken) {
714
+ super(apiToken, "/2.0/timesheet");
715
+ }
716
+ /**
717
+ * Not implemented by Bexio yet
718
+ *
719
+ * @param {number} id
720
+ * @param {{}} ressource
721
+ * @returns {Promise<TimetrackingsStatic.TimetrackingsFull>}
722
+ * @memberof Timetracking
723
+ */
724
+ async overwrite(id, ressource) {
725
+ throw new Error("not implemented by Bexio yet");
726
+ }
727
+ };
728
+
729
+ // src/resources/TimetrackingStatuses.ts
730
+ var TimetrackingStatuses = class extends BaseCrud {
731
+ constructor(apiToken) {
732
+ super(apiToken, "/2.0/timesheet_status");
733
+ }
734
+ /**
735
+ * Not implemented by Bexio yet
736
+ *
737
+ * @param {number} id
738
+ * @param {{}} ressource
739
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
740
+ * @memberof TimetrackingStatuses
741
+ */
742
+ async overwrite(id, ressource) {
743
+ throw new Error("not implemented by Bexio yet");
744
+ }
745
+ /**
746
+ * Not implemented by Bexio yet
747
+ *
748
+ * @param {number} id
749
+ * @param {{}} ressource
750
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
751
+ * @memberof TimetrackingStatuses
752
+ */
753
+ async edit(id, ressource) {
754
+ throw new Error("not implemented by Bexio yet");
755
+ }
756
+ /**
757
+ * Not implemented by Bexio yet
758
+ *
759
+ * @param {{}} ressource
760
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
761
+ * @memberof TimetrackingStatuses
762
+ */
763
+ async create(ressource) {
764
+ throw new Error("not implemented by Bexio yet");
765
+ }
766
+ /**
767
+ * Not implemented by Bexio yet
768
+ *
769
+ * @param {number} id
770
+ * @returns {Promise<boolean>}
771
+ * @memberof TimetrackingStatuses
772
+ */
773
+ async delete(id) {
774
+ throw new Error("not implemented by Bexio yet");
775
+ }
776
+ };
777
+
778
+ // src/resources/Users.ts
779
+ var Users = class extends BaseCrud {
780
+ constructor(apiToken) {
781
+ super(apiToken, "/2.0/user");
782
+ }
783
+ /**
784
+ * Not implemented by Bexio yet
785
+ *
786
+ * @param {number} id
787
+ * @param {{}} ressource
788
+ * @returns {Promise<UsersStatic.UserFull>}
789
+ * @memberof Users
790
+ */
791
+ async overwrite(id, ressource) {
792
+ throw new Error("not implemented by Bexio yet");
793
+ }
794
+ /**
795
+ * Not implemented by Bexio yet
796
+ *
797
+ * @param {number} id
798
+ * @param {{}} ressource
799
+ * @returns {Promise<UsersStatic.UserFull>}
800
+ * @memberof Users
801
+ */
802
+ async edit(id, ressource) {
803
+ throw new Error("not implemented by Bexio yet");
804
+ }
805
+ /**
806
+ * Not implemented by Bexio yet
807
+ *
808
+ * @param {{}} ressource
809
+ * @returns {Promise<UsersStatic.UserFull>}
810
+ * @memberof Users
811
+ */
812
+ async create(ressource) {
813
+ throw new Error("not implemented by Bexio yet");
814
+ }
815
+ /**
816
+ * Not implemented by Bexio yet
817
+ *
818
+ * @param {number} id
819
+ * @returns {Promise<boolean>}
820
+ * @memberof Users
821
+ */
822
+ async delete(id) {
823
+ throw new Error("not implemented by Bexio yet");
824
+ }
825
+ };
826
+
827
+ // src/resources/Items.ts
828
+ var Items = class extends BaseCrud {
829
+ constructor(apiToken) {
830
+ super(apiToken, "/2.0/article");
831
+ }
832
+ };
833
+
834
+ // src/resources/Invoices.ts
835
+ var Invoices = class extends BaseCrud {
836
+ constructor(apiToken) {
837
+ super(apiToken, "/2.0/kb_invoice");
838
+ }
839
+ /**
840
+ * Send an invoice by email.
841
+ *
842
+ * @param {number} id
843
+ * @param {Partial<InvoicesStatic.InvoiceSend>} ressource
844
+ * @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
845
+ * @memberof Invoices
846
+ */
847
+ async send(id, ressource) {
848
+ return this.request(
849
+ "POST",
850
+ `${this.apiEndpoint}/${id}/send`,
851
+ void 0,
852
+ ressource
853
+ );
854
+ }
855
+ /**
856
+ * @deprecated Use `send` instead.
857
+ */
858
+ async sent(id, ressource) {
859
+ return this.send(id, ressource);
860
+ }
861
+ async cancel(id) {
862
+ return this.request(
863
+ "POST",
864
+ `${this.apiEndpoint}/${id}/cancel`
865
+ );
866
+ }
867
+ /**
868
+ * This action returns a pdf document of the invoice.
869
+ *
870
+ * @param {number} id
871
+ * @param {0 | 1} [logopaper] Whether the PDF should be generated using the letterhead, or not.
872
+ * @returns {Promise<BaseStatic.PdfResponse>}
873
+ * @memberof Invoices
874
+ */
875
+ async showPdf(id, logopaper) {
876
+ const response = await this.request(
877
+ "GET",
878
+ `${this.apiEndpoint}/${id}/pdf`,
879
+ logopaper !== void 0 ? { logopaper } : void 0
880
+ );
881
+ return {
882
+ ...response,
883
+ content: Buffer.from(response.content, "base64")
884
+ };
885
+ }
886
+ /**
887
+ * Issue an invoice. The invoice must be in the draft status.
888
+ *
889
+ * @param {number} id
890
+ * @returns {Promise<InvoicesStatic.InvoiceIssued>}
891
+ * @memberof Invoices
892
+ */
893
+ async issue(id) {
894
+ return this.request(
895
+ "POST",
896
+ `${this.apiEndpoint}/${id}/issue`
897
+ );
898
+ }
899
+ /**
900
+ * Mark an invoice as sent.
901
+ *
902
+ * @param {number} id
903
+ * @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
904
+ * @memberof Invoices
905
+ */
906
+ async markAsSent(id) {
907
+ return this.request(
908
+ "POST",
909
+ `${this.apiEndpoint}/${id}/mark_as_sent`
910
+ );
911
+ }
912
+ /**
913
+ * revert a Invoice issue
914
+ *
915
+ * @param {number} id
916
+ * @returns {Promise<{ success: boolean }>}
917
+ * @memberof Invoices
918
+ */
919
+ async revertIssue(id) {
920
+ return this.request(
921
+ "POST",
922
+ `${this.apiEndpoint}/${id.toString()}/revert_issue`
923
+ );
924
+ }
925
+ /**
926
+ * Create a payment for an invoice
927
+ *
928
+ * @param {number} invoiceId
929
+ * @param {Date} date
930
+ * @param {string} value
931
+ * @param {number} [bank_account_id]
932
+ * @param {number} [payment_service_id]
933
+ * @return {*} {Promise<InvoicesStatic.Payment>}
934
+ * @memberof Invoices
935
+ */
936
+ async createPayment(invoiceId, date, value, bank_account_id, payment_service_id) {
937
+ return this.request(
938
+ "POST",
939
+ `${this.apiEndpoint}/${invoiceId.toString()}/payment`,
940
+ void 0,
941
+ {
942
+ date: `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, "0")}-${date.getDate().toString().padStart(2, "0")}`,
943
+ value,
944
+ bank_account_id,
945
+ payment_service_id
946
+ }
947
+ );
948
+ }
949
+ /**
950
+ * Get a payment for an invoice
951
+ *
952
+ * @param {number} invoiceId
953
+ * @param {number} paymentId
954
+ * @return {*} {Promise<InvoicesStatic.Payment>}
955
+ * @memberof Invoices
956
+ */
957
+ async getPayment(invoiceId, paymentId) {
958
+ return this.request(
959
+ "GET",
960
+ `${this.apiEndpoint}/${invoiceId.toString()}/payment/${paymentId.toString()}`
961
+ );
962
+ }
963
+ /**
964
+ * Delete a payment for an invoice
965
+ *
966
+ * @param {number} invoiceId
967
+ * @param {number} paymentId
968
+ * @return {*} {Promise<void>}
969
+ * @memberof Invoices
970
+ */
971
+ async deletePayment(invoiceId, paymentId) {
972
+ return this.request(
973
+ "DELETE",
974
+ `${this.apiEndpoint}/${invoiceId.toString()}/payment/${paymentId.toString()}`
975
+ );
976
+ }
977
+ /**
978
+ * Create a default position for an invoice
979
+ *
980
+ * @param {number} invoiceId
981
+ * @param {PositionsStatic.DefaultPositionCreate} position
982
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
983
+ * @memberof Invoices
984
+ */
985
+ async createDefaultPosition(invoiceId, position) {
986
+ return new DefaultPositions(this.apiToken, "kb_invoice", invoiceId).create(
987
+ position
988
+ );
989
+ }
990
+ /**
991
+ * Create an item position for an invoice
992
+ *
993
+ * @param {number} invoiceId
994
+ * @param {PositionsStatic.ItemPositionCreate} position
995
+ * @returns {Promise<PositionsStatic.ItemPosition>}
996
+ * @memberof Invoices
997
+ */
998
+ async createItemPosition(invoiceId, position) {
999
+ return new ItemPositions(this.apiToken, "kb_invoice", invoiceId).create(
1000
+ position
1001
+ );
1002
+ }
1003
+ /**
1004
+ * Create a text position for an invoice
1005
+ *
1006
+ * @param {number} invoiceId
1007
+ * @param {PositionsStatic.TextPositionCreate} position
1008
+ * @returns {Promise<PositionsStatic.TextPosition>}
1009
+ * @memberof Invoices
1010
+ */
1011
+ async createTextPosition(invoiceId, position) {
1012
+ return new TextPositions(this.apiToken, "kb_invoice", invoiceId).create(
1013
+ position
1014
+ );
1015
+ }
1016
+ };
1017
+
1018
+ // src/resources/Currencies.ts
1019
+ var Currencies = class extends BaseCrud {
1020
+ constructor(apiToken) {
1021
+ super(apiToken, `/3.0/currencies`);
1022
+ }
1023
+ /**
1024
+ * NOT IMPLEMENTED BY BEXIO YET
1025
+ *
1026
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
1027
+ * @param {BaseStatic.BaseOptions} [options]
1028
+ * @returns {Promise<Array<{}>>}
1029
+ * @memberof Currencies
1030
+ */
1031
+ async search(searchOptions, options) {
1032
+ throw new Error("not implemented by Bexio yet");
1033
+ }
1034
+ /**
1035
+ * NOT IMPLEMENTED BY BEXIO YET
1036
+ *
1037
+ * @param {number} id
1038
+ * @param {Overwrite} ressource
1039
+ * @returns {Promise<{}>}
1040
+ * @memberof Currencies
1041
+ */
1042
+ async overwrite(id, ressource) {
1043
+ throw new Error("not implemented by Bexio yet");
1044
+ }
1045
+ /**
1046
+ * NOT IMPLEMENTED BY BEXIO YET
1047
+ *
1048
+ * @param {number} id
1049
+ * @param {Partial<{}>} ressource
1050
+ * @returns {Promise<CurrenciesStatic.Currency>}
1051
+ * @memberof BaseCrud
1052
+ */
1053
+ async edit(id, ressource) {
1054
+ throw new Error("not implemented by Bexio yet");
1055
+ }
1056
+ };
1057
+
1058
+ // src/resources/BillsV4.ts
1059
+ var BillsV4 = class extends BaseCrud {
1060
+ constructor(apiToken) {
1061
+ super(apiToken, "/4.0/purchase/bills");
1062
+ }
1063
+ /**
1064
+ * Lists the ressource
1065
+ *
1066
+ * @param {BillsV4Static.ListOptions} [options]
1067
+ * @returns {Promise<Array<BillsV4Static.Bill>>}
1068
+ * @memberof BillsV4
1069
+ */
1070
+ async list(options) {
1071
+ const resp = await this.request("GET", this.apiEndpoint, options);
1072
+ return resp.data;
1073
+ }
1074
+ /**
1075
+ * Not implemented by Bexio yet
1076
+ *
1077
+ * @param {Array<BaseStatic.SearchParameter<BillsV4Static.SearchParameters>>} searchOptions
1078
+ * @param {BaseStatic.BaseOptions} [options]
1079
+ * @returns {Promise<BillsV4Static.Bill[]>}
1080
+ * @memberof BillsV4
1081
+ */
1082
+ async search(searchOptions, options) {
1083
+ throw new Error("not implemented by Bexio yet");
1084
+ }
1085
+ /**
1086
+ * Update bill status
1087
+ *
1088
+ * @param {string} id
1089
+ * @param {BillsV4Static.BillStatusUpdate} status
1090
+ * @returns {Promise<BillsV4Static.BillFull>}
1091
+ * @memberof BillsV4
1092
+ */
1093
+ async updateStatus(id, status) {
1094
+ return this.request(
1095
+ "PUT",
1096
+ `${this.apiEndpoint}/${id}/bookings/${status}`
1097
+ );
1098
+ }
1099
+ /**
1100
+ * Execute bill action
1101
+ *
1102
+ * @param {string} id
1103
+ * @param {BillsV4Static.BillAction} action
1104
+ * @returns {Promise<BillsV4Static.BillFull>}
1105
+ * @memberof BillsV4
1106
+ */
1107
+ async executeAction(id, action) {
1108
+ return this.request(
1109
+ "POST",
1110
+ `${this.apiEndpoint}/${id}/actions`,
1111
+ void 0,
1112
+ { action }
1113
+ );
1114
+ }
1115
+ /**
1116
+ * Validate whether document number is available or not
1117
+ *
1118
+ * @param {string} documentNo
1119
+ * @returns {Promise<{ valid: boolean; next_available_no: string }>}
1120
+ * @memberof BillsV4
1121
+ */
1122
+ async validateDocumentNumber(documentNo) {
1123
+ return this.request(
1124
+ "GET",
1125
+ "/4.0/purchase/documentnumbers/bills",
1126
+ { document_no: documentNo }
1127
+ );
1128
+ }
1129
+ };
1130
+
1131
+ // src/resources/OutgoingPayments.ts
1132
+ var OutgoingPayments = class extends BaseCrud {
1133
+ constructor(apiToken) {
1134
+ super(apiToken, "/4.0/purchase/outgoing-payments");
1135
+ }
1136
+ /**
1137
+ * search for resources - Not implemented for OutgoingPayments V4
1138
+ *
1139
+ * @memberof OutgoingPayments
1140
+ */
1141
+ async search() {
1142
+ throw new Error("Method not implemented.");
1143
+ }
1144
+ /**
1145
+ * overwrite an existing outgoing payment - Not implemented for OutgoingPayments V4
1146
+ *
1147
+ * @memberof OutgoingPayments
1148
+ */
1149
+ async overwrite(id, ressource) {
1150
+ throw new Error("Method not implemented. Use update() instead.");
1151
+ }
1152
+ /**
1153
+ * edit an existing outgoing payment - Not implemented for OutgoingPayments V4
1154
+ *
1155
+ * @memberof OutgoingPayments
1156
+ */
1157
+ async edit(id, ressource) {
1158
+ throw new Error("Method not implemented. Use update() instead.");
1159
+ }
1160
+ /**
1161
+ * delete an existing outgoing payment
1162
+ *
1163
+ * @param {T} id
1164
+ * @returns {Promise<any>}
1165
+ * @memberof OutgoingPayments
1166
+ */
1167
+ async delete(id) {
1168
+ const resp = await this.request("DELETE", `${this.apiEndpoint}/${id}`);
1169
+ if (!resp || resp && Object.keys(resp).length === 0) {
1170
+ return true;
1171
+ }
1172
+ throw new Error(`Failed to delete outgoing payment with id ${id}`);
1173
+ }
1174
+ /**
1175
+ * cancel an existing outgoing payment
1176
+ *
1177
+ * @param {string} id
1178
+ * @returns {Promise<void>}
1179
+ * @memberof OutgoingPayments
1180
+ */
1181
+ async cancel(id) {
1182
+ return this.request("POST", `${this.apiEndpoint}/${id}/cancel`);
1183
+ }
1184
+ /**
1185
+ * edit an existing outgoing payment
1186
+ *
1187
+ * @param {OutgoingPaymentsStatic.OutgoingPaymentUpdate} data
1188
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment>}
1189
+ * @memberof OutgoingPayments
1190
+ */
1191
+ async update(data) {
1192
+ return this.request(
1193
+ "PUT",
1194
+ this.apiEndpoint,
1195
+ void 0,
1196
+ data
1197
+ );
1198
+ }
1199
+ /**
1200
+ * Lists the outgoing payments
1201
+ *
1202
+ * @param {OutgoingPaymentsStatic.ListOptions} options
1203
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment[]>}
1204
+ * @memberof OutgoingPayments
1205
+ */
1206
+ async list(options) {
1207
+ const response = await this.request("GET", this.apiEndpoint, options);
1208
+ return response.data;
1209
+ }
1210
+ /**
1211
+ * create a new outgoing payment
1212
+ *
1213
+ * @param {OutgoingPaymentsStatic.OutgoingPaymentCreate} data
1214
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment>}
1215
+ * @memberof OutgoingPayments
1216
+ */
1217
+ async create(data) {
1218
+ return this.request(
1219
+ "POST",
1220
+ this.apiEndpoint,
1221
+ void 0,
1222
+ data
1223
+ );
1224
+ }
1225
+ };
1226
+
1227
+ // src/resources/BankAccounts.ts
1228
+ var BankAccounts = class extends BaseCrud {
1229
+ constructor(apiToken) {
1230
+ super(apiToken, "/3.0/banking/accounts");
1231
+ }
1232
+ /**
1233
+ * NOT IMPLEMENTED BY BEXIO YET
1234
+ *
1235
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
1236
+ * @param {BaseStatic.BaseOptions} [options]
1237
+ * @returns {Promise<Array<{}>>}
1238
+ * @memberof BankAccounts
1239
+ */
1240
+ async search(searchOptions, options) {
1241
+ throw new Error("not implemented by Bexio yet");
1242
+ }
1243
+ /**
1244
+ * NOT IMPLEMENTED BY BEXIO YET
1245
+ *
1246
+ * @param {number} id
1247
+ * @param {{}} ressource
1248
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
1249
+ * @memberof BankAccounts
1250
+ */
1251
+ async overwrite(id, ressource) {
1252
+ throw new Error("not implemented by Bexio yet");
1253
+ }
1254
+ /**
1255
+ * NOT IMPLEMENTED BY BEXIO YET
1256
+ *
1257
+ * @param {number} id
1258
+ * @param {Partial<{}>} ressource
1259
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
1260
+ * @memberof BankAccounts
1261
+ */
1262
+ async edit(id, ressource) {
1263
+ throw new Error("not implemented by Bexio yet");
1264
+ }
1265
+ /**
1266
+ * NOT IMPLEMENTED BY BEXIO YET
1267
+ *
1268
+ * @param {{}} ressource
1269
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
1270
+ * @memberof BankAccounts
1271
+ */
1272
+ async create(ressource) {
1273
+ throw new Error("not implemented by Bexio yet");
1274
+ }
1275
+ /**
1276
+ * NOT IMPLEMENTED BY BEXIO YET
1277
+ *
1278
+ * @param {number} id
1279
+ * @returns {Promise<boolean>}
1280
+ * @memberof BankAccounts
1281
+ */
1282
+ async delete(id) {
1283
+ throw new Error("not implemented by Bexio yet");
1284
+ }
1285
+ };
1286
+
1287
+ // src/resources/Accounts.ts
1288
+ var Accounts = class extends BaseCrud {
1289
+ constructor(apiToken) {
1290
+ super(apiToken, "/2.0/accounts");
1291
+ }
1292
+ /**
1293
+ * show a specific ressource
1294
+ *
1295
+ * @param {string | number} id
1296
+ * @param {BaseStatic.BaseOptions} [options]
1297
+ * @returns {Promise<AccountsStatic.Account>}
1298
+ * @memberof Accounts
1299
+ */
1300
+ async show(id, options) {
1301
+ throw new Error("not implemented by Bexio yet");
1302
+ }
1303
+ /**
1304
+ * create a new ressource
1305
+ *
1306
+ * @param {AccountsStatic.Account} ressource
1307
+ * @returns {Promise<AccountsStatic.Account>}
1308
+ * @memberof Accounts
1309
+ */
1310
+ async create(ressource) {
1311
+ throw new Error("not implemented by Bexio yet");
1312
+ }
1313
+ /**
1314
+ * overwrite an existing ressource
1315
+ *
1316
+ * @param {number} id
1317
+ * @param {AccountsStatic.Account} ressource
1318
+ * @returns {Promise<AccountsStatic.Account>}
1319
+ * @memberof Accounts
1320
+ */
1321
+ async overwrite(id, ressource) {
1322
+ throw new Error("not implemented by Bexio yet");
1323
+ }
1324
+ /**
1325
+ * edit an existing ressource
1326
+ *
1327
+ * @param {number} id
1328
+ * @param {Partial<AccountsStatic.Account>} ressource
1329
+ * @returns {Promise<AccountsStatic.Account>}
1330
+ * @memberof Accounts
1331
+ */
1332
+ async edit(id, ressource) {
1333
+ throw new Error("not implemented by Bexio yet");
1334
+ }
1335
+ /**
1336
+ * delete a ressource
1337
+ *
1338
+ * @param {number} id
1339
+ * @returns {Promise<boolean>}
1340
+ * @memberof Accounts
1341
+ */
1342
+ async delete(id) {
1343
+ throw new Error("not implemented by Bexio yet");
1344
+ }
1345
+ };
1346
+
1347
+ // src/resources/ManualEntries.ts
1348
+ var ManualEntries = class extends BaseCrud {
1349
+ constructor(apiToken) {
1350
+ super(apiToken, "/3.0/accounting/manual_entries");
1351
+ }
1352
+ /**
1353
+ * Lists the manual entries
1354
+ *
1355
+ * @param {ManualEntriesStatic.ListOptions} [options]
1356
+ * @returns {Promise<Array<ManualEntriesStatic.ManualEntry>>}
1357
+ * @memberof ManualEntries
1358
+ */
1359
+ async list(options) {
1360
+ return this.request(
1361
+ "GET",
1362
+ this.apiEndpoint,
1363
+ options
1364
+ );
1365
+ }
1366
+ /**
1367
+ * Not implemented by Bexio yet
1368
+ *
1369
+ * @param {string | number} id
1370
+ * @param {BaseStatic.BaseOptions} [options]
1371
+ * @returns {Promise<ManualEntriesStatic.ManualEntry>}
1372
+ * @memberof ManualEntries
1373
+ */
1374
+ async show(id, options) {
1375
+ throw new Error("not implemented by Bexio yet");
1376
+ }
1377
+ /**
1378
+ * Not implemented by Bexio yet
1379
+ *
1380
+ * @param {Array<BaseStatic.SearchParameter<ManualEntriesStatic.SearchParameters>>} searchOptions
1381
+ * @param {BaseStatic.BaseOptions} [options]
1382
+ * @returns {Promise<ManualEntriesStatic.ManualEntry[]>}
1383
+ * @memberof ManualEntries
1384
+ */
1385
+ async search(searchOptions, options) {
1386
+ throw new Error("not implemented by Bexio yet");
1387
+ }
1388
+ /**
1389
+ * Not implemented by Bexio yet
1390
+ *
1391
+ * @param {number} id
1392
+ * @param {Partial<ManualEntriesStatic.ManualEntryUpdate>} ressource
1393
+ * @returns {Promise<ManualEntriesStatic.ManualEntry>}
1394
+ * @memberof ManualEntries
1395
+ */
1396
+ async edit(id, ressource) {
1397
+ throw new Error("not implemented by Bexio yet");
1398
+ }
1399
+ /**
1400
+ * Get the next reference number for a manual entry
1401
+ *
1402
+ * @returns {Promise<{ next_ref_nr: string }>}
1403
+ * @memberof ManualEntries
1404
+ */
1405
+ async getNextReferenceNumber() {
1406
+ return this.request(
1407
+ "GET",
1408
+ `${this.apiEndpoint}/next_ref_nr`
1409
+ );
1410
+ }
1411
+ };
1412
+
1413
+ // src/resources/Taxes.ts
1414
+ var Taxes = class extends BaseCrud {
1415
+ constructor(accessToken) {
1416
+ super(accessToken, "/3.0/taxes");
1417
+ }
1418
+ /**
1419
+ * Lists the taxes
1420
+ *
1421
+ * @param {TaxesStatic.TaxOptions} [options]
1422
+ * @returns {Promise<TaxesStatic.Tax[]>}
1423
+ * @memberof Taxes
1424
+ */
1425
+ async list(options) {
1426
+ return super.list(options);
1427
+ }
1428
+ /**
1429
+ * Search for taxes is not implemented in the API.
1430
+ * Use list() with parameters instead.
1431
+ */
1432
+ async search() {
1433
+ throw new Error("Method not implemented.");
1434
+ }
1435
+ /**
1436
+ * Create a tax is not implemented in the API.
1437
+ */
1438
+ async create() {
1439
+ throw new Error("Method not implemented.");
1440
+ }
1441
+ /**
1442
+ * Overwrite a tax is not implemented in the API.
1443
+ */
1444
+ async overwrite() {
1445
+ throw new Error("Method not implemented.");
1446
+ }
1447
+ /**
1448
+ * Edit a tax is not implemented in the API.
1449
+ */
1450
+ async edit() {
1451
+ throw new Error("Method not implemented.");
1452
+ }
1453
+ };
1454
+
1455
+ // src/interfaces/BillsStatic.ts
1456
+ var BillsStatic;
1457
+ ((BillsStatic2) => {
1458
+ let SearchParameters;
1459
+ ((SearchParameters2) => {
1460
+ SearchParameters2["id"] = "id";
1461
+ SearchParameters2["kb_item_status_id"] = "kb_item_status_id";
1462
+ SearchParameters2["document_nr"] = "document_nr";
1463
+ SearchParameters2["title"] = "title";
1464
+ SearchParameters2["contact_id"] = "contact_id";
1465
+ SearchParameters2["contact_sub_id"] = "contact_sub_id";
1466
+ SearchParameters2["user_id"] = "user_id";
1467
+ SearchParameters2["currency_id"] = "currency_id";
1468
+ SearchParameters2["total_gross"] = "total_gross";
1469
+ SearchParameters2["total_net"] = "total_net";
1470
+ SearchParameters2["total"] = "total";
1471
+ SearchParameters2["is_valid_from"] = "is_valid_from";
1472
+ SearchParameters2["is_valid_to"] = "is_valid_to";
1473
+ SearchParameters2["is_valid_until"] = "is_valid_until";
1474
+ SearchParameters2["updated_at"] = "updated_at";
1475
+ })(SearchParameters = BillsStatic2.SearchParameters || (BillsStatic2.SearchParameters = {}));
1476
+ })(BillsStatic || (BillsStatic = {}));
1477
+
1478
+ // src/interfaces/BusinessActivitiesStatic.ts
1479
+ var BusinessActivitiesStatic;
1480
+ ((BusinessActivitiesStatic2) => {
1481
+ let BusinessActivitySearchParameters;
1482
+ ((BusinessActivitySearchParameters2) => {
1483
+ BusinessActivitySearchParameters2["name"] = "name";
1484
+ })(BusinessActivitySearchParameters = BusinessActivitiesStatic2.BusinessActivitySearchParameters || (BusinessActivitiesStatic2.BusinessActivitySearchParameters = {}));
1485
+ })(BusinessActivitiesStatic || (BusinessActivitiesStatic = {}));
1486
+
1487
+ // src/interfaces/CalendarStatic.ts
1488
+ var CalendarStatic;
1489
+ ((CalendarStatic2) => {
1490
+ let SearchParameters;
1491
+ ((SearchParameters2) => {
1492
+ SearchParameters2["event_start"] = "event_start";
1493
+ SearchParameters2["event_end"] = "event_end";
1494
+ SearchParameters2["contact_id"] = "contact_id";
1495
+ SearchParameters2["user_id"] = "user_id";
1496
+ SearchParameters2["subject"] = "subject";
1497
+ SearchParameters2["place"] = "place";
1498
+ SearchParameters2["module_id"] = "module_id";
1499
+ SearchParameters2["entry_id"] = "entry_id";
1500
+ })(SearchParameters = CalendarStatic2.SearchParameters || (CalendarStatic2.SearchParameters = {}));
1501
+ })(CalendarStatic || (CalendarStatic = {}));
1502
+
1503
+ // src/interfaces/ContactGroupsStatic.ts
1504
+ var ContactGroupsStatic;
1505
+ ((ContactGroupsStatic2) => {
1506
+ let ContactGroupSearchParameters;
1507
+ ((ContactGroupSearchParameters2) => {
1508
+ ContactGroupSearchParameters2["name"] = "name";
1509
+ })(ContactGroupSearchParameters = ContactGroupsStatic2.ContactGroupSearchParameters || (ContactGroupsStatic2.ContactGroupSearchParameters = {}));
1510
+ })(ContactGroupsStatic || (ContactGroupsStatic = {}));
1511
+
1512
+ // src/interfaces/ContactRelationsStatic.ts
1513
+ var ContactRelationsStatic;
1514
+ ((ContactRelationsStatic2) => {
1515
+ let ContactRelationSearchParameters;
1516
+ ((ContactRelationSearchParameters2) => {
1517
+ ContactRelationSearchParameters2["contact_id"] = "contact_id";
1518
+ ContactRelationSearchParameters2["contact_sub_id"] = "contact_sub_id";
1519
+ ContactRelationSearchParameters2["updated_at"] = "updated_at";
1520
+ })(ContactRelationSearchParameters = ContactRelationsStatic2.ContactRelationSearchParameters || (ContactRelationsStatic2.ContactRelationSearchParameters = {}));
1521
+ })(ContactRelationsStatic || (ContactRelationsStatic = {}));
1522
+
1523
+ // src/interfaces/ContactSectorsStatic.ts
1524
+ var ContactSectorsStatic;
1525
+ ((ContactSectorsStatic2) => {
1526
+ let ContactSectorSearchParameters;
1527
+ ((ContactSectorSearchParameters2) => {
1528
+ ContactSectorSearchParameters2["name"] = "name";
1529
+ })(ContactSectorSearchParameters = ContactSectorsStatic2.ContactSectorSearchParameters || (ContactSectorsStatic2.ContactSectorSearchParameters = {}));
1530
+ })(ContactSectorsStatic || (ContactSectorsStatic = {}));
1531
+
1532
+ // src/interfaces/ContactTypesStatic.ts
1533
+ var ContactTypesStatic;
1534
+ ((ContactTypesStatic2) => {
1535
+ let ContactTypeSearchParameters;
1536
+ ((ContactTypeSearchParameters2) => {
1537
+ ContactTypeSearchParameters2["name"] = "name";
1538
+ })(ContactTypeSearchParameters = ContactTypesStatic2.ContactTypeSearchParameters || (ContactTypesStatic2.ContactTypeSearchParameters = {}));
1539
+ })(ContactTypesStatic || (ContactTypesStatic = {}));
1540
+
1541
+ // src/interfaces/ContactsStatic.ts
1542
+ var ContactsStatic;
1543
+ ((ContactsStatic2) => {
1544
+ let ContactSearchParameters;
1545
+ ((ContactSearchParameters2) => {
1546
+ ContactSearchParameters2["id"] = "id";
1547
+ ContactSearchParameters2["name_1"] = "name_1";
1548
+ ContactSearchParameters2["name_2"] = "name_2";
1549
+ ContactSearchParameters2["nr"] = "nr";
1550
+ ContactSearchParameters2["address"] = "address";
1551
+ ContactSearchParameters2["mail"] = "mail";
1552
+ ContactSearchParameters2["mail_second"] = "mail_second";
1553
+ ContactSearchParameters2["postcode"] = "postcode";
1554
+ ContactSearchParameters2["city"] = "city";
1555
+ ContactSearchParameters2["country_id"] = "country_id";
1556
+ ContactSearchParameters2["contact_group_ids"] = "contact_group_ids";
1557
+ ContactSearchParameters2["contact_type_id"] = "contact_type_id";
1558
+ ContactSearchParameters2["updated_at"] = "updated_at";
1559
+ ContactSearchParameters2["user_id"] = "user_id";
1560
+ ContactSearchParameters2["phone_fixed"] = "phone_fixed";
1561
+ ContactSearchParameters2["phone_mobile"] = "phone_mobile";
1562
+ ContactSearchParameters2["fax"] = "fax";
1563
+ })(ContactSearchParameters = ContactsStatic2.ContactSearchParameters || (ContactsStatic2.ContactSearchParameters = {}));
1564
+ })(ContactsStatic || (ContactsStatic = {}));
1565
+
1566
+ // src/interfaces/ExpensesStatic.ts
1567
+ var ExpensesStatic;
1568
+ ((ExpensesStatic2) => {
1569
+ let SearchParameters;
1570
+ ((SearchParameters2) => {
1571
+ SearchParameters2["id"] = "id";
1572
+ SearchParameters2["kb_item_status_id"] = "kb_item_status_id";
1573
+ SearchParameters2["document_nr"] = "document_nr";
1574
+ SearchParameters2["title"] = "title";
1575
+ SearchParameters2["contact_id"] = "contact_id";
1576
+ SearchParameters2["contact_sub_id"] = "contact_sub_id";
1577
+ SearchParameters2["user_id"] = "user_id";
1578
+ SearchParameters2["currency_id"] = "currency_id";
1579
+ SearchParameters2["total_gross"] = "total_gross";
1580
+ SearchParameters2["total_net"] = "total_net";
1581
+ SearchParameters2["total"] = "total";
1582
+ SearchParameters2["is_valid_from"] = "is_valid_from";
1583
+ SearchParameters2["is_valid_to"] = "is_valid_to";
1584
+ SearchParameters2["is_valid_until"] = "is_valid_until";
1585
+ SearchParameters2["updated_at"] = "updated_at";
1586
+ })(SearchParameters = ExpensesStatic2.SearchParameters || (ExpensesStatic2.SearchParameters = {}));
1587
+ })(ExpensesStatic || (ExpensesStatic = {}));
1588
+
1589
+ // src/interfaces/NotesStatic.ts
1590
+ var NotesStatic;
1591
+ ((NotesStatic2) => {
1592
+ let SearchParameters;
1593
+ ((SearchParameters2) => {
1594
+ SearchParameters2["event_start"] = "event_start";
1595
+ SearchParameters2["contact_id"] = "contact_id";
1596
+ SearchParameters2["user_id"] = "user_id";
1597
+ SearchParameters2["subject"] = "subject";
1598
+ SearchParameters2["module_id"] = "module_id";
1599
+ SearchParameters2["entry_id"] = "entry_id";
1600
+ })(SearchParameters = NotesStatic2.SearchParameters || (NotesStatic2.SearchParameters = {}));
1601
+ })(NotesStatic || (NotesStatic = {}));
1602
+
1603
+ // src/interfaces/OrdersStatic.ts
1604
+ var OrdersStatic;
1605
+ ((OrdersStatic2) => {
1606
+ let OrderSearchParameters;
1607
+ ((OrderSearchParameters2) => {
1608
+ OrderSearchParameters2["id"] = "id";
1609
+ OrderSearchParameters2["kb_item_status_id"] = "kb_item_status_id";
1610
+ OrderSearchParameters2["document_nr"] = "document_nr";
1611
+ OrderSearchParameters2["title"] = "title";
1612
+ OrderSearchParameters2["contact_id"] = "contact_id";
1613
+ OrderSearchParameters2["contact_sub_id"] = "contact_sub_id";
1614
+ OrderSearchParameters2["user_id"] = "user_id";
1615
+ OrderSearchParameters2["currency_id"] = "currency_id";
1616
+ OrderSearchParameters2["total_gross"] = "total_gross";
1617
+ OrderSearchParameters2["total_net"] = "total_net";
1618
+ OrderSearchParameters2["total"] = "total";
1619
+ OrderSearchParameters2["is_valid_from"] = "is_valid_from";
1620
+ OrderSearchParameters2["is_valid_to"] = "is_valid_to";
1621
+ OrderSearchParameters2["is_valid_until"] = "is_valid_until";
1622
+ OrderSearchParameters2["updated_at"] = "updated_at";
1623
+ })(OrderSearchParameters = OrdersStatic2.OrderSearchParameters || (OrdersStatic2.OrderSearchParameters = {}));
1624
+ })(OrdersStatic || (OrdersStatic = {}));
1625
+
1626
+ // src/interfaces/ProjectsStatic.ts
1627
+ var ProjectsStatic;
1628
+ ((ProjectsStatic2) => {
1629
+ let ProjectSearchParameters;
1630
+ ((ProjectSearchParameters2) => {
1631
+ ProjectSearchParameters2["name"] = "name";
1632
+ ProjectSearchParameters2["contact_id"] = "contact_id";
1633
+ ProjectSearchParameters2["pr_state_id"] = "pr_state_id";
1634
+ })(ProjectSearchParameters = ProjectsStatic2.ProjectSearchParameters || (ProjectsStatic2.ProjectSearchParameters = {}));
1635
+ })(ProjectsStatic || (ProjectsStatic = {}));
1636
+
1637
+ // src/interfaces/ProjectStatusesStatic.ts
1638
+ var ProjectStatusesStatic;
1639
+ ((ProjectStatusesStatic2) => {
1640
+ let ProjectStatusSearchParameters;
1641
+ ((ProjectStatusSearchParameters2) => {
1642
+ ProjectStatusSearchParameters2["text"] = "text";
1643
+ })(ProjectStatusSearchParameters = ProjectStatusesStatic2.ProjectStatusSearchParameters || (ProjectStatusesStatic2.ProjectStatusSearchParameters = {}));
1644
+ })(ProjectStatusesStatic || (ProjectStatusesStatic = {}));
1645
+
1646
+ // src/interfaces/ProjectTypesStatic.ts
1647
+ var ProjectTypesStatic;
1648
+ ((ProjectTypesStatic2) => {
1649
+ let ProjectTypeSearchParameters;
1650
+ ((ProjectTypeSearchParameters2) => {
1651
+ ProjectTypeSearchParameters2["project_type"] = "project_type";
1652
+ })(ProjectTypeSearchParameters = ProjectTypesStatic2.ProjectTypeSearchParameters || (ProjectTypesStatic2.ProjectTypeSearchParameters = {}));
1653
+ })(ProjectTypesStatic || (ProjectTypesStatic = {}));
1654
+
1655
+ // src/interfaces/SalesOrderManagementStatic.ts
1656
+ var SalesOrderManagementStatic;
1657
+ ((SalesOrderManagementStatic2) => {
1658
+ let EstimateSearchParameters;
1659
+ ((EstimateSearchParameters2) => {
1660
+ EstimateSearchParameters2["id"] = "id";
1661
+ EstimateSearchParameters2["kb_item_status_id"] = "kb_item_status_id";
1662
+ EstimateSearchParameters2["document_nr"] = "document_nr";
1663
+ EstimateSearchParameters2["title"] = "title";
1664
+ EstimateSearchParameters2["contact_id"] = "contact_id";
1665
+ EstimateSearchParameters2["contact_sub_id"] = "contact_sub_id";
1666
+ EstimateSearchParameters2["user_id"] = "user_id";
1667
+ EstimateSearchParameters2["currency_id"] = "currency_id";
1668
+ EstimateSearchParameters2["total_gross"] = "total_gross";
1669
+ EstimateSearchParameters2["total_net"] = "total_net";
1670
+ EstimateSearchParameters2["total"] = "total";
1671
+ EstimateSearchParameters2["is_valid_from"] = "is_valid_from";
1672
+ EstimateSearchParameters2["is_valid_to"] = "is_valid_to";
1673
+ EstimateSearchParameters2["is_valid_until"] = "is_valid_until";
1674
+ EstimateSearchParameters2["updated_at"] = "updated_at";
1675
+ })(EstimateSearchParameters = SalesOrderManagementStatic2.EstimateSearchParameters || (SalesOrderManagementStatic2.EstimateSearchParameters = {}));
1676
+ let CommentSearchParameters;
1677
+ ((CommentSearchParameters2) => {
1678
+ CommentSearchParameters2["id"] = "id";
1679
+ CommentSearchParameters2["user_id"] = "user_id";
1680
+ CommentSearchParameters2["text"] = "text";
1681
+ CommentSearchParameters2["date"] = "date";
1682
+ CommentSearchParameters2["is_public"] = "is_public";
1683
+ })(CommentSearchParameters = SalesOrderManagementStatic2.CommentSearchParameters || (SalesOrderManagementStatic2.CommentSearchParameters = {}));
1684
+ let OrderSearchParameters;
1685
+ ((OrderSearchParameters2) => {
1686
+ OrderSearchParameters2["id"] = "id";
1687
+ OrderSearchParameters2["kb_item_status_id"] = "kb_item_status_id";
1688
+ OrderSearchParameters2["document_nr"] = "document_nr";
1689
+ OrderSearchParameters2["title"] = "title";
1690
+ OrderSearchParameters2["contact_id"] = "contact_id";
1691
+ OrderSearchParameters2["contact_sub_id"] = "contact_sub_id";
1692
+ OrderSearchParameters2["user_id"] = "user_id";
1693
+ OrderSearchParameters2["currency_id"] = "currency_id";
1694
+ OrderSearchParameters2["total_gross"] = "total_gross";
1695
+ OrderSearchParameters2["total_net"] = "total_net";
1696
+ OrderSearchParameters2["total"] = "total";
1697
+ OrderSearchParameters2["is_valid_from"] = "is_valid_from";
1698
+ OrderSearchParameters2["is_valid_to"] = "is_valid_to";
1699
+ OrderSearchParameters2["is_valid_until"] = "is_valid_until";
1700
+ OrderSearchParameters2["updated_at"] = "updated_at";
1701
+ })(OrderSearchParameters = SalesOrderManagementStatic2.OrderSearchParameters || (SalesOrderManagementStatic2.OrderSearchParameters = {}));
1702
+ let InvoiceSearchParameters;
1703
+ ((InvoiceSearchParameters2) => {
1704
+ InvoiceSearchParameters2["id"] = "id";
1705
+ InvoiceSearchParameters2["kb_item_status_id"] = "kb_item_status_id";
1706
+ InvoiceSearchParameters2["document_nr"] = "document_nr";
1707
+ InvoiceSearchParameters2["title"] = "title";
1708
+ InvoiceSearchParameters2["contact_id"] = "contact_id";
1709
+ InvoiceSearchParameters2["contact_sub_id"] = "contact_sub_id";
1710
+ InvoiceSearchParameters2["user_id"] = "user_id";
1711
+ InvoiceSearchParameters2["currency_id"] = "currency_id";
1712
+ InvoiceSearchParameters2["total_gross"] = "total_gross";
1713
+ InvoiceSearchParameters2["total_net"] = "total_net";
1714
+ InvoiceSearchParameters2["total"] = "total";
1715
+ InvoiceSearchParameters2["is_valid_from"] = "is_valid_from";
1716
+ InvoiceSearchParameters2["is_valid_to"] = "is_valid_to";
1717
+ InvoiceSearchParameters2["is_valid_until"] = "is_valid_until";
1718
+ InvoiceSearchParameters2["updated_at"] = "updated_at";
1719
+ })(InvoiceSearchParameters = SalesOrderManagementStatic2.InvoiceSearchParameters || (SalesOrderManagementStatic2.InvoiceSearchParameters = {}));
1720
+ })(SalesOrderManagementStatic || (SalesOrderManagementStatic = {}));
1721
+
1722
+ // src/interfaces/TimetrackingsStatic.ts
1723
+ var TimetrackingsStatic;
1724
+ ((TimetrackingsStatic2) => {
1725
+ let TimetrackingsSearchParameters;
1726
+ ((TimetrackingsSearchParameters2) => {
1727
+ TimetrackingsSearchParameters2["id"] = "id";
1728
+ TimetrackingsSearchParameters2["client_service_id"] = "client_service_id";
1729
+ TimetrackingsSearchParameters2["contact_id"] = "contact_id";
1730
+ TimetrackingsSearchParameters2["user_id"] = "user_id";
1731
+ TimetrackingsSearchParameters2["pr_project_id"] = "pr_project_id";
1732
+ TimetrackingsSearchParameters2["status_id"] = "status_id";
1733
+ })(TimetrackingsSearchParameters = TimetrackingsStatic2.TimetrackingsSearchParameters || (TimetrackingsStatic2.TimetrackingsSearchParameters = {}));
1734
+ })(TimetrackingsStatic || (TimetrackingsStatic = {}));
1735
+
1736
+ // src/interfaces/TimetrackingStatusesStatic.ts
1737
+ var TimetrackingStatusesStatic;
1738
+ ((TimetrackingStatusesStatic2) => {
1739
+ let TimetrackingStatusesSearchparameters;
1740
+ ((TimetrackingStatusesSearchparameters2) => {
1741
+ TimetrackingStatusesSearchparameters2["name"] = "name";
1742
+ })(TimetrackingStatusesSearchparameters = TimetrackingStatusesStatic2.TimetrackingStatusesSearchparameters || (TimetrackingStatusesStatic2.TimetrackingStatusesSearchparameters = {}));
1743
+ })(TimetrackingStatusesStatic || (TimetrackingStatusesStatic = {}));
1744
+
1745
+ // src/interfaces/UsersStatic.ts
1746
+ var UsersStatic;
1747
+ ((UsersStatic2) => {
1748
+ let UsersSearchparameters;
1749
+ ((UsersSearchparameters2) => {
1750
+ UsersSearchparameters2["id"] = "id";
1751
+ UsersSearchparameters2["nickname"] = "nickname";
1752
+ UsersSearchparameters2["firstname"] = "firstname";
1753
+ UsersSearchparameters2["lastname"] = "lastname";
1754
+ UsersSearchparameters2["color"] = "color";
1755
+ })(UsersSearchparameters = UsersStatic2.UsersSearchparameters || (UsersStatic2.UsersSearchparameters = {}));
1756
+ })(UsersStatic || (UsersStatic = {}));
1757
+
1758
+ // src/interfaces/ItemsStatic.ts
1759
+ var ItemsStatic;
1760
+ ((ItemsStatic2) => {
1761
+ let ItemSearchParameters;
1762
+ ((ItemSearchParameters2) => {
1763
+ ItemSearchParameters2["id"] = "id";
1764
+ ItemSearchParameters2["user_id"] = "user_id";
1765
+ ItemSearchParameters2["article_type_id"] = "article_type_id";
1766
+ ItemSearchParameters2["contact_id"] = "contact_id";
1767
+ ItemSearchParameters2["deliverer_code"] = "deliverer_code";
1768
+ ItemSearchParameters2["deliverer_name"] = "deliverer_name";
1769
+ ItemSearchParameters2["deliverer_description"] = "deliverer_description";
1770
+ ItemSearchParameters2["intern_code"] = "intern_code";
1771
+ ItemSearchParameters2["intern_name"] = "intern_name";
1772
+ ItemSearchParameters2["intern_description"] = "intern_description";
1773
+ ItemSearchParameters2["purchase_price"] = "purchase_price";
1774
+ ItemSearchParameters2["sale_price"] = "sale_price";
1775
+ ItemSearchParameters2["purchase_total"] = "purchase_total";
1776
+ ItemSearchParameters2["sale_total"] = "sale_total";
1777
+ ItemSearchParameters2["currency_id"] = "currency_id";
1778
+ ItemSearchParameters2["tax_income_id"] = "tax_income_id";
1779
+ ItemSearchParameters2["tax_id"] = "tax_id";
1780
+ ItemSearchParameters2["tax_expense_id"] = "tax_expense_id";
1781
+ ItemSearchParameters2["unit_id"] = "unit_id";
1782
+ ItemSearchParameters2["is_stock"] = "is_stock";
1783
+ ItemSearchParameters2["stock_id"] = "stock_id";
1784
+ ItemSearchParameters2["stock_place_id"] = "stock_place_id";
1785
+ ItemSearchParameters2["stock_nr"] = "stock_nr";
1786
+ ItemSearchParameters2["stock_min_nr"] = "stock_min_nr";
1787
+ ItemSearchParameters2["stock_reserved_nr"] = "stock_reserved_nr";
1788
+ ItemSearchParameters2["stock_available_nr"] = "stock_available_nr";
1789
+ ItemSearchParameters2["stock_picked_nr"] = "stock_picked_nr";
1790
+ ItemSearchParameters2["stock_disposed_nr"] = "stock_disposed_nr";
1791
+ ItemSearchParameters2["stock_ordered_nr"] = "stock_ordered_nr";
1792
+ ItemSearchParameters2["width"] = "width";
1793
+ ItemSearchParameters2["height"] = "height";
1794
+ ItemSearchParameters2["weight"] = "weight";
1795
+ ItemSearchParameters2["volume"] = "volume";
1796
+ ItemSearchParameters2["html_text"] = "html_text";
1797
+ ItemSearchParameters2["remarks"] = "remarks";
1798
+ ItemSearchParameters2["delivery_price"] = "delivery_price";
1799
+ ItemSearchParameters2["article_group_id"] = "article_group_id";
1800
+ })(ItemSearchParameters = ItemsStatic2.ItemSearchParameters || (ItemsStatic2.ItemSearchParameters = {}));
1801
+ })(ItemsStatic || (ItemsStatic = {}));
1802
+
1803
+ // src/interfaces/InvoicesStatic.ts
1804
+ var InvoicesStatic;
1805
+ ((InvoicesStatic2) => {
1806
+ let InvoiceSearchParameters;
1807
+ ((InvoiceSearchParameters2) => {
1808
+ InvoiceSearchParameters2["id"] = "id";
1809
+ InvoiceSearchParameters2["kb_item_status_id"] = "kb_item_status_id";
1810
+ InvoiceSearchParameters2["document_nr"] = "document_nr";
1811
+ InvoiceSearchParameters2["title"] = "title";
1812
+ InvoiceSearchParameters2["api_reference"] = "api_reference";
1813
+ InvoiceSearchParameters2["contact_id"] = "contact_id";
1814
+ InvoiceSearchParameters2["contact_sub_id"] = "contact_sub_id";
1815
+ InvoiceSearchParameters2["user_id"] = "user_id";
1816
+ InvoiceSearchParameters2["currency_id"] = "currency_id";
1817
+ InvoiceSearchParameters2["total_gross"] = "total_gross";
1818
+ InvoiceSearchParameters2["total_net"] = "total_net";
1819
+ InvoiceSearchParameters2["total"] = "total";
1820
+ InvoiceSearchParameters2["is_valid_from"] = "is_valid_from";
1821
+ InvoiceSearchParameters2["is_valid_to"] = "is_valid_to";
1822
+ InvoiceSearchParameters2["updated_at"] = "updated_at";
1823
+ })(InvoiceSearchParameters = InvoicesStatic2.InvoiceSearchParameters || (InvoicesStatic2.InvoiceSearchParameters = {}));
1824
+ let KB_ITEM_STATUS;
1825
+ ((KB_ITEM_STATUS2) => {
1826
+ KB_ITEM_STATUS2[KB_ITEM_STATUS2["Draft"] = 7] = "Draft";
1827
+ KB_ITEM_STATUS2[KB_ITEM_STATUS2["Pending"] = 8] = "Pending";
1828
+ KB_ITEM_STATUS2[KB_ITEM_STATUS2["Paid"] = 9] = "Paid";
1829
+ KB_ITEM_STATUS2[KB_ITEM_STATUS2["Partial"] = 16] = "Partial";
1830
+ KB_ITEM_STATUS2[KB_ITEM_STATUS2["Canceled"] = 19] = "Canceled";
1831
+ KB_ITEM_STATUS2[KB_ITEM_STATUS2["Unpaid"] = 31] = "Unpaid";
1832
+ })(KB_ITEM_STATUS = InvoicesStatic2.KB_ITEM_STATUS || (InvoicesStatic2.KB_ITEM_STATUS = {}));
1833
+ let MWST_TYPE;
1834
+ ((MWST_TYPE2) => {
1835
+ MWST_TYPE2[MWST_TYPE2["INCLUDING_TAXES"] = 0] = "INCLUDING_TAXES";
1836
+ MWST_TYPE2[MWST_TYPE2["EXCLUDING_TAXES"] = 1] = "EXCLUDING_TAXES";
1837
+ MWST_TYPE2[MWST_TYPE2["EXEMPT_FROM_TAXES"] = 2] = "EXEMPT_FROM_TAXES";
1838
+ })(MWST_TYPE = InvoicesStatic2.MWST_TYPE || (InvoicesStatic2.MWST_TYPE = {}));
1839
+ let PAYMENT_SERVICE;
1840
+ ((PAYMENT_SERVICE2) => {
1841
+ PAYMENT_SERVICE2[PAYMENT_SERVICE2["PAYPAL"] = 1] = "PAYPAL";
1842
+ PAYMENT_SERVICE2[PAYMENT_SERVICE2["STRIPE"] = 2] = "STRIPE";
1843
+ PAYMENT_SERVICE2[PAYMENT_SERVICE2["SIX_PAYMENTS"] = 3] = "SIX_PAYMENTS";
1844
+ })(PAYMENT_SERVICE = InvoicesStatic2.PAYMENT_SERVICE || (InvoicesStatic2.PAYMENT_SERVICE = {}));
1845
+ })(InvoicesStatic || (InvoicesStatic = {}));
1846
+
1847
+ // src/interfaces/BillsV4Static.ts
1848
+ var BillsV4Static;
1849
+ ((BillsV4Static2) => {
1850
+ let SearchParameters;
1851
+ ((SearchParameters2) => {
1852
+ SearchParameters2["document_no"] = "document_no";
1853
+ SearchParameters2["title"] = "title";
1854
+ SearchParameters2["vendor_ref"] = "vendor_ref";
1855
+ SearchParameters2["currency_code"] = "currency_code";
1856
+ SearchParameters2["lastname_company"] = "lastname_company";
1857
+ SearchParameters2["firstname_suffix"] = "firstname_suffix";
1858
+ })(SearchParameters = BillsV4Static2.SearchParameters || (BillsV4Static2.SearchParameters = {}));
1859
+ let BillStatusUpdate;
1860
+ ((BillStatusUpdate2) => {
1861
+ BillStatusUpdate2["DRAFT"] = "DRAFT";
1862
+ BillStatusUpdate2["BOOKED"] = "BOOKED";
1863
+ })(BillStatusUpdate = BillsV4Static2.BillStatusUpdate || (BillsV4Static2.BillStatusUpdate = {}));
1864
+ let BillAction;
1865
+ ((BillAction2) => {
1866
+ BillAction2["DUPLICATE"] = "DUPLICATE";
1867
+ })(BillAction = BillsV4Static2.BillAction || (BillsV4Static2.BillAction = {}));
1868
+ let BillStatusFilter;
1869
+ ((BillStatusFilter2) => {
1870
+ BillStatusFilter2["DRAFTS"] = "DRAFTS";
1871
+ BillStatusFilter2["TODO"] = "TODO";
1872
+ BillStatusFilter2["PAID"] = "PAID";
1873
+ BillStatusFilter2["OVERDUE"] = "OVERDUE";
1874
+ })(BillStatusFilter = BillsV4Static2.BillStatusFilter || (BillsV4Static2.BillStatusFilter = {}));
1875
+ let PaymentType;
1876
+ ((PaymentType2) => {
1877
+ PaymentType2["IBAN"] = "IBAN";
1878
+ PaymentType2["MANUAL"] = "MANUAL";
1879
+ PaymentType2["QR"] = "QR";
1880
+ })(PaymentType = BillsV4Static2.PaymentType || (BillsV4Static2.PaymentType = {}));
1881
+ let PaymentFee;
1882
+ ((PaymentFee2) => {
1883
+ PaymentFee2["BY_SENDER"] = "BY_SENDER";
1884
+ PaymentFee2["BY_RECEIVER"] = "BY_RECEIVER";
1885
+ PaymentFee2["BREAKDOWN"] = "BREAKDOWN";
1886
+ PaymentFee2["NO_FEE"] = "NO_FEE";
1887
+ })(PaymentFee = BillsV4Static2.PaymentFee || (BillsV4Static2.PaymentFee = {}));
1888
+ let BillStatus;
1889
+ ((BillStatus2) => {
1890
+ BillStatus2["DRAFT"] = "DRAFT";
1891
+ BillStatus2["BOOKED"] = "BOOKED";
1892
+ BillStatus2["PARTIALLY_CREATED"] = "PARTIALLY_CREATED";
1893
+ BillStatus2["CREATED"] = "CREATED";
1894
+ BillStatus2["PARTIALLY_SENT"] = "PARTIALLY_SENT";
1895
+ BillStatus2["SENT"] = "SENT";
1896
+ BillStatus2["PARTIALLY_DOWNLOADED"] = "PARTIALLY_DOWNLOADED";
1897
+ BillStatus2["DOWNLOADED"] = "DOWNLOADED";
1898
+ BillStatus2["PARTIALLY_PAID"] = "PARTIALLY_PAID";
1899
+ BillStatus2["PAID"] = "PAID";
1900
+ BillStatus2["PARTIALLY_FAILED"] = "PARTIALLY_FAILED";
1901
+ BillStatus2["FAILED"] = "FAILED";
1902
+ })(BillStatus = BillsV4Static2.BillStatus || (BillsV4Static2.BillStatus = {}));
1903
+ })(BillsV4Static || (BillsV4Static = {}));
1904
+
1905
+ // src/interfaces/OutgoingPaymentsStatic.ts
1906
+ var OutgoingPaymentsStatic;
1907
+ ((OutgoingPaymentsStatic2) => {
1908
+ let OutgoingPaymentStatus;
1909
+ ((OutgoingPaymentStatus2) => {
1910
+ OutgoingPaymentStatus2["DOWNLOADED"] = "DOWNLOADED";
1911
+ OutgoingPaymentStatus2["OPEN"] = "OPEN";
1912
+ OutgoingPaymentStatus2["RECONCILED"] = "RECONCILED";
1913
+ OutgoingPaymentStatus2["CANCELLED"] = "CANCELLED";
1914
+ OutgoingPaymentStatus2["UPLOADED"] = "UPLOADED";
1915
+ OutgoingPaymentStatus2["REJECTED"] = "REJECTED";
1916
+ })(OutgoingPaymentStatus = OutgoingPaymentsStatic2.OutgoingPaymentStatus || (OutgoingPaymentsStatic2.OutgoingPaymentStatus = {}));
1917
+ let OutgoingPaymentType;
1918
+ ((OutgoingPaymentType2) => {
1919
+ OutgoingPaymentType2["IBAN"] = "IBAN";
1920
+ OutgoingPaymentType2["MANUAL"] = "MANUAL";
1921
+ OutgoingPaymentType2["CASH_DISCOUNT"] = "CASH_DISCOUNT";
1922
+ OutgoingPaymentType2["QR"] = "QR";
1923
+ })(OutgoingPaymentType = OutgoingPaymentsStatic2.OutgoingPaymentType || (OutgoingPaymentsStatic2.OutgoingPaymentType = {}));
1924
+ let FeeType;
1925
+ ((FeeType2) => {
1926
+ FeeType2["BY_SENDER"] = "BY_SENDER";
1927
+ FeeType2["BY_RECEIVER"] = "BY_RECEIVER";
1928
+ FeeType2["BREAKDOWN"] = "BREAKDOWN";
1929
+ FeeType2["NO_FEE"] = "NO_FEE";
1930
+ })(FeeType = OutgoingPaymentsStatic2.FeeType || (OutgoingPaymentsStatic2.FeeType = {}));
1931
+ })(OutgoingPaymentsStatic || (OutgoingPaymentsStatic = {}));
1932
+
1933
+ // src/index.ts
1934
+ var Bexio = class {
1935
+ constructor(token) {
1936
+ this.token = token;
1937
+ this.businessActivities = new ClientServices(this.token);
1938
+ this.contacts = new Contacts(this.token);
1939
+ this.contactTypes = new ContactTypes(this.token);
1940
+ this.contactSectors = new ContactSectors(this.token);
1941
+ this.contactGroups = new ContactGroups(this.token);
1942
+ this.contactRelations = new ContactRelations(this.token);
1943
+ this.orders = new Orders(this.token);
1944
+ this.projects = new Projects(this.token);
1945
+ this.projectStatuses = new ProjectStatuses(this.token);
1946
+ this.projectTypes = new ProjectTypes(this.token);
1947
+ this.expenses = new Expenses(this.token);
1948
+ this.billsV4 = new BillsV4(this.token);
1949
+ this.outgoingPayments = new OutgoingPayments(this.token);
1950
+ this.bills = new Bills(this.token);
1951
+ this.timetrackings = new Timetrackings(this.token);
1952
+ this.timetrackingStatuses = new TimetrackingStatuses(this.token);
1953
+ this.users = new Users(this.token);
1954
+ this.items = new Items(this.token);
1955
+ this.invoices = new Invoices(this.token);
1956
+ this.currencies = new Currencies(this.token);
1957
+ this.bankAccounts = new BankAccounts(this.token);
1958
+ this.accounts = new Accounts(this.token);
1959
+ this.manualEntries = new ManualEntries(this.token);
1960
+ this.taxes = new Taxes(this.token);
1961
+ }
1962
+ };
1963
+ var index_default = Bexio;
1964
+ export {
1965
+ Bexio,
1966
+ BillsStatic,
1967
+ BillsV4Static,
1968
+ BusinessActivitiesStatic,
1969
+ CalendarStatic,
1970
+ ContactGroupsStatic,
1971
+ ContactRelationsStatic,
1972
+ ContactSectorsStatic,
1973
+ ContactTypesStatic,
1974
+ ContactsStatic,
1975
+ ExpensesStatic,
1976
+ InvoicesStatic,
1977
+ ItemsStatic,
1978
+ NotesStatic,
1979
+ OrdersStatic,
1980
+ OutgoingPaymentsStatic,
1981
+ ProjectStatusesStatic,
1982
+ ProjectTypesStatic,
1983
+ ProjectsStatic,
1984
+ SalesOrderManagementStatic,
1985
+ TimetrackingStatusesStatic,
1986
+ TimetrackingsStatic,
1987
+ UsersStatic,
1988
+ index_default as default
1989
+ };
1990
+ //# sourceMappingURL=index.mjs.map