bexio 3.8.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/lib/index.d.mts +2908 -0
  2. package/lib/index.d.ts +2879 -55
  3. package/lib/index.js +2045 -100
  4. package/lib/index.js.map +1 -1
  5. package/lib/index.mjs +1990 -0
  6. package/lib/index.mjs.map +1 -0
  7. package/package.json +20 -4
  8. package/lib/interfaces/AccountsStatic.d.ts +0 -14
  9. package/lib/interfaces/AccountsStatic.js +0 -3
  10. package/lib/interfaces/AccountsStatic.js.map +0 -1
  11. package/lib/interfaces/BankAccountsStatic.d.ts +0 -25
  12. package/lib/interfaces/BankAccountsStatic.js +0 -3
  13. package/lib/interfaces/BankAccountsStatic.js.map +0 -1
  14. package/lib/interfaces/BaseStatic.d.ts +0 -20
  15. package/lib/interfaces/BaseStatic.js +0 -3
  16. package/lib/interfaces/BaseStatic.js.map +0 -1
  17. package/lib/interfaces/BillsStatic.d.ts +0 -167
  18. package/lib/interfaces/BillsStatic.js +0 -25
  19. package/lib/interfaces/BillsStatic.js.map +0 -1
  20. package/lib/interfaces/BillsV4Static.d.ts +0 -204
  21. package/lib/interfaces/BillsV4Static.js +0 -60
  22. package/lib/interfaces/BillsV4Static.js.map +0 -1
  23. package/lib/interfaces/BusinessActivitiesStatic.d.ts +0 -24
  24. package/lib/interfaces/BusinessActivitiesStatic.js +0 -11
  25. package/lib/interfaces/BusinessActivitiesStatic.js.map +0 -1
  26. package/lib/interfaces/CalendarStatic.d.ts +0 -30
  27. package/lib/interfaces/CalendarStatic.js +0 -18
  28. package/lib/interfaces/CalendarStatic.js.map +0 -1
  29. package/lib/interfaces/ContactGroupsStatic.d.ts +0 -12
  30. package/lib/interfaces/ContactGroupsStatic.js +0 -11
  31. package/lib/interfaces/ContactGroupsStatic.js.map +0 -1
  32. package/lib/interfaces/ContactRelationsStatic.d.ts +0 -24
  33. package/lib/interfaces/ContactRelationsStatic.js +0 -13
  34. package/lib/interfaces/ContactRelationsStatic.js.map +0 -1
  35. package/lib/interfaces/ContactSectorsStatic.d.ts +0 -9
  36. package/lib/interfaces/ContactSectorsStatic.js +0 -11
  37. package/lib/interfaces/ContactSectorsStatic.js.map +0 -1
  38. package/lib/interfaces/ContactTypesStatic.d.ts +0 -9
  39. package/lib/interfaces/ContactTypesStatic.js +0 -11
  40. package/lib/interfaces/ContactTypesStatic.js.map +0 -1
  41. package/lib/interfaces/ContactsStatic.d.ts +0 -118
  42. package/lib/interfaces/ContactsStatic.js +0 -27
  43. package/lib/interfaces/ContactsStatic.js.map +0 -1
  44. package/lib/interfaces/CurrenciesStatic.d.ts +0 -20
  45. package/lib/interfaces/CurrenciesStatic.js +0 -3
  46. package/lib/interfaces/CurrenciesStatic.js.map +0 -1
  47. package/lib/interfaces/ExpensesStatic.d.ts +0 -83
  48. package/lib/interfaces/ExpensesStatic.js +0 -25
  49. package/lib/interfaces/ExpensesStatic.js.map +0 -1
  50. package/lib/interfaces/InvoicesStatic.d.ts +0 -162
  51. package/lib/interfaces/InvoicesStatic.js +0 -46
  52. package/lib/interfaces/InvoicesStatic.js.map +0 -1
  53. package/lib/interfaces/ItemsStatic.d.ts +0 -120
  54. package/lib/interfaces/ItemsStatic.js +0 -47
  55. package/lib/interfaces/ItemsStatic.js.map +0 -1
  56. package/lib/interfaces/ManualEntriesStatic.d.ts +0 -42
  57. package/lib/interfaces/ManualEntriesStatic.js +0 -3
  58. package/lib/interfaces/ManualEntriesStatic.js.map +0 -1
  59. package/lib/interfaces/NotesStatic.d.ts +0 -23
  60. package/lib/interfaces/NotesStatic.js +0 -16
  61. package/lib/interfaces/NotesStatic.js.map +0 -1
  62. package/lib/interfaces/OrdersStatic.d.ts +0 -117
  63. package/lib/interfaces/OrdersStatic.js +0 -25
  64. package/lib/interfaces/OrdersStatic.js.map +0 -1
  65. package/lib/interfaces/OutgoingPaymentsStatic.d.ts +0 -142
  66. package/lib/interfaces/OutgoingPaymentsStatic.js +0 -39
  67. package/lib/interfaces/OutgoingPaymentsStatic.js.map +0 -1
  68. package/lib/interfaces/PaymentsStatic.d.ts +0 -22
  69. package/lib/interfaces/PaymentsStatic.js +0 -3
  70. package/lib/interfaces/PaymentsStatic.js.map +0 -1
  71. package/lib/interfaces/PositionStatic.d.ts +0 -35
  72. package/lib/interfaces/PositionStatic.js +0 -3
  73. package/lib/interfaces/PositionStatic.js.map +0 -1
  74. package/lib/interfaces/PositionsStatic.d.ts +0 -46
  75. package/lib/interfaces/PositionsStatic.js +0 -3
  76. package/lib/interfaces/PositionsStatic.js.map +0 -1
  77. package/lib/interfaces/ProjectStatusesStatic.d.ts +0 -9
  78. package/lib/interfaces/ProjectStatusesStatic.js +0 -11
  79. package/lib/interfaces/ProjectStatusesStatic.js.map +0 -1
  80. package/lib/interfaces/ProjectTypesStatic.d.ts +0 -9
  81. package/lib/interfaces/ProjectTypesStatic.js +0 -11
  82. package/lib/interfaces/ProjectTypesStatic.js.map +0 -1
  83. package/lib/interfaces/ProjectsStatic.d.ts +0 -55
  84. package/lib/interfaces/ProjectsStatic.js +0 -13
  85. package/lib/interfaces/ProjectsStatic.js.map +0 -1
  86. package/lib/interfaces/SalesOrderManagementStatic.d.ts +0 -289
  87. package/lib/interfaces/SalesOrderManagementStatic.js +0 -69
  88. package/lib/interfaces/SalesOrderManagementStatic.js.map +0 -1
  89. package/lib/interfaces/TaxesStatic.d.ts +0 -31
  90. package/lib/interfaces/TaxesStatic.js +0 -3
  91. package/lib/interfaces/TaxesStatic.js.map +0 -1
  92. package/lib/interfaces/TimetrackingStatusesStatic.d.ts +0 -9
  93. package/lib/interfaces/TimetrackingStatusesStatic.js +0 -11
  94. package/lib/interfaces/TimetrackingStatusesStatic.js.map +0 -1
  95. package/lib/interfaces/TimetrackingsStatic.d.ts +0 -69
  96. package/lib/interfaces/TimetrackingsStatic.js +0 -16
  97. package/lib/interfaces/TimetrackingsStatic.js.map +0 -1
  98. package/lib/interfaces/UsersStatic.d.ts +0 -23
  99. package/lib/interfaces/UsersStatic.js +0 -15
  100. package/lib/interfaces/UsersStatic.js.map +0 -1
  101. package/lib/resources/Accounts.d.ts +0 -49
  102. package/lib/resources/Accounts.js +0 -85
  103. package/lib/resources/Accounts.js.map +0 -1
  104. package/lib/resources/BankAccounts.d.ts +0 -49
  105. package/lib/resources/BankAccounts.js +0 -85
  106. package/lib/resources/BankAccounts.js.map +0 -1
  107. package/lib/resources/BaseCrud.d.ts +0 -89
  108. package/lib/resources/BaseCrud.js +0 -181
  109. package/lib/resources/BaseCrud.js.map +0 -1
  110. package/lib/resources/Bills.d.ts +0 -67
  111. package/lib/resources/Bills.js +0 -107
  112. package/lib/resources/Bills.js.map +0 -1
  113. package/lib/resources/BillsV4.d.ts +0 -52
  114. package/lib/resources/BillsV4.js +0 -86
  115. package/lib/resources/BillsV4.js.map +0 -1
  116. package/lib/resources/BusinessActivities.d.ts +0 -5
  117. package/lib/resources/BusinessActivities.js +0 -13
  118. package/lib/resources/BusinessActivities.js.map +0 -1
  119. package/lib/resources/ContactGroups.d.ts +0 -13
  120. package/lib/resources/ContactGroups.js +0 -34
  121. package/lib/resources/ContactGroups.js.map +0 -1
  122. package/lib/resources/ContactRelations.d.ts +0 -5
  123. package/lib/resources/ContactRelations.js +0 -13
  124. package/lib/resources/ContactRelations.js.map +0 -1
  125. package/lib/resources/ContactSectors.d.ts +0 -39
  126. package/lib/resources/ContactSectors.js +0 -72
  127. package/lib/resources/ContactSectors.js.map +0 -1
  128. package/lib/resources/ContactTypes.d.ts +0 -39
  129. package/lib/resources/ContactTypes.js +0 -72
  130. package/lib/resources/ContactTypes.js.map +0 -1
  131. package/lib/resources/Contacts.d.ts +0 -5
  132. package/lib/resources/Contacts.js +0 -13
  133. package/lib/resources/Contacts.js.map +0 -1
  134. package/lib/resources/Currencies.d.ts +0 -33
  135. package/lib/resources/Currencies.js +0 -61
  136. package/lib/resources/Currencies.js.map +0 -1
  137. package/lib/resources/DefaultPositions.d.ts +0 -33
  138. package/lib/resources/DefaultPositions.js +0 -61
  139. package/lib/resources/DefaultPositions.js.map +0 -1
  140. package/lib/resources/Expenses.d.ts +0 -5
  141. package/lib/resources/Expenses.js +0 -13
  142. package/lib/resources/Expenses.js.map +0 -1
  143. package/lib/resources/Invoices.d.ts +0 -113
  144. package/lib/resources/Invoices.js +0 -189
  145. package/lib/resources/Invoices.js.map +0 -1
  146. package/lib/resources/ItemPositions.d.ts +0 -33
  147. package/lib/resources/ItemPositions.js +0 -61
  148. package/lib/resources/ItemPositions.js.map +0 -1
  149. package/lib/resources/Items.d.ts +0 -5
  150. package/lib/resources/Items.js +0 -13
  151. package/lib/resources/Items.js.map +0 -1
  152. package/lib/resources/ManualEntries.d.ts +0 -50
  153. package/lib/resources/ManualEntries.js +0 -84
  154. package/lib/resources/ManualEntries.js.map +0 -1
  155. package/lib/resources/Orders.d.ts +0 -33
  156. package/lib/resources/Orders.js +0 -64
  157. package/lib/resources/Orders.js.map +0 -1
  158. package/lib/resources/OutgoingPayments.d.ts +0 -63
  159. package/lib/resources/OutgoingPayments.js +0 -117
  160. package/lib/resources/OutgoingPayments.js.map +0 -1
  161. package/lib/resources/Payments.d.ts +0 -36
  162. package/lib/resources/Payments.js +0 -64
  163. package/lib/resources/Payments.js.map +0 -1
  164. package/lib/resources/ProjectStatuses.d.ts +0 -39
  165. package/lib/resources/ProjectStatuses.js +0 -72
  166. package/lib/resources/ProjectStatuses.js.map +0 -1
  167. package/lib/resources/ProjectTypes.d.ts +0 -39
  168. package/lib/resources/ProjectTypes.js +0 -72
  169. package/lib/resources/ProjectTypes.js.map +0 -1
  170. package/lib/resources/Projects.d.ts +0 -5
  171. package/lib/resources/Projects.js +0 -13
  172. package/lib/resources/Projects.js.map +0 -1
  173. package/lib/resources/Taxes.d.ts +0 -30
  174. package/lib/resources/Taxes.js +0 -70
  175. package/lib/resources/Taxes.js.map +0 -1
  176. package/lib/resources/TextPositions.d.ts +0 -33
  177. package/lib/resources/TextPositions.js +0 -61
  178. package/lib/resources/TextPositions.js.map +0 -1
  179. package/lib/resources/TimetrackingStatuses.d.ts +0 -39
  180. package/lib/resources/TimetrackingStatuses.js +0 -72
  181. package/lib/resources/TimetrackingStatuses.js.map +0 -1
  182. package/lib/resources/Timetrackings.d.ts +0 -14
  183. package/lib/resources/Timetrackings.js +0 -35
  184. package/lib/resources/Timetrackings.js.map +0 -1
  185. package/lib/resources/Users.d.ts +0 -39
  186. package/lib/resources/Users.js +0 -72
  187. package/lib/resources/Users.js.map +0 -1
  188. package/lib/tests/Accounts.test.d.ts +0 -1
  189. package/lib/tests/Accounts.test.js +0 -86
  190. package/lib/tests/Accounts.test.js.map +0 -1
  191. package/lib/tests/BankAccounts.test.d.ts +0 -1
  192. package/lib/tests/BankAccounts.test.js +0 -86
  193. package/lib/tests/BankAccounts.test.js.map +0 -1
  194. package/lib/tests/BaseCrud.test.d.ts +0 -1
  195. package/lib/tests/BaseCrud.test.js +0 -302
  196. package/lib/tests/BaseCrud.test.js.map +0 -1
  197. package/lib/tests/Bills.test.d.ts +0 -1
  198. package/lib/tests/Bills.test.js +0 -110
  199. package/lib/tests/Bills.test.js.map +0 -1
  200. package/lib/tests/BillsV4.test.d.ts +0 -1
  201. package/lib/tests/BillsV4.test.js +0 -134
  202. package/lib/tests/BillsV4.test.js.map +0 -1
  203. package/lib/tests/BusinessActivities.test.d.ts +0 -1
  204. package/lib/tests/BusinessActivities.test.js +0 -21
  205. package/lib/tests/BusinessActivities.test.js.map +0 -1
  206. package/lib/tests/ContactGroups.test.d.ts +0 -1
  207. package/lib/tests/ContactGroups.test.js +0 -21
  208. package/lib/tests/ContactGroups.test.js.map +0 -1
  209. package/lib/tests/ContactRelations.test.d.ts +0 -1
  210. package/lib/tests/ContactRelations.test.js +0 -21
  211. package/lib/tests/ContactRelations.test.js.map +0 -1
  212. package/lib/tests/ContactSectors.test.d.ts +0 -1
  213. package/lib/tests/ContactSectors.test.js +0 -21
  214. package/lib/tests/ContactSectors.test.js.map +0 -1
  215. package/lib/tests/ContactTypes.test.d.ts +0 -1
  216. package/lib/tests/ContactTypes.test.js +0 -21
  217. package/lib/tests/ContactTypes.test.js.map +0 -1
  218. package/lib/tests/Contacts.test.d.ts +0 -1
  219. package/lib/tests/Contacts.test.js +0 -21
  220. package/lib/tests/Contacts.test.js.map +0 -1
  221. package/lib/tests/Currencies.test.d.ts +0 -1
  222. package/lib/tests/Currencies.test.js +0 -21
  223. package/lib/tests/Currencies.test.js.map +0 -1
  224. package/lib/tests/DefaultPositions.test.d.ts +0 -1
  225. package/lib/tests/DefaultPositions.test.js +0 -22
  226. package/lib/tests/DefaultPositions.test.js.map +0 -1
  227. package/lib/tests/Expenses.test.d.ts +0 -1
  228. package/lib/tests/Expenses.test.js +0 -21
  229. package/lib/tests/Expenses.test.js.map +0 -1
  230. package/lib/tests/Invoices.test.d.ts +0 -1
  231. package/lib/tests/Invoices.test.js +0 -207
  232. package/lib/tests/Invoices.test.js.map +0 -1
  233. package/lib/tests/ItemPositions.test.d.ts +0 -1
  234. package/lib/tests/ItemPositions.test.js +0 -22
  235. package/lib/tests/ItemPositions.test.js.map +0 -1
  236. package/lib/tests/Items.test.d.ts +0 -1
  237. package/lib/tests/Items.test.js +0 -21
  238. package/lib/tests/Items.test.js.map +0 -1
  239. package/lib/tests/ManualEntries.test.d.ts +0 -1
  240. package/lib/tests/ManualEntries.test.js +0 -116
  241. package/lib/tests/ManualEntries.test.js.map +0 -1
  242. package/lib/tests/Orders.test.d.ts +0 -1
  243. package/lib/tests/Orders.test.js +0 -137
  244. package/lib/tests/Orders.test.js.map +0 -1
  245. package/lib/tests/OutgoingPayments.test.d.ts +0 -1
  246. package/lib/tests/OutgoingPayments.test.js +0 -125
  247. package/lib/tests/OutgoingPayments.test.js.map +0 -1
  248. package/lib/tests/Payments.test.d.ts +0 -1
  249. package/lib/tests/Payments.test.js +0 -22
  250. package/lib/tests/Payments.test.js.map +0 -1
  251. package/lib/tests/ProjectStatuses.test.d.ts +0 -1
  252. package/lib/tests/ProjectStatuses.test.js +0 -21
  253. package/lib/tests/ProjectStatuses.test.js.map +0 -1
  254. package/lib/tests/ProjectTypes.test.d.ts +0 -1
  255. package/lib/tests/ProjectTypes.test.js +0 -21
  256. package/lib/tests/ProjectTypes.test.js.map +0 -1
  257. package/lib/tests/Projects.test.d.ts +0 -1
  258. package/lib/tests/Projects.test.js +0 -21
  259. package/lib/tests/Projects.test.js.map +0 -1
  260. package/lib/tests/Taxes.test.d.ts +0 -1
  261. package/lib/tests/Taxes.test.js +0 -107
  262. package/lib/tests/Taxes.test.js.map +0 -1
  263. package/lib/tests/TextPositions.test.d.ts +0 -1
  264. package/lib/tests/TextPositions.test.js +0 -22
  265. package/lib/tests/TextPositions.test.js.map +0 -1
  266. package/lib/tests/TimetrackingStatuses.test.d.ts +0 -1
  267. package/lib/tests/TimetrackingStatuses.test.js +0 -21
  268. package/lib/tests/TimetrackingStatuses.test.js.map +0 -1
  269. package/lib/tests/Timetrackings.test.d.ts +0 -1
  270. package/lib/tests/Timetrackings.test.js +0 -21
  271. package/lib/tests/Timetrackings.test.js.map +0 -1
  272. package/lib/tests/Users.test.d.ts +0 -1
  273. package/lib/tests/Users.test.js +0 -21
  274. package/lib/tests/Users.test.js.map +0 -1
@@ -0,0 +1,2908 @@
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
+ interface DefaultPositionCreate {
877
+ amount: string;
878
+ amount_reserved: string;
879
+ amount_open: string;
880
+ amount_completed: string;
881
+ unit_id: number;
882
+ account_id: number;
883
+ tax_id: number;
884
+ text: string;
885
+ unit_price: string;
886
+ discount_in_percent: string | null;
887
+ is_optional: boolean;
888
+ }
889
+ interface DefaultPosition extends Omit<DefaultPositionCreate, "unit_price"> {
890
+ id: number;
891
+ unit_name: string;
892
+ tax_value: string;
893
+ position_total: string;
894
+ unit_price: string | null;
895
+ pos: string;
896
+ internal_pos: number;
897
+ type: "KbPositionCustom";
898
+ parent_id: number | null;
899
+ }
900
+ interface ItemPositionCreate extends DefaultPositionCreate {
901
+ article_id: number;
902
+ }
903
+ interface ItemPosition extends Omit<DefaultPosition, "type"> {
904
+ article_id: number;
905
+ type: "KbPositionArticle";
906
+ }
907
+ interface TextPositionCreate {
908
+ text: string;
909
+ show_pos_nr: boolean;
910
+ }
911
+ interface TextPosition extends TextPositionCreate {
912
+ id: number;
913
+ pos: string | null;
914
+ internal_pos: number;
915
+ is_optional: boolean;
916
+ type: "KbPositionText";
917
+ parent_id: number | null;
918
+ }
919
+ }
920
+
921
+ declare class Orders extends BaseCrud<OrdersStatic.OrderSmall, OrdersStatic.OrderFull, OrdersStatic.OrderSmall, OrdersStatic.OrderSearchParameters, OrdersStatic.OrderCreate, OrdersStatic.OrderCreate> {
922
+ constructor(apiToken: string);
923
+ /**
924
+ * Create a default position for an order
925
+ *
926
+ * @param {number} orderId
927
+ * @param {PositionsStatic.DefaultPositionCreate} position
928
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
929
+ * @memberof Orders
930
+ */
931
+ createDefaultPosition(orderId: number, position: PositionsStatic.DefaultPositionCreate): Promise<PositionsStatic.DefaultPosition>;
932
+ /**
933
+ * Create an item position for an order
934
+ *
935
+ * @param {number} orderId
936
+ * @param {PositionsStatic.ItemPositionCreate} position
937
+ * @returns {Promise<PositionsStatic.ItemPosition>}
938
+ * @memberof Orders
939
+ */
940
+ createItemPosition(orderId: number, position: PositionsStatic.ItemPositionCreate): Promise<PositionsStatic.ItemPosition>;
941
+ /**
942
+ * Create a text position for an order
943
+ *
944
+ * @param {number} orderId
945
+ * @param {PositionsStatic.TextPositionCreate} position
946
+ * @returns {Promise<PositionsStatic.TextPosition>}
947
+ * @memberof Orders
948
+ */
949
+ createTextPosition(orderId: number, position: PositionsStatic.TextPositionCreate): Promise<PositionsStatic.TextPosition>;
950
+ }
951
+
952
+ declare namespace ProjectsStatic {
953
+ interface Project {
954
+ id: number;
955
+ nr: string;
956
+ name: string;
957
+ start_date?: string;
958
+ end_date?: string;
959
+ comment: string;
960
+ pr_state_id: number;
961
+ pr_project_type_id: number;
962
+ contact_id: number;
963
+ contact_sub_id?: number;
964
+ pr_invoice_type_id?: number;
965
+ pr_invoice_type_amount: number;
966
+ pr_budget_type_id?: number;
967
+ pr_budget_type_amount: number;
968
+ }
969
+ interface ProjectCreate {
970
+ contact_id: number;
971
+ name: string;
972
+ pr_project_type_id: number;
973
+ pr_state_id: number;
974
+ user_id: number;
975
+ comment?: string;
976
+ contact_sub_id?: number;
977
+ end_date?: string;
978
+ pr_budget_type_amount?: number;
979
+ pr_budget_type_id?: number;
980
+ pr_invoice_type_amount?: number;
981
+ pr_invoice_type_id?: number;
982
+ pr_sub_state_id?: number;
983
+ start_date?: string;
984
+ }
985
+ interface ProjectOverwrite {
986
+ contact_id: number;
987
+ name: string;
988
+ pr_project_type_id: number;
989
+ pr_state_id: number;
990
+ user_id: number;
991
+ comment?: string;
992
+ contact_sub_id?: number;
993
+ end_date?: string;
994
+ pr_budget_type_amount?: number;
995
+ pr_budget_type_id?: number;
996
+ pr_invoice_type_amount?: number;
997
+ pr_invoice_type_id?: number;
998
+ pr_sub_state_id?: number;
999
+ start_date?: string;
1000
+ }
1001
+ enum ProjectSearchParameters {
1002
+ name = "name",
1003
+ contact_id = "contact_id",
1004
+ pr_state_id = "pr_state_id"
1005
+ }
1006
+ }
1007
+
1008
+ declare class Projects extends BaseCrud<ProjectsStatic.Project, ProjectsStatic.Project, ProjectsStatic.Project, ProjectsStatic.ProjectSearchParameters, ProjectsStatic.ProjectCreate, ProjectsStatic.ProjectOverwrite> {
1009
+ constructor(apiToken: string);
1010
+ }
1011
+
1012
+ declare namespace ProjectStatusesStatic {
1013
+ interface ProjectStatus {
1014
+ id: number;
1015
+ name: string;
1016
+ }
1017
+ enum ProjectStatusSearchParameters {
1018
+ text = "text"
1019
+ }
1020
+ }
1021
+
1022
+ declare class ProjectStatuses extends BaseCrud<ProjectStatusesStatic.ProjectStatus, ProjectStatusesStatic.ProjectStatus, ProjectStatusesStatic.ProjectStatus, ProjectStatusesStatic.ProjectStatusSearchParameters, {}, {}> {
1023
+ constructor(apiToken: string);
1024
+ /**
1025
+ * Not implemented by Bexio yet
1026
+ *
1027
+ * @param {number} id
1028
+ * @param {{}} ressource
1029
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
1030
+ * @memberof ProjectStatuses
1031
+ */
1032
+ overwrite(id: number, ressource: {}): Promise<ProjectStatusesStatic.ProjectStatus>;
1033
+ /**
1034
+ * Not implemented by Bexio yet
1035
+ *
1036
+ * @param {number} id
1037
+ * @param {{}} ressource
1038
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
1039
+ * @memberof ProjectStatuses
1040
+ */
1041
+ edit(id: number, ressource: {}): Promise<ProjectStatusesStatic.ProjectStatus>;
1042
+ /**
1043
+ * Not implemented by Bexio yet
1044
+ *
1045
+ * @param {{}} ressource
1046
+ * @returns {Promise<ProjectStatusesStatic.ProjectStatus>}
1047
+ * @memberof ProjectStatuses
1048
+ */
1049
+ create(ressource: {}): Promise<ProjectStatusesStatic.ProjectStatus>;
1050
+ /**
1051
+ * Not implemented by Bexio yet
1052
+ *
1053
+ * @param {number} id
1054
+ * @returns {Promise<boolean>}
1055
+ * @memberof ProjectStatuses
1056
+ */
1057
+ delete(id: number): Promise<boolean>;
1058
+ }
1059
+
1060
+ declare namespace ProjectTypesStatic {
1061
+ interface ProjectType {
1062
+ id: number;
1063
+ name: string;
1064
+ }
1065
+ enum ProjectTypeSearchParameters {
1066
+ project_type = "project_type"
1067
+ }
1068
+ }
1069
+
1070
+ declare class ProjectTypes extends BaseCrud<ProjectTypesStatic.ProjectType, ProjectTypesStatic.ProjectType, ProjectTypesStatic.ProjectType, ProjectTypesStatic.ProjectTypeSearchParameters, {}, ProjectTypesStatic.ProjectType> {
1071
+ constructor(apiToken: string);
1072
+ /**
1073
+ * Not implemented by Bexio yet
1074
+ *
1075
+ * @param {{}} ressource
1076
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
1077
+ * @memberof ProjectTypes
1078
+ */
1079
+ create(ressource: {}): Promise<ProjectTypesStatic.ProjectType>;
1080
+ /**
1081
+ * Not implemented by Bexio yet
1082
+ *
1083
+ * @param {number} id
1084
+ * @param {{}} ressource
1085
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
1086
+ * @memberof ProjectTypes
1087
+ */
1088
+ edit(id: number, ressource: {}): Promise<ProjectTypesStatic.ProjectType>;
1089
+ /**
1090
+ * Not implemented by Bexio yet
1091
+ *
1092
+ * @param {number} id
1093
+ * @param {{}} ressource
1094
+ * @returns {Promise<ProjectTypesStatic.ProjectType>}
1095
+ * @memberof ProjectTypes
1096
+ */
1097
+ overwrite(id: number, ressource: {}): Promise<ProjectTypesStatic.ProjectType>;
1098
+ /**
1099
+ * Not implemented by Bexio yet
1100
+ *
1101
+ * @param {number} id
1102
+ * @returns {Promise<boolean>}
1103
+ * @memberof ProjectTypes
1104
+ */
1105
+ delete(id: number): Promise<boolean>;
1106
+ }
1107
+
1108
+ declare namespace TimetrackingsStatic {
1109
+ interface TimetrackingsSmall {
1110
+ id: number;
1111
+ user_id: number;
1112
+ status_id?: number;
1113
+ client_service_id: number;
1114
+ text: string;
1115
+ allowable_bill: true;
1116
+ charge?: boolean;
1117
+ contact_id?: number;
1118
+ sub_contact_id?: number;
1119
+ pr_project_id?: number;
1120
+ pr_package_id?: number;
1121
+ pr_milestone_id?: number;
1122
+ travel_time?: number;
1123
+ travel_charge?: boolean;
1124
+ travel_distance?: number;
1125
+ estimated_time?: number;
1126
+ date: string;
1127
+ duration: string;
1128
+ running: boolean;
1129
+ }
1130
+ enum TimetrackingsSearchParameters {
1131
+ id = "id",
1132
+ client_service_id = "client_service_id",
1133
+ contact_id = "contact_id",
1134
+ user_id = "user_id",
1135
+ pr_project_id = "pr_project_id",
1136
+ status_id = "status_id"
1137
+ }
1138
+ interface TimetrackingsFull extends TimetrackingsSmall {
1139
+ tracking: TimetrackingsTrackingRecord;
1140
+ }
1141
+ interface TimetrackingsTrackingRecord {
1142
+ type: "duration" | "range";
1143
+ date: string;
1144
+ duration: string;
1145
+ }
1146
+ interface TimetrackingsCreate {
1147
+ user_id: number;
1148
+ client_service_id: number;
1149
+ allowable_bill: boolean;
1150
+ tracking: TimetrackingsTrackingRecord;
1151
+ charge?: boolean;
1152
+ contact_id?: number;
1153
+ estimated_time?: string;
1154
+ pr_project_id?: number;
1155
+ pr_package_id?: number;
1156
+ pr_milestone_id?: number;
1157
+ status_id?: number;
1158
+ sub_contact_id?: number;
1159
+ text?: string;
1160
+ }
1161
+ interface TimetrackingsEdit {
1162
+ allowable_bill?: boolean;
1163
+ charge?: number;
1164
+ client_service_id?: number;
1165
+ contact_id?: number;
1166
+ estimated_time?: string;
1167
+ pr_milestone_id?: number;
1168
+ pr_package_id?: number;
1169
+ pr_project_id?: number;
1170
+ status_id?: number;
1171
+ sub_contact_id?: number;
1172
+ text?: string;
1173
+ tracking?: TimetrackingsTrackingRecord;
1174
+ user_id?: number;
1175
+ }
1176
+ }
1177
+
1178
+ declare class Timetrackings extends BaseCrud<TimetrackingsStatic.TimetrackingsSmall, TimetrackingsStatic.TimetrackingsFull, TimetrackingsStatic.TimetrackingsSmall, TimetrackingsStatic.TimetrackingsSearchParameters, TimetrackingsStatic.TimetrackingsCreate, {}> {
1179
+ constructor(apiToken: string);
1180
+ /**
1181
+ * Not implemented by Bexio yet
1182
+ *
1183
+ * @param {number} id
1184
+ * @param {{}} ressource
1185
+ * @returns {Promise<TimetrackingsStatic.TimetrackingsFull>}
1186
+ * @memberof Timetracking
1187
+ */
1188
+ overwrite(id: number, ressource: {}): Promise<TimetrackingsStatic.TimetrackingsFull>;
1189
+ }
1190
+
1191
+ declare namespace TimetrackingStatusesStatic {
1192
+ interface TimetrackingStatus {
1193
+ id: number;
1194
+ name: string;
1195
+ }
1196
+ enum TimetrackingStatusesSearchparameters {
1197
+ name = "name"
1198
+ }
1199
+ }
1200
+
1201
+ declare class TimetrackingStatuses extends BaseCrud<TimetrackingStatusesStatic.TimetrackingStatus, TimetrackingStatusesStatic.TimetrackingStatus, TimetrackingStatusesStatic.TimetrackingStatus, TimetrackingStatusesStatic.TimetrackingStatusesSearchparameters, {}, {}> {
1202
+ constructor(apiToken: string);
1203
+ /**
1204
+ * Not implemented by Bexio yet
1205
+ *
1206
+ * @param {number} id
1207
+ * @param {{}} ressource
1208
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
1209
+ * @memberof TimetrackingStatuses
1210
+ */
1211
+ overwrite(id: number, ressource: {}): Promise<TimetrackingStatusesStatic.TimetrackingStatus>;
1212
+ /**
1213
+ * Not implemented by Bexio yet
1214
+ *
1215
+ * @param {number} id
1216
+ * @param {{}} ressource
1217
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
1218
+ * @memberof TimetrackingStatuses
1219
+ */
1220
+ edit(id: number, ressource: {}): Promise<TimetrackingStatusesStatic.TimetrackingStatus>;
1221
+ /**
1222
+ * Not implemented by Bexio yet
1223
+ *
1224
+ * @param {{}} ressource
1225
+ * @returns {Promise<TimetrackingStatusesStatic.TimetrackingStatus>}
1226
+ * @memberof TimetrackingStatuses
1227
+ */
1228
+ create(ressource: {}): Promise<TimetrackingStatusesStatic.TimetrackingStatus>;
1229
+ /**
1230
+ * Not implemented by Bexio yet
1231
+ *
1232
+ * @param {number} id
1233
+ * @returns {Promise<boolean>}
1234
+ * @memberof TimetrackingStatuses
1235
+ */
1236
+ delete(id: number): Promise<boolean>;
1237
+ }
1238
+
1239
+ declare namespace UsersStatic {
1240
+ interface UserSmall {
1241
+ id: number;
1242
+ nickname?: string;
1243
+ firstname: string;
1244
+ lastname: string;
1245
+ email?: string;
1246
+ color: string;
1247
+ phone_fixed?: string;
1248
+ phone_mobile?: string;
1249
+ is_superadmin: boolean;
1250
+ }
1251
+ interface UserFull extends UserSmall {
1252
+ profile_image: string;
1253
+ }
1254
+ enum UsersSearchparameters {
1255
+ id = "id",
1256
+ nickname = "nickname",
1257
+ firstname = "firstname",
1258
+ lastname = "lastname",
1259
+ color = "color"
1260
+ }
1261
+ }
1262
+
1263
+ declare class Users extends BaseCrud<UsersStatic.UserSmall, UsersStatic.UserFull, UsersStatic.UserSmall, UsersStatic.UsersSearchparameters, {}, {}> {
1264
+ constructor(apiToken: string);
1265
+ /**
1266
+ * Not implemented by Bexio yet
1267
+ *
1268
+ * @param {number} id
1269
+ * @param {{}} ressource
1270
+ * @returns {Promise<UsersStatic.UserFull>}
1271
+ * @memberof Users
1272
+ */
1273
+ overwrite(id: number, ressource: {}): Promise<UsersStatic.UserFull>;
1274
+ /**
1275
+ * Not implemented by Bexio yet
1276
+ *
1277
+ * @param {number} id
1278
+ * @param {{}} ressource
1279
+ * @returns {Promise<UsersStatic.UserFull>}
1280
+ * @memberof Users
1281
+ */
1282
+ edit(id: number, ressource: {}): Promise<UsersStatic.UserFull>;
1283
+ /**
1284
+ * Not implemented by Bexio yet
1285
+ *
1286
+ * @param {{}} ressource
1287
+ * @returns {Promise<UsersStatic.UserFull>}
1288
+ * @memberof Users
1289
+ */
1290
+ create(ressource: {}): Promise<UsersStatic.UserFull>;
1291
+ /**
1292
+ * Not implemented by Bexio yet
1293
+ *
1294
+ * @param {number} id
1295
+ * @returns {Promise<boolean>}
1296
+ * @memberof Users
1297
+ */
1298
+ delete(id: number): Promise<boolean>;
1299
+ }
1300
+
1301
+ declare namespace ItemsStatic {
1302
+ interface Item {
1303
+ id: number;
1304
+ user_id: number;
1305
+ article_type_id: number;
1306
+ contact_id: number;
1307
+ deliverer_code?: string;
1308
+ deliverer_name?: string;
1309
+ deliverer_description?: string;
1310
+ intern_code: string;
1311
+ intern_name: string;
1312
+ intern_description?: string;
1313
+ purchase_price?: number;
1314
+ sale_price?: number;
1315
+ purchase_total?: number;
1316
+ sale_total?: number;
1317
+ currency_id?: number;
1318
+ tax_income_id?: number;
1319
+ tax_id?: number;
1320
+ tax_expense_id?: number;
1321
+ unit_id?: number;
1322
+ is_stock: boolean;
1323
+ stock_id?: number;
1324
+ stock_place_id?: number;
1325
+ stock_nr: number;
1326
+ stock_min_nr: number;
1327
+ stock_reserved_nr: number;
1328
+ stock_available_nr: number;
1329
+ stock_picked_nr: number;
1330
+ stock_disposed_nr: number;
1331
+ stock_ordered_nr: number;
1332
+ width?: number;
1333
+ height?: number;
1334
+ weight?: number;
1335
+ volume?: number;
1336
+ html_text?: string;
1337
+ remarks?: string;
1338
+ delivery_price?: number;
1339
+ article_group_id?: number;
1340
+ }
1341
+ interface ItemCreate {
1342
+ user_id: number;
1343
+ article_type_id: number;
1344
+ contact_id: number;
1345
+ deliverer_code?: string;
1346
+ deliverer_name?: string;
1347
+ deliverer_description?: string;
1348
+ intern_code: string;
1349
+ intern_name: string;
1350
+ intern_description?: string;
1351
+ purchase_price?: number;
1352
+ sale_price?: number;
1353
+ purchase_total?: number;
1354
+ sale_total?: number;
1355
+ currency_id?: number;
1356
+ tax_income_id?: number;
1357
+ tax_id?: number;
1358
+ tax_expense_id?: number;
1359
+ unit_id?: number;
1360
+ is_stock: boolean;
1361
+ stock_id?: number;
1362
+ stock_place_id?: number;
1363
+ stock_nr: number;
1364
+ stock_min_nr: number;
1365
+ stock_reserved_nr: number;
1366
+ stock_available_nr: number;
1367
+ stock_picked_nr: number;
1368
+ stock_disposed_nr: number;
1369
+ stock_ordered_nr: number;
1370
+ width?: number;
1371
+ height?: number;
1372
+ weight?: number;
1373
+ volume?: number;
1374
+ html_text?: string;
1375
+ remarks?: string;
1376
+ delivery_price?: number;
1377
+ article_group_id?: number;
1378
+ }
1379
+ interface ItemOverwrite extends ItemCreate {
1380
+ }
1381
+ enum ItemSearchParameters {
1382
+ id = "id",
1383
+ user_id = "user_id",
1384
+ article_type_id = "article_type_id",
1385
+ contact_id = "contact_id",
1386
+ deliverer_code = "deliverer_code",
1387
+ deliverer_name = "deliverer_name",
1388
+ deliverer_description = "deliverer_description",
1389
+ intern_code = "intern_code",
1390
+ intern_name = "intern_name",
1391
+ intern_description = "intern_description",
1392
+ purchase_price = "purchase_price",
1393
+ sale_price = "sale_price",
1394
+ purchase_total = "purchase_total",
1395
+ sale_total = "sale_total",
1396
+ currency_id = "currency_id",
1397
+ tax_income_id = "tax_income_id",
1398
+ tax_id = "tax_id",
1399
+ tax_expense_id = "tax_expense_id",
1400
+ unit_id = "unit_id",
1401
+ is_stock = "is_stock",
1402
+ stock_id = "stock_id",
1403
+ stock_place_id = "stock_place_id",
1404
+ stock_nr = "stock_nr",
1405
+ stock_min_nr = "stock_min_nr",
1406
+ stock_reserved_nr = "stock_reserved_nr",
1407
+ stock_available_nr = "stock_available_nr",
1408
+ stock_picked_nr = "stock_picked_nr",
1409
+ stock_disposed_nr = "stock_disposed_nr",
1410
+ stock_ordered_nr = "stock_ordered_nr",
1411
+ width = "width",
1412
+ height = "height",
1413
+ weight = "weight",
1414
+ volume = "volume",
1415
+ html_text = "html_text",
1416
+ remarks = "remarks",
1417
+ delivery_price = "delivery_price",
1418
+ article_group_id = "article_group_id"
1419
+ }
1420
+ }
1421
+
1422
+ declare class Items extends BaseCrud<ItemsStatic.Item, ItemsStatic.Item, ItemsStatic.Item, ItemsStatic.ItemSearchParameters, ItemsStatic.ItemCreate, ItemsStatic.ItemOverwrite> {
1423
+ constructor(apiToken: string);
1424
+ }
1425
+
1426
+ declare namespace PositionStatic {
1427
+ interface PositionCreate {
1428
+ amount?: string;
1429
+ unit_id?: number;
1430
+ account_id?: number;
1431
+ tax_id?: number;
1432
+ text: string;
1433
+ unit_price?: string;
1434
+ discount_in_percent?: string;
1435
+ type: string;
1436
+ parent_id?: number | null;
1437
+ article_id?: number;
1438
+ show_pos_nr?: boolean;
1439
+ is_percentual?: boolean;
1440
+ value?: string;
1441
+ }
1442
+ interface Position {
1443
+ id: number;
1444
+ type: string;
1445
+ amount: string;
1446
+ unit_id: number;
1447
+ account_id: number;
1448
+ unit_name: string;
1449
+ tax_id: number;
1450
+ tax_value: string;
1451
+ text: string;
1452
+ unit_price: string;
1453
+ discount_in_percent: null;
1454
+ position_total: string;
1455
+ pos: string;
1456
+ internal_pos: number;
1457
+ parent_id: null;
1458
+ is_optional: false;
1459
+ }
1460
+ }
1461
+
1462
+ declare namespace InvoicesStatic {
1463
+ interface Invoice {
1464
+ id: number;
1465
+ title: string | null;
1466
+ contact_id: number;
1467
+ contact_sub_id: number | null;
1468
+ user_id: number;
1469
+ pr_project_id: number | null;
1470
+ logopaper_id: number;
1471
+ language_id: number;
1472
+ bank_account_id: number;
1473
+ currency_id: number;
1474
+ payment_type_id: number;
1475
+ header: string;
1476
+ footer: string;
1477
+ mwst_type: number;
1478
+ mwst_is_net: boolean;
1479
+ show_position_taxes: boolean;
1480
+ is_valid_from: string;
1481
+ is_valid_to: string;
1482
+ reference: null | string;
1483
+ api_reference: null | string;
1484
+ template_slug: string;
1485
+ positions: PositionStatic.Position[];
1486
+ document_nr: string;
1487
+ total_gross: string;
1488
+ total_net: string;
1489
+ total_taxes: string;
1490
+ total_received_payments: string;
1491
+ total_credit_vouchers: string;
1492
+ total_remaining_payments: string;
1493
+ total: string;
1494
+ total_rounding_difference: number;
1495
+ contact_address: string;
1496
+ kb_item_status_id: number;
1497
+ viewed_by_client_at: string | null;
1498
+ updated_at: string;
1499
+ esr_id: number;
1500
+ qr_invoice_id: number;
1501
+ taxs: {
1502
+ percentage: string;
1503
+ value: string;
1504
+ }[];
1505
+ network_link: string | null;
1506
+ }
1507
+ interface InvoiceCreate {
1508
+ title?: string | null;
1509
+ contact_id: number;
1510
+ contact_sub_id?: number | null;
1511
+ user_id: number;
1512
+ pr_project_id?: number | null;
1513
+ logopaper_id?: number;
1514
+ language_id?: number;
1515
+ bank_account_id?: number;
1516
+ currency_id?: number;
1517
+ payment_type_id?: number;
1518
+ header?: string;
1519
+ footer?: string;
1520
+ mwst_type?: number;
1521
+ mwst_is_net?: boolean;
1522
+ show_position_taxes?: boolean;
1523
+ is_valid_from?: string;
1524
+ is_valid_to?: string;
1525
+ reference?: string | null;
1526
+ api_reference?: string | null;
1527
+ template_slug?: string;
1528
+ positions: PositionStatic.PositionCreate[];
1529
+ }
1530
+ interface InvoiceOverwrite {
1531
+ title?: string | null;
1532
+ contact_id?: number;
1533
+ contact_sub_id?: number | null;
1534
+ user_id?: number;
1535
+ pr_project_id?: number | null;
1536
+ logopaper_id?: number;
1537
+ language_id?: number;
1538
+ bank_account_id?: number;
1539
+ currency_id?: number;
1540
+ payment_type_id?: number;
1541
+ header?: string;
1542
+ footer?: string;
1543
+ mwst_type?: number;
1544
+ mwst_is_net?: boolean;
1545
+ show_position_taxes?: boolean;
1546
+ is_valid_from?: string;
1547
+ is_valid_to?: string;
1548
+ reference?: null;
1549
+ api_reference?: null;
1550
+ template_slug?: string;
1551
+ positions: PositionStatic.PositionCreate[];
1552
+ }
1553
+ enum InvoiceSearchParameters {
1554
+ id = "id",
1555
+ kb_item_status_id = "kb_item_status_id",
1556
+ document_nr = "document_nr",
1557
+ title = "title",
1558
+ api_reference = "api_reference",
1559
+ contact_id = "contact_id",
1560
+ contact_sub_id = "contact_sub_id",
1561
+ user_id = "user_id",
1562
+ currency_id = "currency_id",
1563
+ total_gross = "total_gross",
1564
+ total_net = "total_net",
1565
+ total = "total",
1566
+ is_valid_from = "is_valid_from",
1567
+ is_valid_to = "is_valid_to",
1568
+ updated_at = "updated_at"
1569
+ }
1570
+ interface InvoiceSend {
1571
+ recipient_email: string;
1572
+ subject: string;
1573
+ message: string;
1574
+ mark_as_open: boolean;
1575
+ attach_pdf?: boolean;
1576
+ }
1577
+ /**
1578
+ * @deprecated Use `InvoiceSend` instead.
1579
+ */
1580
+ type InvoiceSent = InvoiceSend;
1581
+ interface InvoiceCancelled {
1582
+ success: boolean;
1583
+ }
1584
+ interface InvoiceIssued {
1585
+ success: boolean;
1586
+ }
1587
+ interface InvoiceSentAnswer {
1588
+ success: boolean;
1589
+ }
1590
+ interface Payment {
1591
+ id: number;
1592
+ date: string;
1593
+ value: string;
1594
+ bank_account_id?: number | null;
1595
+ title?: string | null;
1596
+ payment_service_id?: number | null;
1597
+ is_client_account_redemption: boolean;
1598
+ is_cash_discount: boolean;
1599
+ kb_invoice_id?: number | null;
1600
+ kb_credit_voucher_id?: number | null;
1601
+ kb_bill_id?: number | null;
1602
+ kb_credit_voucher_text?: number | null;
1603
+ }
1604
+ enum KB_ITEM_STATUS {
1605
+ Draft = 7,
1606
+ Pending = 8,
1607
+ Paid = 9,
1608
+ Partial = 16,
1609
+ Canceled = 19,
1610
+ Unpaid = 31
1611
+ }
1612
+ enum MWST_TYPE {
1613
+ INCLUDING_TAXES = 0,
1614
+ EXCLUDING_TAXES = 1,
1615
+ EXEMPT_FROM_TAXES = 2
1616
+ }
1617
+ enum PAYMENT_SERVICE {
1618
+ PAYPAL = 1,
1619
+ STRIPE = 2,
1620
+ SIX_PAYMENTS = 3
1621
+ }
1622
+ }
1623
+
1624
+ declare class Invoices extends BaseCrud<InvoicesStatic.Invoice, InvoicesStatic.Invoice, InvoicesStatic.Invoice, InvoicesStatic.InvoiceSearchParameters, InvoicesStatic.InvoiceCreate, InvoicesStatic.InvoiceOverwrite> {
1625
+ constructor(apiToken: string);
1626
+ /**
1627
+ * Send an invoice by email.
1628
+ *
1629
+ * @param {number} id
1630
+ * @param {Partial<InvoicesStatic.InvoiceSend>} ressource
1631
+ * @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
1632
+ * @memberof Invoices
1633
+ */
1634
+ send(id: number, ressource: Partial<InvoicesStatic.InvoiceSend>): Promise<InvoicesStatic.InvoiceSentAnswer>;
1635
+ /**
1636
+ * @deprecated Use `send` instead.
1637
+ */
1638
+ sent(id: number, ressource: Partial<InvoicesStatic.InvoiceSend>): Promise<InvoicesStatic.InvoiceSentAnswer>;
1639
+ cancel(id: number): Promise<InvoicesStatic.InvoiceCancelled>;
1640
+ /**
1641
+ * This action returns a pdf document of the invoice.
1642
+ *
1643
+ * @param {number} id
1644
+ * @param {0 | 1} [logopaper] Whether the PDF should be generated using the letterhead, or not.
1645
+ * @returns {Promise<BaseStatic.PdfResponse>}
1646
+ * @memberof Invoices
1647
+ */
1648
+ showPdf(id: number, logopaper?: 0 | 1): Promise<BaseStatic.PdfResponse>;
1649
+ /**
1650
+ * Issue an invoice. The invoice must be in the draft status.
1651
+ *
1652
+ * @param {number} id
1653
+ * @returns {Promise<InvoicesStatic.InvoiceIssued>}
1654
+ * @memberof Invoices
1655
+ */
1656
+ issue(id: number): Promise<InvoicesStatic.InvoiceIssued>;
1657
+ /**
1658
+ * Mark an invoice as sent.
1659
+ *
1660
+ * @param {number} id
1661
+ * @returns {Promise<InvoicesStatic.InvoiceSentAnswer>}
1662
+ * @memberof Invoices
1663
+ */
1664
+ markAsSent(id: number): Promise<InvoicesStatic.InvoiceSentAnswer>;
1665
+ /**
1666
+ * revert a Invoice issue
1667
+ *
1668
+ * @param {number} id
1669
+ * @returns {Promise<{ success: boolean }>}
1670
+ * @memberof Invoices
1671
+ */
1672
+ revertIssue(id: number): Promise<{
1673
+ success: boolean;
1674
+ }>;
1675
+ /**
1676
+ * Create a payment for an invoice
1677
+ *
1678
+ * @param {number} invoiceId
1679
+ * @param {Date} date
1680
+ * @param {string} value
1681
+ * @param {number} [bank_account_id]
1682
+ * @param {number} [payment_service_id]
1683
+ * @return {*} {Promise<InvoicesStatic.Payment>}
1684
+ * @memberof Invoices
1685
+ */
1686
+ createPayment(invoiceId: number, date: Date, value: string, bank_account_id?: number, payment_service_id?: number): Promise<InvoicesStatic.Payment>;
1687
+ /**
1688
+ * Get a payment for an invoice
1689
+ *
1690
+ * @param {number} invoiceId
1691
+ * @param {number} paymentId
1692
+ * @return {*} {Promise<InvoicesStatic.Payment>}
1693
+ * @memberof Invoices
1694
+ */
1695
+ getPayment(invoiceId: number, paymentId: number): Promise<InvoicesStatic.Payment>;
1696
+ /**
1697
+ * Delete a payment for an invoice
1698
+ *
1699
+ * @param {number} invoiceId
1700
+ * @param {number} paymentId
1701
+ * @return {*} {Promise<void>}
1702
+ * @memberof Invoices
1703
+ */
1704
+ deletePayment(invoiceId: number, paymentId: number): Promise<void>;
1705
+ /**
1706
+ * Create a default position for an invoice
1707
+ *
1708
+ * @param {number} invoiceId
1709
+ * @param {PositionsStatic.DefaultPositionCreate} position
1710
+ * @returns {Promise<PositionsStatic.DefaultPosition>}
1711
+ * @memberof Invoices
1712
+ */
1713
+ createDefaultPosition(invoiceId: number, position: PositionsStatic.DefaultPositionCreate): Promise<PositionsStatic.DefaultPosition>;
1714
+ /**
1715
+ * Create an item position for an invoice
1716
+ *
1717
+ * @param {number} invoiceId
1718
+ * @param {PositionsStatic.ItemPositionCreate} position
1719
+ * @returns {Promise<PositionsStatic.ItemPosition>}
1720
+ * @memberof Invoices
1721
+ */
1722
+ createItemPosition(invoiceId: number, position: PositionsStatic.ItemPositionCreate): Promise<PositionsStatic.ItemPosition>;
1723
+ /**
1724
+ * Create a text position for an invoice
1725
+ *
1726
+ * @param {number} invoiceId
1727
+ * @param {PositionsStatic.TextPositionCreate} position
1728
+ * @returns {Promise<PositionsStatic.TextPosition>}
1729
+ * @memberof Invoices
1730
+ */
1731
+ createTextPosition(invoiceId: number, position: PositionsStatic.TextPositionCreate): Promise<PositionsStatic.TextPosition>;
1732
+ }
1733
+
1734
+ declare namespace CurrenciesStatic {
1735
+ interface Currency {
1736
+ id: number;
1737
+ name: string;
1738
+ round_factor: number;
1739
+ }
1740
+ interface CurrencyFull extends Currency {
1741
+ exchange_rate?: number;
1742
+ exchange_rate_id?: number;
1743
+ ratio?: number;
1744
+ exchange_rate_to_ratio?: number;
1745
+ source?: "custom" | "monthly_average";
1746
+ source_reason?: "monthly_average_provided" | "monthly_average_unavailable" | "monthly_average_unreachable" | "source_custom";
1747
+ exchange_rate_date?: string;
1748
+ }
1749
+ interface CurrencyCreate {
1750
+ name: string;
1751
+ round_factor: number;
1752
+ }
1753
+ }
1754
+
1755
+ declare class Currencies extends BaseCrud<CurrenciesStatic.CurrencyFull, CurrenciesStatic.Currency, {}, {}, CurrenciesStatic.CurrencyCreate, {}> {
1756
+ constructor(apiToken: string);
1757
+ /**
1758
+ * NOT IMPLEMENTED BY BEXIO YET
1759
+ *
1760
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
1761
+ * @param {BaseStatic.BaseOptions} [options]
1762
+ * @returns {Promise<Array<{}>>}
1763
+ * @memberof Currencies
1764
+ */
1765
+ search(searchOptions: Array<BaseStatic.SearchParameter<{}>>, options?: BaseStatic.BaseOptions): Promise<Array<{}>>;
1766
+ /**
1767
+ * NOT IMPLEMENTED BY BEXIO YET
1768
+ *
1769
+ * @param {number} id
1770
+ * @param {Overwrite} ressource
1771
+ * @returns {Promise<{}>}
1772
+ * @memberof Currencies
1773
+ */
1774
+ overwrite(id: number, ressource: CurrenciesStatic.Currency): Promise<CurrenciesStatic.Currency>;
1775
+ /**
1776
+ * NOT IMPLEMENTED BY BEXIO YET
1777
+ *
1778
+ * @param {number} id
1779
+ * @param {Partial<{}>} ressource
1780
+ * @returns {Promise<CurrenciesStatic.Currency>}
1781
+ * @memberof BaseCrud
1782
+ */
1783
+ edit(id: number, ressource: Partial<{}>): Promise<CurrenciesStatic.Currency>;
1784
+ }
1785
+
1786
+ declare namespace BillsV4Static {
1787
+ interface Bill {
1788
+ id: string;
1789
+ document_no: string;
1790
+ title?: string;
1791
+ status: BillStatus;
1792
+ firstname_suffix?: string;
1793
+ lastname_company: string;
1794
+ created_at: string;
1795
+ vendor_ref?: string;
1796
+ pending_amount?: number;
1797
+ currency_code: string;
1798
+ net?: number;
1799
+ gross?: number;
1800
+ bill_date: string;
1801
+ due_date: string;
1802
+ overdue: boolean;
1803
+ booking_account_ids: number[];
1804
+ attachment_ids: string[];
1805
+ }
1806
+ interface BillFull extends Bill {
1807
+ supplier_id: number;
1808
+ contact_partner_id: number;
1809
+ amount_man: number;
1810
+ amount_calc: number;
1811
+ manual_amount: boolean;
1812
+ exchange_rate: number;
1813
+ base_currency_code: string;
1814
+ item_net: boolean;
1815
+ split_into_line_items: boolean;
1816
+ purchase_order_id?: number;
1817
+ base_currency_amount: number;
1818
+ qr_bill_information?: string;
1819
+ address: Address;
1820
+ line_items: LineItem[];
1821
+ discounts: Discount[];
1822
+ payment?: Payment;
1823
+ note?: string;
1824
+ }
1825
+ interface Address {
1826
+ title?: string;
1827
+ salutation?: string;
1828
+ firstname_suffix?: string;
1829
+ lastname_company: string;
1830
+ address_line?: string;
1831
+ postcode?: string;
1832
+ city?: string;
1833
+ country_code?: string;
1834
+ main_contact_id?: number;
1835
+ contact_address_id?: number;
1836
+ type: "PRIVATE" | "COMPANY";
1837
+ }
1838
+ interface LineItem {
1839
+ position: number;
1840
+ title?: string;
1841
+ tax_id?: number;
1842
+ amount: number;
1843
+ booking_account_id?: number;
1844
+ }
1845
+ interface Discount {
1846
+ position: number;
1847
+ amount: number;
1848
+ }
1849
+ interface Payment {
1850
+ type: PaymentType;
1851
+ bank_account_id?: number;
1852
+ fee?: PaymentFee;
1853
+ execution_date: string;
1854
+ exchange_rate?: number;
1855
+ amount: number;
1856
+ account_no?: string;
1857
+ iban?: string;
1858
+ name?: string;
1859
+ address?: string;
1860
+ street?: string;
1861
+ house_no?: string;
1862
+ postcode?: string;
1863
+ city?: string;
1864
+ country_code?: string;
1865
+ message?: string;
1866
+ booking_text?: string;
1867
+ salary_payment?: boolean;
1868
+ reference_no?: string;
1869
+ }
1870
+ interface BillCreate {
1871
+ supplier_id: number;
1872
+ vendor_ref?: string;
1873
+ title?: string;
1874
+ contact_partner_id: number;
1875
+ bill_date: string;
1876
+ due_date: string;
1877
+ amount_man?: number;
1878
+ amount_calc?: number;
1879
+ manual_amount: boolean;
1880
+ currency_code: string;
1881
+ exchange_rate?: number;
1882
+ base_currency_amount?: number;
1883
+ item_net: boolean;
1884
+ purchase_order_id?: number;
1885
+ qr_bill_information?: string;
1886
+ attachment_ids: string[];
1887
+ address: Address;
1888
+ line_items: LineItem[];
1889
+ discounts: Discount[];
1890
+ payment?: Payment;
1891
+ salary_payment?: boolean;
1892
+ reference_no?: string;
1893
+ note?: string;
1894
+ }
1895
+ interface BillOverwrite {
1896
+ document_no?: string;
1897
+ title?: string;
1898
+ supplier_id: number;
1899
+ vendor_ref?: string;
1900
+ contact_partner_id: number;
1901
+ bill_date: string;
1902
+ due_date: string;
1903
+ amount_man?: number;
1904
+ amount_calc?: number;
1905
+ manual_amount: boolean;
1906
+ currency_code: string;
1907
+ exchange_rate?: number;
1908
+ item_net: boolean;
1909
+ split_into_line_items: boolean;
1910
+ base_currency_amount?: number;
1911
+ attachment_ids: string[];
1912
+ address: Address;
1913
+ line_items: LineItem[];
1914
+ discounts: Discount[];
1915
+ payment?: Payment;
1916
+ }
1917
+ enum SearchParameters {
1918
+ document_no = "document_no",
1919
+ title = "title",
1920
+ vendor_ref = "vendor_ref",
1921
+ currency_code = "currency_code",
1922
+ lastname_company = "lastname_company",
1923
+ firstname_suffix = "firstname_suffix"
1924
+ }
1925
+ enum BillStatusUpdate {
1926
+ DRAFT = "DRAFT",
1927
+ BOOKED = "BOOKED"
1928
+ }
1929
+ enum BillAction {
1930
+ DUPLICATE = "DUPLICATE"
1931
+ }
1932
+ enum BillStatusFilter {
1933
+ DRAFTS = "DRAFTS",
1934
+ TODO = "TODO",
1935
+ PAID = "PAID",
1936
+ OVERDUE = "OVERDUE"
1937
+ }
1938
+ interface ListOptions {
1939
+ limit?: number;
1940
+ page?: number;
1941
+ order?: "asc" | "desc";
1942
+ sort?: string;
1943
+ search_term?: string;
1944
+ "fields[]"?: string[];
1945
+ status?: BillStatusFilter;
1946
+ bill_date_start?: string;
1947
+ bill_date_end?: string;
1948
+ due_date_start?: string;
1949
+ due_date_end?: string;
1950
+ vendor_ref?: string;
1951
+ title?: string;
1952
+ currency_code?: string;
1953
+ pending_amount_min?: number;
1954
+ pending_amount_max?: number;
1955
+ vendor?: string;
1956
+ gross_min?: number;
1957
+ gross_max?: number;
1958
+ net_min?: number;
1959
+ net_max?: number;
1960
+ document_no?: string;
1961
+ supplier_id?: number;
1962
+ average_exchange_rate_enabled?: boolean;
1963
+ }
1964
+ enum PaymentType {
1965
+ IBAN = "IBAN",
1966
+ MANUAL = "MANUAL",
1967
+ QR = "QR"
1968
+ }
1969
+ enum PaymentFee {
1970
+ BY_SENDER = "BY_SENDER",
1971
+ BY_RECEIVER = "BY_RECEIVER",
1972
+ BREAKDOWN = "BREAKDOWN",
1973
+ NO_FEE = "NO_FEE"
1974
+ }
1975
+ enum BillStatus {
1976
+ DRAFT = "DRAFT",
1977
+ BOOKED = "BOOKED",
1978
+ PARTIALLY_CREATED = "PARTIALLY_CREATED",
1979
+ CREATED = "CREATED",
1980
+ PARTIALLY_SENT = "PARTIALLY_SENT",
1981
+ SENT = "SENT",
1982
+ PARTIALLY_DOWNLOADED = "PARTIALLY_DOWNLOADED",
1983
+ DOWNLOADED = "DOWNLOADED",
1984
+ PARTIALLY_PAID = "PARTIALLY_PAID",
1985
+ PAID = "PAID",
1986
+ PARTIALLY_FAILED = "PARTIALLY_FAILED",
1987
+ FAILED = "FAILED"
1988
+ }
1989
+ }
1990
+
1991
+ declare class BillsV4 extends BaseCrud<BillsV4Static.Bill, BillsV4Static.BillFull, BillsV4Static.Bill, BillsV4Static.SearchParameters, BillsV4Static.BillCreate, BillsV4Static.BillOverwrite> {
1992
+ constructor(apiToken: string);
1993
+ /**
1994
+ * Lists the ressource
1995
+ *
1996
+ * @param {BillsV4Static.ListOptions} [options]
1997
+ * @returns {Promise<Array<BillsV4Static.Bill>>}
1998
+ * @memberof BillsV4
1999
+ */
2000
+ list(options?: BillsV4Static.ListOptions): Promise<Array<BillsV4Static.Bill>>;
2001
+ /**
2002
+ * Not implemented by Bexio yet
2003
+ *
2004
+ * @param {Array<BaseStatic.SearchParameter<BillsV4Static.SearchParameters>>} searchOptions
2005
+ * @param {BaseStatic.BaseOptions} [options]
2006
+ * @returns {Promise<BillsV4Static.Bill[]>}
2007
+ * @memberof BillsV4
2008
+ */
2009
+ search(searchOptions: Array<BaseStatic.SearchParameter<BillsV4Static.SearchParameters>>, options?: BaseStatic.BaseOptions): Promise<BillsV4Static.Bill[]>;
2010
+ /**
2011
+ * Update bill status
2012
+ *
2013
+ * @param {string} id
2014
+ * @param {BillsV4Static.BillStatusUpdate} status
2015
+ * @returns {Promise<BillsV4Static.BillFull>}
2016
+ * @memberof BillsV4
2017
+ */
2018
+ updateStatus(id: string, status: BillsV4Static.BillStatusUpdate): Promise<BillsV4Static.BillFull>;
2019
+ /**
2020
+ * Execute bill action
2021
+ *
2022
+ * @param {string} id
2023
+ * @param {BillsV4Static.BillAction} action
2024
+ * @returns {Promise<BillsV4Static.BillFull>}
2025
+ * @memberof BillsV4
2026
+ */
2027
+ executeAction(id: string, action: BillsV4Static.BillAction): Promise<BillsV4Static.BillFull>;
2028
+ /**
2029
+ * Validate whether document number is available or not
2030
+ *
2031
+ * @param {string} documentNo
2032
+ * @returns {Promise<{ valid: boolean; next_available_no: string }>}
2033
+ * @memberof BillsV4
2034
+ */
2035
+ validateDocumentNumber(documentNo: string): Promise<{
2036
+ valid: boolean;
2037
+ next_available_no: string;
2038
+ }>;
2039
+ }
2040
+
2041
+ declare namespace OutgoingPaymentsStatic {
2042
+ /**
2043
+ * Outgoing Payment Status
2044
+ */
2045
+ enum OutgoingPaymentStatus {
2046
+ DOWNLOADED = "DOWNLOADED",
2047
+ OPEN = "OPEN",
2048
+ RECONCILED = "RECONCILED",
2049
+ CANCELLED = "CANCELLED",
2050
+ UPLOADED = "UPLOADED",
2051
+ REJECTED = "REJECTED"
2052
+ }
2053
+ /**
2054
+ * Outgoing Payment Type
2055
+ */
2056
+ enum OutgoingPaymentType {
2057
+ IBAN = "IBAN",
2058
+ MANUAL = "MANUAL",
2059
+ CASH_DISCOUNT = "CASH_DISCOUNT",
2060
+ QR = "QR"
2061
+ }
2062
+ /**
2063
+ * Fee Type
2064
+ */
2065
+ enum FeeType {
2066
+ BY_SENDER = "BY_SENDER",
2067
+ BY_RECEIVER = "BY_RECEIVER",
2068
+ BREAKDOWN = "BREAKDOWN",
2069
+ NO_FEE = "NO_FEE"
2070
+ }
2071
+ /**
2072
+ * Outgoing Payment
2073
+ */
2074
+ interface OutgoingPayment {
2075
+ id: string;
2076
+ status: OutgoingPaymentStatus | string;
2077
+ created_at: string;
2078
+ bill_id: string;
2079
+ payment_type: OutgoingPaymentType | string;
2080
+ execution_date: string;
2081
+ amount: number;
2082
+ currency_code: string;
2083
+ exchange_rate: number;
2084
+ note?: string;
2085
+ sender_bank_account_id?: number;
2086
+ sender_iban?: string;
2087
+ sender_name?: string;
2088
+ sender_street?: string;
2089
+ sender_house_no?: string;
2090
+ sender_city?: string;
2091
+ sender_postcode?: string;
2092
+ sender_country_code?: string;
2093
+ sender_bc_no?: string;
2094
+ sender_bank_no?: string;
2095
+ sender_bank_name?: string;
2096
+ receiver_iban?: string;
2097
+ receiver_name?: string;
2098
+ receiver_street?: string;
2099
+ receiver_house_no?: string;
2100
+ receiver_city?: string;
2101
+ receiver_postcode?: string;
2102
+ receiver_country_code?: string;
2103
+ receiver_bc_no?: string;
2104
+ receiver_bank_no?: string;
2105
+ receiver_bank_name?: string;
2106
+ fee_type?: FeeType | string;
2107
+ is_salary_payment: boolean;
2108
+ reference_no?: string;
2109
+ message?: string;
2110
+ booking_text?: string;
2111
+ banking_payment_id?: string;
2112
+ banking_payment_entry_id?: string;
2113
+ transaction_id?: string;
2114
+ }
2115
+ /**
2116
+ * Outgoing Payment Create
2117
+ */
2118
+ interface OutgoingPaymentCreate {
2119
+ bill_id: string;
2120
+ payment_type: OutgoingPaymentType | string;
2121
+ execution_date: string;
2122
+ amount: number;
2123
+ currency_code: string;
2124
+ exchange_rate: number;
2125
+ note?: string;
2126
+ sender_bank_account_id?: number;
2127
+ sender_iban?: string;
2128
+ sender_name?: string;
2129
+ sender_street?: string;
2130
+ sender_house_no?: string;
2131
+ sender_city?: string;
2132
+ sender_postcode?: string;
2133
+ sender_country_code?: string;
2134
+ sender_bc_no?: string;
2135
+ sender_bank_no?: string;
2136
+ sender_bank_name?: string;
2137
+ receiver_iban?: string;
2138
+ receiver_name?: string;
2139
+ receiver_street?: string;
2140
+ receiver_house_no?: string;
2141
+ receiver_city?: string;
2142
+ receiver_postcode?: string;
2143
+ receiver_country_code?: string;
2144
+ receiver_bc_no?: string;
2145
+ receiver_bank_no?: string;
2146
+ receiver_bank_name?: string;
2147
+ fee_type?: FeeType | string;
2148
+ is_salary_payment: boolean;
2149
+ reference_no?: string;
2150
+ message?: string;
2151
+ booking_text?: string;
2152
+ }
2153
+ /**
2154
+ * Outgoing Payment Update
2155
+ */
2156
+ interface OutgoingPaymentUpdate {
2157
+ payment_id: string;
2158
+ execution_date: string;
2159
+ amount: number;
2160
+ fee_type?: FeeType | string;
2161
+ is_salary_payment: boolean;
2162
+ reference_no?: string | null;
2163
+ message?: string | null;
2164
+ receiver_iban?: string;
2165
+ receiver_name?: string;
2166
+ receiver_street?: string;
2167
+ receiver_house_no?: string;
2168
+ receiver_city?: string;
2169
+ receiver_postcode?: string;
2170
+ receiver_country_code?: string;
2171
+ }
2172
+ /**
2173
+ * List Options
2174
+ */
2175
+ interface ListOptions {
2176
+ bill_id: string;
2177
+ limit?: number;
2178
+ page?: number;
2179
+ order?: 'asc' | 'desc';
2180
+ sort?: string;
2181
+ }
2182
+ }
2183
+
2184
+ declare class OutgoingPayments extends BaseCrud<OutgoingPaymentsStatic.OutgoingPayment, OutgoingPaymentsStatic.OutgoingPayment, OutgoingPaymentsStatic.OutgoingPayment, any, OutgoingPaymentsStatic.OutgoingPaymentCreate, OutgoingPaymentsStatic.OutgoingPaymentUpdate> {
2185
+ constructor(apiToken: string);
2186
+ /**
2187
+ * search for resources - Not implemented for OutgoingPayments V4
2188
+ *
2189
+ * @memberof OutgoingPayments
2190
+ */
2191
+ search(): Promise<any>;
2192
+ /**
2193
+ * overwrite an existing outgoing payment - Not implemented for OutgoingPayments V4
2194
+ *
2195
+ * @memberof OutgoingPayments
2196
+ */
2197
+ overwrite(id: any, ressource: any): Promise<any>;
2198
+ /**
2199
+ * edit an existing outgoing payment - Not implemented for OutgoingPayments V4
2200
+ *
2201
+ * @memberof OutgoingPayments
2202
+ */
2203
+ edit(id: any, ressource: any): Promise<any>;
2204
+ /**
2205
+ * delete an existing outgoing payment
2206
+ *
2207
+ * @param {T} id
2208
+ * @returns {Promise<any>}
2209
+ * @memberof OutgoingPayments
2210
+ */
2211
+ delete<T = string>(id: T): Promise<boolean>;
2212
+ /**
2213
+ * cancel an existing outgoing payment
2214
+ *
2215
+ * @param {string} id
2216
+ * @returns {Promise<void>}
2217
+ * @memberof OutgoingPayments
2218
+ */
2219
+ cancel(id: string): Promise<void>;
2220
+ /**
2221
+ * edit an existing outgoing payment
2222
+ *
2223
+ * @param {OutgoingPaymentsStatic.OutgoingPaymentUpdate} data
2224
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment>}
2225
+ * @memberof OutgoingPayments
2226
+ */
2227
+ update(data: OutgoingPaymentsStatic.OutgoingPaymentUpdate): Promise<OutgoingPaymentsStatic.OutgoingPayment>;
2228
+ /**
2229
+ * Lists the outgoing payments
2230
+ *
2231
+ * @param {OutgoingPaymentsStatic.ListOptions} options
2232
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment[]>}
2233
+ * @memberof OutgoingPayments
2234
+ */
2235
+ list(options: OutgoingPaymentsStatic.ListOptions): Promise<OutgoingPaymentsStatic.OutgoingPayment[]>;
2236
+ /**
2237
+ * create a new outgoing payment
2238
+ *
2239
+ * @param {OutgoingPaymentsStatic.OutgoingPaymentCreate} data
2240
+ * @returns {Promise<OutgoingPaymentsStatic.OutgoingPayment>}
2241
+ * @memberof OutgoingPayments
2242
+ */
2243
+ create(data: OutgoingPaymentsStatic.OutgoingPaymentCreate): Promise<OutgoingPaymentsStatic.OutgoingPayment>;
2244
+ }
2245
+
2246
+ declare namespace BankAccountsStatic {
2247
+ interface BankAccount {
2248
+ id: number;
2249
+ name: string;
2250
+ owner: string;
2251
+ owner_address: string;
2252
+ owner_house_number: number | string;
2253
+ owner_zip: number | string;
2254
+ owner_city: string;
2255
+ owner_country_code: string;
2256
+ bc_nr: number | string;
2257
+ bank_name: string;
2258
+ bank_nr: string;
2259
+ bank_account_nr: string;
2260
+ iban_nr: string;
2261
+ currency_id: number;
2262
+ account_id: number;
2263
+ remarks: string;
2264
+ invoice_mode: string;
2265
+ qr_invoice_iban: string;
2266
+ type: string;
2267
+ }
2268
+ interface BankAccountFull extends BankAccount {
2269
+ }
2270
+ }
2271
+
2272
+ declare class BankAccounts extends BaseCrud<BankAccountsStatic.BankAccount, BankAccountsStatic.BankAccountFull, BankAccountsStatic.BankAccount, {}, {}, {}> {
2273
+ constructor(apiToken: string);
2274
+ /**
2275
+ * NOT IMPLEMENTED BY BEXIO YET
2276
+ *
2277
+ * @param {Array<BaseStatic.SearchParameter<{}>>} searchOptions
2278
+ * @param {BaseStatic.BaseOptions} [options]
2279
+ * @returns {Promise<Array<{}>>}
2280
+ * @memberof BankAccounts
2281
+ */
2282
+ search(searchOptions: Array<BaseStatic.SearchParameter<{}>>, options?: BaseStatic.BaseOptions): Promise<Array<BankAccountsStatic.BankAccount>>;
2283
+ /**
2284
+ * NOT IMPLEMENTED BY BEXIO YET
2285
+ *
2286
+ * @param {number} id
2287
+ * @param {{}} ressource
2288
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
2289
+ * @memberof BankAccounts
2290
+ */
2291
+ overwrite(id: number, ressource: {}): Promise<BankAccountsStatic.BankAccountFull>;
2292
+ /**
2293
+ * NOT IMPLEMENTED BY BEXIO YET
2294
+ *
2295
+ * @param {number} id
2296
+ * @param {Partial<{}>} ressource
2297
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
2298
+ * @memberof BankAccounts
2299
+ */
2300
+ edit(id: number, ressource: Partial<{}>): Promise<BankAccountsStatic.BankAccountFull>;
2301
+ /**
2302
+ * NOT IMPLEMENTED BY BEXIO YET
2303
+ *
2304
+ * @param {{}} ressource
2305
+ * @returns {Promise<BankAccountsStatic.BankAccountFull>}
2306
+ * @memberof BankAccounts
2307
+ */
2308
+ create(ressource: {}): Promise<BankAccountsStatic.BankAccountFull>;
2309
+ /**
2310
+ * NOT IMPLEMENTED BY BEXIO YET
2311
+ *
2312
+ * @param {number} id
2313
+ * @returns {Promise<boolean>}
2314
+ * @memberof BankAccounts
2315
+ */
2316
+ delete(id: number): Promise<boolean>;
2317
+ }
2318
+
2319
+ declare namespace AccountsStatic {
2320
+ interface Account {
2321
+ id: number;
2322
+ uuid: string;
2323
+ account_no: string;
2324
+ name: string;
2325
+ account_type: number;
2326
+ tax_id: number;
2327
+ fibu_account_group_id: number;
2328
+ is_active: boolean;
2329
+ is_locked: boolean;
2330
+ }
2331
+ type SearchParameters = "account_no" | "fibu_account_group_id" | "name" | "account_type";
2332
+ }
2333
+
2334
+ declare class Accounts extends BaseCrud<AccountsStatic.Account, AccountsStatic.Account, AccountsStatic.Account, AccountsStatic.SearchParameters, AccountsStatic.Account, AccountsStatic.Account> {
2335
+ constructor(apiToken: string);
2336
+ /**
2337
+ * show a specific ressource
2338
+ *
2339
+ * @param {string | number} id
2340
+ * @param {BaseStatic.BaseOptions} [options]
2341
+ * @returns {Promise<AccountsStatic.Account>}
2342
+ * @memberof Accounts
2343
+ */
2344
+ show(id: string | number, options?: BaseStatic.BaseOptions): Promise<AccountsStatic.Account>;
2345
+ /**
2346
+ * create a new ressource
2347
+ *
2348
+ * @param {AccountsStatic.Account} ressource
2349
+ * @returns {Promise<AccountsStatic.Account>}
2350
+ * @memberof Accounts
2351
+ */
2352
+ create(ressource: AccountsStatic.Account): Promise<AccountsStatic.Account>;
2353
+ /**
2354
+ * overwrite an existing ressource
2355
+ *
2356
+ * @param {number} id
2357
+ * @param {AccountsStatic.Account} ressource
2358
+ * @returns {Promise<AccountsStatic.Account>}
2359
+ * @memberof Accounts
2360
+ */
2361
+ overwrite(id: number, ressource: AccountsStatic.Account): Promise<AccountsStatic.Account>;
2362
+ /**
2363
+ * edit an existing ressource
2364
+ *
2365
+ * @param {number} id
2366
+ * @param {Partial<AccountsStatic.Account>} ressource
2367
+ * @returns {Promise<AccountsStatic.Account>}
2368
+ * @memberof Accounts
2369
+ */
2370
+ edit(id: number, ressource: Partial<AccountsStatic.Account>): Promise<AccountsStatic.Account>;
2371
+ /**
2372
+ * delete a ressource
2373
+ *
2374
+ * @param {number} id
2375
+ * @returns {Promise<boolean>}
2376
+ * @memberof Accounts
2377
+ */
2378
+ delete(id: number): Promise<boolean>;
2379
+ }
2380
+
2381
+ declare namespace ManualEntriesStatic {
2382
+ type ManualEntryType = "manual_single_entry" | "manual_compound_entry" | "manual_group_entry";
2383
+ interface Entry {
2384
+ id?: number;
2385
+ debit_account_id: number;
2386
+ credit_account_id: number;
2387
+ tax_id?: number;
2388
+ tax_account_id?: number;
2389
+ amount: number;
2390
+ currency_id: number;
2391
+ exchange_rate?: number;
2392
+ text?: string;
2393
+ }
2394
+ interface ManualEntry {
2395
+ id: number;
2396
+ type: ManualEntryType;
2397
+ date: string;
2398
+ reference_nr: string;
2399
+ entries: Entry[];
2400
+ created_by_user_id: number;
2401
+ edited_by_user_id: number;
2402
+ is_locked: boolean;
2403
+ locked_info?: string;
2404
+ }
2405
+ interface ManualEntryCreate {
2406
+ type: ManualEntryType;
2407
+ date: string;
2408
+ reference_nr?: string;
2409
+ entries: Entry[];
2410
+ }
2411
+ interface ManualEntryUpdate extends ManualEntryCreate {
2412
+ id: number;
2413
+ }
2414
+ interface ListOptions extends BaseStatic.BaseOptions {
2415
+ }
2416
+ interface SearchParameters {
2417
+ id?: number;
2418
+ date?: string;
2419
+ reference_nr?: string;
2420
+ }
2421
+ }
2422
+
2423
+ declare class ManualEntries extends BaseCrud<ManualEntriesStatic.ManualEntry, ManualEntriesStatic.ManualEntry, ManualEntriesStatic.ManualEntry, ManualEntriesStatic.SearchParameters, ManualEntriesStatic.ManualEntryCreate, ManualEntriesStatic.ManualEntryUpdate> {
2424
+ constructor(apiToken: string);
2425
+ /**
2426
+ * Lists the manual entries
2427
+ *
2428
+ * @param {ManualEntriesStatic.ListOptions} [options]
2429
+ * @returns {Promise<Array<ManualEntriesStatic.ManualEntry>>}
2430
+ * @memberof ManualEntries
2431
+ */
2432
+ list(options?: ManualEntriesStatic.ListOptions): Promise<Array<ManualEntriesStatic.ManualEntry>>;
2433
+ /**
2434
+ * Not implemented by Bexio yet
2435
+ *
2436
+ * @param {string | number} id
2437
+ * @param {BaseStatic.BaseOptions} [options]
2438
+ * @returns {Promise<ManualEntriesStatic.ManualEntry>}
2439
+ * @memberof ManualEntries
2440
+ */
2441
+ show(id: string | number, options?: BaseStatic.BaseOptions): Promise<ManualEntriesStatic.ManualEntry>;
2442
+ /**
2443
+ * Not implemented by Bexio yet
2444
+ *
2445
+ * @param {Array<BaseStatic.SearchParameter<ManualEntriesStatic.SearchParameters>>} searchOptions
2446
+ * @param {BaseStatic.BaseOptions} [options]
2447
+ * @returns {Promise<ManualEntriesStatic.ManualEntry[]>}
2448
+ * @memberof ManualEntries
2449
+ */
2450
+ search(searchOptions: Array<BaseStatic.SearchParameter<ManualEntriesStatic.SearchParameters>>, options?: BaseStatic.BaseOptions): Promise<ManualEntriesStatic.ManualEntry[]>;
2451
+ /**
2452
+ * Not implemented by Bexio yet
2453
+ *
2454
+ * @param {number} id
2455
+ * @param {Partial<ManualEntriesStatic.ManualEntryUpdate>} ressource
2456
+ * @returns {Promise<ManualEntriesStatic.ManualEntry>}
2457
+ * @memberof ManualEntries
2458
+ */
2459
+ edit(id: number, ressource: Partial<ManualEntriesStatic.ManualEntryUpdate>): Promise<ManualEntriesStatic.ManualEntry>;
2460
+ /**
2461
+ * Get the next reference number for a manual entry
2462
+ *
2463
+ * @returns {Promise<{ next_ref_nr: string }>}
2464
+ * @memberof ManualEntries
2465
+ */
2466
+ getNextReferenceNumber(): Promise<{
2467
+ next_ref_nr: string;
2468
+ }>;
2469
+ }
2470
+
2471
+ declare namespace TaxesStatic {
2472
+ interface Tax {
2473
+ id: number;
2474
+ uuid: string;
2475
+ name: string;
2476
+ code: string;
2477
+ digit: string;
2478
+ type: 'sales_tax' | 'pre_tax';
2479
+ account_id: number;
2480
+ tax_settlement_type: string;
2481
+ value: number;
2482
+ net_tax_value: number | null;
2483
+ start_year: number;
2484
+ end_year: number | null;
2485
+ is_active: boolean;
2486
+ display_name: string;
2487
+ start_month: number;
2488
+ end_month: number;
2489
+ }
2490
+ interface TaxOptions extends BaseStatic.BaseOptions {
2491
+ scope?: 'active' | 'inactive';
2492
+ date?: string;
2493
+ types?: 'sales_tax' | 'pre_tax';
2494
+ }
2495
+ /**
2496
+ * @deprecated Use TaxOptions instead
2497
+ */
2498
+ interface SearchParameters extends TaxOptions {
2499
+ }
2500
+ }
2501
+
2502
+ declare class Taxes extends BaseCrud<TaxesStatic.Tax, TaxesStatic.Tax, TaxesStatic.Tax, TaxesStatic.TaxOptions, any, any> {
2503
+ constructor(accessToken: string);
2504
+ /**
2505
+ * Lists the taxes
2506
+ *
2507
+ * @param {TaxesStatic.TaxOptions} [options]
2508
+ * @returns {Promise<TaxesStatic.Tax[]>}
2509
+ * @memberof Taxes
2510
+ */
2511
+ list(options?: TaxesStatic.TaxOptions): Promise<TaxesStatic.Tax[]>;
2512
+ /**
2513
+ * Search for taxes is not implemented in the API.
2514
+ * Use list() with parameters instead.
2515
+ */
2516
+ search(): Promise<TaxesStatic.Tax[]>;
2517
+ /**
2518
+ * Create a tax is not implemented in the API.
2519
+ */
2520
+ create(): Promise<TaxesStatic.Tax>;
2521
+ /**
2522
+ * Overwrite a tax is not implemented in the API.
2523
+ */
2524
+ overwrite(): Promise<TaxesStatic.Tax>;
2525
+ /**
2526
+ * Edit a tax is not implemented in the API.
2527
+ */
2528
+ edit(): Promise<TaxesStatic.Tax>;
2529
+ }
2530
+
2531
+ declare namespace CalendarStatic {
2532
+ interface Appointment {
2533
+ id: number;
2534
+ user_id: number;
2535
+ event_start: string;
2536
+ event_end: string;
2537
+ subject: string;
2538
+ place: string;
2539
+ info: null;
2540
+ contact_id: number;
2541
+ sub_contact_id: number;
2542
+ project_id: number;
2543
+ entry_id: number;
2544
+ module_id: number;
2545
+ has_reminder: boolean;
2546
+ remember_type_id: number;
2547
+ remember_time_id: number;
2548
+ is_private: boolean;
2549
+ }
2550
+ enum SearchParameters {
2551
+ event_start = "event_start",
2552
+ event_end = "event_end",
2553
+ contact_id = "contact_id",
2554
+ user_id = "user_id",
2555
+ subject = "subject",
2556
+ place = "place",
2557
+ module_id = "module_id",
2558
+ entry_id = "entry_id"
2559
+ }
2560
+ }
2561
+
2562
+ declare namespace NotesStatic {
2563
+ interface Note {
2564
+ id?: number;
2565
+ user_id?: number;
2566
+ event_start?: string;
2567
+ subject?: string;
2568
+ info?: string;
2569
+ contact_id?: number;
2570
+ project_id?: number;
2571
+ entry_id?: number;
2572
+ module_id?: number;
2573
+ communication_kind_id?: number;
2574
+ pr_project_id?: number;
2575
+ }
2576
+ enum SearchParameters {
2577
+ event_start = "event_start",
2578
+ contact_id = "contact_id",
2579
+ user_id = "user_id",
2580
+ subject = "subject",
2581
+ module_id = "module_id",
2582
+ entry_id = "entry_id"
2583
+ }
2584
+ }
2585
+
2586
+ declare namespace SalesOrderManagementStatic {
2587
+ interface Estimate {
2588
+ id?: number;
2589
+ document_nr?: string;
2590
+ title?: string;
2591
+ contact_id: number;
2592
+ contact_sub_id?: number;
2593
+ user_id: number;
2594
+ project_id?: number;
2595
+ logopaper_id?: number;
2596
+ language_id?: number;
2597
+ bank_account_id?: number;
2598
+ currency_id?: number;
2599
+ payment_type_id?: number;
2600
+ header?: string;
2601
+ footer?: string;
2602
+ total_gross?: string;
2603
+ total_net?: string;
2604
+ total_taxes?: string;
2605
+ total?: string;
2606
+ mwst_type?: number;
2607
+ mwst_is_net?: boolean;
2608
+ show_position_taxes?: boolean;
2609
+ is_valid_from?: string;
2610
+ is_valid_until?: string;
2611
+ contact_address?: string;
2612
+ delivery_address_type?: number;
2613
+ delivery_address?: string;
2614
+ kb_item_status_id?: number;
2615
+ api_reference?: string;
2616
+ viewed_by_client_at?: string;
2617
+ kb_terms_of_payment_template_id?: number;
2618
+ show_total?: boolean;
2619
+ updated_at?: string;
2620
+ taxs?: Array<Tax>;
2621
+ network_link?: string;
2622
+ positions?: Array<Position>;
2623
+ }
2624
+ interface Invoice {
2625
+ id?: number;
2626
+ document_nr?: string;
2627
+ title?: string;
2628
+ contact_id?: number;
2629
+ contact_sub_id?: number;
2630
+ user_id?: number;
2631
+ project_id?: number;
2632
+ logopaper_id?: number;
2633
+ language_id?: number;
2634
+ bank_account_id?: number;
2635
+ currency_id?: number;
2636
+ payment_type_id?: number;
2637
+ header?: string;
2638
+ footer?: string;
2639
+ total_gross?: string;
2640
+ total_net?: string;
2641
+ total_taxes?: string;
2642
+ total_received_payments?: string;
2643
+ total_credit_vouchers?: string;
2644
+ total_remaining_payments?: string;
2645
+ total?: string;
2646
+ mwst_type?: number;
2647
+ mwst_is_net?: boolean;
2648
+ show_position_taxes?: boolean;
2649
+ is_valid_from?: string;
2650
+ is_valid_to?: string;
2651
+ contact_address?: string;
2652
+ kb_item_status_id?: number;
2653
+ api_reference?: string;
2654
+ viewed_by_client_at?: string;
2655
+ updated_at?: string;
2656
+ esr_id?: number;
2657
+ taxs?: Array<Tax>;
2658
+ positions?: Array<Position>;
2659
+ network_link?: string;
2660
+ }
2661
+ interface Order {
2662
+ id?: number;
2663
+ document_nr?: string;
2664
+ title?: string;
2665
+ contact_id?: number;
2666
+ contact_sub_id?: number;
2667
+ user_id?: number;
2668
+ project_id?: number;
2669
+ logopaper_id?: number;
2670
+ language_id?: number;
2671
+ bank_account_id?: number;
2672
+ currency_id?: number;
2673
+ payment_type_id?: number;
2674
+ header?: string;
2675
+ footer?: string;
2676
+ total_gross?: string;
2677
+ total_net?: string;
2678
+ total_taxes?: string;
2679
+ total?: string;
2680
+ mwst_type?: number;
2681
+ mwst_is_net?: boolean;
2682
+ show_position_taxes?: boolean;
2683
+ is_valid_from?: string;
2684
+ contact_address?: string;
2685
+ delivery_address_type?: number;
2686
+ delivery_address?: string;
2687
+ kb_item_status_id?: number;
2688
+ is_recurring?: boolean;
2689
+ api_reference?: string;
2690
+ viewed_by_client_at?: string;
2691
+ updated_at?: string;
2692
+ taxs?: Array<Tax>;
2693
+ positions?: Array<Position>;
2694
+ network_link?: string;
2695
+ }
2696
+ interface Delivery {
2697
+ id?: number;
2698
+ document_nr?: string;
2699
+ title?: string;
2700
+ contact_id?: number;
2701
+ contact_sub_id?: number;
2702
+ user_id?: number;
2703
+ logopaper_id?: number;
2704
+ language_id?: number;
2705
+ bank_account_id?: number;
2706
+ currency_id?: number;
2707
+ header?: string;
2708
+ footer?: string;
2709
+ total_gross?: string;
2710
+ total_net?: string;
2711
+ total_taxes?: string;
2712
+ total?: string;
2713
+ mwst_type?: number;
2714
+ mwst_is_net?: boolean;
2715
+ is_valid_from?: string;
2716
+ contact_address?: string;
2717
+ delivery_address_type?: number;
2718
+ delivery_address?: string;
2719
+ kb_item_status_id?: number;
2720
+ api_reference?: string;
2721
+ viewed_by_client_at?: string;
2722
+ updated_at?: string;
2723
+ taxs?: Array<Tax>;
2724
+ positions?: Array<Position>;
2725
+ }
2726
+ interface Comment {
2727
+ id?: number;
2728
+ text?: string;
2729
+ user_id?: number;
2730
+ user_email?: string;
2731
+ user_name?: string;
2732
+ date?: string;
2733
+ is_public?: boolean;
2734
+ image?: string;
2735
+ image_path?: string;
2736
+ }
2737
+ interface Repetition {
2738
+ start: string;
2739
+ end: string;
2740
+ repetition: {
2741
+ type: string;
2742
+ interval: number;
2743
+ schedule: string;
2744
+ };
2745
+ }
2746
+ interface Tax {
2747
+ percentage: number;
2748
+ value: string;
2749
+ }
2750
+ interface Position {
2751
+ id?: number;
2752
+ type?: string;
2753
+ amount?: string;
2754
+ unit_id?: number;
2755
+ account_id?: number;
2756
+ unit_name?: string;
2757
+ tax_id?: number;
2758
+ tax_value?: string;
2759
+ text?: string;
2760
+ unit_price?: string;
2761
+ discount_in_percent?: string;
2762
+ position_total?: string;
2763
+ pos?: string;
2764
+ internal_pos?: number;
2765
+ parent_id?: number;
2766
+ is_optional?: boolean;
2767
+ article_id?: number;
2768
+ }
2769
+ interface Payment {
2770
+ id: number;
2771
+ date: string;
2772
+ value: string;
2773
+ bank_account_id: number;
2774
+ title: string;
2775
+ payment_service_id: number;
2776
+ is_client_account_redemption: boolean;
2777
+ is_cash_discount: boolean;
2778
+ kb_invoice_id: number;
2779
+ kb_credit_voucher_id: number;
2780
+ kb_bill_id: number;
2781
+ kb_credit_voucher_text: string;
2782
+ }
2783
+ enum EstimateSearchParameters {
2784
+ id = "id",
2785
+ kb_item_status_id = "kb_item_status_id",
2786
+ document_nr = "document_nr",
2787
+ title = "title",
2788
+ contact_id = "contact_id",
2789
+ contact_sub_id = "contact_sub_id",
2790
+ user_id = "user_id",
2791
+ currency_id = "currency_id",
2792
+ total_gross = "total_gross",
2793
+ total_net = "total_net",
2794
+ total = "total",
2795
+ is_valid_from = "is_valid_from",
2796
+ is_valid_to = "is_valid_to",
2797
+ is_valid_until = "is_valid_until",
2798
+ updated_at = "updated_at"
2799
+ }
2800
+ enum CommentSearchParameters {
2801
+ id = "id",
2802
+ user_id = "user_id",
2803
+ text = "text",
2804
+ date = "date",
2805
+ is_public = "is_public"
2806
+ }
2807
+ enum OrderSearchParameters {
2808
+ id = "id",
2809
+ kb_item_status_id = "kb_item_status_id",
2810
+ document_nr = "document_nr",
2811
+ title = "title",
2812
+ contact_id = "contact_id",
2813
+ contact_sub_id = "contact_sub_id",
2814
+ user_id = "user_id",
2815
+ currency_id = "currency_id",
2816
+ total_gross = "total_gross",
2817
+ total_net = "total_net",
2818
+ total = "total",
2819
+ is_valid_from = "is_valid_from",
2820
+ is_valid_to = "is_valid_to",
2821
+ is_valid_until = "is_valid_until",
2822
+ updated_at = "updated_at"
2823
+ }
2824
+ enum InvoiceSearchParameters {
2825
+ id = "id",
2826
+ kb_item_status_id = "kb_item_status_id",
2827
+ document_nr = "document_nr",
2828
+ title = "title",
2829
+ contact_id = "contact_id",
2830
+ contact_sub_id = "contact_sub_id",
2831
+ user_id = "user_id",
2832
+ currency_id = "currency_id",
2833
+ total_gross = "total_gross",
2834
+ total_net = "total_net",
2835
+ total = "total",
2836
+ is_valid_from = "is_valid_from",
2837
+ is_valid_to = "is_valid_to",
2838
+ is_valid_until = "is_valid_until",
2839
+ updated_at = "updated_at"
2840
+ }
2841
+ interface EstimateAcceptDecline {
2842
+ user_id?: number;
2843
+ user_name?: string;
2844
+ user_email?: string;
2845
+ }
2846
+ interface EstimateSend {
2847
+ recipient_email?: string;
2848
+ subject?: string;
2849
+ message?: string;
2850
+ mark_as_open?: boolean;
2851
+ sender?: string;
2852
+ }
2853
+ interface EstimateCopy {
2854
+ contact_id: number;
2855
+ contact_sub_id?: number;
2856
+ is_valid_from?: string;
2857
+ pr_project_id?: number;
2858
+ title?: string;
2859
+ }
2860
+ interface InvoiceCopy {
2861
+ contact_id: number;
2862
+ contact_sub_id?: number;
2863
+ is_valid_from?: string;
2864
+ pr_project_id?: number;
2865
+ title?: string;
2866
+ }
2867
+ interface InvoiceSend {
2868
+ message: string;
2869
+ recipient_email: string;
2870
+ subject: string;
2871
+ mark_as_open?: boolean;
2872
+ sender?: string;
2873
+ }
2874
+ }
2875
+
2876
+ declare class Bexio {
2877
+ private token;
2878
+ businessActivities: ClientServices;
2879
+ contacts: Contacts;
2880
+ contactTypes: ContactTypes;
2881
+ contactSectors: ContactSectors;
2882
+ contactGroups: ContactGroups;
2883
+ contactRelations: ContactRelations;
2884
+ orders: Orders;
2885
+ expenses: Expenses;
2886
+ billsV4: BillsV4;
2887
+ outgoingPayments: OutgoingPayments;
2888
+ /**
2889
+ * @deprecated Use BillsV4 instead
2890
+ */
2891
+ bills: Bills;
2892
+ projects: Projects;
2893
+ projectStatuses: ProjectStatuses;
2894
+ projectTypes: ProjectTypes;
2895
+ timetrackings: Timetrackings;
2896
+ timetrackingStatuses: TimetrackingStatuses;
2897
+ users: Users;
2898
+ items: Items;
2899
+ invoices: Invoices;
2900
+ currencies: Currencies;
2901
+ bankAccounts: BankAccounts;
2902
+ accounts: Accounts;
2903
+ manualEntries: ManualEntries;
2904
+ taxes: Taxes;
2905
+ constructor(token: string);
2906
+ }
2907
+
2908
+ 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 };