bexio 3.8.1 → 4.0.1

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 (286) hide show
  1. package/lib/index.d.mts +2983 -0
  2. package/lib/index.d.ts +2954 -55
  3. package/lib/index.js +2213 -100
  4. package/lib/index.js.map +1 -1
  5. package/lib/index.mjs +2158 -0
  6. package/lib/index.mjs.map +1 -0
  7. package/package.json +25 -6
  8. package/coverage/base.css +0 -224
  9. package/coverage/block-navigation.js +0 -87
  10. package/coverage/favicon.png +0 -0
  11. package/coverage/index.html +0 -146
  12. package/coverage/prettify.css +0 -1
  13. package/coverage/prettify.js +0 -2
  14. package/coverage/sort-arrow-sprite.png +0 -0
  15. package/coverage/sorter.js +0 -210
  16. package/jest-html-reporters-attach/jest_html_reporters/index.js +0 -3
  17. package/jest-html-reporters-attach/jest_html_reporters/result.js +0 -1
  18. package/jest_html_reporters.html +0 -1
  19. package/junit.xml +0 -339
  20. package/lib/interfaces/AccountsStatic.d.ts +0 -14
  21. package/lib/interfaces/AccountsStatic.js +0 -3
  22. package/lib/interfaces/AccountsStatic.js.map +0 -1
  23. package/lib/interfaces/BankAccountsStatic.d.ts +0 -25
  24. package/lib/interfaces/BankAccountsStatic.js +0 -3
  25. package/lib/interfaces/BankAccountsStatic.js.map +0 -1
  26. package/lib/interfaces/BaseStatic.d.ts +0 -20
  27. package/lib/interfaces/BaseStatic.js +0 -3
  28. package/lib/interfaces/BaseStatic.js.map +0 -1
  29. package/lib/interfaces/BillsStatic.d.ts +0 -167
  30. package/lib/interfaces/BillsStatic.js +0 -25
  31. package/lib/interfaces/BillsStatic.js.map +0 -1
  32. package/lib/interfaces/BillsV4Static.d.ts +0 -204
  33. package/lib/interfaces/BillsV4Static.js +0 -60
  34. package/lib/interfaces/BillsV4Static.js.map +0 -1
  35. package/lib/interfaces/BusinessActivitiesStatic.d.ts +0 -24
  36. package/lib/interfaces/BusinessActivitiesStatic.js +0 -11
  37. package/lib/interfaces/BusinessActivitiesStatic.js.map +0 -1
  38. package/lib/interfaces/CalendarStatic.d.ts +0 -30
  39. package/lib/interfaces/CalendarStatic.js +0 -18
  40. package/lib/interfaces/CalendarStatic.js.map +0 -1
  41. package/lib/interfaces/ContactGroupsStatic.d.ts +0 -12
  42. package/lib/interfaces/ContactGroupsStatic.js +0 -11
  43. package/lib/interfaces/ContactGroupsStatic.js.map +0 -1
  44. package/lib/interfaces/ContactRelationsStatic.d.ts +0 -24
  45. package/lib/interfaces/ContactRelationsStatic.js +0 -13
  46. package/lib/interfaces/ContactRelationsStatic.js.map +0 -1
  47. package/lib/interfaces/ContactSectorsStatic.d.ts +0 -9
  48. package/lib/interfaces/ContactSectorsStatic.js +0 -11
  49. package/lib/interfaces/ContactSectorsStatic.js.map +0 -1
  50. package/lib/interfaces/ContactTypesStatic.d.ts +0 -9
  51. package/lib/interfaces/ContactTypesStatic.js +0 -11
  52. package/lib/interfaces/ContactTypesStatic.js.map +0 -1
  53. package/lib/interfaces/ContactsStatic.d.ts +0 -118
  54. package/lib/interfaces/ContactsStatic.js +0 -27
  55. package/lib/interfaces/ContactsStatic.js.map +0 -1
  56. package/lib/interfaces/CurrenciesStatic.d.ts +0 -20
  57. package/lib/interfaces/CurrenciesStatic.js +0 -3
  58. package/lib/interfaces/CurrenciesStatic.js.map +0 -1
  59. package/lib/interfaces/ExpensesStatic.d.ts +0 -83
  60. package/lib/interfaces/ExpensesStatic.js +0 -25
  61. package/lib/interfaces/ExpensesStatic.js.map +0 -1
  62. package/lib/interfaces/InvoicesStatic.d.ts +0 -162
  63. package/lib/interfaces/InvoicesStatic.js +0 -46
  64. package/lib/interfaces/InvoicesStatic.js.map +0 -1
  65. package/lib/interfaces/ItemsStatic.d.ts +0 -120
  66. package/lib/interfaces/ItemsStatic.js +0 -47
  67. package/lib/interfaces/ItemsStatic.js.map +0 -1
  68. package/lib/interfaces/ManualEntriesStatic.d.ts +0 -42
  69. package/lib/interfaces/ManualEntriesStatic.js +0 -3
  70. package/lib/interfaces/ManualEntriesStatic.js.map +0 -1
  71. package/lib/interfaces/NotesStatic.d.ts +0 -23
  72. package/lib/interfaces/NotesStatic.js +0 -16
  73. package/lib/interfaces/NotesStatic.js.map +0 -1
  74. package/lib/interfaces/OrdersStatic.d.ts +0 -117
  75. package/lib/interfaces/OrdersStatic.js +0 -25
  76. package/lib/interfaces/OrdersStatic.js.map +0 -1
  77. package/lib/interfaces/OutgoingPaymentsStatic.d.ts +0 -142
  78. package/lib/interfaces/OutgoingPaymentsStatic.js +0 -39
  79. package/lib/interfaces/OutgoingPaymentsStatic.js.map +0 -1
  80. package/lib/interfaces/PaymentsStatic.d.ts +0 -22
  81. package/lib/interfaces/PaymentsStatic.js +0 -3
  82. package/lib/interfaces/PaymentsStatic.js.map +0 -1
  83. package/lib/interfaces/PositionStatic.d.ts +0 -35
  84. package/lib/interfaces/PositionStatic.js +0 -3
  85. package/lib/interfaces/PositionStatic.js.map +0 -1
  86. package/lib/interfaces/PositionsStatic.d.ts +0 -46
  87. package/lib/interfaces/PositionsStatic.js +0 -3
  88. package/lib/interfaces/PositionsStatic.js.map +0 -1
  89. package/lib/interfaces/ProjectStatusesStatic.d.ts +0 -9
  90. package/lib/interfaces/ProjectStatusesStatic.js +0 -11
  91. package/lib/interfaces/ProjectStatusesStatic.js.map +0 -1
  92. package/lib/interfaces/ProjectTypesStatic.d.ts +0 -9
  93. package/lib/interfaces/ProjectTypesStatic.js +0 -11
  94. package/lib/interfaces/ProjectTypesStatic.js.map +0 -1
  95. package/lib/interfaces/ProjectsStatic.d.ts +0 -55
  96. package/lib/interfaces/ProjectsStatic.js +0 -13
  97. package/lib/interfaces/ProjectsStatic.js.map +0 -1
  98. package/lib/interfaces/SalesOrderManagementStatic.d.ts +0 -289
  99. package/lib/interfaces/SalesOrderManagementStatic.js +0 -69
  100. package/lib/interfaces/SalesOrderManagementStatic.js.map +0 -1
  101. package/lib/interfaces/TaxesStatic.d.ts +0 -31
  102. package/lib/interfaces/TaxesStatic.js +0 -3
  103. package/lib/interfaces/TaxesStatic.js.map +0 -1
  104. package/lib/interfaces/TimetrackingStatusesStatic.d.ts +0 -9
  105. package/lib/interfaces/TimetrackingStatusesStatic.js +0 -11
  106. package/lib/interfaces/TimetrackingStatusesStatic.js.map +0 -1
  107. package/lib/interfaces/TimetrackingsStatic.d.ts +0 -69
  108. package/lib/interfaces/TimetrackingsStatic.js +0 -16
  109. package/lib/interfaces/TimetrackingsStatic.js.map +0 -1
  110. package/lib/interfaces/UsersStatic.d.ts +0 -23
  111. package/lib/interfaces/UsersStatic.js +0 -15
  112. package/lib/interfaces/UsersStatic.js.map +0 -1
  113. package/lib/resources/Accounts.d.ts +0 -49
  114. package/lib/resources/Accounts.js +0 -85
  115. package/lib/resources/Accounts.js.map +0 -1
  116. package/lib/resources/BankAccounts.d.ts +0 -49
  117. package/lib/resources/BankAccounts.js +0 -85
  118. package/lib/resources/BankAccounts.js.map +0 -1
  119. package/lib/resources/BaseCrud.d.ts +0 -89
  120. package/lib/resources/BaseCrud.js +0 -181
  121. package/lib/resources/BaseCrud.js.map +0 -1
  122. package/lib/resources/Bills.d.ts +0 -67
  123. package/lib/resources/Bills.js +0 -107
  124. package/lib/resources/Bills.js.map +0 -1
  125. package/lib/resources/BillsV4.d.ts +0 -52
  126. package/lib/resources/BillsV4.js +0 -86
  127. package/lib/resources/BillsV4.js.map +0 -1
  128. package/lib/resources/BusinessActivities.d.ts +0 -5
  129. package/lib/resources/BusinessActivities.js +0 -13
  130. package/lib/resources/BusinessActivities.js.map +0 -1
  131. package/lib/resources/ContactGroups.d.ts +0 -13
  132. package/lib/resources/ContactGroups.js +0 -34
  133. package/lib/resources/ContactGroups.js.map +0 -1
  134. package/lib/resources/ContactRelations.d.ts +0 -5
  135. package/lib/resources/ContactRelations.js +0 -13
  136. package/lib/resources/ContactRelations.js.map +0 -1
  137. package/lib/resources/ContactSectors.d.ts +0 -39
  138. package/lib/resources/ContactSectors.js +0 -72
  139. package/lib/resources/ContactSectors.js.map +0 -1
  140. package/lib/resources/ContactTypes.d.ts +0 -39
  141. package/lib/resources/ContactTypes.js +0 -72
  142. package/lib/resources/ContactTypes.js.map +0 -1
  143. package/lib/resources/Contacts.d.ts +0 -5
  144. package/lib/resources/Contacts.js +0 -13
  145. package/lib/resources/Contacts.js.map +0 -1
  146. package/lib/resources/Currencies.d.ts +0 -33
  147. package/lib/resources/Currencies.js +0 -61
  148. package/lib/resources/Currencies.js.map +0 -1
  149. package/lib/resources/DefaultPositions.d.ts +0 -33
  150. package/lib/resources/DefaultPositions.js +0 -61
  151. package/lib/resources/DefaultPositions.js.map +0 -1
  152. package/lib/resources/Expenses.d.ts +0 -5
  153. package/lib/resources/Expenses.js +0 -13
  154. package/lib/resources/Expenses.js.map +0 -1
  155. package/lib/resources/Invoices.d.ts +0 -113
  156. package/lib/resources/Invoices.js +0 -189
  157. package/lib/resources/Invoices.js.map +0 -1
  158. package/lib/resources/ItemPositions.d.ts +0 -33
  159. package/lib/resources/ItemPositions.js +0 -61
  160. package/lib/resources/ItemPositions.js.map +0 -1
  161. package/lib/resources/Items.d.ts +0 -5
  162. package/lib/resources/Items.js +0 -13
  163. package/lib/resources/Items.js.map +0 -1
  164. package/lib/resources/ManualEntries.d.ts +0 -50
  165. package/lib/resources/ManualEntries.js +0 -84
  166. package/lib/resources/ManualEntries.js.map +0 -1
  167. package/lib/resources/Orders.d.ts +0 -33
  168. package/lib/resources/Orders.js +0 -64
  169. package/lib/resources/Orders.js.map +0 -1
  170. package/lib/resources/OutgoingPayments.d.ts +0 -63
  171. package/lib/resources/OutgoingPayments.js +0 -117
  172. package/lib/resources/OutgoingPayments.js.map +0 -1
  173. package/lib/resources/Payments.d.ts +0 -36
  174. package/lib/resources/Payments.js +0 -64
  175. package/lib/resources/Payments.js.map +0 -1
  176. package/lib/resources/ProjectStatuses.d.ts +0 -39
  177. package/lib/resources/ProjectStatuses.js +0 -72
  178. package/lib/resources/ProjectStatuses.js.map +0 -1
  179. package/lib/resources/ProjectTypes.d.ts +0 -39
  180. package/lib/resources/ProjectTypes.js +0 -72
  181. package/lib/resources/ProjectTypes.js.map +0 -1
  182. package/lib/resources/Projects.d.ts +0 -5
  183. package/lib/resources/Projects.js +0 -13
  184. package/lib/resources/Projects.js.map +0 -1
  185. package/lib/resources/Taxes.d.ts +0 -30
  186. package/lib/resources/Taxes.js +0 -70
  187. package/lib/resources/Taxes.js.map +0 -1
  188. package/lib/resources/TextPositions.d.ts +0 -33
  189. package/lib/resources/TextPositions.js +0 -61
  190. package/lib/resources/TextPositions.js.map +0 -1
  191. package/lib/resources/TimetrackingStatuses.d.ts +0 -39
  192. package/lib/resources/TimetrackingStatuses.js +0 -72
  193. package/lib/resources/TimetrackingStatuses.js.map +0 -1
  194. package/lib/resources/Timetrackings.d.ts +0 -14
  195. package/lib/resources/Timetrackings.js +0 -35
  196. package/lib/resources/Timetrackings.js.map +0 -1
  197. package/lib/resources/Users.d.ts +0 -39
  198. package/lib/resources/Users.js +0 -72
  199. package/lib/resources/Users.js.map +0 -1
  200. package/lib/tests/Accounts.test.d.ts +0 -1
  201. package/lib/tests/Accounts.test.js +0 -86
  202. package/lib/tests/Accounts.test.js.map +0 -1
  203. package/lib/tests/BankAccounts.test.d.ts +0 -1
  204. package/lib/tests/BankAccounts.test.js +0 -86
  205. package/lib/tests/BankAccounts.test.js.map +0 -1
  206. package/lib/tests/BaseCrud.test.d.ts +0 -1
  207. package/lib/tests/BaseCrud.test.js +0 -302
  208. package/lib/tests/BaseCrud.test.js.map +0 -1
  209. package/lib/tests/Bills.test.d.ts +0 -1
  210. package/lib/tests/Bills.test.js +0 -110
  211. package/lib/tests/Bills.test.js.map +0 -1
  212. package/lib/tests/BillsV4.test.d.ts +0 -1
  213. package/lib/tests/BillsV4.test.js +0 -134
  214. package/lib/tests/BillsV4.test.js.map +0 -1
  215. package/lib/tests/BusinessActivities.test.d.ts +0 -1
  216. package/lib/tests/BusinessActivities.test.js +0 -21
  217. package/lib/tests/BusinessActivities.test.js.map +0 -1
  218. package/lib/tests/ContactGroups.test.d.ts +0 -1
  219. package/lib/tests/ContactGroups.test.js +0 -21
  220. package/lib/tests/ContactGroups.test.js.map +0 -1
  221. package/lib/tests/ContactRelations.test.d.ts +0 -1
  222. package/lib/tests/ContactRelations.test.js +0 -21
  223. package/lib/tests/ContactRelations.test.js.map +0 -1
  224. package/lib/tests/ContactSectors.test.d.ts +0 -1
  225. package/lib/tests/ContactSectors.test.js +0 -21
  226. package/lib/tests/ContactSectors.test.js.map +0 -1
  227. package/lib/tests/ContactTypes.test.d.ts +0 -1
  228. package/lib/tests/ContactTypes.test.js +0 -21
  229. package/lib/tests/ContactTypes.test.js.map +0 -1
  230. package/lib/tests/Contacts.test.d.ts +0 -1
  231. package/lib/tests/Contacts.test.js +0 -21
  232. package/lib/tests/Contacts.test.js.map +0 -1
  233. package/lib/tests/Currencies.test.d.ts +0 -1
  234. package/lib/tests/Currencies.test.js +0 -21
  235. package/lib/tests/Currencies.test.js.map +0 -1
  236. package/lib/tests/DefaultPositions.test.d.ts +0 -1
  237. package/lib/tests/DefaultPositions.test.js +0 -22
  238. package/lib/tests/DefaultPositions.test.js.map +0 -1
  239. package/lib/tests/Expenses.test.d.ts +0 -1
  240. package/lib/tests/Expenses.test.js +0 -21
  241. package/lib/tests/Expenses.test.js.map +0 -1
  242. package/lib/tests/Invoices.test.d.ts +0 -1
  243. package/lib/tests/Invoices.test.js +0 -207
  244. package/lib/tests/Invoices.test.js.map +0 -1
  245. package/lib/tests/ItemPositions.test.d.ts +0 -1
  246. package/lib/tests/ItemPositions.test.js +0 -22
  247. package/lib/tests/ItemPositions.test.js.map +0 -1
  248. package/lib/tests/Items.test.d.ts +0 -1
  249. package/lib/tests/Items.test.js +0 -21
  250. package/lib/tests/Items.test.js.map +0 -1
  251. package/lib/tests/ManualEntries.test.d.ts +0 -1
  252. package/lib/tests/ManualEntries.test.js +0 -116
  253. package/lib/tests/ManualEntries.test.js.map +0 -1
  254. package/lib/tests/Orders.test.d.ts +0 -1
  255. package/lib/tests/Orders.test.js +0 -137
  256. package/lib/tests/Orders.test.js.map +0 -1
  257. package/lib/tests/OutgoingPayments.test.d.ts +0 -1
  258. package/lib/tests/OutgoingPayments.test.js +0 -125
  259. package/lib/tests/OutgoingPayments.test.js.map +0 -1
  260. package/lib/tests/Payments.test.d.ts +0 -1
  261. package/lib/tests/Payments.test.js +0 -22
  262. package/lib/tests/Payments.test.js.map +0 -1
  263. package/lib/tests/ProjectStatuses.test.d.ts +0 -1
  264. package/lib/tests/ProjectStatuses.test.js +0 -21
  265. package/lib/tests/ProjectStatuses.test.js.map +0 -1
  266. package/lib/tests/ProjectTypes.test.d.ts +0 -1
  267. package/lib/tests/ProjectTypes.test.js +0 -21
  268. package/lib/tests/ProjectTypes.test.js.map +0 -1
  269. package/lib/tests/Projects.test.d.ts +0 -1
  270. package/lib/tests/Projects.test.js +0 -21
  271. package/lib/tests/Projects.test.js.map +0 -1
  272. package/lib/tests/Taxes.test.d.ts +0 -1
  273. package/lib/tests/Taxes.test.js +0 -107
  274. package/lib/tests/Taxes.test.js.map +0 -1
  275. package/lib/tests/TextPositions.test.d.ts +0 -1
  276. package/lib/tests/TextPositions.test.js +0 -22
  277. package/lib/tests/TextPositions.test.js.map +0 -1
  278. package/lib/tests/TimetrackingStatuses.test.d.ts +0 -1
  279. package/lib/tests/TimetrackingStatuses.test.js +0 -21
  280. package/lib/tests/TimetrackingStatuses.test.js.map +0 -1
  281. package/lib/tests/Timetrackings.test.d.ts +0 -1
  282. package/lib/tests/Timetrackings.test.js +0 -21
  283. package/lib/tests/Timetrackings.test.js.map +0 -1
  284. package/lib/tests/Users.test.d.ts +0 -1
  285. package/lib/tests/Users.test.js +0 -21
  286. package/lib/tests/Users.test.js.map +0 -1
@@ -0,0 +1,2983 @@
1
+ declare namespace BusinessActivitiesStatic {
2
+ interface BusinessActivity {
3
+ id: number;
4
+ name: string;
5
+ default_is_billable?: boolean;
6
+ default_price_per_hour?: string;
7
+ account_id?: number;
8
+ }
9
+ interface BusinessActivityCreate {
10
+ name: string;
11
+ default_is_billable?: boolean;
12
+ default_price_per_hour?: string;
13
+ account_id?: number;
14
+ }
15
+ interface BusinessActivityOverwrite {
16
+ name: string;
17
+ default_is_billable?: boolean;
18
+ default_price_per_hour?: string;
19
+ account_id?: number;
20
+ }
21
+ enum BusinessActivitySearchParameters {
22
+ name = "name"
23
+ }
24
+ }
25
+
26
+ declare namespace BaseStatic {
27
+ interface PdfResponse {
28
+ name: string;
29
+ size: number;
30
+ mime: string;
31
+ content: Buffer;
32
+ }
33
+ type SearchCriteria = "=" | "!=" | ">" | "<" | ">=" | "<=" | "equal" | "not_equal" | "greater_than" | "less_than" | "greater_equal" | "less_equal" | "like" | "not_like" | "is_null" | "not_null" | "in" | "not_in";
34
+ interface SearchParameter<T> {
35
+ field: T;
36
+ value: any;
37
+ criteria?: SearchCriteria;
38
+ }
39
+ interface BaseOptions {
40
+ limit?: number;
41
+ offset?: number;
42
+ order_by?: string;
43
+ [index: string]: any;
44
+ }
45
+ }
46
+
47
+ declare class BaseCrud<Small, Full, Search, SearchType, Create, Overwrite> {
48
+ protected apiToken: string;
49
+ protected apiEndpoint: string;
50
+ protected baseApiUrl: string;
51
+ constructor(apiToken: string, apiEndpoint: string);
52
+ /**
53
+ * Lists the ressource
54
+ *
55
+ * @param {BaseStatic.BaseOptions} [options]
56
+ * @returns {Promise<Array<T>>}
57
+ * @memberof BaseCrud
58
+ */
59
+ list(options?: BaseStatic.BaseOptions): Promise<Array<Small>>;
60
+ /**
61
+ * search for resources
62
+ *
63
+ * @param {Array<BaseStatic.SearchParameter<SearchType>>} searchOptions
64
+ * @param {BaseStatic.BaseOptions} [options]
65
+ * @returns {Promise<Array<Search>>}
66
+ * @memberof BaseCrud
67
+ */
68
+ search(searchOptions: Array<BaseStatic.SearchParameter<SearchType>>, options?: BaseStatic.BaseOptions): Promise<Array<Search>>;
69
+ /**
70
+ * show a specific ressource
71
+ *
72
+ * @param {string | number} id
73
+ * @param {BaseStatic.BaseOptions} [options]
74
+ * @returns {Promise<Full>}
75
+ * @memberof BaseCrud
76
+ */
77
+ show(id: string | number, options?: BaseStatic.BaseOptions): Promise<Full>;
78
+ /**
79
+ * create a new ressource
80
+ *
81
+ * @param {Full} ressource
82
+ * @returns {Promise<Full>}
83
+ * @memberof BaseCrud
84
+ */
85
+ create(ressource: Create): Promise<Full>;
86
+ /**
87
+ * overwrite an existing ressource
88
+ *
89
+ * @param {number} id
90
+ * @param {Overwrite} ressource
91
+ * @returns {Promise<Full>}
92
+ * @memberof BaseCrud
93
+ */
94
+ overwrite(id: number, ressource: Overwrite): Promise<Full>;
95
+ /**
96
+ * edit an existing ressource
97
+ *
98
+ * @param {number} id
99
+ * @param {Partial<Overwrite>} ressource
100
+ * @returns {Promise<Full>}
101
+ * @memberof BaseCrud
102
+ */
103
+ edit(id: number, ressource: Partial<Overwrite>): Promise<Full>;
104
+ /**
105
+ * delete an ressource
106
+ *
107
+ * @param {string | number} id
108
+ * @returns {Promise<boolean>}
109
+ * @memberof BaseCrud
110
+ */
111
+ delete(id: string | number): Promise<boolean>;
112
+ /**
113
+ * Base request to the api
114
+ *
115
+ * @protected
116
+ * @template T
117
+ * @param {string} method
118
+ * @param {string} path
119
+ * @param {BaseStatic.BaseOptions} [options]
120
+ * @param {*} [data]
121
+ * @returns {Promise<T>}
122
+ * @memberof Bexio
123
+ */
124
+ protected request<T>(method: "DELETE" | "get" | "GET" | "delete" | "head" | "HEAD" | "options" | "OPTIONS" | "post" | "POST" | "put" | "PUT" | "patch" | "PATCH" | "purge" | "PURGE" | "link" | "LINK" | "unlink" | "UNLINK", path: string, options?: BaseStatic.BaseOptions, data?: any): Promise<T>;
125
+ /**
126
+ * Generates the querystring out of the options
127
+ *
128
+ * @protected
129
+ * @param {BaseStatic.BaseOptions} [options]
130
+ * @returns {string}
131
+ * @memberof Bexio
132
+ */
133
+ protected optionsToQuery(options?: BaseStatic.BaseOptions): string;
134
+ }
135
+
136
+ declare class ClientServices extends BaseCrud<BusinessActivitiesStatic.BusinessActivity, BusinessActivitiesStatic.BusinessActivity, BusinessActivitiesStatic.BusinessActivity, BusinessActivitiesStatic.BusinessActivitySearchParameters, BusinessActivitiesStatic.BusinessActivityCreate, BusinessActivitiesStatic.BusinessActivityOverwrite> {
137
+ constructor(apiToken: string);
138
+ }
139
+
140
+ declare namespace ContactsStatic {
141
+ interface ContactSmall {
142
+ id: number;
143
+ nr: string;
144
+ contact_type_id: number;
145
+ name_1: string;
146
+ name_2: string;
147
+ salutation_id: number;
148
+ salutation_form?: number;
149
+ title_id?: number;
150
+ birthday?: string;
151
+ /** @deprecated */
152
+ address?: string;
153
+ street_name?: string;
154
+ house_number?: string;
155
+ postcode: string;
156
+ city: string;
157
+ country_id: number;
158
+ mail: string;
159
+ mail_second: string;
160
+ phone_fixed: string;
161
+ phone_fixed_second: string;
162
+ phone_mobile: string;
163
+ fax: string;
164
+ url: string;
165
+ skype_name: string;
166
+ remarks: string;
167
+ language_id?: number;
168
+ is_lead: boolean;
169
+ contact_group_ids: string;
170
+ contact_branch_ids?: string;
171
+ user_id: number;
172
+ owner_id: number;
173
+ updated_at: string;
174
+ }
175
+ interface ContactFull extends ContactSmall {
176
+ profile_image: string;
177
+ }
178
+ interface ContactCreate {
179
+ nr?: string;
180
+ name_1: string;
181
+ user_id: number;
182
+ country_id?: number;
183
+ owner_id: number;
184
+ contact_type_id: number;
185
+ contact_group_ids?: Array<number>;
186
+ name_2?: string;
187
+ salutation_id?: number;
188
+ salutation_form?: number;
189
+ title_id?: number;
190
+ birthday?: string;
191
+ street_name?: string;
192
+ house_number?: string;
193
+ address_addition?: string;
194
+ postcode?: string;
195
+ city?: string;
196
+ mail?: string;
197
+ mail_second?: string;
198
+ phone_fixed?: string;
199
+ phone_fixed_second?: string;
200
+ phone_mobile?: string;
201
+ fax?: string;
202
+ url?: string;
203
+ skype_name?: string;
204
+ remarks?: string;
205
+ language_id?: number;
206
+ contact_branch_ids?: string;
207
+ }
208
+ interface ContactOverwrite {
209
+ nr?: string;
210
+ name_1: string;
211
+ user_id: number;
212
+ country_id?: number;
213
+ owner_id: number;
214
+ contact_type_id: number;
215
+ contact_group_ids?: Array<number>;
216
+ name_2?: string;
217
+ salutation_id?: number;
218
+ salutation_form?: number;
219
+ title_id?: number;
220
+ birthday?: string;
221
+ street_name?: string;
222
+ house_number?: string;
223
+ address_addition?: string;
224
+ postcode?: string;
225
+ city?: string;
226
+ mail?: string;
227
+ mail_second?: string;
228
+ phone_fixed?: string;
229
+ phone_fixed_second?: string;
230
+ phone_mobile?: string;
231
+ fax?: string;
232
+ url?: string;
233
+ skype_name?: string;
234
+ remarks?: string;
235
+ language_id?: number;
236
+ contact_branch_ids?: string;
237
+ }
238
+ enum ContactSearchParameters {
239
+ id = "id",
240
+ name_1 = "name_1",
241
+ name_2 = "name_2",
242
+ nr = "nr",
243
+ address = "address",
244
+ mail = "mail",
245
+ mail_second = "mail_second",
246
+ postcode = "postcode",
247
+ city = "city",
248
+ country_id = "country_id",
249
+ contact_group_ids = "contact_group_ids",
250
+ contact_type_id = "contact_type_id",
251
+ updated_at = "updated_at",
252
+ user_id = "user_id",
253
+ phone_fixed = "phone_fixed",
254
+ phone_mobile = "phone_mobile",
255
+ fax = "fax"
256
+ }
257
+ }
258
+
259
+ declare class Contacts extends BaseCrud<ContactsStatic.ContactSmall, ContactsStatic.ContactFull, ContactsStatic.ContactSmall, ContactsStatic.ContactSearchParameters, ContactsStatic.ContactCreate, ContactsStatic.ContactOverwrite> {
260
+ constructor(apiToken: string);
261
+ }
262
+
263
+ declare namespace ContactTypesStatic {
264
+ interface ContactType {
265
+ id: number;
266
+ name: string;
267
+ }
268
+ enum ContactTypeSearchParameters {
269
+ name = "name"
270
+ }
271
+ }
272
+
273
+ declare class ContactTypes extends BaseCrud<ContactTypesStatic.ContactType, ContactTypesStatic.ContactType, ContactTypesStatic.ContactType, ContactTypesStatic.ContactTypeSearchParameters, {}, ContactTypesStatic.ContactType> {
274
+ constructor(apiToken: string);
275
+ /**
276
+ * Not implemented by Bexio yet
277
+ *
278
+ * @param {{}} ressource
279
+ * @returns {Promise<ContactTypesStatic.ContactSector>}
280
+ * @memberof ContactTypes
281
+ */
282
+ create(ressource: {}): Promise<ContactTypesStatic.ContactType>;
283
+ /**
284
+ * Not implemented by Bexio yet
285
+ *
286
+ * @param {number} id
287
+ * @param {{}} ressource
288
+ * @returns {Promise<ContactTypesStatic.ContactSector>}
289
+ * @memberof ContactTypes
290
+ */
291
+ edit(id: number, ressource: {}): Promise<ContactTypesStatic.ContactType>;
292
+ /**
293
+ * Not implemented by Bexio yet
294
+ *
295
+ * @param {number} id
296
+ * @param {{}} ressource
297
+ * @returns {Promise<ContactTypesStatic.ContactSector>}
298
+ * @memberof ContactTypes
299
+ */
300
+ overwrite(id: number, ressource: {}): Promise<ContactTypesStatic.ContactType>;
301
+ /**
302
+ * Not implemented by Bexio yet
303
+ *
304
+ * @param {number} id
305
+ * @returns {Promise<boolean>}
306
+ * @memberof ContactTypes
307
+ */
308
+ delete(id: number): Promise<boolean>;
309
+ }
310
+
311
+ declare namespace ContactSectorsStatic {
312
+ interface ContactSector {
313
+ id: number;
314
+ name: string;
315
+ }
316
+ enum ContactSectorSearchParameters {
317
+ name = "name"
318
+ }
319
+ }
320
+
321
+ declare class ContactSectors extends BaseCrud<ContactSectorsStatic.ContactSector, ContactSectorsStatic.ContactSector, ContactSectorsStatic.ContactSector, ContactSectorsStatic.ContactSectorSearchParameters, {}, ContactSectorsStatic.ContactSector> {
322
+ constructor(apiToken: string);
323
+ /**
324
+ * Not implemented by Bexio yet
325
+ *
326
+ * @param {{}} ressource
327
+ * @returns {Promise<ContactSectorsStatic.ContactSector>}
328
+ * @memberof ContactSectors
329
+ */
330
+ create(ressource: {}): Promise<ContactSectorsStatic.ContactSector>;
331
+ /**
332
+ * Not implemented by Bexio yet
333
+ *
334
+ * @param {number} id
335
+ * @param {{}} ressource
336
+ * @returns {Promise<ContactSectorsStatic.ContactSector>}
337
+ * @memberof ContactSectors
338
+ */
339
+ edit(id: number, ressource: {}): Promise<ContactSectorsStatic.ContactSector>;
340
+ /**
341
+ * Not implemented by Bexio yet
342
+ *
343
+ * @param {number} id
344
+ * @param {{}} ressource
345
+ * @returns {Promise<ContactSectorsStatic.ContactSector>}
346
+ * @memberof ContactSectors
347
+ */
348
+ overwrite(id: number, ressource: {}): Promise<ContactSectorsStatic.ContactSector>;
349
+ /**
350
+ * Not implemented by Bexio yet
351
+ *
352
+ * @param {number} id
353
+ * @returns {Promise<boolean>}
354
+ * @memberof ContactSectors
355
+ */
356
+ delete(id: number): Promise<boolean>;
357
+ }
358
+
359
+ declare namespace ContactGroupsStatic {
360
+ interface ContactGroup {
361
+ id: number;
362
+ name: string;
363
+ }
364
+ interface ContactGroupCreate {
365
+ name: string;
366
+ }
367
+ enum ContactGroupSearchParameters {
368
+ name = "name"
369
+ }
370
+ }
371
+
372
+ declare class ContactGroups extends BaseCrud<ContactGroupsStatic.ContactGroup, ContactGroupsStatic.ContactGroup, ContactGroupsStatic.ContactGroup, ContactGroupsStatic.ContactGroupSearchParameters, ContactGroupsStatic.ContactGroupCreate, ContactGroupsStatic.ContactGroup> {
373
+ constructor(apiToken: string);
374
+ /**
375
+ * Not implemented by Bexio yet
376
+ *
377
+ * @param {number} id
378
+ * @returns {Promise<boolean>}
379
+ * @memberof ContactGroups
380
+ */
381
+ delete(id: number): Promise<boolean>;
382
+ }
383
+
384
+ declare namespace ContactRelationsStatic {
385
+ interface ContactRelation {
386
+ id: number;
387
+ contact_id: number;
388
+ contact_sub_id: number;
389
+ description: string;
390
+ updated_at: string;
391
+ }
392
+ interface ContactRelationOverwrite {
393
+ contact_id: number;
394
+ contact_sub_id: number;
395
+ description: string;
396
+ }
397
+ interface ContactRelationCreate {
398
+ contact_id: number;
399
+ contact_sub_id: number;
400
+ description: string;
401
+ }
402
+ enum ContactRelationSearchParameters {
403
+ contact_id = "contact_id",
404
+ contact_sub_id = "contact_sub_id",
405
+ updated_at = "updated_at"
406
+ }
407
+ }
408
+
409
+ declare class ContactRelations extends BaseCrud<ContactRelationsStatic.ContactRelation, ContactRelationsStatic.ContactRelation, ContactRelationsStatic.ContactRelation, ContactRelationsStatic.ContactRelationSearchParameters, ContactRelationsStatic.ContactRelationCreate, ContactRelationsStatic.ContactRelationOverwrite> {
410
+ constructor(apiToken: string);
411
+ }
412
+
413
+ declare namespace ExpensesStatic {
414
+ interface Expense {
415
+ id: number;
416
+ document_nr: string;
417
+ title?: string;
418
+ contact_id: number;
419
+ contact_sub_id?: number;
420
+ user_id: number;
421
+ pr_project_id?: number;
422
+ logopaper_id: number;
423
+ language_id: number;
424
+ bank_account_id: number;
425
+ currency_id: number;
426
+ mwst_type: number;
427
+ mwst_is_net: boolean;
428
+ show_position_taxes: boolean;
429
+ is_valid_from: string;
430
+ is_valid_to: string;
431
+ kb_item_status_id: number;
432
+ api_reference?: string;
433
+ total_gross: string;
434
+ total_net: string;
435
+ total_taxes: string;
436
+ total_paid_payments: string;
437
+ total_remaining_payments: string;
438
+ viewed_by_client_at?: string;
439
+ total: string;
440
+ updated_at: string;
441
+ taxs: Array<Tax>;
442
+ info?: string;
443
+ allowable_bill: null;
444
+ account_id?: number;
445
+ tax_id: number;
446
+ amount: string;
447
+ }
448
+ interface Tax {
449
+ percentage: number;
450
+ value: string;
451
+ }
452
+ interface ExpenseCreate {
453
+ user_id: number;
454
+ contact_id: number;
455
+ tax_id: number;
456
+ amount: string;
457
+ account_id: number;
458
+ mwst_type: 0 | 1 | 2;
459
+ }
460
+ interface ExpenseOverwrite {
461
+ user_id: number;
462
+ contact_id: number;
463
+ tax_id: number;
464
+ amount: string;
465
+ account_id: number;
466
+ mwst_type: 0 | 1 | 2;
467
+ logopaper_id: number;
468
+ language_id: number;
469
+ bank_account_id: number;
470
+ currency_id: number;
471
+ nb_decimals_amount: number;
472
+ nb_decimals_price: number;
473
+ is_valid_from: number;
474
+ is_compact_view: boolean;
475
+ show_position_taxes: boolean;
476
+ payment_type_id: number;
477
+ }
478
+ enum SearchParameters {
479
+ id = "id",
480
+ kb_item_status_id = "kb_item_status_id",
481
+ document_nr = "document_nr",
482
+ title = "title",
483
+ contact_id = "contact_id",
484
+ contact_sub_id = "contact_sub_id",
485
+ user_id = "user_id",
486
+ currency_id = "currency_id",
487
+ total_gross = "total_gross",
488
+ total_net = "total_net",
489
+ total = "total",
490
+ is_valid_from = "is_valid_from",
491
+ is_valid_to = "is_valid_to",
492
+ is_valid_until = "is_valid_until",
493
+ updated_at = "updated_at"
494
+ }
495
+ }
496
+
497
+ declare class Expenses extends BaseCrud<ExpensesStatic.Expense, ExpensesStatic.Expense, ExpensesStatic.Expense, ExpensesStatic.SearchParameters, ExpensesStatic.ExpenseCreate, ExpensesStatic.ExpenseOverwrite> {
498
+ constructor(apiToken: string);
499
+ }
500
+
501
+ declare namespace BillsStatic {
502
+ interface Bill {
503
+ id: number;
504
+ document_nr: string;
505
+ title: string;
506
+ contact_id: number;
507
+ contact_sub_id: number;
508
+ user_id: number;
509
+ pr_project_id: number;
510
+ logopaper_id: number;
511
+ language_id: number;
512
+ bank_account_id: number;
513
+ currency_id: number;
514
+ header: string;
515
+ footer: string;
516
+ total_gross: string;
517
+ total_net: string;
518
+ total_taxes: string;
519
+ total_regards_taxes: string;
520
+ total_paid_payments: string;
521
+ total_remaining_payments: string;
522
+ total: string;
523
+ total_rounding_difference: number;
524
+ mwst_type: 0 | 1 | 2;
525
+ mwst_is_net: boolean;
526
+ show_position_taxes: boolean;
527
+ is_valid_from: string;
528
+ is_valid_to: string;
529
+ contact_address: string;
530
+ kb_item_status_id: number;
531
+ api_reference: string;
532
+ viewed_by_client_at: string;
533
+ updated_at: string;
534
+ taxs: Array<Tax>;
535
+ }
536
+ interface BillFull extends Bill {
537
+ positions: Array<CustomPosition | ArticlePosition>;
538
+ }
539
+ interface BillCreate {
540
+ contact_id: number;
541
+ user_id: number;
542
+ api_reference?: string;
543
+ bank_account_id?: number;
544
+ contact_address_id?: number;
545
+ contact_address_manual?: string;
546
+ contact_sub_id?: number;
547
+ currency_id?: number;
548
+ footer?: string;
549
+ header?: string;
550
+ is_compact_view?: boolean;
551
+ is_valid_from?: string;
552
+ is_valid_to?: string;
553
+ language_id?: number;
554
+ logopaper_id?: number;
555
+ mwst_is_net?: boolean;
556
+ mwst_type?: 0 | 1 | 2;
557
+ nb_decimals_amount?: number;
558
+ nb_decimals_price?: number;
559
+ payment_type_id?: number;
560
+ pr_project_id?: number;
561
+ show_position_taxes?: boolean;
562
+ terms_of_payment_text?: string;
563
+ title?: string;
564
+ viewed_by_client_at?: string;
565
+ positions: Array<CustomPositionCreate | ArticlePositionCreate>;
566
+ }
567
+ interface Tax {
568
+ percentage: number;
569
+ value: string;
570
+ }
571
+ enum SearchParameters {
572
+ id = "id",
573
+ kb_item_status_id = "kb_item_status_id",
574
+ document_nr = "document_nr",
575
+ title = "title",
576
+ contact_id = "contact_id",
577
+ contact_sub_id = "contact_sub_id",
578
+ user_id = "user_id",
579
+ currency_id = "currency_id",
580
+ total_gross = "total_gross",
581
+ total_net = "total_net",
582
+ total = "total",
583
+ is_valid_from = "is_valid_from",
584
+ is_valid_to = "is_valid_to",
585
+ is_valid_until = "is_valid_until",
586
+ updated_at = "updated_at"
587
+ }
588
+ interface Position {
589
+ id: number;
590
+ type: "KbPositionCustom" | "KbPositionArticle";
591
+ amount: string;
592
+ unit_id?: number;
593
+ account_id: number;
594
+ unit_name?: string;
595
+ tax_id: number;
596
+ tax_value: string;
597
+ text: string;
598
+ unit_price: string;
599
+ discount_in_percent?: string;
600
+ position_total: string;
601
+ pos: string;
602
+ internal_pos: number;
603
+ parent_id?: number;
604
+ is_optional: boolean;
605
+ }
606
+ interface PositionCreate {
607
+ type: "KbPositionCustom" | "KbPositionArticle";
608
+ unit_price: string;
609
+ tax_id: number;
610
+ amount: string;
611
+ account_id: number;
612
+ text?: string;
613
+ discount_in_percent?: number;
614
+ unit_id?: number;
615
+ }
616
+ interface CustomPositionCreate extends PositionCreate {
617
+ }
618
+ interface CustomPosition extends Position {
619
+ }
620
+ interface ArticlePositionCreate extends PositionCreate {
621
+ type: "KbPositionArticle";
622
+ article_id: number;
623
+ }
624
+ interface ArticlePosition extends Position {
625
+ type: "KbPositionArticle";
626
+ article_id: number;
627
+ }
628
+ interface BillOverwrite {
629
+ contact_id: number;
630
+ user_id: number;
631
+ api_reference: string;
632
+ bank_account_id: number;
633
+ contact_address_id?: number;
634
+ contact_address_manual?: string;
635
+ contact_sub_id: number;
636
+ currency_id: number;
637
+ footer: string;
638
+ header: string;
639
+ is_valid_from: string;
640
+ is_valid_to: string;
641
+ language_id: number;
642
+ logopaper_id: number;
643
+ mwst_is_net: boolean;
644
+ mwst_type: 0 | 1 | 2;
645
+ show_position_taxes: boolean;
646
+ title: string;
647
+ positions: Array<CustomPositionOverwrite | ArticlePositionOverwrite>;
648
+ nb_decimals_amount: number;
649
+ nb_decimals_price: number;
650
+ is_compact_view: boolean;
651
+ payment_type_id: number;
652
+ }
653
+ interface PositionOverwrite {
654
+ type: "KbPositionCustom" | "KbPositionArticle";
655
+ unit_price: string;
656
+ tax_id: number;
657
+ amount: string;
658
+ account_id: number;
659
+ text: string;
660
+ }
661
+ interface ArticlePositionOverwrite extends PositionOverwrite {
662
+ type: "KbPositionArticle";
663
+ article_id: number;
664
+ }
665
+ interface CustomPositionOverwrite extends PositionOverwrite {
666
+ }
667
+ }
668
+
669
+ declare namespace PaymentsStatic {
670
+ interface Payment {
671
+ id: number;
672
+ date: string;
673
+ value: string;
674
+ bank_account_id?: number;
675
+ title: string;
676
+ payment_service_id?: number;
677
+ is_client_account_redemption: boolean;
678
+ is_cash_discount: boolean;
679
+ kb_invoice_id?: number;
680
+ kb_credit_voucher_id?: number;
681
+ kb_bill_id: number;
682
+ kb_credit_voucher_text: string;
683
+ }
684
+ interface PaymentCreate {
685
+ date: string;
686
+ value: number;
687
+ bank_account_id?: number;
688
+ payment_service_id?: number;
689
+ }
690
+ }
691
+
692
+ /**
693
+ * @deprecated Use BillsV4 instead
694
+ */
695
+ declare class Bills extends BaseCrud<BillsStatic.Bill, BillsStatic.BillFull, BillsStatic.Bill, BillsStatic.SearchParameters, BillsStatic.BillCreate, BillsStatic.BillOverwrite> {
696
+ constructor(apiToken: string);
697
+ /**
698
+ * issue a bill
699
+ *
700
+ * @param {number} id
701
+ * @returns {Promise<{ success: boolean }>}
702
+ * @memberof Bills
703
+ */
704
+ issue(id: number): Promise<{
705
+ success: boolean;
706
+ }>;
707
+ /**
708
+ * revert a bill issue
709
+ *
710
+ * @param {number} id
711
+ * @returns {Promise<{ success: boolean }>}
712
+ * @memberof Bills
713
+ */
714
+ revertIssue(id: number): Promise<{
715
+ success: boolean;
716
+ }>;
717
+ /**
718
+ * List all payments for this bill
719
+ *
720
+ * @param {number} billId
721
+ * @param {BaseStatic.BaseOptions} [options]
722
+ * @returns {Promise<PaymentsStatic.Payment[]>}
723
+ * @memberof Bills
724
+ */
725
+ listPayments(billId: number, options?: BaseStatic.BaseOptions): Promise<PaymentsStatic.Payment[]>;
726
+ /**
727
+ * Show a specific payment for this bill
728
+ *
729
+ * @param {number} billId
730
+ * @param {number} paymentId
731
+ * @param {BaseStatic.BaseOptions} [options]
732
+ * @returns {Promise<PaymentsStatic.Payment>}
733
+ * @memberof Bills
734
+ */
735
+ showPayment(billId: number, paymentId: number, options?: BaseStatic.BaseOptions): Promise<PaymentsStatic.Payment>;
736
+ /**
737
+ * Create a new payment for this bill
738
+ *
739
+ * @param {number} billId
740
+ * @param {PaymentsStatic.PaymentCreate} payment
741
+ * @returns {Promise<PaymentsStatic.Payment>}
742
+ * @memberof Bills
743
+ */
744
+ createPayment(billId: number, payment: PaymentsStatic.PaymentCreate): Promise<PaymentsStatic.Payment>;
745
+ /**
746
+ * delete a specific payment for this bill
747
+ *
748
+ * @param {number} billId
749
+ * @param {number} paymentId
750
+ * @returns {Promise<boolean>}
751
+ * @memberof Bills
752
+ */
753
+ deletePayment(billId: number, paymentId: number): Promise<boolean>;
754
+ }
755
+
756
+ declare namespace OrdersStatic {
757
+ interface OrderSmall {
758
+ id: number;
759
+ document_nr: string;
760
+ title?: string;
761
+ contact_id: number;
762
+ contact_sub_id?: number;
763
+ user_id: number;
764
+ project_id?: number;
765
+ logopaper_id: number;
766
+ language_id: number;
767
+ bank_account_id: number;
768
+ currency_id: number;
769
+ payment_type_id: number;
770
+ header: string;
771
+ footer: string;
772
+ total_gross: string;
773
+ total_net: string;
774
+ total_taxes: string;
775
+ total: string;
776
+ mwst_type: number;
777
+ mwst_is_net: boolean;
778
+ show_position_taxes: boolean;
779
+ is_valid_from: string;
780
+ contact_address: string;
781
+ delivery_address_type: number;
782
+ delivery_address: string;
783
+ kb_item_status_id: number;
784
+ is_recurring: boolean;
785
+ api_reference?: string;
786
+ viewed_by_client_at?: string;
787
+ updated_at: string;
788
+ taxs: Tax[];
789
+ network_link: string;
790
+ }
791
+ interface Tax {
792
+ percentage: number;
793
+ value: string;
794
+ }
795
+ interface OrderFull extends OrderSmall {
796
+ positions: Array<CustomPosition | ArticlePosition>;
797
+ }
798
+ interface OrderCreate {
799
+ user_id: number;
800
+ contact_id: number;
801
+ positions: Array<CustomPositionCreate | ArticlePositionCreate>;
802
+ logopaper_id: number;
803
+ language_id: number;
804
+ bank_account_id: number;
805
+ currency_id: number;
806
+ mwst_type: number;
807
+ nb_decimals_amount: number;
808
+ nb_decimals_price: number;
809
+ is_valid_from: number;
810
+ is_compact_view: boolean;
811
+ show_position_taxes: boolean;
812
+ payment_type_id: number;
813
+ }
814
+ interface PositionCreate {
815
+ type: "KbPositionCustom" | "KbPositionArticle";
816
+ unit_price: string;
817
+ tax_id: number;
818
+ amount: string;
819
+ text?: string;
820
+ discount_in_percent?: number;
821
+ unit_id?: number;
822
+ is_optional: boolean;
823
+ }
824
+ interface CustomPositionCreate extends PositionCreate {
825
+ }
826
+ interface CustomPosition extends Position {
827
+ }
828
+ interface ArticlePositionCreate extends PositionCreate {
829
+ type: "KbPositionArticle";
830
+ article_id: number;
831
+ }
832
+ interface ArticlePosition extends Position {
833
+ type: "KbPositionArticle";
834
+ article_id: number;
835
+ }
836
+ interface Position {
837
+ id: number;
838
+ type: "KbPositionArticle" | "KbPositionCustom";
839
+ amount: string;
840
+ unit_id?: number;
841
+ account_id: number;
842
+ unit_name?: string;
843
+ tax_id: number;
844
+ tax_value: string;
845
+ text: string;
846
+ unit_price: string;
847
+ discount_in_percent?: string;
848
+ position_total: string;
849
+ pos: string;
850
+ internal_pos: number;
851
+ parent_id?: number;
852
+ is_optional: boolean;
853
+ article_id: number;
854
+ }
855
+ enum OrderSearchParameters {
856
+ id = "id",
857
+ kb_item_status_id = "kb_item_status_id",
858
+ document_nr = "document_nr",
859
+ title = "title",
860
+ contact_id = "contact_id",
861
+ contact_sub_id = "contact_sub_id",
862
+ user_id = "user_id",
863
+ currency_id = "currency_id",
864
+ total_gross = "total_gross",
865
+ total_net = "total_net",
866
+ total = "total",
867
+ is_valid_from = "is_valid_from",
868
+ is_valid_to = "is_valid_to",
869
+ is_valid_until = "is_valid_until",
870
+ updated_at = "updated_at"
871
+ }
872
+ }
873
+
874
+ declare namespace PositionsStatic {
875
+ type KbDocumentType = "kb_invoice" | "kb_offer" | "kb_order";
876
+ type PositionType = "KbPositionCustom" | "KbPositionArticle" | "KbPositionText" | "KbPositionSubtotal" | "KbPositionPagebreak" | "KbPositionDiscount" | "KbPositionSubposition";
877
+ interface DefaultPositionCreate {
878
+ amount: string;
879
+ amount_reserved: string;
880
+ amount_open: string;
881
+ amount_completed: string;
882
+ unit_id: number;
883
+ account_id: number;
884
+ tax_id: number;
885
+ text: string;
886
+ unit_price: string;
887
+ discount_in_percent: string | null;
888
+ is_optional: boolean;
889
+ }
890
+ interface DefaultPosition extends Omit<DefaultPositionCreate, "unit_price"> {
891
+ id: number;
892
+ unit_name: string;
893
+ tax_value: string;
894
+ position_total: string;
895
+ unit_price: string | null;
896
+ pos: string;
897
+ internal_pos: number;
898
+ type: "KbPositionCustom";
899
+ parent_id: number | null;
900
+ }
901
+ interface ItemPositionCreate extends DefaultPositionCreate {
902
+ article_id: number;
903
+ }
904
+ interface ItemPosition extends Omit<DefaultPosition, "type"> {
905
+ article_id: number;
906
+ type: "KbPositionArticle";
907
+ }
908
+ interface TextPositionCreate {
909
+ text: string;
910
+ show_pos_nr: boolean;
911
+ }
912
+ interface TextPosition extends TextPositionCreate {
913
+ id: number;
914
+ pos: string | null;
915
+ internal_pos: number;
916
+ is_optional: boolean;
917
+ type: "KbPositionText";
918
+ parent_id: number | null;
919
+ }
920
+ }
921
+
922
+ declare namespace PositionStatic {
923
+ interface PositionCreate {
924
+ amount?: string;
925
+ unit_id?: number;
926
+ account_id?: number;
927
+ tax_id?: number;
928
+ text: string;
929
+ unit_price?: string;
930
+ discount_in_percent?: string;
931
+ type: string;
932
+ parent_id?: number | null;
933
+ article_id?: number;
934
+ show_pos_nr?: boolean;
935
+ is_percentual?: boolean;
936
+ value?: string;
937
+ }
938
+ interface Position {
939
+ id: number;
940
+ type: PositionsStatic.PositionType;
941
+ amount: string;
942
+ unit_id: number;
943
+ account_id: number;
944
+ unit_name: string;
945
+ tax_id: number;
946
+ tax_value: string;
947
+ text: string;
948
+ unit_price: string;
949
+ discount_in_percent: string | null;
950
+ position_total: string;
951
+ pos: string;
952
+ internal_pos: number;
953
+ parent_id: number | null;
954
+ is_optional: boolean;
955
+ }
956
+ }
957
+
958
+ declare class Orders extends BaseCrud<OrdersStatic.OrderSmall, OrdersStatic.OrderFull, OrdersStatic.OrderSmall, OrdersStatic.OrderSearchParameters, OrdersStatic.OrderCreate, OrdersStatic.OrderCreate> {
959
+ constructor(apiToken: string);
960
+ /**
961
+ * Create a default position for an order
962
+ *
963
+ * @param {number} orderId
964
+ * @param {PositionsStatic.DefaultPositionCreate} position
965
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
966
+ * @memberof Orders
967
+ */
968
+ createDefaultPosition(orderId: number, position: PositionsStatic.DefaultPositionCreate): Promise<PositionsStatic.DefaultPosition>;
969
+ /**
970
+ * Create an item position for an order
971
+ *
972
+ * @param {number} orderId
973
+ * @param {PositionsStatic.ItemPositionCreate} position
974
+ * @returns {Promise<PositionsStatic.ItemPosition>}
975
+ * @memberof Orders
976
+ */
977
+ createItemPosition(orderId: number, position: PositionsStatic.ItemPositionCreate): Promise<PositionsStatic.ItemPosition>;
978
+ /**
979
+ * Create a text position for an order
980
+ *
981
+ * @param {number} orderId
982
+ * @param {PositionsStatic.TextPositionCreate} position
983
+ * @returns {Promise<PositionsStatic.TextPosition>}
984
+ * @memberof Orders
985
+ */
986
+ createTextPosition(orderId: number, position: PositionsStatic.TextPositionCreate): Promise<PositionsStatic.TextPosition>;
987
+ /**
988
+ * Delete a default position for an order
989
+ *
990
+ * @param {number} orderId
991
+ * @param {number} positionId
992
+ * @returns {Promise<boolean>}
993
+ * @memberof Orders
994
+ */
995
+ deleteDefaultPosition(orderId: number, positionId: number): Promise<boolean>;
996
+ /**
997
+ * Delete an item position for an order
998
+ *
999
+ * @param {number} orderId
1000
+ * @param {number} positionId
1001
+ * @returns {Promise<boolean>}
1002
+ * @memberof Orders
1003
+ */
1004
+ deleteItemPosition(orderId: number, positionId: number): Promise<boolean>;
1005
+ /**
1006
+ * Delete a text position for an order
1007
+ *
1008
+ * @param {number} orderId
1009
+ * @param {number} positionId
1010
+ * @returns {Promise<boolean>}
1011
+ * @memberof Orders
1012
+ */
1013
+ deleteTextPosition(orderId: number, positionId: number): Promise<boolean>;
1014
+ /**
1015
+ * Delete a position for an order, whatever its type
1016
+ *
1017
+ * @param {number} orderId
1018
+ * @param {Pick<PositionStatic.Position, "id" | "type">} position
1019
+ * @returns {Promise<boolean>}
1020
+ * @memberof Orders
1021
+ */
1022
+ deletePosition(orderId: number, position: Pick<PositionStatic.Position, "id" | "type">): Promise<boolean>;
1023
+ }
1024
+
1025
+ declare namespace ProjectsStatic {
1026
+ interface Project {
1027
+ id: number;
1028
+ nr: string;
1029
+ name: string;
1030
+ start_date?: string;
1031
+ end_date?: string;
1032
+ comment: string;
1033
+ pr_state_id: number;
1034
+ pr_project_type_id: number;
1035
+ contact_id: number;
1036
+ contact_sub_id?: number;
1037
+ pr_invoice_type_id?: number;
1038
+ pr_invoice_type_amount: number;
1039
+ pr_budget_type_id?: number;
1040
+ pr_budget_type_amount: number;
1041
+ }
1042
+ interface ProjectCreate {
1043
+ contact_id: number;
1044
+ name: string;
1045
+ pr_project_type_id: number;
1046
+ pr_state_id: number;
1047
+ user_id: number;
1048
+ comment?: string;
1049
+ contact_sub_id?: number;
1050
+ end_date?: string;
1051
+ pr_budget_type_amount?: number;
1052
+ pr_budget_type_id?: number;
1053
+ pr_invoice_type_amount?: number;
1054
+ pr_invoice_type_id?: number;
1055
+ pr_sub_state_id?: number;
1056
+ start_date?: string;
1057
+ }
1058
+ interface ProjectOverwrite {
1059
+ contact_id: number;
1060
+ name: string;
1061
+ pr_project_type_id: number;
1062
+ pr_state_id: number;
1063
+ user_id: number;
1064
+ comment?: string;
1065
+ contact_sub_id?: number;
1066
+ end_date?: string;
1067
+ pr_budget_type_amount?: number;
1068
+ pr_budget_type_id?: number;
1069
+ pr_invoice_type_amount?: number;
1070
+ pr_invoice_type_id?: number;
1071
+ pr_sub_state_id?: number;
1072
+ start_date?: string;
1073
+ }
1074
+ enum ProjectSearchParameters {
1075
+ name = "name",
1076
+ contact_id = "contact_id",
1077
+ pr_state_id = "pr_state_id"
1078
+ }
1079
+ }
1080
+
1081
+ declare class Projects extends BaseCrud<ProjectsStatic.Project, ProjectsStatic.Project, ProjectsStatic.Project, ProjectsStatic.ProjectSearchParameters, ProjectsStatic.ProjectCreate, ProjectsStatic.ProjectOverwrite> {
1082
+ constructor(apiToken: string);
1083
+ }
1084
+
1085
+ declare namespace ProjectStatusesStatic {
1086
+ interface ProjectStatus {
1087
+ id: number;
1088
+ name: string;
1089
+ }
1090
+ enum ProjectStatusSearchParameters {
1091
+ text = "text"
1092
+ }
1093
+ }
1094
+
1095
+ declare class ProjectStatuses extends BaseCrud<ProjectStatusesStatic.ProjectStatus, ProjectStatusesStatic.ProjectStatus, ProjectStatusesStatic.ProjectStatus, ProjectStatusesStatic.ProjectStatusSearchParameters, {}, {}> {
1096
+ constructor(apiToken: string);
1097
+ /**
1098
+ * Not implemented by Bexio yet
1099
+ *
1100
+ * @param {number} id
1101
+ * @param {{}} ressource
1102
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
1103
+ * @memberof ProjectStatuses
1104
+ */
1105
+ overwrite(id: number, ressource: {}): Promise<ProjectStatusesStatic.ProjectStatus>;
1106
+ /**
1107
+ * Not implemented by Bexio yet
1108
+ *
1109
+ * @param {number} id
1110
+ * @param {{}} ressource
1111
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
1112
+ * @memberof ProjectStatuses
1113
+ */
1114
+ edit(id: number, ressource: {}): Promise<ProjectStatusesStatic.ProjectStatus>;
1115
+ /**
1116
+ * Not implemented by Bexio yet
1117
+ *
1118
+ * @param {{}} ressource
1119
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
1120
+ * @memberof ProjectStatuses
1121
+ */
1122
+ create(ressource: {}): Promise<ProjectStatusesStatic.ProjectStatus>;
1123
+ /**
1124
+ * Not implemented by Bexio yet
1125
+ *
1126
+ * @param {number} id
1127
+ * @returns {Promise<boolean>}
1128
+ * @memberof ProjectStatuses
1129
+ */
1130
+ delete(id: number): Promise<boolean>;
1131
+ }
1132
+
1133
+ declare namespace ProjectTypesStatic {
1134
+ interface ProjectType {
1135
+ id: number;
1136
+ name: string;
1137
+ }
1138
+ enum ProjectTypeSearchParameters {
1139
+ project_type = "project_type"
1140
+ }
1141
+ }
1142
+
1143
+ declare class ProjectTypes extends BaseCrud<ProjectTypesStatic.ProjectType, ProjectTypesStatic.ProjectType, ProjectTypesStatic.ProjectType, ProjectTypesStatic.ProjectTypeSearchParameters, {}, ProjectTypesStatic.ProjectType> {
1144
+ constructor(apiToken: string);
1145
+ /**
1146
+ * Not implemented by Bexio yet
1147
+ *
1148
+ * @param {{}} ressource
1149
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
1150
+ * @memberof ProjectTypes
1151
+ */
1152
+ create(ressource: {}): Promise<ProjectTypesStatic.ProjectType>;
1153
+ /**
1154
+ * Not implemented by Bexio yet
1155
+ *
1156
+ * @param {number} id
1157
+ * @param {{}} ressource
1158
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
1159
+ * @memberof ProjectTypes
1160
+ */
1161
+ edit(id: number, ressource: {}): Promise<ProjectTypesStatic.ProjectType>;
1162
+ /**
1163
+ * Not implemented by Bexio yet
1164
+ *
1165
+ * @param {number} id
1166
+ * @param {{}} ressource
1167
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
1168
+ * @memberof ProjectTypes
1169
+ */
1170
+ overwrite(id: number, ressource: {}): Promise<ProjectTypesStatic.ProjectType>;
1171
+ /**
1172
+ * Not implemented by Bexio yet
1173
+ *
1174
+ * @param {number} id
1175
+ * @returns {Promise<boolean>}
1176
+ * @memberof ProjectTypes
1177
+ */
1178
+ delete(id: number): Promise<boolean>;
1179
+ }
1180
+
1181
+ declare namespace TimetrackingsStatic {
1182
+ interface TimetrackingsSmall {
1183
+ id: number;
1184
+ user_id: number;
1185
+ status_id?: number;
1186
+ client_service_id: number;
1187
+ text: string;
1188
+ allowable_bill: true;
1189
+ charge?: boolean;
1190
+ contact_id?: number;
1191
+ sub_contact_id?: number;
1192
+ pr_project_id?: number;
1193
+ pr_package_id?: number;
1194
+ pr_milestone_id?: number;
1195
+ travel_time?: number;
1196
+ travel_charge?: boolean;
1197
+ travel_distance?: number;
1198
+ estimated_time?: number;
1199
+ date: string;
1200
+ duration: string;
1201
+ running: boolean;
1202
+ }
1203
+ enum TimetrackingsSearchParameters {
1204
+ id = "id",
1205
+ client_service_id = "client_service_id",
1206
+ contact_id = "contact_id",
1207
+ user_id = "user_id",
1208
+ pr_project_id = "pr_project_id",
1209
+ status_id = "status_id"
1210
+ }
1211
+ interface TimetrackingsFull extends TimetrackingsSmall {
1212
+ tracking: TimetrackingsTrackingRecord;
1213
+ }
1214
+ interface TimetrackingsTrackingRecord {
1215
+ type: "duration" | "range";
1216
+ date: string;
1217
+ duration: string;
1218
+ }
1219
+ interface TimetrackingsCreate {
1220
+ user_id: number;
1221
+ client_service_id: number;
1222
+ allowable_bill: boolean;
1223
+ tracking: TimetrackingsTrackingRecord;
1224
+ charge?: boolean;
1225
+ contact_id?: number;
1226
+ estimated_time?: string;
1227
+ pr_project_id?: number;
1228
+ pr_package_id?: number;
1229
+ pr_milestone_id?: number;
1230
+ status_id?: number;
1231
+ sub_contact_id?: number;
1232
+ text?: string;
1233
+ }
1234
+ interface TimetrackingsEdit {
1235
+ allowable_bill?: boolean;
1236
+ charge?: number;
1237
+ client_service_id?: number;
1238
+ contact_id?: number;
1239
+ estimated_time?: string;
1240
+ pr_milestone_id?: number;
1241
+ pr_package_id?: number;
1242
+ pr_project_id?: number;
1243
+ status_id?: number;
1244
+ sub_contact_id?: number;
1245
+ text?: string;
1246
+ tracking?: TimetrackingsTrackingRecord;
1247
+ user_id?: number;
1248
+ }
1249
+ }
1250
+
1251
+ declare class Timetrackings extends BaseCrud<TimetrackingsStatic.TimetrackingsSmall, TimetrackingsStatic.TimetrackingsFull, TimetrackingsStatic.TimetrackingsSmall, TimetrackingsStatic.TimetrackingsSearchParameters, TimetrackingsStatic.TimetrackingsCreate, {}> {
1252
+ constructor(apiToken: string);
1253
+ /**
1254
+ * Not implemented by Bexio yet
1255
+ *
1256
+ * @param {number} id
1257
+ * @param {{}} ressource
1258
+ * @returns {Promise<TimetrackingsStatic.TimetrackingsFull>}
1259
+ * @memberof Timetracking
1260
+ */
1261
+ overwrite(id: number, ressource: {}): Promise<TimetrackingsStatic.TimetrackingsFull>;
1262
+ }
1263
+
1264
+ declare namespace TimetrackingStatusesStatic {
1265
+ interface TimetrackingStatus {
1266
+ id: number;
1267
+ name: string;
1268
+ }
1269
+ enum TimetrackingStatusesSearchparameters {
1270
+ name = "name"
1271
+ }
1272
+ }
1273
+
1274
+ declare class TimetrackingStatuses extends BaseCrud<TimetrackingStatusesStatic.TimetrackingStatus, TimetrackingStatusesStatic.TimetrackingStatus, TimetrackingStatusesStatic.TimetrackingStatus, TimetrackingStatusesStatic.TimetrackingStatusesSearchparameters, {}, {}> {
1275
+ constructor(apiToken: string);
1276
+ /**
1277
+ * Not implemented by Bexio yet
1278
+ *
1279
+ * @param {number} id
1280
+ * @param {{}} ressource
1281
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
1282
+ * @memberof TimetrackingStatuses
1283
+ */
1284
+ overwrite(id: number, ressource: {}): Promise<TimetrackingStatusesStatic.TimetrackingStatus>;
1285
+ /**
1286
+ * Not implemented by Bexio yet
1287
+ *
1288
+ * @param {number} id
1289
+ * @param {{}} ressource
1290
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
1291
+ * @memberof TimetrackingStatuses
1292
+ */
1293
+ edit(id: number, ressource: {}): Promise<TimetrackingStatusesStatic.TimetrackingStatus>;
1294
+ /**
1295
+ * Not implemented by Bexio yet
1296
+ *
1297
+ * @param {{}} ressource
1298
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
1299
+ * @memberof TimetrackingStatuses
1300
+ */
1301
+ create(ressource: {}): Promise<TimetrackingStatusesStatic.TimetrackingStatus>;
1302
+ /**
1303
+ * Not implemented by Bexio yet
1304
+ *
1305
+ * @param {number} id
1306
+ * @returns {Promise<boolean>}
1307
+ * @memberof TimetrackingStatuses
1308
+ */
1309
+ delete(id: number): Promise<boolean>;
1310
+ }
1311
+
1312
+ declare namespace UsersStatic {
1313
+ interface UserSmall {
1314
+ id: number;
1315
+ nickname?: string;
1316
+ firstname: string;
1317
+ lastname: string;
1318
+ email?: string;
1319
+ color: string;
1320
+ phone_fixed?: string;
1321
+ phone_mobile?: string;
1322
+ is_superadmin: boolean;
1323
+ }
1324
+ interface UserFull extends UserSmall {
1325
+ profile_image: string;
1326
+ }
1327
+ enum UsersSearchparameters {
1328
+ id = "id",
1329
+ nickname = "nickname",
1330
+ firstname = "firstname",
1331
+ lastname = "lastname",
1332
+ color = "color"
1333
+ }
1334
+ }
1335
+
1336
+ declare class Users extends BaseCrud<UsersStatic.UserSmall, UsersStatic.UserFull, UsersStatic.UserSmall, UsersStatic.UsersSearchparameters, {}, {}> {
1337
+ constructor(apiToken: string);
1338
+ /**
1339
+ * Not implemented by Bexio yet
1340
+ *
1341
+ * @param {number} id
1342
+ * @param {{}} ressource
1343
+ * @returns {Promise<UsersStatic.UserFull>}
1344
+ * @memberof Users
1345
+ */
1346
+ overwrite(id: number, ressource: {}): Promise<UsersStatic.UserFull>;
1347
+ /**
1348
+ * Not implemented by Bexio yet
1349
+ *
1350
+ * @param {number} id
1351
+ * @param {{}} ressource
1352
+ * @returns {Promise<UsersStatic.UserFull>}
1353
+ * @memberof Users
1354
+ */
1355
+ edit(id: number, ressource: {}): Promise<UsersStatic.UserFull>;
1356
+ /**
1357
+ * Not implemented by Bexio yet
1358
+ *
1359
+ * @param {{}} ressource
1360
+ * @returns {Promise<UsersStatic.UserFull>}
1361
+ * @memberof Users
1362
+ */
1363
+ create(ressource: {}): Promise<UsersStatic.UserFull>;
1364
+ /**
1365
+ * Not implemented by Bexio yet
1366
+ *
1367
+ * @param {number} id
1368
+ * @returns {Promise<boolean>}
1369
+ * @memberof Users
1370
+ */
1371
+ delete(id: number): Promise<boolean>;
1372
+ }
1373
+
1374
+ declare namespace ItemsStatic {
1375
+ interface Item {
1376
+ id: number;
1377
+ user_id: number;
1378
+ article_type_id: number;
1379
+ contact_id: number;
1380
+ deliverer_code?: string;
1381
+ deliverer_name?: string;
1382
+ deliverer_description?: string;
1383
+ intern_code: string;
1384
+ intern_name: string;
1385
+ intern_description?: string;
1386
+ purchase_price?: number;
1387
+ sale_price?: number;
1388
+ purchase_total?: number;
1389
+ sale_total?: number;
1390
+ currency_id?: number;
1391
+ tax_income_id?: number;
1392
+ tax_id?: number;
1393
+ tax_expense_id?: number;
1394
+ unit_id?: number;
1395
+ is_stock: boolean;
1396
+ stock_id?: number;
1397
+ stock_place_id?: number;
1398
+ stock_nr: number;
1399
+ stock_min_nr: number;
1400
+ stock_reserved_nr: number;
1401
+ stock_available_nr: number;
1402
+ stock_picked_nr: number;
1403
+ stock_disposed_nr: number;
1404
+ stock_ordered_nr: number;
1405
+ width?: number;
1406
+ height?: number;
1407
+ weight?: number;
1408
+ volume?: number;
1409
+ html_text?: string;
1410
+ remarks?: string;
1411
+ delivery_price?: number;
1412
+ article_group_id?: number;
1413
+ }
1414
+ interface ItemCreate {
1415
+ user_id: number;
1416
+ article_type_id: number;
1417
+ contact_id: number;
1418
+ deliverer_code?: string;
1419
+ deliverer_name?: string;
1420
+ deliverer_description?: string;
1421
+ intern_code: string;
1422
+ intern_name: string;
1423
+ intern_description?: string;
1424
+ purchase_price?: number;
1425
+ sale_price?: number;
1426
+ purchase_total?: number;
1427
+ sale_total?: number;
1428
+ currency_id?: number;
1429
+ tax_income_id?: number;
1430
+ tax_id?: number;
1431
+ tax_expense_id?: number;
1432
+ unit_id?: number;
1433
+ is_stock: boolean;
1434
+ stock_id?: number;
1435
+ stock_place_id?: number;
1436
+ stock_nr: number;
1437
+ stock_min_nr: number;
1438
+ stock_reserved_nr: number;
1439
+ stock_available_nr: number;
1440
+ stock_picked_nr: number;
1441
+ stock_disposed_nr: number;
1442
+ stock_ordered_nr: number;
1443
+ width?: number;
1444
+ height?: number;
1445
+ weight?: number;
1446
+ volume?: number;
1447
+ html_text?: string;
1448
+ remarks?: string;
1449
+ delivery_price?: number;
1450
+ article_group_id?: number;
1451
+ }
1452
+ interface ItemOverwrite extends ItemCreate {
1453
+ }
1454
+ enum ItemSearchParameters {
1455
+ id = "id",
1456
+ user_id = "user_id",
1457
+ article_type_id = "article_type_id",
1458
+ contact_id = "contact_id",
1459
+ deliverer_code = "deliverer_code",
1460
+ deliverer_name = "deliverer_name",
1461
+ deliverer_description = "deliverer_description",
1462
+ intern_code = "intern_code",
1463
+ intern_name = "intern_name",
1464
+ intern_description = "intern_description",
1465
+ purchase_price = "purchase_price",
1466
+ sale_price = "sale_price",
1467
+ purchase_total = "purchase_total",
1468
+ sale_total = "sale_total",
1469
+ currency_id = "currency_id",
1470
+ tax_income_id = "tax_income_id",
1471
+ tax_id = "tax_id",
1472
+ tax_expense_id = "tax_expense_id",
1473
+ unit_id = "unit_id",
1474
+ is_stock = "is_stock",
1475
+ stock_id = "stock_id",
1476
+ stock_place_id = "stock_place_id",
1477
+ stock_nr = "stock_nr",
1478
+ stock_min_nr = "stock_min_nr",
1479
+ stock_reserved_nr = "stock_reserved_nr",
1480
+ stock_available_nr = "stock_available_nr",
1481
+ stock_picked_nr = "stock_picked_nr",
1482
+ stock_disposed_nr = "stock_disposed_nr",
1483
+ stock_ordered_nr = "stock_ordered_nr",
1484
+ width = "width",
1485
+ height = "height",
1486
+ weight = "weight",
1487
+ volume = "volume",
1488
+ html_text = "html_text",
1489
+ remarks = "remarks",
1490
+ delivery_price = "delivery_price",
1491
+ article_group_id = "article_group_id"
1492
+ }
1493
+ }
1494
+
1495
+ declare class Items extends BaseCrud<ItemsStatic.Item, ItemsStatic.Item, ItemsStatic.Item, ItemsStatic.ItemSearchParameters, ItemsStatic.ItemCreate, ItemsStatic.ItemOverwrite> {
1496
+ constructor(apiToken: string);
1497
+ }
1498
+
1499
+ declare namespace InvoicesStatic {
1500
+ interface Invoice {
1501
+ id: number;
1502
+ title: string | null;
1503
+ contact_id: number;
1504
+ contact_sub_id: number | null;
1505
+ user_id: number;
1506
+ pr_project_id: number | null;
1507
+ logopaper_id: number;
1508
+ language_id: number;
1509
+ bank_account_id: number;
1510
+ currency_id: number;
1511
+ payment_type_id: number;
1512
+ header: string;
1513
+ footer: string;
1514
+ mwst_type: number;
1515
+ mwst_is_net: boolean;
1516
+ show_position_taxes: boolean;
1517
+ is_valid_from: string;
1518
+ is_valid_to: string;
1519
+ reference: null | string;
1520
+ api_reference: null | string;
1521
+ template_slug: string;
1522
+ positions: PositionStatic.Position[];
1523
+ document_nr: string;
1524
+ total_gross: string;
1525
+ total_net: string;
1526
+ total_taxes: string;
1527
+ total_received_payments: string;
1528
+ total_credit_vouchers: string;
1529
+ total_remaining_payments: string;
1530
+ total: string;
1531
+ total_rounding_difference: number;
1532
+ contact_address: string;
1533
+ kb_item_status_id: number;
1534
+ viewed_by_client_at: string | null;
1535
+ updated_at: string;
1536
+ esr_id: number;
1537
+ qr_invoice_id: number;
1538
+ taxs: {
1539
+ percentage: string;
1540
+ value: string;
1541
+ }[];
1542
+ network_link: string | null;
1543
+ }
1544
+ interface InvoiceCreate {
1545
+ title?: string | null;
1546
+ contact_id: number;
1547
+ contact_sub_id?: number | null;
1548
+ contact_address_manual?: string | null;
1549
+ user_id: number;
1550
+ pr_project_id?: number | null;
1551
+ logopaper_id?: number;
1552
+ language_id?: number;
1553
+ bank_account_id?: number;
1554
+ currency_id?: number;
1555
+ payment_type_id?: number;
1556
+ header?: string;
1557
+ footer?: string;
1558
+ mwst_type?: number;
1559
+ mwst_is_net?: boolean;
1560
+ show_position_taxes?: boolean;
1561
+ is_valid_from?: string;
1562
+ is_valid_to?: string;
1563
+ reference?: string | null;
1564
+ api_reference?: string | null;
1565
+ template_slug?: string;
1566
+ positions: PositionStatic.PositionCreate[];
1567
+ }
1568
+ interface InvoiceOverwrite {
1569
+ title?: string | null;
1570
+ contact_id?: number;
1571
+ contact_sub_id?: number | null;
1572
+ contact_address_manual?: string | null;
1573
+ user_id?: number;
1574
+ pr_project_id?: number | null;
1575
+ logopaper_id?: number;
1576
+ language_id?: number;
1577
+ bank_account_id?: number;
1578
+ currency_id?: number;
1579
+ payment_type_id?: number;
1580
+ header?: string;
1581
+ footer?: string;
1582
+ mwst_type?: number;
1583
+ mwst_is_net?: boolean;
1584
+ show_position_taxes?: boolean;
1585
+ is_valid_from?: string;
1586
+ is_valid_to?: string;
1587
+ reference?: null;
1588
+ api_reference?: null;
1589
+ template_slug?: string;
1590
+ positions: PositionStatic.PositionCreate[];
1591
+ }
1592
+ enum InvoiceSearchParameters {
1593
+ id = "id",
1594
+ kb_item_status_id = "kb_item_status_id",
1595
+ document_nr = "document_nr",
1596
+ title = "title",
1597
+ api_reference = "api_reference",
1598
+ contact_id = "contact_id",
1599
+ contact_sub_id = "contact_sub_id",
1600
+ user_id = "user_id",
1601
+ currency_id = "currency_id",
1602
+ total_gross = "total_gross",
1603
+ total_net = "total_net",
1604
+ total = "total",
1605
+ is_valid_from = "is_valid_from",
1606
+ is_valid_to = "is_valid_to",
1607
+ updated_at = "updated_at"
1608
+ }
1609
+ interface InvoiceSend {
1610
+ recipient_email: string;
1611
+ subject: string;
1612
+ message: string;
1613
+ mark_as_open: boolean;
1614
+ attach_pdf?: boolean;
1615
+ }
1616
+ /**
1617
+ * @deprecated Use `InvoiceSend` instead.
1618
+ */
1619
+ type InvoiceSent = InvoiceSend;
1620
+ interface InvoiceCancelled {
1621
+ success: boolean;
1622
+ }
1623
+ interface InvoiceIssued {
1624
+ success: boolean;
1625
+ }
1626
+ interface InvoiceSentAnswer {
1627
+ success: boolean;
1628
+ }
1629
+ interface Payment {
1630
+ id: number;
1631
+ date: string;
1632
+ value: string;
1633
+ bank_account_id?: number | null;
1634
+ title?: string | null;
1635
+ payment_service_id?: number | null;
1636
+ is_client_account_redemption: boolean;
1637
+ is_cash_discount: boolean;
1638
+ kb_invoice_id?: number | null;
1639
+ kb_credit_voucher_id?: number | null;
1640
+ kb_bill_id?: number | null;
1641
+ kb_credit_voucher_text?: number | null;
1642
+ }
1643
+ enum KB_ITEM_STATUS {
1644
+ Draft = 7,
1645
+ Pending = 8,
1646
+ Paid = 9,
1647
+ Partial = 16,
1648
+ Canceled = 19,
1649
+ Unpaid = 31
1650
+ }
1651
+ enum MWST_TYPE {
1652
+ INCLUDING_TAXES = 0,
1653
+ EXCLUDING_TAXES = 1,
1654
+ EXEMPT_FROM_TAXES = 2
1655
+ }
1656
+ enum PAYMENT_SERVICE {
1657
+ PAYPAL = 1,
1658
+ STRIPE = 2,
1659
+ SIX_PAYMENTS = 3
1660
+ }
1661
+ }
1662
+
1663
+ declare class Invoices extends BaseCrud<InvoicesStatic.Invoice, InvoicesStatic.Invoice, InvoicesStatic.Invoice, InvoicesStatic.InvoiceSearchParameters, InvoicesStatic.InvoiceCreate, InvoicesStatic.InvoiceOverwrite> {
1664
+ constructor(apiToken: string);
1665
+ /**
1666
+ * Send an invoice by email.
1667
+ *
1668
+ * @param {number} id
1669
+ * @param {Partial<InvoicesStatic.InvoiceSend>} ressource
1670
+ * @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
1671
+ * @memberof Invoices
1672
+ */
1673
+ send(id: number, ressource: Partial<InvoicesStatic.InvoiceSend>): Promise<InvoicesStatic.InvoiceSentAnswer>;
1674
+ /**
1675
+ * @deprecated Use `send` instead.
1676
+ */
1677
+ sent(id: number, ressource: Partial<InvoicesStatic.InvoiceSend>): Promise<InvoicesStatic.InvoiceSentAnswer>;
1678
+ cancel(id: number): Promise<InvoicesStatic.InvoiceCancelled>;
1679
+ /**
1680
+ * This action returns a pdf document of the invoice.
1681
+ *
1682
+ * @param {number} id
1683
+ * @param {0 | 1} [logopaper] Whether the PDF should be generated using the letterhead, or not.
1684
+ * @returns {Promise<BaseStatic.PdfResponse>}
1685
+ * @memberof Invoices
1686
+ */
1687
+ showPdf(id: number, logopaper?: 0 | 1): Promise<BaseStatic.PdfResponse>;
1688
+ /**
1689
+ * Issue an invoice. The invoice must be in the draft status.
1690
+ *
1691
+ * @param {number} id
1692
+ * @returns {Promise<InvoicesStatic.InvoiceIssued>}
1693
+ * @memberof Invoices
1694
+ */
1695
+ issue(id: number): Promise<InvoicesStatic.InvoiceIssued>;
1696
+ /**
1697
+ * Mark an invoice as sent.
1698
+ *
1699
+ * @param {number} id
1700
+ * @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
1701
+ * @memberof Invoices
1702
+ */
1703
+ markAsSent(id: number): Promise<InvoicesStatic.InvoiceSentAnswer>;
1704
+ /**
1705
+ * revert a Invoice issue
1706
+ *
1707
+ * @param {number} id
1708
+ * @returns {Promise<{ success: boolean }>}
1709
+ * @memberof Invoices
1710
+ */
1711
+ revertIssue(id: number): Promise<{
1712
+ success: boolean;
1713
+ }>;
1714
+ /**
1715
+ * Create a payment for an invoice
1716
+ *
1717
+ * @param {number} invoiceId
1718
+ * @param {Date} date
1719
+ * @param {string} value
1720
+ * @param {number} [bank_account_id]
1721
+ * @param {number} [payment_service_id]
1722
+ * @return {*} {Promise<InvoicesStatic.Payment>}
1723
+ * @memberof Invoices
1724
+ */
1725
+ createPayment(invoiceId: number, date: Date, value: string, bank_account_id?: number, payment_service_id?: number): Promise<InvoicesStatic.Payment>;
1726
+ /**
1727
+ * Get a payment for an invoice
1728
+ *
1729
+ * @param {number} invoiceId
1730
+ * @param {number} paymentId
1731
+ * @return {*} {Promise<InvoicesStatic.Payment>}
1732
+ * @memberof Invoices
1733
+ */
1734
+ getPayment(invoiceId: number, paymentId: number): Promise<InvoicesStatic.Payment>;
1735
+ /**
1736
+ * Delete a payment for an invoice
1737
+ *
1738
+ * @param {number} invoiceId
1739
+ * @param {number} paymentId
1740
+ * @return {*} {Promise<void>}
1741
+ * @memberof Invoices
1742
+ */
1743
+ deletePayment(invoiceId: number, paymentId: number): Promise<void>;
1744
+ /**
1745
+ * Create a default position for an invoice
1746
+ *
1747
+ * @param {number} invoiceId
1748
+ * @param {PositionsStatic.DefaultPositionCreate} position
1749
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
1750
+ * @memberof Invoices
1751
+ */
1752
+ createDefaultPosition(invoiceId: number, position: PositionsStatic.DefaultPositionCreate): Promise<PositionsStatic.DefaultPosition>;
1753
+ /**
1754
+ * Create an item position for an invoice
1755
+ *
1756
+ * @param {number} invoiceId
1757
+ * @param {PositionsStatic.ItemPositionCreate} position
1758
+ * @returns {Promise<PositionsStatic.ItemPosition>}
1759
+ * @memberof Invoices
1760
+ */
1761
+ createItemPosition(invoiceId: number, position: PositionsStatic.ItemPositionCreate): Promise<PositionsStatic.ItemPosition>;
1762
+ /**
1763
+ * Create a text position for an invoice
1764
+ *
1765
+ * @param {number} invoiceId
1766
+ * @param {PositionsStatic.TextPositionCreate} position
1767
+ * @returns {Promise<PositionsStatic.TextPosition>}
1768
+ * @memberof Invoices
1769
+ */
1770
+ createTextPosition(invoiceId: number, position: PositionsStatic.TextPositionCreate): Promise<PositionsStatic.TextPosition>;
1771
+ /**
1772
+ * Delete a default position for an invoice
1773
+ *
1774
+ * @param {number} invoiceId
1775
+ * @param {number} positionId
1776
+ * @returns {Promise<boolean>}
1777
+ * @memberof Invoices
1778
+ */
1779
+ deleteDefaultPosition(invoiceId: number, positionId: number): Promise<boolean>;
1780
+ /**
1781
+ * Delete an item position for an invoice
1782
+ *
1783
+ * @param {number} invoiceId
1784
+ * @param {number} positionId
1785
+ * @returns {Promise<boolean>}
1786
+ * @memberof Invoices
1787
+ */
1788
+ deleteItemPosition(invoiceId: number, positionId: number): Promise<boolean>;
1789
+ /**
1790
+ * Delete a text position for an invoice
1791
+ *
1792
+ * @param {number} invoiceId
1793
+ * @param {number} positionId
1794
+ * @returns {Promise<boolean>}
1795
+ * @memberof Invoices
1796
+ */
1797
+ deleteTextPosition(invoiceId: number, positionId: number): Promise<boolean>;
1798
+ /**
1799
+ * Delete a position for an invoice, whatever its type
1800
+ *
1801
+ * @param {number} invoiceId
1802
+ * @param {Pick<PositionStatic.Position, "id" | "type">} position
1803
+ * @returns {Promise<boolean>}
1804
+ * @memberof Invoices
1805
+ */
1806
+ deletePosition(invoiceId: number, position: Pick<PositionStatic.Position, "id" | "type">): Promise<boolean>;
1807
+ }
1808
+
1809
+ declare namespace CurrenciesStatic {
1810
+ interface Currency {
1811
+ id: number;
1812
+ name: string;
1813
+ round_factor: number;
1814
+ }
1815
+ interface CurrencyFull extends Currency {
1816
+ exchange_rate?: number;
1817
+ exchange_rate_id?: number;
1818
+ ratio?: number;
1819
+ exchange_rate_to_ratio?: number;
1820
+ source?: "custom" | "monthly_average";
1821
+ source_reason?: "monthly_average_provided" | "monthly_average_unavailable" | "monthly_average_unreachable" | "source_custom";
1822
+ exchange_rate_date?: string;
1823
+ }
1824
+ interface CurrencyCreate {
1825
+ name: string;
1826
+ round_factor: number;
1827
+ }
1828
+ }
1829
+
1830
+ declare class Currencies extends BaseCrud<CurrenciesStatic.CurrencyFull, CurrenciesStatic.Currency, {}, {}, CurrenciesStatic.CurrencyCreate, {}> {
1831
+ constructor(apiToken: string);
1832
+ /**
1833
+ * NOT IMPLEMENTED BY BEXIO YET
1834
+ *
1835
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
1836
+ * @param {BaseStatic.BaseOptions} [options]
1837
+ * @returns {Promise<Array<{}>>}
1838
+ * @memberof Currencies
1839
+ */
1840
+ search(searchOptions: Array<BaseStatic.SearchParameter<{}>>, options?: BaseStatic.BaseOptions): Promise<Array<{}>>;
1841
+ /**
1842
+ * NOT IMPLEMENTED BY BEXIO YET
1843
+ *
1844
+ * @param {number} id
1845
+ * @param {Overwrite} ressource
1846
+ * @returns {Promise<{}>}
1847
+ * @memberof Currencies
1848
+ */
1849
+ overwrite(id: number, ressource: CurrenciesStatic.Currency): Promise<CurrenciesStatic.Currency>;
1850
+ /**
1851
+ * NOT IMPLEMENTED BY BEXIO YET
1852
+ *
1853
+ * @param {number} id
1854
+ * @param {Partial<{}>} ressource
1855
+ * @returns {Promise<CurrenciesStatic.Currency>}
1856
+ * @memberof BaseCrud
1857
+ */
1858
+ edit(id: number, ressource: Partial<{}>): Promise<CurrenciesStatic.Currency>;
1859
+ }
1860
+
1861
+ declare namespace BillsV4Static {
1862
+ interface Bill {
1863
+ id: string;
1864
+ document_no: string;
1865
+ title?: string;
1866
+ status: BillStatus;
1867
+ firstname_suffix?: string;
1868
+ lastname_company: string;
1869
+ created_at: string;
1870
+ vendor_ref?: string;
1871
+ pending_amount?: number;
1872
+ currency_code: string;
1873
+ net?: number;
1874
+ gross?: number;
1875
+ bill_date: string;
1876
+ due_date: string;
1877
+ overdue: boolean;
1878
+ booking_account_ids: number[];
1879
+ attachment_ids: string[];
1880
+ }
1881
+ interface BillFull extends Bill {
1882
+ supplier_id: number;
1883
+ contact_partner_id: number;
1884
+ amount_man: number;
1885
+ amount_calc: number;
1886
+ manual_amount: boolean;
1887
+ exchange_rate: number;
1888
+ base_currency_code: string;
1889
+ item_net: boolean;
1890
+ split_into_line_items: boolean;
1891
+ purchase_order_id?: number;
1892
+ base_currency_amount: number;
1893
+ qr_bill_information?: string;
1894
+ address: Address;
1895
+ line_items: LineItem[];
1896
+ discounts: Discount[];
1897
+ payment?: Payment;
1898
+ note?: string;
1899
+ }
1900
+ interface Address {
1901
+ title?: string;
1902
+ salutation?: string;
1903
+ firstname_suffix?: string;
1904
+ lastname_company: string;
1905
+ address_line?: string;
1906
+ postcode?: string;
1907
+ city?: string;
1908
+ country_code?: string;
1909
+ main_contact_id?: number;
1910
+ contact_address_id?: number;
1911
+ type: "PRIVATE" | "COMPANY";
1912
+ }
1913
+ interface LineItem {
1914
+ position: number;
1915
+ title?: string;
1916
+ tax_id?: number;
1917
+ amount: number;
1918
+ booking_account_id?: number;
1919
+ }
1920
+ interface Discount {
1921
+ position: number;
1922
+ amount: number;
1923
+ }
1924
+ interface Payment {
1925
+ type: PaymentType;
1926
+ bank_account_id?: number;
1927
+ fee?: PaymentFee;
1928
+ execution_date: string;
1929
+ exchange_rate?: number;
1930
+ amount: number;
1931
+ account_no?: string;
1932
+ iban?: string;
1933
+ name?: string;
1934
+ address?: string;
1935
+ street?: string;
1936
+ house_no?: string;
1937
+ postcode?: string;
1938
+ city?: string;
1939
+ country_code?: string;
1940
+ message?: string;
1941
+ booking_text?: string;
1942
+ salary_payment?: boolean;
1943
+ reference_no?: string;
1944
+ }
1945
+ interface BillCreate {
1946
+ supplier_id: number;
1947
+ vendor_ref?: string;
1948
+ title?: string;
1949
+ contact_partner_id: number;
1950
+ bill_date: string;
1951
+ due_date: string;
1952
+ amount_man?: number;
1953
+ amount_calc?: number;
1954
+ manual_amount: boolean;
1955
+ currency_code: string;
1956
+ exchange_rate?: number;
1957
+ base_currency_amount?: number;
1958
+ item_net: boolean;
1959
+ purchase_order_id?: number;
1960
+ qr_bill_information?: string;
1961
+ attachment_ids: string[];
1962
+ address: Address;
1963
+ line_items: LineItem[];
1964
+ discounts: Discount[];
1965
+ payment?: Payment;
1966
+ salary_payment?: boolean;
1967
+ reference_no?: string;
1968
+ note?: string;
1969
+ }
1970
+ interface BillOverwrite {
1971
+ document_no?: string;
1972
+ title?: string;
1973
+ supplier_id: number;
1974
+ vendor_ref?: string;
1975
+ contact_partner_id: number;
1976
+ bill_date: string;
1977
+ due_date: string;
1978
+ amount_man?: number;
1979
+ amount_calc?: number;
1980
+ manual_amount: boolean;
1981
+ currency_code: string;
1982
+ exchange_rate?: number;
1983
+ item_net: boolean;
1984
+ split_into_line_items: boolean;
1985
+ base_currency_amount?: number;
1986
+ attachment_ids: string[];
1987
+ address: Address;
1988
+ line_items: LineItem[];
1989
+ discounts: Discount[];
1990
+ payment?: Payment;
1991
+ }
1992
+ enum SearchParameters {
1993
+ document_no = "document_no",
1994
+ title = "title",
1995
+ vendor_ref = "vendor_ref",
1996
+ currency_code = "currency_code",
1997
+ lastname_company = "lastname_company",
1998
+ firstname_suffix = "firstname_suffix"
1999
+ }
2000
+ enum BillStatusUpdate {
2001
+ DRAFT = "DRAFT",
2002
+ BOOKED = "BOOKED"
2003
+ }
2004
+ enum BillAction {
2005
+ DUPLICATE = "DUPLICATE"
2006
+ }
2007
+ enum BillStatusFilter {
2008
+ DRAFTS = "DRAFTS",
2009
+ TODO = "TODO",
2010
+ PAID = "PAID",
2011
+ OVERDUE = "OVERDUE"
2012
+ }
2013
+ interface ListOptions {
2014
+ limit?: number;
2015
+ page?: number;
2016
+ order?: "asc" | "desc";
2017
+ sort?: string;
2018
+ search_term?: string;
2019
+ "fields[]"?: string[];
2020
+ status?: BillStatusFilter;
2021
+ bill_date_start?: string;
2022
+ bill_date_end?: string;
2023
+ due_date_start?: string;
2024
+ due_date_end?: string;
2025
+ vendor_ref?: string;
2026
+ title?: string;
2027
+ currency_code?: string;
2028
+ pending_amount_min?: number;
2029
+ pending_amount_max?: number;
2030
+ vendor?: string;
2031
+ gross_min?: number;
2032
+ gross_max?: number;
2033
+ net_min?: number;
2034
+ net_max?: number;
2035
+ document_no?: string;
2036
+ supplier_id?: number;
2037
+ average_exchange_rate_enabled?: boolean;
2038
+ }
2039
+ enum PaymentType {
2040
+ IBAN = "IBAN",
2041
+ MANUAL = "MANUAL",
2042
+ QR = "QR"
2043
+ }
2044
+ enum PaymentFee {
2045
+ BY_SENDER = "BY_SENDER",
2046
+ BY_RECEIVER = "BY_RECEIVER",
2047
+ BREAKDOWN = "BREAKDOWN",
2048
+ NO_FEE = "NO_FEE"
2049
+ }
2050
+ enum BillStatus {
2051
+ DRAFT = "DRAFT",
2052
+ BOOKED = "BOOKED",
2053
+ PARTIALLY_CREATED = "PARTIALLY_CREATED",
2054
+ CREATED = "CREATED",
2055
+ PARTIALLY_SENT = "PARTIALLY_SENT",
2056
+ SENT = "SENT",
2057
+ PARTIALLY_DOWNLOADED = "PARTIALLY_DOWNLOADED",
2058
+ DOWNLOADED = "DOWNLOADED",
2059
+ PARTIALLY_PAID = "PARTIALLY_PAID",
2060
+ PAID = "PAID",
2061
+ PARTIALLY_FAILED = "PARTIALLY_FAILED",
2062
+ FAILED = "FAILED"
2063
+ }
2064
+ }
2065
+
2066
+ declare class BillsV4 extends BaseCrud<BillsV4Static.Bill, BillsV4Static.BillFull, BillsV4Static.Bill, BillsV4Static.SearchParameters, BillsV4Static.BillCreate, BillsV4Static.BillOverwrite> {
2067
+ constructor(apiToken: string);
2068
+ /**
2069
+ * Lists the ressource
2070
+ *
2071
+ * @param {BillsV4Static.ListOptions} [options]
2072
+ * @returns {Promise<Array<BillsV4Static.Bill>>}
2073
+ * @memberof BillsV4
2074
+ */
2075
+ list(options?: BillsV4Static.ListOptions): Promise<Array<BillsV4Static.Bill>>;
2076
+ /**
2077
+ * Not implemented by Bexio yet
2078
+ *
2079
+ * @param {Array<BaseStatic.SearchParameter<BillsV4Static.SearchParameters>>} searchOptions
2080
+ * @param {BaseStatic.BaseOptions} [options]
2081
+ * @returns {Promise<BillsV4Static.Bill[]>}
2082
+ * @memberof BillsV4
2083
+ */
2084
+ search(searchOptions: Array<BaseStatic.SearchParameter<BillsV4Static.SearchParameters>>, options?: BaseStatic.BaseOptions): Promise<BillsV4Static.Bill[]>;
2085
+ /**
2086
+ * Update bill status
2087
+ *
2088
+ * @param {string} id
2089
+ * @param {BillsV4Static.BillStatusUpdate} status
2090
+ * @returns {Promise<BillsV4Static.BillFull>}
2091
+ * @memberof BillsV4
2092
+ */
2093
+ updateStatus(id: string, status: BillsV4Static.BillStatusUpdate): Promise<BillsV4Static.BillFull>;
2094
+ /**
2095
+ * Execute bill action
2096
+ *
2097
+ * @param {string} id
2098
+ * @param {BillsV4Static.BillAction} action
2099
+ * @returns {Promise<BillsV4Static.BillFull>}
2100
+ * @memberof BillsV4
2101
+ */
2102
+ executeAction(id: string, action: BillsV4Static.BillAction): Promise<BillsV4Static.BillFull>;
2103
+ /**
2104
+ * Validate whether document number is available or not
2105
+ *
2106
+ * @param {string} documentNo
2107
+ * @returns {Promise<{ valid: boolean; next_available_no: string }>}
2108
+ * @memberof BillsV4
2109
+ */
2110
+ validateDocumentNumber(documentNo: string): Promise<{
2111
+ valid: boolean;
2112
+ next_available_no: string;
2113
+ }>;
2114
+ }
2115
+
2116
+ declare namespace OutgoingPaymentsStatic {
2117
+ /**
2118
+ * Outgoing Payment Status
2119
+ */
2120
+ enum OutgoingPaymentStatus {
2121
+ DOWNLOADED = "DOWNLOADED",
2122
+ OPEN = "OPEN",
2123
+ RECONCILED = "RECONCILED",
2124
+ CANCELLED = "CANCELLED",
2125
+ UPLOADED = "UPLOADED",
2126
+ REJECTED = "REJECTED"
2127
+ }
2128
+ /**
2129
+ * Outgoing Payment Type
2130
+ */
2131
+ enum OutgoingPaymentType {
2132
+ IBAN = "IBAN",
2133
+ MANUAL = "MANUAL",
2134
+ CASH_DISCOUNT = "CASH_DISCOUNT",
2135
+ QR = "QR"
2136
+ }
2137
+ /**
2138
+ * Fee Type
2139
+ */
2140
+ enum FeeType {
2141
+ BY_SENDER = "BY_SENDER",
2142
+ BY_RECEIVER = "BY_RECEIVER",
2143
+ BREAKDOWN = "BREAKDOWN",
2144
+ NO_FEE = "NO_FEE"
2145
+ }
2146
+ /**
2147
+ * Outgoing Payment
2148
+ */
2149
+ interface OutgoingPayment {
2150
+ id: string;
2151
+ status: OutgoingPaymentStatus | string;
2152
+ created_at: string;
2153
+ bill_id: string;
2154
+ payment_type: OutgoingPaymentType | string;
2155
+ execution_date: string;
2156
+ amount: number;
2157
+ currency_code: string;
2158
+ exchange_rate: number;
2159
+ note?: string;
2160
+ sender_bank_account_id?: number;
2161
+ sender_iban?: string;
2162
+ sender_name?: string;
2163
+ sender_street?: string;
2164
+ sender_house_no?: string;
2165
+ sender_city?: string;
2166
+ sender_postcode?: string;
2167
+ sender_country_code?: string;
2168
+ sender_bc_no?: string;
2169
+ sender_bank_no?: string;
2170
+ sender_bank_name?: string;
2171
+ receiver_iban?: string;
2172
+ receiver_name?: string;
2173
+ receiver_street?: string;
2174
+ receiver_house_no?: string;
2175
+ receiver_city?: string;
2176
+ receiver_postcode?: string;
2177
+ receiver_country_code?: string;
2178
+ receiver_bc_no?: string;
2179
+ receiver_bank_no?: string;
2180
+ receiver_bank_name?: string;
2181
+ fee_type?: FeeType | string;
2182
+ is_salary_payment: boolean;
2183
+ reference_no?: string;
2184
+ message?: string;
2185
+ booking_text?: string;
2186
+ banking_payment_id?: string;
2187
+ banking_payment_entry_id?: string;
2188
+ transaction_id?: string;
2189
+ }
2190
+ /**
2191
+ * Outgoing Payment Create
2192
+ */
2193
+ interface OutgoingPaymentCreate {
2194
+ bill_id: string;
2195
+ payment_type: OutgoingPaymentType | string;
2196
+ execution_date: string;
2197
+ amount: number;
2198
+ currency_code: string;
2199
+ exchange_rate: number;
2200
+ note?: string;
2201
+ sender_bank_account_id?: number;
2202
+ sender_iban?: string;
2203
+ sender_name?: string;
2204
+ sender_street?: string;
2205
+ sender_house_no?: string;
2206
+ sender_city?: string;
2207
+ sender_postcode?: string;
2208
+ sender_country_code?: string;
2209
+ sender_bc_no?: string;
2210
+ sender_bank_no?: string;
2211
+ sender_bank_name?: string;
2212
+ receiver_iban?: string;
2213
+ receiver_name?: string;
2214
+ receiver_street?: string;
2215
+ receiver_house_no?: string;
2216
+ receiver_city?: string;
2217
+ receiver_postcode?: string;
2218
+ receiver_country_code?: string;
2219
+ receiver_bc_no?: string;
2220
+ receiver_bank_no?: string;
2221
+ receiver_bank_name?: string;
2222
+ fee_type?: FeeType | string;
2223
+ is_salary_payment: boolean;
2224
+ reference_no?: string;
2225
+ message?: string;
2226
+ booking_text?: string;
2227
+ }
2228
+ /**
2229
+ * Outgoing Payment Update
2230
+ */
2231
+ interface OutgoingPaymentUpdate {
2232
+ payment_id: string;
2233
+ execution_date: string;
2234
+ amount: number;
2235
+ fee_type?: FeeType | string;
2236
+ is_salary_payment: boolean;
2237
+ reference_no?: string | null;
2238
+ message?: string | null;
2239
+ receiver_iban?: string;
2240
+ receiver_name?: string;
2241
+ receiver_street?: string;
2242
+ receiver_house_no?: string;
2243
+ receiver_city?: string;
2244
+ receiver_postcode?: string;
2245
+ receiver_country_code?: string;
2246
+ }
2247
+ /**
2248
+ * List Options
2249
+ */
2250
+ interface ListOptions {
2251
+ bill_id: string;
2252
+ limit?: number;
2253
+ page?: number;
2254
+ order?: 'asc' | 'desc';
2255
+ sort?: string;
2256
+ }
2257
+ }
2258
+
2259
+ declare class OutgoingPayments extends BaseCrud<OutgoingPaymentsStatic.OutgoingPayment, OutgoingPaymentsStatic.OutgoingPayment, OutgoingPaymentsStatic.OutgoingPayment, any, OutgoingPaymentsStatic.OutgoingPaymentCreate, OutgoingPaymentsStatic.OutgoingPaymentUpdate> {
2260
+ constructor(apiToken: string);
2261
+ /**
2262
+ * search for resources - Not implemented for OutgoingPayments V4
2263
+ *
2264
+ * @memberof OutgoingPayments
2265
+ */
2266
+ search(): Promise<any>;
2267
+ /**
2268
+ * overwrite an existing outgoing payment - Not implemented for OutgoingPayments V4
2269
+ *
2270
+ * @memberof OutgoingPayments
2271
+ */
2272
+ overwrite(id: any, ressource: any): Promise<any>;
2273
+ /**
2274
+ * edit an existing outgoing payment - Not implemented for OutgoingPayments V4
2275
+ *
2276
+ * @memberof OutgoingPayments
2277
+ */
2278
+ edit(id: any, ressource: any): Promise<any>;
2279
+ /**
2280
+ * delete an existing outgoing payment
2281
+ *
2282
+ * @param {T} id
2283
+ * @returns {Promise<any>}
2284
+ * @memberof OutgoingPayments
2285
+ */
2286
+ delete<T = string>(id: T): Promise<boolean>;
2287
+ /**
2288
+ * cancel an existing outgoing payment
2289
+ *
2290
+ * @param {string} id
2291
+ * @returns {Promise<void>}
2292
+ * @memberof OutgoingPayments
2293
+ */
2294
+ cancel(id: string): Promise<void>;
2295
+ /**
2296
+ * edit an existing outgoing payment
2297
+ *
2298
+ * @param {OutgoingPaymentsStatic.OutgoingPaymentUpdate} data
2299
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment>}
2300
+ * @memberof OutgoingPayments
2301
+ */
2302
+ update(data: OutgoingPaymentsStatic.OutgoingPaymentUpdate): Promise<OutgoingPaymentsStatic.OutgoingPayment>;
2303
+ /**
2304
+ * Lists the outgoing payments
2305
+ *
2306
+ * @param {OutgoingPaymentsStatic.ListOptions} options
2307
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment[]>}
2308
+ * @memberof OutgoingPayments
2309
+ */
2310
+ list(options: OutgoingPaymentsStatic.ListOptions): Promise<OutgoingPaymentsStatic.OutgoingPayment[]>;
2311
+ /**
2312
+ * create a new outgoing payment
2313
+ *
2314
+ * @param {OutgoingPaymentsStatic.OutgoingPaymentCreate} data
2315
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment>}
2316
+ * @memberof OutgoingPayments
2317
+ */
2318
+ create(data: OutgoingPaymentsStatic.OutgoingPaymentCreate): Promise<OutgoingPaymentsStatic.OutgoingPayment>;
2319
+ }
2320
+
2321
+ declare namespace BankAccountsStatic {
2322
+ interface BankAccount {
2323
+ id: number;
2324
+ name: string;
2325
+ owner: string;
2326
+ owner_address: string;
2327
+ owner_house_number: number | string;
2328
+ owner_zip: number | string;
2329
+ owner_city: string;
2330
+ owner_country_code: string;
2331
+ bc_nr: number | string;
2332
+ bank_name: string;
2333
+ bank_nr: string;
2334
+ bank_account_nr: string;
2335
+ iban_nr: string;
2336
+ currency_id: number;
2337
+ account_id: number;
2338
+ remarks: string;
2339
+ invoice_mode: string;
2340
+ qr_invoice_iban: string;
2341
+ type: string;
2342
+ }
2343
+ interface BankAccountFull extends BankAccount {
2344
+ }
2345
+ }
2346
+
2347
+ declare class BankAccounts extends BaseCrud<BankAccountsStatic.BankAccount, BankAccountsStatic.BankAccountFull, BankAccountsStatic.BankAccount, {}, {}, {}> {
2348
+ constructor(apiToken: string);
2349
+ /**
2350
+ * NOT IMPLEMENTED BY BEXIO YET
2351
+ *
2352
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
2353
+ * @param {BaseStatic.BaseOptions} [options]
2354
+ * @returns {Promise<Array<{}>>}
2355
+ * @memberof BankAccounts
2356
+ */
2357
+ search(searchOptions: Array<BaseStatic.SearchParameter<{}>>, options?: BaseStatic.BaseOptions): Promise<Array<BankAccountsStatic.BankAccount>>;
2358
+ /**
2359
+ * NOT IMPLEMENTED BY BEXIO YET
2360
+ *
2361
+ * @param {number} id
2362
+ * @param {{}} ressource
2363
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
2364
+ * @memberof BankAccounts
2365
+ */
2366
+ overwrite(id: number, ressource: {}): Promise<BankAccountsStatic.BankAccountFull>;
2367
+ /**
2368
+ * NOT IMPLEMENTED BY BEXIO YET
2369
+ *
2370
+ * @param {number} id
2371
+ * @param {Partial<{}>} ressource
2372
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
2373
+ * @memberof BankAccounts
2374
+ */
2375
+ edit(id: number, ressource: Partial<{}>): Promise<BankAccountsStatic.BankAccountFull>;
2376
+ /**
2377
+ * NOT IMPLEMENTED BY BEXIO YET
2378
+ *
2379
+ * @param {{}} ressource
2380
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
2381
+ * @memberof BankAccounts
2382
+ */
2383
+ create(ressource: {}): Promise<BankAccountsStatic.BankAccountFull>;
2384
+ /**
2385
+ * NOT IMPLEMENTED BY BEXIO YET
2386
+ *
2387
+ * @param {number} id
2388
+ * @returns {Promise<boolean>}
2389
+ * @memberof BankAccounts
2390
+ */
2391
+ delete(id: number): Promise<boolean>;
2392
+ }
2393
+
2394
+ declare namespace AccountsStatic {
2395
+ interface Account {
2396
+ id: number;
2397
+ uuid: string;
2398
+ account_no: string;
2399
+ name: string;
2400
+ account_type: number;
2401
+ tax_id: number;
2402
+ fibu_account_group_id: number;
2403
+ is_active: boolean;
2404
+ is_locked: boolean;
2405
+ }
2406
+ type SearchParameters = "account_no" | "fibu_account_group_id" | "name" | "account_type";
2407
+ }
2408
+
2409
+ declare class Accounts extends BaseCrud<AccountsStatic.Account, AccountsStatic.Account, AccountsStatic.Account, AccountsStatic.SearchParameters, AccountsStatic.Account, AccountsStatic.Account> {
2410
+ constructor(apiToken: string);
2411
+ /**
2412
+ * show a specific ressource
2413
+ *
2414
+ * @param {string | number} id
2415
+ * @param {BaseStatic.BaseOptions} [options]
2416
+ * @returns {Promise<AccountsStatic.Account>}
2417
+ * @memberof Accounts
2418
+ */
2419
+ show(id: string | number, options?: BaseStatic.BaseOptions): Promise<AccountsStatic.Account>;
2420
+ /**
2421
+ * create a new ressource
2422
+ *
2423
+ * @param {AccountsStatic.Account} ressource
2424
+ * @returns {Promise<AccountsStatic.Account>}
2425
+ * @memberof Accounts
2426
+ */
2427
+ create(ressource: AccountsStatic.Account): Promise<AccountsStatic.Account>;
2428
+ /**
2429
+ * overwrite an existing ressource
2430
+ *
2431
+ * @param {number} id
2432
+ * @param {AccountsStatic.Account} ressource
2433
+ * @returns {Promise<AccountsStatic.Account>}
2434
+ * @memberof Accounts
2435
+ */
2436
+ overwrite(id: number, ressource: AccountsStatic.Account): Promise<AccountsStatic.Account>;
2437
+ /**
2438
+ * edit an existing ressource
2439
+ *
2440
+ * @param {number} id
2441
+ * @param {Partial<AccountsStatic.Account>} ressource
2442
+ * @returns {Promise<AccountsStatic.Account>}
2443
+ * @memberof Accounts
2444
+ */
2445
+ edit(id: number, ressource: Partial<AccountsStatic.Account>): Promise<AccountsStatic.Account>;
2446
+ /**
2447
+ * delete a ressource
2448
+ *
2449
+ * @param {number} id
2450
+ * @returns {Promise<boolean>}
2451
+ * @memberof Accounts
2452
+ */
2453
+ delete(id: number): Promise<boolean>;
2454
+ }
2455
+
2456
+ declare namespace ManualEntriesStatic {
2457
+ type ManualEntryType = "manual_single_entry" | "manual_compound_entry" | "manual_group_entry";
2458
+ interface Entry {
2459
+ id?: number;
2460
+ debit_account_id: number;
2461
+ credit_account_id: number;
2462
+ tax_id?: number;
2463
+ tax_account_id?: number;
2464
+ amount: number;
2465
+ currency_id: number;
2466
+ exchange_rate?: number;
2467
+ text?: string;
2468
+ }
2469
+ interface ManualEntry {
2470
+ id: number;
2471
+ type: ManualEntryType;
2472
+ date: string;
2473
+ reference_nr: string;
2474
+ entries: Entry[];
2475
+ created_by_user_id: number;
2476
+ edited_by_user_id: number;
2477
+ is_locked: boolean;
2478
+ locked_info?: string;
2479
+ }
2480
+ interface ManualEntryCreate {
2481
+ type: ManualEntryType;
2482
+ date: string;
2483
+ reference_nr?: string;
2484
+ entries: Entry[];
2485
+ }
2486
+ interface ManualEntryUpdate extends ManualEntryCreate {
2487
+ id: number;
2488
+ }
2489
+ interface ListOptions extends BaseStatic.BaseOptions {
2490
+ }
2491
+ interface SearchParameters {
2492
+ id?: number;
2493
+ date?: string;
2494
+ reference_nr?: string;
2495
+ }
2496
+ }
2497
+
2498
+ declare class ManualEntries extends BaseCrud<ManualEntriesStatic.ManualEntry, ManualEntriesStatic.ManualEntry, ManualEntriesStatic.ManualEntry, ManualEntriesStatic.SearchParameters, ManualEntriesStatic.ManualEntryCreate, ManualEntriesStatic.ManualEntryUpdate> {
2499
+ constructor(apiToken: string);
2500
+ /**
2501
+ * Lists the manual entries
2502
+ *
2503
+ * @param {ManualEntriesStatic.ListOptions} [options]
2504
+ * @returns {Promise<Array<ManualEntriesStatic.ManualEntry>>}
2505
+ * @memberof ManualEntries
2506
+ */
2507
+ list(options?: ManualEntriesStatic.ListOptions): Promise<Array<ManualEntriesStatic.ManualEntry>>;
2508
+ /**
2509
+ * Not implemented by Bexio yet
2510
+ *
2511
+ * @param {string | number} id
2512
+ * @param {BaseStatic.BaseOptions} [options]
2513
+ * @returns {Promise<ManualEntriesStatic.ManualEntry>}
2514
+ * @memberof ManualEntries
2515
+ */
2516
+ show(id: string | number, options?: BaseStatic.BaseOptions): Promise<ManualEntriesStatic.ManualEntry>;
2517
+ /**
2518
+ * Not implemented by Bexio yet
2519
+ *
2520
+ * @param {Array<BaseStatic.SearchParameter<ManualEntriesStatic.SearchParameters>>} searchOptions
2521
+ * @param {BaseStatic.BaseOptions} [options]
2522
+ * @returns {Promise<ManualEntriesStatic.ManualEntry[]>}
2523
+ * @memberof ManualEntries
2524
+ */
2525
+ search(searchOptions: Array<BaseStatic.SearchParameter<ManualEntriesStatic.SearchParameters>>, options?: BaseStatic.BaseOptions): Promise<ManualEntriesStatic.ManualEntry[]>;
2526
+ /**
2527
+ * Not implemented by Bexio yet
2528
+ *
2529
+ * @param {number} id
2530
+ * @param {Partial<ManualEntriesStatic.ManualEntryUpdate>} ressource
2531
+ * @returns {Promise<ManualEntriesStatic.ManualEntry>}
2532
+ * @memberof ManualEntries
2533
+ */
2534
+ edit(id: number, ressource: Partial<ManualEntriesStatic.ManualEntryUpdate>): Promise<ManualEntriesStatic.ManualEntry>;
2535
+ /**
2536
+ * Get the next reference number for a manual entry
2537
+ *
2538
+ * @returns {Promise<{ next_ref_nr: string }>}
2539
+ * @memberof ManualEntries
2540
+ */
2541
+ getNextReferenceNumber(): Promise<{
2542
+ next_ref_nr: string;
2543
+ }>;
2544
+ }
2545
+
2546
+ declare namespace TaxesStatic {
2547
+ interface Tax {
2548
+ id: number;
2549
+ uuid: string;
2550
+ name: string;
2551
+ code: string;
2552
+ digit: string;
2553
+ type: 'sales_tax' | 'pre_tax';
2554
+ account_id: number;
2555
+ tax_settlement_type: string;
2556
+ value: number;
2557
+ net_tax_value: number | null;
2558
+ start_year: number;
2559
+ end_year: number | null;
2560
+ is_active: boolean;
2561
+ display_name: string;
2562
+ start_month: number;
2563
+ end_month: number;
2564
+ }
2565
+ interface TaxOptions extends BaseStatic.BaseOptions {
2566
+ scope?: 'active' | 'inactive';
2567
+ date?: string;
2568
+ types?: 'sales_tax' | 'pre_tax';
2569
+ }
2570
+ /**
2571
+ * @deprecated Use TaxOptions instead
2572
+ */
2573
+ interface SearchParameters extends TaxOptions {
2574
+ }
2575
+ }
2576
+
2577
+ declare class Taxes extends BaseCrud<TaxesStatic.Tax, TaxesStatic.Tax, TaxesStatic.Tax, TaxesStatic.TaxOptions, any, any> {
2578
+ constructor(accessToken: string);
2579
+ /**
2580
+ * Lists the taxes
2581
+ *
2582
+ * @param {TaxesStatic.TaxOptions} [options]
2583
+ * @returns {Promise<TaxesStatic.Tax[]>}
2584
+ * @memberof Taxes
2585
+ */
2586
+ list(options?: TaxesStatic.TaxOptions): Promise<TaxesStatic.Tax[]>;
2587
+ /**
2588
+ * Search for taxes is not implemented in the API.
2589
+ * Use list() with parameters instead.
2590
+ */
2591
+ search(): Promise<TaxesStatic.Tax[]>;
2592
+ /**
2593
+ * Create a tax is not implemented in the API.
2594
+ */
2595
+ create(): Promise<TaxesStatic.Tax>;
2596
+ /**
2597
+ * Overwrite a tax is not implemented in the API.
2598
+ */
2599
+ overwrite(): Promise<TaxesStatic.Tax>;
2600
+ /**
2601
+ * Edit a tax is not implemented in the API.
2602
+ */
2603
+ edit(): Promise<TaxesStatic.Tax>;
2604
+ }
2605
+
2606
+ declare namespace CalendarStatic {
2607
+ interface Appointment {
2608
+ id: number;
2609
+ user_id: number;
2610
+ event_start: string;
2611
+ event_end: string;
2612
+ subject: string;
2613
+ place: string;
2614
+ info: null;
2615
+ contact_id: number;
2616
+ sub_contact_id: number;
2617
+ project_id: number;
2618
+ entry_id: number;
2619
+ module_id: number;
2620
+ has_reminder: boolean;
2621
+ remember_type_id: number;
2622
+ remember_time_id: number;
2623
+ is_private: boolean;
2624
+ }
2625
+ enum SearchParameters {
2626
+ event_start = "event_start",
2627
+ event_end = "event_end",
2628
+ contact_id = "contact_id",
2629
+ user_id = "user_id",
2630
+ subject = "subject",
2631
+ place = "place",
2632
+ module_id = "module_id",
2633
+ entry_id = "entry_id"
2634
+ }
2635
+ }
2636
+
2637
+ declare namespace NotesStatic {
2638
+ interface Note {
2639
+ id?: number;
2640
+ user_id?: number;
2641
+ event_start?: string;
2642
+ subject?: string;
2643
+ info?: string;
2644
+ contact_id?: number;
2645
+ project_id?: number;
2646
+ entry_id?: number;
2647
+ module_id?: number;
2648
+ communication_kind_id?: number;
2649
+ pr_project_id?: number;
2650
+ }
2651
+ enum SearchParameters {
2652
+ event_start = "event_start",
2653
+ contact_id = "contact_id",
2654
+ user_id = "user_id",
2655
+ subject = "subject",
2656
+ module_id = "module_id",
2657
+ entry_id = "entry_id"
2658
+ }
2659
+ }
2660
+
2661
+ declare namespace SalesOrderManagementStatic {
2662
+ interface Estimate {
2663
+ id?: number;
2664
+ document_nr?: string;
2665
+ title?: string;
2666
+ contact_id: number;
2667
+ contact_sub_id?: number;
2668
+ user_id: number;
2669
+ project_id?: number;
2670
+ logopaper_id?: number;
2671
+ language_id?: number;
2672
+ bank_account_id?: number;
2673
+ currency_id?: number;
2674
+ payment_type_id?: number;
2675
+ header?: string;
2676
+ footer?: string;
2677
+ total_gross?: string;
2678
+ total_net?: string;
2679
+ total_taxes?: string;
2680
+ total?: string;
2681
+ mwst_type?: number;
2682
+ mwst_is_net?: boolean;
2683
+ show_position_taxes?: boolean;
2684
+ is_valid_from?: string;
2685
+ is_valid_until?: string;
2686
+ contact_address?: string;
2687
+ delivery_address_type?: number;
2688
+ delivery_address?: string;
2689
+ kb_item_status_id?: number;
2690
+ api_reference?: string;
2691
+ viewed_by_client_at?: string;
2692
+ kb_terms_of_payment_template_id?: number;
2693
+ show_total?: boolean;
2694
+ updated_at?: string;
2695
+ taxs?: Array<Tax>;
2696
+ network_link?: string;
2697
+ positions?: Array<Position>;
2698
+ }
2699
+ interface Invoice {
2700
+ id?: number;
2701
+ document_nr?: string;
2702
+ title?: string;
2703
+ contact_id?: number;
2704
+ contact_sub_id?: number;
2705
+ user_id?: number;
2706
+ project_id?: number;
2707
+ logopaper_id?: number;
2708
+ language_id?: number;
2709
+ bank_account_id?: number;
2710
+ currency_id?: number;
2711
+ payment_type_id?: number;
2712
+ header?: string;
2713
+ footer?: string;
2714
+ total_gross?: string;
2715
+ total_net?: string;
2716
+ total_taxes?: string;
2717
+ total_received_payments?: string;
2718
+ total_credit_vouchers?: string;
2719
+ total_remaining_payments?: string;
2720
+ total?: string;
2721
+ mwst_type?: number;
2722
+ mwst_is_net?: boolean;
2723
+ show_position_taxes?: boolean;
2724
+ is_valid_from?: string;
2725
+ is_valid_to?: string;
2726
+ contact_address?: string;
2727
+ kb_item_status_id?: number;
2728
+ api_reference?: string;
2729
+ viewed_by_client_at?: string;
2730
+ updated_at?: string;
2731
+ esr_id?: number;
2732
+ taxs?: Array<Tax>;
2733
+ positions?: Array<Position>;
2734
+ network_link?: string;
2735
+ }
2736
+ interface Order {
2737
+ id?: number;
2738
+ document_nr?: string;
2739
+ title?: string;
2740
+ contact_id?: number;
2741
+ contact_sub_id?: number;
2742
+ user_id?: number;
2743
+ project_id?: number;
2744
+ logopaper_id?: number;
2745
+ language_id?: number;
2746
+ bank_account_id?: number;
2747
+ currency_id?: number;
2748
+ payment_type_id?: number;
2749
+ header?: string;
2750
+ footer?: string;
2751
+ total_gross?: string;
2752
+ total_net?: string;
2753
+ total_taxes?: string;
2754
+ total?: string;
2755
+ mwst_type?: number;
2756
+ mwst_is_net?: boolean;
2757
+ show_position_taxes?: boolean;
2758
+ is_valid_from?: string;
2759
+ contact_address?: string;
2760
+ delivery_address_type?: number;
2761
+ delivery_address?: string;
2762
+ kb_item_status_id?: number;
2763
+ is_recurring?: boolean;
2764
+ api_reference?: string;
2765
+ viewed_by_client_at?: string;
2766
+ updated_at?: string;
2767
+ taxs?: Array<Tax>;
2768
+ positions?: Array<Position>;
2769
+ network_link?: string;
2770
+ }
2771
+ interface Delivery {
2772
+ id?: number;
2773
+ document_nr?: string;
2774
+ title?: string;
2775
+ contact_id?: number;
2776
+ contact_sub_id?: number;
2777
+ user_id?: number;
2778
+ logopaper_id?: number;
2779
+ language_id?: number;
2780
+ bank_account_id?: number;
2781
+ currency_id?: number;
2782
+ header?: string;
2783
+ footer?: string;
2784
+ total_gross?: string;
2785
+ total_net?: string;
2786
+ total_taxes?: string;
2787
+ total?: string;
2788
+ mwst_type?: number;
2789
+ mwst_is_net?: boolean;
2790
+ is_valid_from?: string;
2791
+ contact_address?: string;
2792
+ delivery_address_type?: number;
2793
+ delivery_address?: string;
2794
+ kb_item_status_id?: number;
2795
+ api_reference?: string;
2796
+ viewed_by_client_at?: string;
2797
+ updated_at?: string;
2798
+ taxs?: Array<Tax>;
2799
+ positions?: Array<Position>;
2800
+ }
2801
+ interface Comment {
2802
+ id?: number;
2803
+ text?: string;
2804
+ user_id?: number;
2805
+ user_email?: string;
2806
+ user_name?: string;
2807
+ date?: string;
2808
+ is_public?: boolean;
2809
+ image?: string;
2810
+ image_path?: string;
2811
+ }
2812
+ interface Repetition {
2813
+ start: string;
2814
+ end: string;
2815
+ repetition: {
2816
+ type: string;
2817
+ interval: number;
2818
+ schedule: string;
2819
+ };
2820
+ }
2821
+ interface Tax {
2822
+ percentage: number;
2823
+ value: string;
2824
+ }
2825
+ interface Position {
2826
+ id?: number;
2827
+ type?: string;
2828
+ amount?: string;
2829
+ unit_id?: number;
2830
+ account_id?: number;
2831
+ unit_name?: string;
2832
+ tax_id?: number;
2833
+ tax_value?: string;
2834
+ text?: string;
2835
+ unit_price?: string;
2836
+ discount_in_percent?: string;
2837
+ position_total?: string;
2838
+ pos?: string;
2839
+ internal_pos?: number;
2840
+ parent_id?: number;
2841
+ is_optional?: boolean;
2842
+ article_id?: number;
2843
+ }
2844
+ interface Payment {
2845
+ id: number;
2846
+ date: string;
2847
+ value: string;
2848
+ bank_account_id: number;
2849
+ title: string;
2850
+ payment_service_id: number;
2851
+ is_client_account_redemption: boolean;
2852
+ is_cash_discount: boolean;
2853
+ kb_invoice_id: number;
2854
+ kb_credit_voucher_id: number;
2855
+ kb_bill_id: number;
2856
+ kb_credit_voucher_text: string;
2857
+ }
2858
+ enum EstimateSearchParameters {
2859
+ id = "id",
2860
+ kb_item_status_id = "kb_item_status_id",
2861
+ document_nr = "document_nr",
2862
+ title = "title",
2863
+ contact_id = "contact_id",
2864
+ contact_sub_id = "contact_sub_id",
2865
+ user_id = "user_id",
2866
+ currency_id = "currency_id",
2867
+ total_gross = "total_gross",
2868
+ total_net = "total_net",
2869
+ total = "total",
2870
+ is_valid_from = "is_valid_from",
2871
+ is_valid_to = "is_valid_to",
2872
+ is_valid_until = "is_valid_until",
2873
+ updated_at = "updated_at"
2874
+ }
2875
+ enum CommentSearchParameters {
2876
+ id = "id",
2877
+ user_id = "user_id",
2878
+ text = "text",
2879
+ date = "date",
2880
+ is_public = "is_public"
2881
+ }
2882
+ enum OrderSearchParameters {
2883
+ id = "id",
2884
+ kb_item_status_id = "kb_item_status_id",
2885
+ document_nr = "document_nr",
2886
+ title = "title",
2887
+ contact_id = "contact_id",
2888
+ contact_sub_id = "contact_sub_id",
2889
+ user_id = "user_id",
2890
+ currency_id = "currency_id",
2891
+ total_gross = "total_gross",
2892
+ total_net = "total_net",
2893
+ total = "total",
2894
+ is_valid_from = "is_valid_from",
2895
+ is_valid_to = "is_valid_to",
2896
+ is_valid_until = "is_valid_until",
2897
+ updated_at = "updated_at"
2898
+ }
2899
+ enum InvoiceSearchParameters {
2900
+ id = "id",
2901
+ kb_item_status_id = "kb_item_status_id",
2902
+ document_nr = "document_nr",
2903
+ title = "title",
2904
+ contact_id = "contact_id",
2905
+ contact_sub_id = "contact_sub_id",
2906
+ user_id = "user_id",
2907
+ currency_id = "currency_id",
2908
+ total_gross = "total_gross",
2909
+ total_net = "total_net",
2910
+ total = "total",
2911
+ is_valid_from = "is_valid_from",
2912
+ is_valid_to = "is_valid_to",
2913
+ is_valid_until = "is_valid_until",
2914
+ updated_at = "updated_at"
2915
+ }
2916
+ interface EstimateAcceptDecline {
2917
+ user_id?: number;
2918
+ user_name?: string;
2919
+ user_email?: string;
2920
+ }
2921
+ interface EstimateSend {
2922
+ recipient_email?: string;
2923
+ subject?: string;
2924
+ message?: string;
2925
+ mark_as_open?: boolean;
2926
+ sender?: string;
2927
+ }
2928
+ interface EstimateCopy {
2929
+ contact_id: number;
2930
+ contact_sub_id?: number;
2931
+ is_valid_from?: string;
2932
+ pr_project_id?: number;
2933
+ title?: string;
2934
+ }
2935
+ interface InvoiceCopy {
2936
+ contact_id: number;
2937
+ contact_sub_id?: number;
2938
+ is_valid_from?: string;
2939
+ pr_project_id?: number;
2940
+ title?: string;
2941
+ }
2942
+ interface InvoiceSend {
2943
+ message: string;
2944
+ recipient_email: string;
2945
+ subject: string;
2946
+ mark_as_open?: boolean;
2947
+ sender?: string;
2948
+ }
2949
+ }
2950
+
2951
+ declare class Bexio {
2952
+ private token;
2953
+ businessActivities: ClientServices;
2954
+ contacts: Contacts;
2955
+ contactTypes: ContactTypes;
2956
+ contactSectors: ContactSectors;
2957
+ contactGroups: ContactGroups;
2958
+ contactRelations: ContactRelations;
2959
+ orders: Orders;
2960
+ expenses: Expenses;
2961
+ billsV4: BillsV4;
2962
+ outgoingPayments: OutgoingPayments;
2963
+ /**
2964
+ * @deprecated Use BillsV4 instead
2965
+ */
2966
+ bills: Bills;
2967
+ projects: Projects;
2968
+ projectStatuses: ProjectStatuses;
2969
+ projectTypes: ProjectTypes;
2970
+ timetrackings: Timetrackings;
2971
+ timetrackingStatuses: TimetrackingStatuses;
2972
+ users: Users;
2973
+ items: Items;
2974
+ invoices: Invoices;
2975
+ currencies: Currencies;
2976
+ bankAccounts: BankAccounts;
2977
+ accounts: Accounts;
2978
+ manualEntries: ManualEntries;
2979
+ taxes: Taxes;
2980
+ constructor(token: string);
2981
+ }
2982
+
2983
+ export { AccountsStatic, BankAccountsStatic, Bexio, BillsStatic, BillsV4Static, BusinessActivitiesStatic, CalendarStatic, ContactGroupsStatic, ContactRelationsStatic, ContactSectorsStatic, ContactTypesStatic, ContactsStatic, CurrenciesStatic, ExpensesStatic, InvoicesStatic, ItemsStatic, ManualEntriesStatic, NotesStatic, OrdersStatic, OutgoingPaymentsStatic, PositionStatic, PositionsStatic, ProjectStatusesStatic, ProjectTypesStatic, ProjectsStatic, SalesOrderManagementStatic, TaxesStatic, TimetrackingStatusesStatic, TimetrackingsStatic, UsersStatic, Bexio as default };