@emilgroup/billing-v2-sdk 0.0.0-stage → 1.0.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/.openapi-generator/FILES +93 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +50 -2
  5. package/api/bill-runs-api.ts +468 -0
  6. package/api/bills-api.ts +145 -0
  7. package/api/invoices-api.ts +1530 -0
  8. package/api/jobs-api.ts +756 -0
  9. package/api/policy-billings-api.ts +591 -0
  10. package/api.ts +35 -0
  11. package/base.ts +588 -0
  12. package/common.ts +199 -0
  13. package/configuration.ts +130 -0
  14. package/dist/api/bill-runs-api.d.ts +266 -0
  15. package/dist/api/bill-runs-api.js +466 -0
  16. package/dist/api/bills-api.d.ts +87 -0
  17. package/dist/api/bills-api.js +207 -0
  18. package/dist/api/invoices-api.d.ts +847 -0
  19. package/dist/api/invoices-api.js +1353 -0
  20. package/dist/api/jobs-api.d.ts +426 -0
  21. package/dist/api/jobs-api.js +708 -0
  22. package/dist/api/policy-billings-api.d.ts +332 -0
  23. package/dist/api/policy-billings-api.js +561 -0
  24. package/dist/api.d.ts +16 -0
  25. package/dist/api.js +34 -0
  26. package/dist/base.d.ts +120 -0
  27. package/dist/base.js +604 -0
  28. package/dist/common.d.ts +91 -0
  29. package/dist/common.js +277 -0
  30. package/dist/configuration.d.ts +106 -0
  31. package/dist/configuration.js +54 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +36 -0
  34. package/dist/models/any.d.ts +25 -0
  35. package/dist/models/any.js +15 -0
  36. package/dist/models/bill-item.d.ts +132 -0
  37. package/dist/models/bill-item.js +15 -0
  38. package/dist/models/bill-run.d.ts +145 -0
  39. package/dist/models/bill-run.js +15 -0
  40. package/dist/models/bill.d.ts +194 -0
  41. package/dist/models/bill.js +15 -0
  42. package/dist/models/cancel-job-response.d.ts +25 -0
  43. package/dist/models/cancel-job-response.js +15 -0
  44. package/dist/models/create-correction-invoices-request.d.ts +72 -0
  45. package/dist/models/create-correction-invoices-request.js +15 -0
  46. package/dist/models/create-correction-invoices-response.d.ts +31 -0
  47. package/dist/models/create-correction-invoices-response.js +15 -0
  48. package/dist/models/create-detail-export-job-request.d.ts +56 -0
  49. package/dist/models/create-detail-export-job-request.js +15 -0
  50. package/dist/models/create-detail-export-job-response.d.ts +25 -0
  51. package/dist/models/create-detail-export-job-response.js +15 -0
  52. package/dist/models/create-estimated-invoice-for-interval-request.d.ts +42 -0
  53. package/dist/models/create-estimated-invoice-for-interval-request.js +15 -0
  54. package/dist/models/create-estimated-invoice-for-interval-response.d.ts +25 -0
  55. package/dist/models/create-estimated-invoice-for-interval-response.js +15 -0
  56. package/dist/models/create-estimated-invoice-request.d.ts +36 -0
  57. package/dist/models/create-estimated-invoice-request.js +15 -0
  58. package/dist/models/create-estimated-invoice-response.d.ts +25 -0
  59. package/dist/models/create-estimated-invoice-response.js +15 -0
  60. package/dist/models/create-export-job-request.d.ts +68 -0
  61. package/dist/models/create-export-job-request.js +15 -0
  62. package/dist/models/create-export-job-response.d.ts +25 -0
  63. package/dist/models/create-export-job-response.js +15 -0
  64. package/dist/models/create-initial-invoice-request.d.ts +72 -0
  65. package/dist/models/create-initial-invoice-request.js +15 -0
  66. package/dist/models/create-initial-invoice-response.d.ts +25 -0
  67. package/dist/models/create-initial-invoice-response.js +15 -0
  68. package/dist/models/create-invoice-request.d.ts +67 -0
  69. package/dist/models/create-invoice-request.js +15 -0
  70. package/dist/models/create-invoice-response.d.ts +25 -0
  71. package/dist/models/create-invoice-response.js +15 -0
  72. package/dist/models/create-invoice-status-body.d.ts +24 -0
  73. package/dist/models/create-invoice-status-body.js +15 -0
  74. package/dist/models/create-invoice-status-response.d.ts +25 -0
  75. package/dist/models/create-invoice-status-response.js +15 -0
  76. package/dist/models/create-item-request.d.ts +36 -0
  77. package/dist/models/create-item-request.js +15 -0
  78. package/dist/models/create-policy-billing-request.d.ts +42 -0
  79. package/dist/models/create-policy-billing-request.js +15 -0
  80. package/dist/models/create-policy-billing-response.d.ts +25 -0
  81. package/dist/models/create-policy-billing-response.js +15 -0
  82. package/dist/models/create-recurring-invoice-request.d.ts +72 -0
  83. package/dist/models/create-recurring-invoice-request.js +15 -0
  84. package/dist/models/create-recurring-invoice-response.d.ts +31 -0
  85. package/dist/models/create-recurring-invoice-response.js +15 -0
  86. package/dist/models/create-termination-invoice-request.d.ts +60 -0
  87. package/dist/models/create-termination-invoice-request.js +15 -0
  88. package/dist/models/create-termination-invoice-response.d.ts +25 -0
  89. package/dist/models/create-termination-invoice-response.js +15 -0
  90. package/dist/models/create-withdraw-invoice-request.d.ts +48 -0
  91. package/dist/models/create-withdraw-invoice-request.js +15 -0
  92. package/dist/models/create-withdraw-invoice-response.d.ts +25 -0
  93. package/dist/models/create-withdraw-invoice-response.js +15 -0
  94. package/dist/models/estimate-history-entry.d.ts +36 -0
  95. package/dist/models/estimate-history-entry.js +15 -0
  96. package/dist/models/export-column.d.ts +36 -0
  97. package/dist/models/export-column.js +15 -0
  98. package/dist/models/filter-field.d.ts +110 -0
  99. package/dist/models/filter-field.js +15 -0
  100. package/dist/models/filter-value.d.ts +37 -0
  101. package/dist/models/filter-value.js +15 -0
  102. package/dist/models/get-bill-response.d.ts +25 -0
  103. package/dist/models/get-bill-response.js +15 -0
  104. package/dist/models/get-bill-run-filter-catalog-response.d.ts +31 -0
  105. package/dist/models/get-bill-run-filter-catalog-response.js +15 -0
  106. package/dist/models/get-bill-run-response.d.ts +25 -0
  107. package/dist/models/get-bill-run-response.js +15 -0
  108. package/dist/models/get-invoice-filter-catalog-response.d.ts +31 -0
  109. package/dist/models/get-invoice-filter-catalog-response.js +15 -0
  110. package/dist/models/get-invoice-response.d.ts +25 -0
  111. package/dist/models/get-invoice-response.js +15 -0
  112. package/dist/models/get-job-download-response.d.ts +25 -0
  113. package/dist/models/get-job-download-response.js +15 -0
  114. package/dist/models/get-job-filter-catalog-response.d.ts +31 -0
  115. package/dist/models/get-job-filter-catalog-response.js +15 -0
  116. package/dist/models/get-job-response.d.ts +25 -0
  117. package/dist/models/get-job-response.js +15 -0
  118. package/dist/models/get-policies-billing-date-filter-catalog-response.d.ts +31 -0
  119. package/dist/models/get-policies-billing-date-filter-catalog-response.js +15 -0
  120. package/dist/models/get-policies-billing-filter-catalog-response.d.ts +31 -0
  121. package/dist/models/get-policies-billing-filter-catalog-response.js +15 -0
  122. package/dist/models/get-policy-billing-response.d.ts +25 -0
  123. package/dist/models/get-policy-billing-response.js +15 -0
  124. package/dist/models/highlight.d.ts +30 -0
  125. package/dist/models/highlight.js +15 -0
  126. package/dist/models/index.d.ts +75 -0
  127. package/dist/models/index.js +91 -0
  128. package/dist/models/invoice-item.d.ts +204 -0
  129. package/dist/models/invoice-item.js +15 -0
  130. package/dist/models/invoice-payment.d.ts +108 -0
  131. package/dist/models/invoice-payment.js +15 -0
  132. package/dist/models/invoice-payments.d.ts +25 -0
  133. package/dist/models/invoice-payments.js +15 -0
  134. package/dist/models/invoice-status.d.ts +54 -0
  135. package/dist/models/invoice-status.js +15 -0
  136. package/dist/models/invoice.d.ts +275 -0
  137. package/dist/models/invoice.js +15 -0
  138. package/dist/models/job-download.d.ts +36 -0
  139. package/dist/models/job-download.js +15 -0
  140. package/dist/models/job-error.d.ts +30 -0
  141. package/dist/models/job-error.js +15 -0
  142. package/dist/models/job-progress.d.ts +36 -0
  143. package/dist/models/job-progress.js +15 -0
  144. package/dist/models/job.d.ts +134 -0
  145. package/dist/models/job.js +15 -0
  146. package/dist/models/list-bill-runs-response.d.ts +37 -0
  147. package/dist/models/list-bill-runs-response.js +15 -0
  148. package/dist/models/list-invoices-response.d.ts +37 -0
  149. package/dist/models/list-invoices-response.js +15 -0
  150. package/dist/models/list-jobs-response.d.ts +37 -0
  151. package/dist/models/list-jobs-response.js +15 -0
  152. package/dist/models/list-policies-billing-dates-response.d.ts +37 -0
  153. package/dist/models/list-policies-billing-dates-response.js +15 -0
  154. package/dist/models/list-policies-billings-response.d.ts +37 -0
  155. package/dist/models/list-policies-billings-response.js +15 -0
  156. package/dist/models/list-request.d.ts +60 -0
  157. package/dist/models/list-request.js +15 -0
  158. package/dist/models/localized-text.d.ts +30 -0
  159. package/dist/models/localized-text.js +15 -0
  160. package/dist/models/match.d.ts +69 -0
  161. package/dist/models/match.js +15 -0
  162. package/dist/models/payment-term.d.ts +42 -0
  163. package/dist/models/payment-term.js +15 -0
  164. package/dist/models/policy-billing.d.ts +139 -0
  165. package/dist/models/policy-billing.js +15 -0
  166. package/dist/models/request-bill-run-request.d.ts +30 -0
  167. package/dist/models/request-bill-run-request.js +15 -0
  168. package/dist/models/request-bill-run-response.d.ts +25 -0
  169. package/dist/models/request-bill-run-response.js +15 -0
  170. package/dist/models/resolved-billing-config.d.ts +130 -0
  171. package/dist/models/resolved-billing-config.js +15 -0
  172. package/dist/models/revert-invoice-request.d.ts +24 -0
  173. package/dist/models/revert-invoice-request.js +15 -0
  174. package/dist/models/revert-invoice-response.d.ts +25 -0
  175. package/dist/models/revert-invoice-response.js +15 -0
  176. package/dist/models/slice.d.ts +30 -0
  177. package/dist/models/slice.js +15 -0
  178. package/dist/models/status.d.ts +37 -0
  179. package/dist/models/status.js +15 -0
  180. package/dist/models/tax.d.ts +30 -0
  181. package/dist/models/tax.js +15 -0
  182. package/dist/models/update-policy-billing-body.d.ts +24 -0
  183. package/dist/models/update-policy-billing-body.js +15 -0
  184. package/dist/models/update-policy-billing-response.d.ts +25 -0
  185. package/dist/models/update-policy-billing-response.js +15 -0
  186. package/git_push.sh +57 -0
  187. package/index.ts +19 -0
  188. package/models/any.ts +32 -0
  189. package/models/bill-item.ts +138 -0
  190. package/models/bill-run.ts +151 -0
  191. package/models/bill.ts +200 -0
  192. package/models/cancel-job-response.ts +31 -0
  193. package/models/create-correction-invoices-request.ts +78 -0
  194. package/models/create-correction-invoices-response.ts +37 -0
  195. package/models/create-detail-export-job-request.ts +60 -0
  196. package/models/create-detail-export-job-response.ts +31 -0
  197. package/models/create-estimated-invoice-for-interval-request.ts +48 -0
  198. package/models/create-estimated-invoice-for-interval-response.ts +31 -0
  199. package/models/create-estimated-invoice-request.ts +42 -0
  200. package/models/create-estimated-invoice-response.ts +31 -0
  201. package/models/create-export-job-request.ts +74 -0
  202. package/models/create-export-job-response.ts +31 -0
  203. package/models/create-initial-invoice-request.ts +78 -0
  204. package/models/create-initial-invoice-response.ts +31 -0
  205. package/models/create-invoice-request.ts +73 -0
  206. package/models/create-invoice-response.ts +31 -0
  207. package/models/create-invoice-status-body.ts +30 -0
  208. package/models/create-invoice-status-response.ts +31 -0
  209. package/models/create-item-request.ts +42 -0
  210. package/models/create-policy-billing-request.ts +48 -0
  211. package/models/create-policy-billing-response.ts +31 -0
  212. package/models/create-recurring-invoice-request.ts +78 -0
  213. package/models/create-recurring-invoice-response.ts +37 -0
  214. package/models/create-termination-invoice-request.ts +66 -0
  215. package/models/create-termination-invoice-response.ts +31 -0
  216. package/models/create-withdraw-invoice-request.ts +54 -0
  217. package/models/create-withdraw-invoice-response.ts +31 -0
  218. package/models/estimate-history-entry.ts +42 -0
  219. package/models/export-column.ts +42 -0
  220. package/models/filter-field.ts +116 -0
  221. package/models/filter-value.ts +43 -0
  222. package/models/get-bill-response.ts +31 -0
  223. package/models/get-bill-run-filter-catalog-response.ts +37 -0
  224. package/models/get-bill-run-response.ts +31 -0
  225. package/models/get-invoice-filter-catalog-response.ts +37 -0
  226. package/models/get-invoice-response.ts +31 -0
  227. package/models/get-job-download-response.ts +31 -0
  228. package/models/get-job-filter-catalog-response.ts +37 -0
  229. package/models/get-job-response.ts +31 -0
  230. package/models/get-policies-billing-date-filter-catalog-response.ts +37 -0
  231. package/models/get-policies-billing-filter-catalog-response.ts +37 -0
  232. package/models/get-policy-billing-response.ts +31 -0
  233. package/models/highlight.ts +36 -0
  234. package/models/index.ts +75 -0
  235. package/models/invoice-item.ts +210 -0
  236. package/models/invoice-payment.ts +114 -0
  237. package/models/invoice-payments.ts +31 -0
  238. package/models/invoice-status.ts +60 -0
  239. package/models/invoice.ts +281 -0
  240. package/models/job-download.ts +42 -0
  241. package/models/job-error.ts +36 -0
  242. package/models/job-progress.ts +42 -0
  243. package/models/job.ts +140 -0
  244. package/models/list-bill-runs-response.ts +43 -0
  245. package/models/list-invoices-response.ts +43 -0
  246. package/models/list-jobs-response.ts +43 -0
  247. package/models/list-policies-billing-dates-response.ts +43 -0
  248. package/models/list-policies-billings-response.ts +43 -0
  249. package/models/list-request.ts +66 -0
  250. package/models/localized-text.ts +36 -0
  251. package/models/match.ts +75 -0
  252. package/models/payment-term.ts +48 -0
  253. package/models/policy-billing.ts +145 -0
  254. package/models/request-bill-run-request.ts +36 -0
  255. package/models/request-bill-run-response.ts +31 -0
  256. package/models/resolved-billing-config.ts +134 -0
  257. package/models/revert-invoice-request.ts +30 -0
  258. package/models/revert-invoice-response.ts +31 -0
  259. package/models/slice.ts +36 -0
  260. package/models/status.ts +43 -0
  261. package/models/tax.ts +36 -0
  262. package/models/update-policy-billing-body.ts +30 -0
  263. package/models/update-policy-billing-response.ts +31 -0
  264. package/package.json +25 -4
  265. package/tsconfig.json +23 -0
@@ -0,0 +1,132 @@
1
+ /**
2
+ * EMIL Billing Service
3
+ * The billing service: bills, bill runs, invoices and policy billings.
4
+ *
5
+ * The version of the OpenAPI document: 2.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * One priced line of a bill: one premium item over one part of the billing period.
14
+ * @export
15
+ * @interface BillItem
16
+ */
17
+ export interface BillItem {
18
+ /**
19
+ * The first day the line covers, as an RFC 3339 full-date. The window includes this day.
20
+ * @type {string}
21
+ * @memberof BillItem
22
+ */
23
+ 'coveredFrom'?: string;
24
+ /**
25
+ * The end of the window the line covers, as an RFC 3339 full-date. The window does not include this day.
26
+ * @type {string}
27
+ * @memberof BillItem
28
+ */
29
+ 'coveredTo'?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof BillItem
34
+ */
35
+ 'createdAt'?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof BillItem
40
+ */
41
+ 'createdBy'?: string;
42
+ /**
43
+ * The gross amount of the line, in minor units.
44
+ * @type {number}
45
+ * @memberof BillItem
46
+ */
47
+ 'grossAmount'?: number;
48
+ /**
49
+ * The group of the premium item.
50
+ * @type {string}
51
+ * @memberof BillItem
52
+ */
53
+ 'group'?: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof BillItem
58
+ */
59
+ 'id'?: string;
60
+ /**
61
+ * The key of the premium item.
62
+ * @type {string}
63
+ * @memberof BillItem
64
+ */
65
+ 'itemKey'?: string;
66
+ /**
67
+ * The type of the premium item, such as `NET` or `TOTAL`.
68
+ * @type {string}
69
+ * @memberof BillItem
70
+ */
71
+ 'itemType'?: string;
72
+ /**
73
+ * The name of the premium item.
74
+ * @type {string}
75
+ * @memberof BillItem
76
+ */
77
+ 'name'?: string;
78
+ /**
79
+ * The net amount of the line, in minor units.
80
+ * @type {number}
81
+ * @memberof BillItem
82
+ */
83
+ 'netAmount'?: number;
84
+ /**
85
+ * The id of the policy state this line was priced from.
86
+ * @type {string}
87
+ * @memberof BillItem
88
+ */
89
+ 'policySnapshotId'?: string;
90
+ /**
91
+ * The period the premium is stated for: `PER_DAY`, `PER_MONTH`, `PER_YEAR` or `ONE_TIME`.
92
+ * @type {string}
93
+ * @memberof BillItem
94
+ */
95
+ 'premiumPeriod'?: string;
96
+ /**
97
+ * The gross premium for one unit, as an exact string (`8.59`): for one billing period on a monthly or yearly premium, for one day on a daily one. A decimal when it terminates within 10 places, otherwise a fraction.
98
+ * @type {string}
99
+ * @memberof BillItem
100
+ */
101
+ 'pricePerUnit'?: string;
102
+ /**
103
+ * How many units the line bills, as an exact string: the covered fraction of the period (`1`, `0.5`, `17/31`) for a monthly or yearly premium, the days covered for a daily one, `1` for a one-time one. A decimal when it terminates within 10 places, otherwise a fraction.
104
+ * @type {string}
105
+ * @memberof BillItem
106
+ */
107
+ 'quantity'?: string;
108
+ /**
109
+ * The tax amount of the line, in minor units.
110
+ * @type {number}
111
+ * @memberof BillItem
112
+ */
113
+ 'taxAmount'?: number;
114
+ /**
115
+ * The unit the line counts: the billing frequency word (`month`) for a monthly or yearly premium, `day` for a daily one, `oneTimePayment` for a one-time one.
116
+ * @type {string}
117
+ * @memberof BillItem
118
+ */
119
+ 'unit'?: string;
120
+ /**
121
+ *
122
+ * @type {string}
123
+ * @memberof BillItem
124
+ */
125
+ 'updatedAt'?: string;
126
+ /**
127
+ *
128
+ * @type {string}
129
+ * @memberof BillItem
130
+ */
131
+ 'updatedBy'?: string;
132
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Billing Service
6
+ * The billing service: bills, bill runs, invoices and policy billings.
7
+ *
8
+ * The version of the OpenAPI document: 2.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,145 @@
1
+ /**
2
+ * EMIL Billing Service
3
+ * The billing service: bills, bill runs, invoices and policy billings.
4
+ *
5
+ * The version of the OpenAPI document: 2.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Match } from './match';
13
+ /**
14
+ * One execution of a bill run: a pass over the policies for one run date. A run has one of three kinds: `INVOICE` creates the invoices that are due, `ESTIMATE` prices the running period of every active policy, and `RECONCILE` creates the invoices that are missing. A run can be repeated for the same date: what already exists is not created twice, and the report marks it as `already_existed`.
15
+ * @export
16
+ * @interface BillRun
17
+ */
18
+ export interface BillRun {
19
+ /**
20
+ * Unique identifier for the object.
21
+ * @type {string}
22
+ * @memberof BillRun
23
+ */
24
+ 'code'?: string;
25
+ /**
26
+ * How many report entries have the outcome `created`. A policy can have several entries, so the sum of the three counts can exceed `selected`.
27
+ * @type {number}
28
+ * @memberof BillRun
29
+ */
30
+ 'created'?: number;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof BillRun
35
+ */
36
+ 'createdAt'?: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof BillRun
41
+ */
42
+ 'createdBy'?: string;
43
+ /**
44
+ * The run\'s ERN (EIS Resource Name).
45
+ * @type {string}
46
+ * @memberof BillRun
47
+ */
48
+ 'ern'?: string;
49
+ /**
50
+ * The run\'s entity tag, which changes with every write.
51
+ * @type {string}
52
+ * @memberof BillRun
53
+ */
54
+ 'etag'?: string;
55
+ /**
56
+ * How many report entries have the outcome `failed`.
57
+ * @type {number}
58
+ * @memberof BillRun
59
+ */
60
+ 'failed'?: number;
61
+ /**
62
+ * When the run ended. Not set while `outcome` is `RUNNING`.
63
+ * @type {string}
64
+ * @memberof BillRun
65
+ */
66
+ 'finishedAt'?: string;
67
+ /**
68
+ *
69
+ * @type {string}
70
+ * @memberof BillRun
71
+ */
72
+ 'id'?: string;
73
+ /**
74
+ * The kind of the run: `INVOICE`, `ESTIMATE` or `RECONCILE`.
75
+ * @type {string}
76
+ * @memberof BillRun
77
+ */
78
+ 'kind'?: string;
79
+ /**
80
+ *
81
+ * @type {Match}
82
+ * @memberof BillRun
83
+ */
84
+ 'match'?: Match;
85
+ /**
86
+ * The result of the run: `RUNNING` until it ends, then `SUCCEEDED` when no entry failed, `FAILED` when every entry failed, otherwise `PARTIAL`.
87
+ * @type {string}
88
+ * @memberof BillRun
89
+ */
90
+ 'outcome'?: string;
91
+ /**
92
+ * The report of the run: an object with `entries`, one or more per policy. An entry without `policyCode` means the run could not select its policies. Each entry has `policyCode`, `outcome` (`created`, `already_existed`, `skipped` or `failed`) and, when they apply, `invoiceCode`, `billCode` and `reason`.
93
+ * @type {object}
94
+ * @memberof BillRun
95
+ */
96
+ 'report'?: object;
97
+ /**
98
+ * The date the run is for, not the time it ran, as an RFC 3339 full-date (`2026-03-01`).
99
+ * @type {string}
100
+ * @memberof BillRun
101
+ */
102
+ 'runDate'?: string;
103
+ /**
104
+ * How many policies the run selected.
105
+ * @type {number}
106
+ * @memberof BillRun
107
+ */
108
+ 'selected'?: number;
109
+ /**
110
+ * How many report entries have the outcome `skipped` or `already_existed`.
111
+ * @type {number}
112
+ * @memberof BillRun
113
+ */
114
+ 'skipped'?: number;
115
+ /**
116
+ * When the run started.
117
+ * @type {string}
118
+ * @memberof BillRun
119
+ */
120
+ 'startedAt'?: string;
121
+ /**
122
+ * Who started the run: `system:billing-run` for the daily scheduled run, otherwise the user who requested it.
123
+ * @type {string}
124
+ * @memberof BillRun
125
+ */
126
+ 'triggeredBy'?: string;
127
+ /**
128
+ *
129
+ * @type {string}
130
+ * @memberof BillRun
131
+ */
132
+ 'updatedAt'?: string;
133
+ /**
134
+ *
135
+ * @type {string}
136
+ * @memberof BillRun
137
+ */
138
+ 'updatedBy'?: string;
139
+ /**
140
+ * The version of the run record.
141
+ * @type {string}
142
+ * @memberof BillRun
143
+ */
144
+ 'version'?: string;
145
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Billing Service
6
+ * The billing service: bills, bill runs, invoices and policy billings.
7
+ *
8
+ * The version of the OpenAPI document: 2.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,194 @@
1
+ /**
2
+ * EMIL Billing Service
3
+ * The billing service: bills, bill runs, invoices and policy billings.
4
+ *
5
+ * The version of the OpenAPI document: 2.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { BillItem } from './bill-item';
13
+ import { ResolvedBillingConfig } from './resolved-billing-config';
14
+ /**
15
+ * A bill: the priced statement of one policy for one billing period, or for two on a first bill. A bill never changes once it is written. An invoice is the difference between two bills, and an estimate is a bill without an invoice. Bills are not a list resource: `GetBill` reads one bill, for an audit, and invoices point to their bills with `billErn`. Amounts are in minor units as integers (`859` is 8.59 in a currency with two decimals). Rates and quantities are exact decimal strings.
16
+ * @export
17
+ * @interface Bill
18
+ */
19
+ export interface Bill {
20
+ /**
21
+ * What the bill is for: `INVOICE` or `ESTIMATE`.
22
+ * @type {string}
23
+ * @memberof Bill
24
+ */
25
+ 'billKind'?: string;
26
+ /**
27
+ * The ERN of the billing configuration the bill was priced under.
28
+ * @type {string}
29
+ * @memberof Bill
30
+ */
31
+ 'billingConfigErn'?: string;
32
+ /**
33
+ * Unique identifier for the object.
34
+ * @type {string}
35
+ * @memberof Bill
36
+ */
37
+ 'code'?: string;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof Bill
42
+ */
43
+ 'createdAt'?: string;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof Bill
48
+ */
49
+ 'createdBy'?: string;
50
+ /**
51
+ * The currency of the amounts, as a three-letter code such as `EUR`.
52
+ * @type {string}
53
+ * @memberof Bill
54
+ */
55
+ 'currency'?: string;
56
+ /**
57
+ * How a part of a period is prorated: `CALENDAR_DAYS` or `COMMERCIAL_30_360`.
58
+ * @type {string}
59
+ * @memberof Bill
60
+ */
61
+ 'dayCountBasis'?: string;
62
+ /**
63
+ * The bill\'s ERN (EIS Resource Name).
64
+ * @type {string}
65
+ * @memberof Bill
66
+ */
67
+ 'ern'?: string;
68
+ /**
69
+ * For an `ESTIMATE`: the run date of the estimate, as an RFC 3339 full-date. Empty otherwise.
70
+ * @type {string}
71
+ * @memberof Bill
72
+ */
73
+ 'estimatedAt'?: string;
74
+ /**
75
+ * The gross amount of the bill, in minor units: the net amount plus the tax amount.
76
+ * @type {number}
77
+ * @memberof Bill
78
+ */
79
+ 'grossAmount'?: number;
80
+ /**
81
+ * The ERN of the billing configuration of the group tariff, when the group policy has one.
82
+ * @type {string}
83
+ * @memberof Bill
84
+ */
85
+ 'groupBillingConfigErn'?: string;
86
+ /**
87
+ * The code of the group policy the policy belongs to. Empty for a standalone policy.
88
+ * @type {string}
89
+ * @memberof Bill
90
+ */
91
+ 'groupPolicyCode'?: string;
92
+ /**
93
+ * The ERN of the group tariff version the group policy was priced with. Empty for a standalone policy.
94
+ * @type {string}
95
+ * @memberof Bill
96
+ */
97
+ 'groupTariffVersionErn'?: string;
98
+ /**
99
+ *
100
+ * @type {string}
101
+ * @memberof Bill
102
+ */
103
+ 'id'?: string;
104
+ /**
105
+ * A digest of the inputs the bill was priced from.
106
+ * @type {string}
107
+ * @memberof Bill
108
+ */
109
+ 'inputDigest'?: string;
110
+ /**
111
+ * The priced lines of the bill.
112
+ * @type {Array<BillItem>}
113
+ * @memberof Bill
114
+ */
115
+ 'items'?: Array<BillItem>;
116
+ /**
117
+ * The net amount of the bill, in minor units.
118
+ * @type {number}
119
+ * @memberof Bill
120
+ */
121
+ 'netAmount'?: number;
122
+ /**
123
+ * The first day of the billing period, as an RFC 3339 full-date (`2026-03-01`). The period includes this day.
124
+ * @type {string}
125
+ * @memberof Bill
126
+ */
127
+ 'periodFrom'?: string;
128
+ /**
129
+ * The end of the billing period, as an RFC 3339 full-date. The period does not include this day.
130
+ * @type {string}
131
+ * @memberof Bill
132
+ */
133
+ 'periodTo'?: string;
134
+ /**
135
+ * The business version of the policy the bill was priced from.
136
+ * @type {string}
137
+ * @memberof Bill
138
+ */
139
+ 'policyBusinessVersion'?: string;
140
+ /**
141
+ * The code of the policy the bill prices. For a group policy\'s own estimate or adjustment bill, the group policy\'s code.
142
+ * @type {string}
143
+ * @memberof Bill
144
+ */
145
+ 'policyCode'?: string;
146
+ /**
147
+ * The id of the policy state in force at the end of the period. Each item names the state it was priced from. Empty on a group policy\'s aggregate estimate.
148
+ * @type {string}
149
+ * @memberof Bill
150
+ */
151
+ 'policySnapshotId'?: string;
152
+ /**
153
+ *
154
+ * @type {ResolvedBillingConfig}
155
+ * @memberof Bill
156
+ */
157
+ 'resolvedConfig'?: ResolvedBillingConfig;
158
+ /**
159
+ * How amounts are rounded: `HALF_UP` or `NEAREST_0_05`.
160
+ * @type {string}
161
+ * @memberof Bill
162
+ */
163
+ 'roundingMode'?: string;
164
+ /**
165
+ * For an `ESTIMATE`: the code of the estimate bill that replaced this one. Empty when none did.
166
+ * @type {string}
167
+ * @memberof Bill
168
+ */
169
+ 'supersededBy'?: string;
170
+ /**
171
+ * The ERN of the tariff version the policy was priced with.
172
+ * @type {string}
173
+ * @memberof Bill
174
+ */
175
+ 'tariffVersionErn'?: string;
176
+ /**
177
+ * The tax amount of the bill, in minor units.
178
+ * @type {number}
179
+ * @memberof Bill
180
+ */
181
+ 'taxAmount'?: number;
182
+ /**
183
+ *
184
+ * @type {string}
185
+ * @memberof Bill
186
+ */
187
+ 'updatedAt'?: string;
188
+ /**
189
+ *
190
+ * @type {string}
191
+ * @memberof Bill
192
+ */
193
+ 'updatedBy'?: string;
194
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Billing Service
6
+ * The billing service: bills, bill runs, invoices and policy billings.
7
+ *
8
+ * The version of the OpenAPI document: 2.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL Billing Service
3
+ * The billing service: bills, bill runs, invoices and policy billings.
4
+ *
5
+ * The version of the OpenAPI document: 2.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Job } from './job';
13
+ /**
14
+ * The response of `CancelJob`.
15
+ * @export
16
+ * @interface CancelJobResponse
17
+ */
18
+ export interface CancelJobResponse {
19
+ /**
20
+ *
21
+ * @type {Job}
22
+ * @memberof CancelJobResponse
23
+ */
24
+ 'job'?: Job;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Billing Service
6
+ * The billing service: bills, bill runs, invoices and policy billings.
7
+ *
8
+ * The version of the OpenAPI document: 2.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,72 @@
1
+ /**
2
+ * EMIL Billing Service
3
+ * The billing service: bills, bill runs, invoices and policy billings.
4
+ *
5
+ * The version of the OpenAPI document: 2.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * The request of `CreateCorrectionInvoices`. Only `policyCode`, the billing interval and `metadata` are read. Without an interval, every invoiced period is corrected; with it, the invoiced bills of that period.
14
+ * @export
15
+ * @interface CreateCorrectionInvoicesRequest
16
+ */
17
+ export interface CreateCorrectionInvoicesRequest {
18
+ /**
19
+ * Ignored.
20
+ * @type {string}
21
+ * @memberof CreateCorrectionInvoicesRequest
22
+ */
23
+ 'accountNumber'?: string;
24
+ /**
25
+ * The first day of the period to correct, at midnight UTC. Optional.
26
+ * @type {string}
27
+ * @memberof CreateCorrectionInvoicesRequest
28
+ */
29
+ 'billingIntervalFrom'?: string;
30
+ /**
31
+ * The end of the period to correct, at midnight UTC; the period does not include this day. Optional.
32
+ * @type {string}
33
+ * @memberof CreateCorrectionInvoicesRequest
34
+ */
35
+ 'billingIntervalTo'?: string;
36
+ /**
37
+ * Ignored.
38
+ * @type {string}
39
+ * @memberof CreateCorrectionInvoicesRequest
40
+ */
41
+ 'dueDate'?: string;
42
+ /**
43
+ * Ignored: a correction always draws the next number of the sequence.
44
+ * @type {string}
45
+ * @memberof CreateCorrectionInvoicesRequest
46
+ */
47
+ 'invoiceNumber'?: string;
48
+ /**
49
+ * Free key-value data, kept on the invoice.
50
+ * @type {object}
51
+ * @memberof CreateCorrectionInvoicesRequest
52
+ */
53
+ 'metadata'?: object;
54
+ /**
55
+ * The code of the policy to invoice.
56
+ * @type {string}
57
+ * @memberof CreateCorrectionInvoicesRequest
58
+ */
59
+ 'policyCode'?: string;
60
+ /**
61
+ * Ignored.
62
+ * @type {string}
63
+ * @memberof CreateCorrectionInvoicesRequest
64
+ */
65
+ 'policyNumber'?: string;
66
+ /**
67
+ * Ignored.
68
+ * @type {boolean}
69
+ * @memberof CreateCorrectionInvoicesRequest
70
+ */
71
+ 'shouldSetNextBillingDate'?: boolean;
72
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Billing Service
6
+ * The billing service: bills, bill runs, invoices and policy billings.
7
+ *
8
+ * The version of the OpenAPI document: 2.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * EMIL Billing Service
3
+ * The billing service: bills, bill runs, invoices and policy billings.
4
+ *
5
+ * The version of the OpenAPI document: 2.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { Invoice } from './invoice';
13
+ /**
14
+ * The response of `CreateCorrectionInvoices`.
15
+ * @export
16
+ * @interface CreateCorrectionInvoicesResponse
17
+ */
18
+ export interface CreateCorrectionInvoicesResponse {
19
+ /**
20
+ * The correction invoices, one for each corrected period. Empty when `noChange` is true.
21
+ * @type {Array<Invoice>}
22
+ * @memberof CreateCorrectionInvoicesResponse
23
+ */
24
+ 'invoices'?: Array<Invoice>;
25
+ /**
26
+ * True when no correction invoice was needed.
27
+ * @type {boolean}
28
+ * @memberof CreateCorrectionInvoicesResponse
29
+ */
30
+ 'noChange'?: boolean;
31
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Billing Service
6
+ * The billing service: bills, bill runs, invoices and policy billings.
7
+ *
8
+ * The version of the OpenAPI document: 2.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });