@solibo/home-api 1.41.0 → 1.42.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 (74) hide show
  1. package/kotlin-kotlin-stdlib.mjs +4 -8
  2. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  3. package/kotlinx-coroutines-core.mjs +7 -7
  4. package/kotlinx-coroutines-core.mjs.map +1 -1
  5. package/kotlinx-serialization-kotlinx-serialization-core.mjs +2 -234
  6. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  7. package/ktor-ktor-utils.mjs +2 -2
  8. package/ktor-ktor-websockets.mjs +2 -2
  9. package/package.json +1 -1
  10. package/solibo-sdk-sdk-api-accounting.mjs +581 -514
  11. package/solibo-sdk-sdk-api-accounting.mjs.map +1 -1
  12. package/solibo-sdk-sdk-api-board.mjs +531 -472
  13. package/solibo-sdk-sdk-api-board.mjs.map +1 -1
  14. package/solibo-sdk-sdk-api-communication.mjs +3595 -3221
  15. package/solibo-sdk-sdk-api-communication.mjs.map +1 -1
  16. package/solibo-sdk-sdk-api-company.mjs +4382 -3959
  17. package/solibo-sdk-sdk-api-company.mjs.map +1 -1
  18. package/solibo-sdk-sdk-api-conversation.mjs +9152 -8320
  19. package/solibo-sdk-sdk-api-conversation.mjs.map +1 -1
  20. package/solibo-sdk-sdk-api-document.mjs +7517 -6991
  21. package/solibo-sdk-sdk-api-document.mjs.map +1 -1
  22. package/solibo-sdk-sdk-api-economy.mjs +966 -856
  23. package/solibo-sdk-sdk-api-economy.mjs.map +1 -1
  24. package/solibo-sdk-sdk-api-expense.mjs +1015 -902
  25. package/solibo-sdk-sdk-api-expense.mjs.map +1 -1
  26. package/solibo-sdk-sdk-api-follow-up.mjs +113 -98
  27. package/solibo-sdk-sdk-api-follow-up.mjs.map +1 -1
  28. package/solibo-sdk-sdk-api-homepage.mjs +4147 -3763
  29. package/solibo-sdk-sdk-api-homepage.mjs.map +1 -1
  30. package/solibo-sdk-sdk-api-insurance.mjs +778 -695
  31. package/solibo-sdk-sdk-api-insurance.mjs.map +1 -1
  32. package/solibo-sdk-sdk-api-invoice.mjs +1179 -1050
  33. package/solibo-sdk-sdk-api-invoice.mjs.map +1 -1
  34. package/solibo-sdk-sdk-api-invoicing.mjs +11671 -10553
  35. package/solibo-sdk-sdk-api-invoicing.mjs.map +1 -1
  36. package/solibo-sdk-sdk-api-issue.mjs +1750 -1566
  37. package/solibo-sdk-sdk-api-issue.mjs.map +1 -1
  38. package/solibo-sdk-sdk-api-loan.mjs +1281 -1143
  39. package/solibo-sdk-sdk-api-loan.mjs.map +1 -1
  40. package/solibo-sdk-sdk-api-marketing.mjs +383 -337
  41. package/solibo-sdk-sdk-api-marketing.mjs.map +1 -1
  42. package/solibo-sdk-sdk-api-meeting.mjs +2388 -2154
  43. package/solibo-sdk-sdk-api-meeting.mjs.map +1 -1
  44. package/solibo-sdk-sdk-api-organization.mjs +1577 -1408
  45. package/solibo-sdk-sdk-api-organization.mjs.map +1 -1
  46. package/solibo-sdk-sdk-api-parking.mjs +1660 -1489
  47. package/solibo-sdk-sdk-api-parking.mjs.map +1 -1
  48. package/solibo-sdk-sdk-api-person.mjs +1488 -1339
  49. package/solibo-sdk-sdk-api-person.mjs.map +1 -1
  50. package/solibo-sdk-sdk-api-resident-communication.mjs +5547 -5028
  51. package/solibo-sdk-sdk-api-resident-communication.mjs.map +1 -1
  52. package/solibo-sdk-sdk-api-resident.mjs +2699 -2368
  53. package/solibo-sdk-sdk-api-resident.mjs.map +1 -1
  54. package/solibo-sdk-sdk-api-routines.mjs +1235 -1096
  55. package/solibo-sdk-sdk-api-routines.mjs.map +1 -1
  56. package/solibo-sdk-sdk-api-scoped-contact.mjs +704 -638
  57. package/solibo-sdk-sdk-api-scoped-contact.mjs.map +1 -1
  58. package/solibo-sdk-sdk-api-section.mjs +4076 -3685
  59. package/solibo-sdk-sdk-api-section.mjs.map +1 -1
  60. package/solibo-sdk-sdk-api-settlement.mjs +2151 -1931
  61. package/solibo-sdk-sdk-api-settlement.mjs.map +1 -1
  62. package/solibo-sdk-sdk-api-storage.mjs +1621 -1454
  63. package/solibo-sdk-sdk-api-storage.mjs.map +1 -1
  64. package/solibo-sdk-sdk-api-supplier.mjs +2286 -2044
  65. package/solibo-sdk-sdk-api-supplier.mjs.map +1 -1
  66. package/solibo-sdk-sdk-api-task.mjs +818 -727
  67. package/solibo-sdk-sdk-api-task.mjs.map +1 -1
  68. package/solibo-sdk-sdk-api-third-party-information.mjs +1332 -1185
  69. package/solibo-sdk-sdk-api-third-party-information.mjs.map +1 -1
  70. package/solibo-sdk-sdk-api-user.mjs +1059 -945
  71. package/solibo-sdk-sdk-api-user.mjs.map +1 -1
  72. package/solibo-sdk-sdk-core.mjs +121 -155
  73. package/solibo-sdk-sdk-core.mjs.map +1 -1
  74. package/solibo-sdk-sdk-home-api.d.mts +716 -2
@@ -4,19 +4,19 @@ import {
4
4
  protoOf180f3jzyo7rfj as protoOf,
5
5
  objectCreate1ve4bgxiu4x98 as objectCreate,
6
6
  CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
7
+ await3n7kedgocftsv as await_0,
8
+ get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
9
+ initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
10
+ promisify1z0ncraq1ipzh as promisify,
11
+ Unit_instance3kz1zqli6gr1r as Unit_instance,
12
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
7
13
  listOf1jh22dvmctj1r as listOf,
8
14
  LinkedHashMap_init_$Create$s27yccuovnls as LinkedHashMap_init_$Create$,
9
15
  replace3le3ie7l9k8aq as replace,
10
- get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
11
16
  Unitkvevlwgzwiuc as Unit,
12
17
  arrayOf1akklvh2at202 as arrayOf,
13
18
  createKType31ecntyyaay3k as createKType,
14
- initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
15
- await3n7kedgocftsv as await_0,
16
19
  listOfvhqybd2zx248 as listOf_0,
17
- Unit_instance3kz1zqli6gr1r as Unit_instance,
18
- promisify1z0ncraq1ipzh as promisify,
19
- initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
20
20
  initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
21
21
  THROW_CCE2g6jy02ryeudk as THROW_CCE,
22
22
  initMetadataForObject1cxne3s9w65el as initMetadataForObject,
@@ -35,6 +35,7 @@ import {
35
35
  Companion_getInstance1if1t4zy98q04 as Companion_getInstance,
36
36
  ApiClient_init_$Init$1zeqbeizsm394 as ApiClient_init_$Init$,
37
37
  ApiClient_init_$Init$38ftv1s10hf6v as ApiClient_init_$Init$_0,
38
+ ApiClient2azxax1pjdtdm as ApiClient,
38
39
  RequestMethod_POST_getInstance29fppyvplo8n0 as RequestMethod_POST_getInstance,
39
40
  RequestConfig10esd7ix0dbbm as RequestConfig,
40
41
  TypedBodyProvider2ertybblisp23 as TypedBodyProvider,
@@ -44,7 +45,6 @@ import {
44
45
  PagedListSupplierInvoiceqlphoqqevuot as PagedListSupplierInvoice,
45
46
  Base64ByteArray15zeye4j39p4v as Base64ByteArray,
46
47
  RequestMethod_PUT_getInstance20qfhqm35d9pr as RequestMethod_PUT_getInstance,
47
- ApiClient2azxax1pjdtdm as ApiClient,
48
48
  $serializer_getInstance1o3nn2hqn4pk3 as $serializer_getInstance,
49
49
  } from './solibo-sdk-sdk-core.mjs';
50
50
  import { TypeInfo2nbxsuf4v8os2 as TypeInfo } from './ktor-ktor-utils.mjs';
@@ -68,33 +68,33 @@ import {
68
68
  var imul = Math.imul;
69
69
  //endregion
70
70
  //region block: pre-declaration
71
- initMetadataForCoroutine($createInvoiceApprovalCOROUTINE$, CoroutineImpl);
72
71
  initMetadataForCoroutine($createInvoiceApproval$suspendBridgeCOROUTINE$, CoroutineImpl);
73
- initMetadataForCoroutine($createInvoiceNoticeCOROUTINE$, CoroutineImpl);
74
72
  initMetadataForCoroutine($createInvoiceNotice$suspendBridgeCOROUTINE$, CoroutineImpl);
75
- initMetadataForCoroutine($createInvoiceRejectionCOROUTINE$, CoroutineImpl);
76
73
  initMetadataForCoroutine($createInvoiceRejection$suspendBridgeCOROUTINE$, CoroutineImpl);
77
- initMetadataForCoroutine($indexCachedApprovalCountsCOROUTINE$, CoroutineImpl);
78
74
  initMetadataForCoroutine($indexCachedApprovalCounts$suspendBridgeCOROUTINE$, CoroutineImpl);
79
- initMetadataForCoroutine($indexInvoiceCOROUTINE$, CoroutineImpl);
80
75
  initMetadataForCoroutine($indexInvoice$suspendBridgeCOROUTINE$, CoroutineImpl);
81
- initMetadataForCoroutine($indexInvoiceCountCOROUTINE$, CoroutineImpl);
82
76
  initMetadataForCoroutine($indexInvoiceCount$suspendBridgeCOROUTINE$, CoroutineImpl);
83
- initMetadataForCoroutine($indexInvoiceUnattestedCountCOROUTINE$, CoroutineImpl);
84
77
  initMetadataForCoroutine($indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$, CoroutineImpl);
85
- initMetadataForCoroutine($indexSupplierInvoicesUserCOROUTINE$, CoroutineImpl);
86
78
  initMetadataForCoroutine($indexSupplierInvoicesUser$suspendBridgeCOROUTINE$, CoroutineImpl);
87
- initMetadataForCoroutine($showAccountingAvailabilityCOROUTINE$, CoroutineImpl);
88
79
  initMetadataForCoroutine($showAccountingAvailability$suspendBridgeCOROUTINE$, CoroutineImpl);
89
- initMetadataForCoroutine($showInvoiceNotificationCOROUTINE$, CoroutineImpl);
90
80
  initMetadataForCoroutine($showInvoiceNotification$suspendBridgeCOROUTINE$, CoroutineImpl);
91
- initMetadataForCoroutine($showInvoicePdfCOROUTINE$, CoroutineImpl);
92
81
  initMetadataForCoroutine($showInvoicePdf$suspendBridgeCOROUTINE$, CoroutineImpl);
93
- initMetadataForCoroutine($updateInvoiceNotificationCOROUTINE$, CoroutineImpl);
94
82
  initMetadataForCoroutine($updateInvoiceNotification$suspendBridgeCOROUTINE$, CoroutineImpl);
95
- initMetadataForCoroutine($updateInvoiceRealtimeNotificationCOROUTINE$, CoroutineImpl);
96
83
  initMetadataForCoroutine($updateInvoiceRealtimeNotification$suspendBridgeCOROUTINE$, CoroutineImpl);
97
84
  initMetadataForClass(InvoiceApi, 'InvoiceApi', create, ApiClient, VOID, [3, 2, 1, 4, 5]);
85
+ initMetadataForCoroutine($createInvoiceApprovalOperationCOROUTINE$, CoroutineImpl);
86
+ initMetadataForCoroutine($createInvoiceNoticeOperationCOROUTINE$, CoroutineImpl);
87
+ initMetadataForCoroutine($createInvoiceRejectionOperationCOROUTINE$, CoroutineImpl);
88
+ initMetadataForCoroutine($indexCachedApprovalCountsOperationCOROUTINE$, CoroutineImpl);
89
+ initMetadataForCoroutine($indexInvoiceCountOperationCOROUTINE$, CoroutineImpl);
90
+ initMetadataForCoroutine($indexInvoiceOperationCOROUTINE$, CoroutineImpl);
91
+ initMetadataForCoroutine($indexInvoiceUnattestedCountOperationCOROUTINE$, CoroutineImpl);
92
+ initMetadataForCoroutine($indexSupplierInvoicesUserOperationCOROUTINE$, CoroutineImpl);
93
+ initMetadataForCoroutine($showAccountingAvailabilityOperationCOROUTINE$, CoroutineImpl);
94
+ initMetadataForCoroutine($showInvoiceNotificationOperationCOROUTINE$, CoroutineImpl);
95
+ initMetadataForCoroutine($showInvoicePdfOperationCOROUTINE$, CoroutineImpl);
96
+ initMetadataForCoroutine($updateInvoiceNotificationOperationCOROUTINE$, CoroutineImpl);
97
+ initMetadataForCoroutine($updateInvoiceRealtimeNotificationOperationCOROUTINE$, CoroutineImpl);
98
98
  initMetadataForCompanion(Companion);
99
99
  initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
100
100
  initMetadataForClass(ApproveSupplierInvoiceCommand, 'ApproveSupplierInvoiceCommand', ApproveSupplierInvoiceCommand, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
@@ -153,68 +153,6 @@ function InvoiceApi_init_$Init$_0(baseUrl, httpClient, $this) {
153
153
  function createWithClient(baseUrl, httpClient) {
154
154
  return InvoiceApi_init_$Init$_0(baseUrl, httpClient, objectCreate(protoOf(InvoiceApi)));
155
155
  }
156
- function $createInvoiceApprovalCOROUTINE$(_this__u8e3s4, companyId, invoiceId, approveSupplierInvoiceCommand, resultContinuation) {
157
- CoroutineImpl.call(this, resultContinuation);
158
- this._this__u8e3s4__1 = _this__u8e3s4;
159
- this.companyId_1 = companyId;
160
- this.invoiceId_1 = invoiceId;
161
- this.approveSupplierInvoiceCommand_1 = approveSupplierInvoiceCommand;
162
- }
163
- protoOf($createInvoiceApprovalCOROUTINE$).doResume_5yljmg_k$ = function () {
164
- var suspendResult = this.result_1;
165
- $sm: do
166
- try {
167
- var tmp = this.state_1;
168
- switch (tmp) {
169
- case 0:
170
- this.exceptionState_1 = 2;
171
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
172
- var localVariableBody = this.approveSupplierInvoiceCommand_1;
173
- var localVariableQuery = LinkedHashMap_init_$Create$();
174
- var localVariableHeaders = LinkedHashMap_init_$Create$();
175
- var tmp0_method = RequestMethod_POST_getInstance();
176
- var tmp1_path = replace(replace('/companies/{companyId}/economy/supplierInvoices/{invoiceId}/approve', '{companyId}', this.companyId_1.toString()), '{invoiceId}', this.invoiceId_1);
177
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
178
- this.state_1 = 1;
179
- suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
180
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
181
- return suspendResult;
182
- }
183
-
184
- continue $sm;
185
- case 1:
186
- var this_0 = suspendResult;
187
- var tmp_0 = getKClass(Unit);
188
- var tmp_1 = null instanceof Unit;
189
- var tmp_2;
190
- try {
191
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
192
- } catch ($p) {
193
- var tmp_3;
194
- if ($p instanceof Error) {
195
- var _unused_var__etf5q3 = $p;
196
- tmp_3 = null;
197
- } else {
198
- throw $p;
199
- }
200
- tmp_2 = tmp_3;
201
- }
202
-
203
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
204
- case 2:
205
- throw this.exception_1;
206
- }
207
- } catch ($p_0) {
208
- var e = $p_0;
209
- if (this.exceptionState_1 === 2) {
210
- throw e;
211
- } else {
212
- this.state_1 = this.exceptionState_1;
213
- this.exception_1 = e;
214
- }
215
- }
216
- while (true);
217
- };
218
156
  function $createInvoiceApproval$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, invoiceId, approveSupplierInvoiceCommand, resultContinuation) {
219
157
  CoroutineImpl.call(this, resultContinuation);
220
158
  this._this__u8e3s4__1 = _this__u8e3s4;
@@ -270,67 +208,6 @@ protoOf($createInvoiceApproval$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = fun
270
208
  }
271
209
  while (true);
272
210
  };
273
- function $createInvoiceNoticeCOROUTINE$(_this__u8e3s4, companyId, createSupplierInvoiceNotificationCommand, resultContinuation) {
274
- CoroutineImpl.call(this, resultContinuation);
275
- this._this__u8e3s4__1 = _this__u8e3s4;
276
- this.companyId_1 = companyId;
277
- this.createSupplierInvoiceNotificationCommand_1 = createSupplierInvoiceNotificationCommand;
278
- }
279
- protoOf($createInvoiceNoticeCOROUTINE$).doResume_5yljmg_k$ = function () {
280
- var suspendResult = this.result_1;
281
- $sm: do
282
- try {
283
- var tmp = this.state_1;
284
- switch (tmp) {
285
- case 0:
286
- this.exceptionState_1 = 2;
287
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
288
- var localVariableBody = this.createSupplierInvoiceNotificationCommand_1;
289
- var localVariableQuery = LinkedHashMap_init_$Create$();
290
- var localVariableHeaders = LinkedHashMap_init_$Create$();
291
- var tmp0_method = RequestMethod_POST_getInstance();
292
- var tmp1_path = replace('/companies/{companyId}/economy/supplierInvoices/notify', '{companyId}', this.companyId_1.toString());
293
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
294
- this.state_1 = 1;
295
- suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
296
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
297
- return suspendResult;
298
- }
299
-
300
- continue $sm;
301
- case 1:
302
- var this_0 = suspendResult;
303
- var tmp_0 = getKClass(Unit);
304
- var tmp_1 = null instanceof Unit;
305
- var tmp_2;
306
- try {
307
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
308
- } catch ($p) {
309
- var tmp_3;
310
- if ($p instanceof Error) {
311
- var _unused_var__etf5q3 = $p;
312
- tmp_3 = null;
313
- } else {
314
- throw $p;
315
- }
316
- tmp_2 = tmp_3;
317
- }
318
-
319
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
320
- case 2:
321
- throw this.exception_1;
322
- }
323
- } catch ($p_0) {
324
- var e = $p_0;
325
- if (this.exceptionState_1 === 2) {
326
- throw e;
327
- } else {
328
- this.state_1 = this.exceptionState_1;
329
- this.exception_1 = e;
330
- }
331
- }
332
- while (true);
333
- };
334
211
  function $createInvoiceNotice$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, createSupplierInvoiceNotificationCommand, resultContinuation) {
335
212
  CoroutineImpl.call(this, resultContinuation);
336
213
  this._this__u8e3s4__1 = _this__u8e3s4;
@@ -385,68 +262,6 @@ protoOf($createInvoiceNotice$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = funct
385
262
  }
386
263
  while (true);
387
264
  };
388
- function $createInvoiceRejectionCOROUTINE$(_this__u8e3s4, companyId, invoiceId, rejectSupplierInvoiceCommand, resultContinuation) {
389
- CoroutineImpl.call(this, resultContinuation);
390
- this._this__u8e3s4__1 = _this__u8e3s4;
391
- this.companyId_1 = companyId;
392
- this.invoiceId_1 = invoiceId;
393
- this.rejectSupplierInvoiceCommand_1 = rejectSupplierInvoiceCommand;
394
- }
395
- protoOf($createInvoiceRejectionCOROUTINE$).doResume_5yljmg_k$ = function () {
396
- var suspendResult = this.result_1;
397
- $sm: do
398
- try {
399
- var tmp = this.state_1;
400
- switch (tmp) {
401
- case 0:
402
- this.exceptionState_1 = 2;
403
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
404
- var localVariableBody = this.rejectSupplierInvoiceCommand_1;
405
- var localVariableQuery = LinkedHashMap_init_$Create$();
406
- var localVariableHeaders = LinkedHashMap_init_$Create$();
407
- var tmp0_method = RequestMethod_POST_getInstance();
408
- var tmp1_path = replace(replace('/companies/{companyId}/economy/supplierInvoices/{invoiceId}/reject', '{companyId}', this.companyId_1.toString()), '{invoiceId}', this.invoiceId_1);
409
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
410
- this.state_1 = 1;
411
- suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
412
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
413
- return suspendResult;
414
- }
415
-
416
- continue $sm;
417
- case 1:
418
- var this_0 = suspendResult;
419
- var tmp_0 = getKClass(Unit);
420
- var tmp_1 = null instanceof Unit;
421
- var tmp_2;
422
- try {
423
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
424
- } catch ($p) {
425
- var tmp_3;
426
- if ($p instanceof Error) {
427
- var _unused_var__etf5q3 = $p;
428
- tmp_3 = null;
429
- } else {
430
- throw $p;
431
- }
432
- tmp_2 = tmp_3;
433
- }
434
-
435
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
436
- case 2:
437
- throw this.exception_1;
438
- }
439
- } catch ($p_0) {
440
- var e = $p_0;
441
- if (this.exceptionState_1 === 2) {
442
- throw e;
443
- } else {
444
- this.state_1 = this.exceptionState_1;
445
- this.exception_1 = e;
446
- }
447
- }
448
- while (true);
449
- };
450
265
  function $createInvoiceRejection$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, invoiceId, rejectSupplierInvoiceCommand, resultContinuation) {
451
266
  CoroutineImpl.call(this, resultContinuation);
452
267
  this._this__u8e3s4__1 = _this__u8e3s4;
@@ -502,72 +317,6 @@ protoOf($createInvoiceRejection$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = fu
502
317
  }
503
318
  while (true);
504
319
  };
505
- function $indexCachedApprovalCountsCOROUTINE$(_this__u8e3s4, fields, resultContinuation) {
506
- CoroutineImpl.call(this, resultContinuation);
507
- this._this__u8e3s4__1 = _this__u8e3s4;
508
- this.fields_1 = fields;
509
- }
510
- protoOf($indexCachedApprovalCountsCOROUTINE$).doResume_5yljmg_k$ = function () {
511
- var suspendResult = this.result_1;
512
- $sm: do
513
- try {
514
- var tmp = this.state_1;
515
- switch (tmp) {
516
- case 0:
517
- this.exceptionState_1 = 2;
518
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
519
- var localVariableBody = EmptyContent_getInstance();
520
- var localVariableQuery = LinkedHashMap_init_$Create$();
521
- if (this.fields_1 == null)
522
- null;
523
- else {
524
- var value = listOf_0(this.fields_1);
525
- localVariableQuery.put_4fpzoq_k$('fields', value);
526
- }
527
-
528
- var localVariableHeaders = LinkedHashMap_init_$Create$();
529
- var tmp1_method = RequestMethod_GET_getInstance();
530
- var localVariableConfig = new RequestConfig(tmp1_method, '/companies/economy/supplierInvoices/approvalCounts', localVariableHeaders, VOID, localVariableQuery, true);
531
- this.state_1 = 1;
532
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
533
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
534
- return suspendResult;
535
- }
536
-
537
- continue $sm;
538
- case 1:
539
- var this_0 = suspendResult;
540
- var tmp_0 = getKClass(SupplierInvoiceApprovalCounts);
541
- var tmp_1 = null instanceof SupplierInvoiceApprovalCounts;
542
- var tmp_2;
543
- try {
544
- tmp_2 = createKType(getKClass(SupplierInvoiceApprovalCounts), arrayOf([]), false);
545
- } catch ($p) {
546
- var tmp_3;
547
- if ($p instanceof Error) {
548
- var _unused_var__etf5q3 = $p;
549
- tmp_3 = null;
550
- } else {
551
- throw $p;
552
- }
553
- tmp_2 = tmp_3;
554
- }
555
-
556
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
557
- case 2:
558
- throw this.exception_1;
559
- }
560
- } catch ($p_0) {
561
- var e = $p_0;
562
- if (this.exceptionState_1 === 2) {
563
- throw e;
564
- } else {
565
- this.state_1 = this.exceptionState_1;
566
- this.exception_1 = e;
567
- }
568
- }
569
- while (true);
570
- };
571
320
  function $indexCachedApprovalCounts$suspendBridgeCOROUTINE$(_this__u8e3s4, fields, resultContinuation) {
572
321
  CoroutineImpl.call(this, resultContinuation);
573
322
  this._this__u8e3s4__1 = _this__u8e3s4;
@@ -621,7 +370,7 @@ protoOf($indexCachedApprovalCounts$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ =
621
370
  }
622
371
  while (true);
623
372
  };
624
- function $indexInvoiceCOROUTINE$(_this__u8e3s4, companyId, archive, year, fields, resultContinuation) {
373
+ function $indexInvoice$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, archive, year, fields, resultContinuation) {
625
374
  CoroutineImpl.call(this, resultContinuation);
626
375
  this._this__u8e3s4__1 = _this__u8e3s4;
627
376
  this.companyId_1 = companyId;
@@ -629,74 +378,46 @@ function $indexInvoiceCOROUTINE$(_this__u8e3s4, companyId, archive, year, fields
629
378
  this.year_1 = year;
630
379
  this.fields_1 = fields;
631
380
  }
632
- protoOf($indexInvoiceCOROUTINE$).doResume_5yljmg_k$ = function () {
381
+ protoOf($indexInvoice$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
633
382
  var suspendResult = this.result_1;
634
383
  $sm: do
635
384
  try {
636
385
  var tmp = this.state_1;
637
386
  switch (tmp) {
638
387
  case 0:
639
- this.exceptionState_1 = 2;
640
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
641
- var localVariableBody = EmptyContent_getInstance();
642
- var localVariableQuery = LinkedHashMap_init_$Create$();
643
- if (this.archive_1 == null)
644
- null;
645
- else {
646
- var value = listOf_0('' + this.archive_1);
647
- localVariableQuery.put_4fpzoq_k$('archive', value);
648
- }
649
-
650
- if (this.year_1 == null)
651
- null;
652
- else {
653
- var value_0 = listOf_0('' + this.year_1);
654
- localVariableQuery.put_4fpzoq_k$('year', value_0);
655
- }
656
-
657
- if (this.fields_1 == null)
658
- null;
659
- else {
660
- var value_1 = listOf_0(this.fields_1);
661
- localVariableQuery.put_4fpzoq_k$('fields', value_1);
662
- }
663
-
664
- var localVariableHeaders = LinkedHashMap_init_$Create$();
665
- var tmp3_method = RequestMethod_GET_getInstance();
666
- var tmp4_path = replace('/companies/{companyId}/economy/supplierInvoices', '{companyId}', this.companyId_1.toString());
667
- var localVariableConfig = new RequestConfig(tmp3_method, tmp4_path, localVariableHeaders, VOID, localVariableQuery, true);
668
- this.state_1 = 1;
669
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
670
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
671
- return suspendResult;
672
- }
673
-
674
- continue $sm;
675
- case 1:
676
- var this_0 = suspendResult;
677
- var tmp_0 = getKClass(SupplierInvoiceList);
678
- var tmp_1 = null instanceof SupplierInvoiceList;
679
- var tmp_2;
680
- try {
681
- tmp_2 = createKType(getKClass(SupplierInvoiceList), arrayOf([]), false);
682
- } catch ($p) {
683
- var tmp_3;
684
- if ($p instanceof Error) {
685
- var _unused_var__etf5q3 = $p;
686
- tmp_3 = null;
687
- } else {
688
- throw $p;
388
+ this.exceptionState_1 = 4;
389
+ if (this._this__u8e3s4__1.indexInvoice === protoOf(InvoiceApi).indexInvoice) {
390
+ this.state_1 = 2;
391
+ suspendResult = this._this__u8e3s4__1.indexInvoice$default_bk0ktl_k$(this.companyId_1, this.archive_1, this.year_1, this.fields_1, this);
392
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
393
+ return suspendResult;
689
394
  }
690
- tmp_2 = tmp_3;
395
+ continue $sm;
396
+ } else {
397
+ this.state_1 = 1;
398
+ suspendResult = await_0(this._this__u8e3s4__1.indexInvoice(this.companyId_1, this.archive_1, this.year_1, this.fields_1), this);
399
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
400
+ return suspendResult;
401
+ }
402
+ continue $sm;
691
403
  }
692
404
 
693
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
405
+ case 1:
406
+ this.WHEN_RESULT0__1 = suspendResult;
407
+ this.state_1 = 3;
408
+ continue $sm;
694
409
  case 2:
410
+ this.WHEN_RESULT0__1 = suspendResult;
411
+ this.state_1 = 3;
412
+ continue $sm;
413
+ case 3:
414
+ return this.WHEN_RESULT0__1;
415
+ case 4:
695
416
  throw this.exception_1;
696
417
  }
697
- } catch ($p_0) {
698
- var e = $p_0;
699
- if (this.exceptionState_1 === 2) {
418
+ } catch ($p) {
419
+ var e = $p;
420
+ if (this.exceptionState_1 === 4) {
700
421
  throw e;
701
422
  } else {
702
423
  this.state_1 = this.exceptionState_1;
@@ -705,15 +426,13 @@ protoOf($indexInvoiceCOROUTINE$).doResume_5yljmg_k$ = function () {
705
426
  }
706
427
  while (true);
707
428
  };
708
- function $indexInvoice$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, archive, year, fields, resultContinuation) {
429
+ function $indexInvoiceCount$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
709
430
  CoroutineImpl.call(this, resultContinuation);
710
431
  this._this__u8e3s4__1 = _this__u8e3s4;
711
432
  this.companyId_1 = companyId;
712
- this.archive_1 = archive;
713
- this.year_1 = year;
714
433
  this.fields_1 = fields;
715
434
  }
716
- protoOf($indexInvoice$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
435
+ protoOf($indexInvoiceCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
717
436
  var suspendResult = this.result_1;
718
437
  $sm: do
719
438
  try {
@@ -721,16 +440,16 @@ protoOf($indexInvoice$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
721
440
  switch (tmp) {
722
441
  case 0:
723
442
  this.exceptionState_1 = 4;
724
- if (this._this__u8e3s4__1.indexInvoice === protoOf(InvoiceApi).indexInvoice) {
443
+ if (this._this__u8e3s4__1.indexInvoiceCount === protoOf(InvoiceApi).indexInvoiceCount) {
725
444
  this.state_1 = 2;
726
- suspendResult = this._this__u8e3s4__1.indexInvoice$default_bk0ktl_k$(this.companyId_1, this.archive_1, this.year_1, this.fields_1, this);
445
+ suspendResult = this._this__u8e3s4__1.indexInvoiceCount$default_takr8j_k$(this.companyId_1, this.fields_1, this);
727
446
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
728
447
  return suspendResult;
729
448
  }
730
449
  continue $sm;
731
450
  } else {
732
451
  this.state_1 = 1;
733
- suspendResult = await_0(this._this__u8e3s4__1.indexInvoice(this.companyId_1, this.archive_1, this.year_1, this.fields_1), this);
452
+ suspendResult = await_0(this._this__u8e3s4__1.indexInvoiceCount(this.companyId_1, this.fields_1), this);
734
453
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
735
454
  return suspendResult;
736
455
  }
@@ -761,66 +480,52 @@ protoOf($indexInvoice$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
761
480
  }
762
481
  while (true);
763
482
  };
764
- function $indexInvoiceCountCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
483
+ function $indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
765
484
  CoroutineImpl.call(this, resultContinuation);
766
485
  this._this__u8e3s4__1 = _this__u8e3s4;
767
486
  this.companyId_1 = companyId;
768
487
  this.fields_1 = fields;
769
488
  }
770
- protoOf($indexInvoiceCountCOROUTINE$).doResume_5yljmg_k$ = function () {
489
+ protoOf($indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
771
490
  var suspendResult = this.result_1;
772
491
  $sm: do
773
492
  try {
774
493
  var tmp = this.state_1;
775
494
  switch (tmp) {
776
495
  case 0:
777
- this.exceptionState_1 = 2;
778
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
779
- var localVariableBody = EmptyContent_getInstance();
780
- var localVariableQuery = LinkedHashMap_init_$Create$();
781
- if (this.fields_1 == null)
782
- null;
783
- else {
784
- var value = listOf_0(this.fields_1);
785
- localVariableQuery.put_4fpzoq_k$('fields', value);
786
- }
787
-
788
- var localVariableHeaders = LinkedHashMap_init_$Create$();
789
- var tmp1_method = RequestMethod_GET_getInstance();
790
- var tmp2_path = replace('/companies/{companyId}/economy/supplierInvoices/forApprovalCount', '{companyId}', this.companyId_1.toString());
791
- var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
792
- this.state_1 = 1;
793
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
794
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
795
- return suspendResult;
796
- }
797
-
798
- continue $sm;
799
- case 1:
800
- var this_0 = suspendResult;
801
- var tmp_0 = getKClass(SupplierInvoiceList);
802
- var tmp_1 = null instanceof SupplierInvoiceList;
803
- var tmp_2;
804
- try {
805
- tmp_2 = createKType(getKClass(SupplierInvoiceList), arrayOf([]), false);
806
- } catch ($p) {
807
- var tmp_3;
808
- if ($p instanceof Error) {
809
- var _unused_var__etf5q3 = $p;
810
- tmp_3 = null;
811
- } else {
812
- throw $p;
496
+ this.exceptionState_1 = 4;
497
+ if (this._this__u8e3s4__1.indexInvoiceUnattestedCount === protoOf(InvoiceApi).indexInvoiceUnattestedCount) {
498
+ this.state_1 = 2;
499
+ suspendResult = this._this__u8e3s4__1.indexInvoiceUnattestedCount$default_upxckv_k$(this.companyId_1, this.fields_1, this);
500
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
501
+ return suspendResult;
813
502
  }
814
- tmp_2 = tmp_3;
503
+ continue $sm;
504
+ } else {
505
+ this.state_1 = 1;
506
+ suspendResult = await_0(this._this__u8e3s4__1.indexInvoiceUnattestedCount(this.companyId_1, this.fields_1), this);
507
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
508
+ return suspendResult;
509
+ }
510
+ continue $sm;
815
511
  }
816
512
 
817
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
513
+ case 1:
514
+ this.WHEN_RESULT0__1 = suspendResult;
515
+ this.state_1 = 3;
516
+ continue $sm;
818
517
  case 2:
518
+ this.WHEN_RESULT0__1 = suspendResult;
519
+ this.state_1 = 3;
520
+ continue $sm;
521
+ case 3:
522
+ return this.WHEN_RESULT0__1;
523
+ case 4:
819
524
  throw this.exception_1;
820
525
  }
821
- } catch ($p_0) {
822
- var e = $p_0;
823
- if (this.exceptionState_1 === 2) {
526
+ } catch ($p) {
527
+ var e = $p;
528
+ if (this.exceptionState_1 === 4) {
824
529
  throw e;
825
530
  } else {
826
531
  this.state_1 = this.exceptionState_1;
@@ -829,13 +534,16 @@ protoOf($indexInvoiceCountCOROUTINE$).doResume_5yljmg_k$ = function () {
829
534
  }
830
535
  while (true);
831
536
  };
832
- function $indexInvoiceCount$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
537
+ function $indexSupplierInvoicesUser$suspendBridgeCOROUTINE$(_this__u8e3s4, companyIds, fields, pageToken, autoPaginate, count, resultContinuation) {
833
538
  CoroutineImpl.call(this, resultContinuation);
834
539
  this._this__u8e3s4__1 = _this__u8e3s4;
835
- this.companyId_1 = companyId;
540
+ this.companyIds_1 = companyIds;
836
541
  this.fields_1 = fields;
542
+ this.pageToken_1 = pageToken;
543
+ this.autoPaginate_1 = autoPaginate;
544
+ this.count_1 = count;
837
545
  }
838
- protoOf($indexInvoiceCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
546
+ protoOf($indexSupplierInvoicesUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
839
547
  var suspendResult = this.result_1;
840
548
  $sm: do
841
549
  try {
@@ -843,16 +551,16 @@ protoOf($indexInvoiceCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = functio
843
551
  switch (tmp) {
844
552
  case 0:
845
553
  this.exceptionState_1 = 4;
846
- if (this._this__u8e3s4__1.indexInvoiceCount === protoOf(InvoiceApi).indexInvoiceCount) {
554
+ if (this._this__u8e3s4__1.indexSupplierInvoicesUser === protoOf(InvoiceApi).indexSupplierInvoicesUser) {
847
555
  this.state_1 = 2;
848
- suspendResult = this._this__u8e3s4__1.indexInvoiceCount$default_takr8j_k$(this.companyId_1, this.fields_1, this);
556
+ suspendResult = this._this__u8e3s4__1.indexSupplierInvoicesUser$default_klw2gq_k$(this.companyIds_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
849
557
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
850
558
  return suspendResult;
851
559
  }
852
560
  continue $sm;
853
561
  } else {
854
562
  this.state_1 = 1;
855
- suspendResult = await_0(this._this__u8e3s4__1.indexInvoiceCount(this.companyId_1, this.fields_1), this);
563
+ suspendResult = await_0(this._this__u8e3s4__1.indexSupplierInvoicesUser(this.companyIds_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
856
564
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
857
565
  return suspendResult;
858
566
  }
@@ -883,66 +591,51 @@ protoOf($indexInvoiceCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = functio
883
591
  }
884
592
  while (true);
885
593
  };
886
- function $indexInvoiceUnattestedCountCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
594
+ function $showAccountingAvailability$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, resultContinuation) {
887
595
  CoroutineImpl.call(this, resultContinuation);
888
596
  this._this__u8e3s4__1 = _this__u8e3s4;
889
597
  this.companyId_1 = companyId;
890
- this.fields_1 = fields;
891
598
  }
892
- protoOf($indexInvoiceUnattestedCountCOROUTINE$).doResume_5yljmg_k$ = function () {
599
+ protoOf($showAccountingAvailability$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
893
600
  var suspendResult = this.result_1;
894
601
  $sm: do
895
602
  try {
896
603
  var tmp = this.state_1;
897
604
  switch (tmp) {
898
605
  case 0:
899
- this.exceptionState_1 = 2;
900
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
901
- var localVariableBody = EmptyContent_getInstance();
902
- var localVariableQuery = LinkedHashMap_init_$Create$();
903
- if (this.fields_1 == null)
904
- null;
905
- else {
906
- var value = listOf_0(this.fields_1);
907
- localVariableQuery.put_4fpzoq_k$('fields', value);
908
- }
909
-
910
- var localVariableHeaders = LinkedHashMap_init_$Create$();
911
- var tmp1_method = RequestMethod_GET_getInstance();
912
- var tmp2_path = replace('/companies/{companyId}/economy/supplierInvoices/unAttested', '{companyId}', this.companyId_1.toString());
913
- var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
914
- this.state_1 = 1;
915
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
916
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
917
- return suspendResult;
918
- }
919
-
920
- continue $sm;
921
- case 1:
922
- var this_0 = suspendResult;
923
- var tmp_0 = getKClass(SupplierInvoiceCount);
924
- var tmp_1 = null instanceof SupplierInvoiceCount;
925
- var tmp_2;
926
- try {
927
- tmp_2 = createKType(getKClass(SupplierInvoiceCount), arrayOf([]), false);
928
- } catch ($p) {
929
- var tmp_3;
930
- if ($p instanceof Error) {
931
- var _unused_var__etf5q3 = $p;
932
- tmp_3 = null;
933
- } else {
934
- throw $p;
606
+ this.exceptionState_1 = 4;
607
+ if (this._this__u8e3s4__1.showAccountingAvailability === protoOf(InvoiceApi).showAccountingAvailability) {
608
+ this.state_1 = 2;
609
+ suspendResult = this._this__u8e3s4__1.showAccountingAvailability_nuy07h_k$(this.companyId_1, this);
610
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
611
+ return suspendResult;
935
612
  }
936
- tmp_2 = tmp_3;
613
+ continue $sm;
614
+ } else {
615
+ this.state_1 = 1;
616
+ suspendResult = await_0(this._this__u8e3s4__1.showAccountingAvailability(this.companyId_1), this);
617
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
618
+ return suspendResult;
619
+ }
620
+ continue $sm;
937
621
  }
938
622
 
939
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
623
+ case 1:
624
+ this.WHEN_RESULT0__1 = suspendResult;
625
+ this.state_1 = 3;
626
+ continue $sm;
940
627
  case 2:
628
+ this.WHEN_RESULT0__1 = suspendResult;
629
+ this.state_1 = 3;
630
+ continue $sm;
631
+ case 3:
632
+ return this.WHEN_RESULT0__1;
633
+ case 4:
941
634
  throw this.exception_1;
942
635
  }
943
- } catch ($p_0) {
944
- var e = $p_0;
945
- if (this.exceptionState_1 === 2) {
636
+ } catch ($p) {
637
+ var e = $p;
638
+ if (this.exceptionState_1 === 4) {
946
639
  throw e;
947
640
  } else {
948
641
  this.state_1 = this.exceptionState_1;
@@ -951,13 +644,13 @@ protoOf($indexInvoiceUnattestedCountCOROUTINE$).doResume_5yljmg_k$ = function ()
951
644
  }
952
645
  while (true);
953
646
  };
954
- function $indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
647
+ function $showInvoiceNotification$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
955
648
  CoroutineImpl.call(this, resultContinuation);
956
649
  this._this__u8e3s4__1 = _this__u8e3s4;
957
650
  this.companyId_1 = companyId;
958
651
  this.fields_1 = fields;
959
652
  }
960
- protoOf($indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
653
+ protoOf($showInvoiceNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
961
654
  var suspendResult = this.result_1;
962
655
  $sm: do
963
656
  try {
@@ -965,16 +658,16 @@ protoOf($indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$
965
658
  switch (tmp) {
966
659
  case 0:
967
660
  this.exceptionState_1 = 4;
968
- if (this._this__u8e3s4__1.indexInvoiceUnattestedCount === protoOf(InvoiceApi).indexInvoiceUnattestedCount) {
661
+ if (this._this__u8e3s4__1.showInvoiceNotification === protoOf(InvoiceApi).showInvoiceNotification) {
969
662
  this.state_1 = 2;
970
- suspendResult = this._this__u8e3s4__1.indexInvoiceUnattestedCount$default_upxckv_k$(this.companyId_1, this.fields_1, this);
663
+ suspendResult = this._this__u8e3s4__1.showInvoiceNotification$default_dx0k41_k$(this.companyId_1, this.fields_1, this);
971
664
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
972
665
  return suspendResult;
973
666
  }
974
667
  continue $sm;
975
668
  } else {
976
669
  this.state_1 = 1;
977
- suspendResult = await_0(this._this__u8e3s4__1.indexInvoiceUnattestedCount(this.companyId_1, this.fields_1), this);
670
+ suspendResult = await_0(this._this__u8e3s4__1.showInvoiceNotification(this.companyId_1, this.fields_1), this);
978
671
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
979
672
  return suspendResult;
980
673
  }
@@ -1005,118 +698,13 @@ protoOf($indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$).doResume_5yljmg_k$
1005
698
  }
1006
699
  while (true);
1007
700
  };
1008
- function $indexSupplierInvoicesUserCOROUTINE$(_this__u8e3s4, companyIds, fields, pageToken, autoPaginate, count, resultContinuation) {
1009
- CoroutineImpl.call(this, resultContinuation);
1010
- this._this__u8e3s4__1 = _this__u8e3s4;
1011
- this.companyIds_1 = companyIds;
1012
- this.fields_1 = fields;
1013
- this.pageToken_1 = pageToken;
1014
- this.autoPaginate_1 = autoPaginate;
1015
- this.count_1 = count;
1016
- }
1017
- protoOf($indexSupplierInvoicesUserCOROUTINE$).doResume_5yljmg_k$ = function () {
1018
- var suspendResult = this.result_1;
1019
- $sm: do
1020
- try {
1021
- var tmp = this.state_1;
1022
- switch (tmp) {
1023
- case 0:
1024
- this.exceptionState_1 = 2;
1025
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1026
- var localVariableBody = EmptyContent_getInstance();
1027
- var localVariableQuery = LinkedHashMap_init_$Create$();
1028
- var tmp0_safe_receiver = this.companyIds_1;
1029
- if (tmp0_safe_receiver == null)
1030
- null;
1031
- else {
1032
- var tmp2 = 'companyIds';
1033
- var value = toMultiValue(tmp0_safe_receiver, 'multi');
1034
- localVariableQuery.put_4fpzoq_k$(tmp2, value);
1035
- }
1036
-
1037
- if (this.fields_1 == null)
1038
- null;
1039
- else {
1040
- var value_0 = listOf_0(this.fields_1);
1041
- localVariableQuery.put_4fpzoq_k$('fields', value_0);
1042
- }
1043
-
1044
- if (this.pageToken_1 == null)
1045
- null;
1046
- else {
1047
- var tmp2_0 = 'pageToken';
1048
- var value_1 = listOf_0(this.pageToken_1);
1049
- localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
1050
- }
1051
-
1052
- if (this.autoPaginate_1 == null)
1053
- null;
1054
- else {
1055
- var tmp2_1 = 'autoPaginate';
1056
- var value_2 = listOf_0('' + this.autoPaginate_1);
1057
- localVariableQuery.put_4fpzoq_k$(tmp2_1, value_2);
1058
- }
1059
-
1060
- if (this.count_1 == null)
1061
- null;
1062
- else {
1063
- var value_3 = listOf_0('' + this.count_1);
1064
- localVariableQuery.put_4fpzoq_k$('count', value_3);
1065
- }
1066
-
1067
- var localVariableHeaders = LinkedHashMap_init_$Create$();
1068
- var tmp5_method = RequestMethod_GET_getInstance();
1069
- var localVariableConfig = new RequestConfig(tmp5_method, '/companies/economy/supplierInvoices', localVariableHeaders, VOID, localVariableQuery, true);
1070
- this.state_1 = 1;
1071
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1072
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1073
- return suspendResult;
1074
- }
1075
-
1076
- continue $sm;
1077
- case 1:
1078
- var this_0 = suspendResult;
1079
- var tmp_0 = getKClass(PagedListSupplierInvoice);
1080
- var tmp_1 = null instanceof PagedListSupplierInvoice;
1081
- var tmp_2;
1082
- try {
1083
- tmp_2 = createKType(getKClass(PagedListSupplierInvoice), arrayOf([]), false);
1084
- } catch ($p) {
1085
- var tmp_3;
1086
- if ($p instanceof Error) {
1087
- var _unused_var__etf5q3 = $p;
1088
- tmp_3 = null;
1089
- } else {
1090
- throw $p;
1091
- }
1092
- tmp_2 = tmp_3;
1093
- }
1094
-
1095
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1096
- case 2:
1097
- throw this.exception_1;
1098
- }
1099
- } catch ($p_0) {
1100
- var e = $p_0;
1101
- if (this.exceptionState_1 === 2) {
1102
- throw e;
1103
- } else {
1104
- this.state_1 = this.exceptionState_1;
1105
- this.exception_1 = e;
1106
- }
1107
- }
1108
- while (true);
1109
- };
1110
- function $indexSupplierInvoicesUser$suspendBridgeCOROUTINE$(_this__u8e3s4, companyIds, fields, pageToken, autoPaginate, count, resultContinuation) {
701
+ function $showInvoicePdf$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, tripletexInvoiceId, resultContinuation) {
1111
702
  CoroutineImpl.call(this, resultContinuation);
1112
703
  this._this__u8e3s4__1 = _this__u8e3s4;
1113
- this.companyIds_1 = companyIds;
1114
- this.fields_1 = fields;
1115
- this.pageToken_1 = pageToken;
1116
- this.autoPaginate_1 = autoPaginate;
1117
- this.count_1 = count;
704
+ this.companyId_1 = companyId;
705
+ this.tripletexInvoiceId_1 = tripletexInvoiceId;
1118
706
  }
1119
- protoOf($indexSupplierInvoicesUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
707
+ protoOf($showInvoicePdf$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1120
708
  var suspendResult = this.result_1;
1121
709
  $sm: do
1122
710
  try {
@@ -1124,16 +712,16 @@ protoOf($indexSupplierInvoicesUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ =
1124
712
  switch (tmp) {
1125
713
  case 0:
1126
714
  this.exceptionState_1 = 4;
1127
- if (this._this__u8e3s4__1.indexSupplierInvoicesUser === protoOf(InvoiceApi).indexSupplierInvoicesUser) {
715
+ if (this._this__u8e3s4__1.showInvoicePdf === protoOf(InvoiceApi).showInvoicePdf) {
1128
716
  this.state_1 = 2;
1129
- suspendResult = this._this__u8e3s4__1.indexSupplierInvoicesUser$default_klw2gq_k$(this.companyIds_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
717
+ suspendResult = this._this__u8e3s4__1.showInvoicePdf_bzn8t6_k$(this.companyId_1, this.tripletexInvoiceId_1, this);
1130
718
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1131
719
  return suspendResult;
1132
720
  }
1133
721
  continue $sm;
1134
722
  } else {
1135
723
  this.state_1 = 1;
1136
- suspendResult = await_0(this._this__u8e3s4__1.indexSupplierInvoicesUser(this.companyIds_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
724
+ suspendResult = await_0(this._this__u8e3s4__1.showInvoicePdf(this.companyId_1, this.tripletexInvoiceId_1), this);
1137
725
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1138
726
  return suspendResult;
1139
727
  }
@@ -1164,58 +752,52 @@ protoOf($indexSupplierInvoicesUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ =
1164
752
  }
1165
753
  while (true);
1166
754
  };
1167
- function $showAccountingAvailabilityCOROUTINE$(_this__u8e3s4, companyId, resultContinuation) {
755
+ function $updateInvoiceNotification$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, updateSupplierInvoiceNotificationCommand, resultContinuation) {
1168
756
  CoroutineImpl.call(this, resultContinuation);
1169
757
  this._this__u8e3s4__1 = _this__u8e3s4;
1170
758
  this.companyId_1 = companyId;
759
+ this.updateSupplierInvoiceNotificationCommand_1 = updateSupplierInvoiceNotificationCommand;
1171
760
  }
1172
- protoOf($showAccountingAvailabilityCOROUTINE$).doResume_5yljmg_k$ = function () {
761
+ protoOf($updateInvoiceNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1173
762
  var suspendResult = this.result_1;
1174
763
  $sm: do
1175
764
  try {
1176
765
  var tmp = this.state_1;
1177
766
  switch (tmp) {
1178
767
  case 0:
1179
- this.exceptionState_1 = 2;
1180
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1181
- var localVariableBody = EmptyContent_getInstance();
1182
- var localVariableQuery = LinkedHashMap_init_$Create$();
1183
- var localVariableHeaders = LinkedHashMap_init_$Create$();
1184
- var tmp0_method = RequestMethod_GET_getInstance();
1185
- var tmp1_path = replace('/companies/{companyId}/economy/accounting/enabled', '{companyId}', this.companyId_1.toString());
1186
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1187
- this.state_1 = 1;
1188
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1189
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1190
- return suspendResult;
1191
- }
1192
-
1193
- continue $sm;
1194
- case 1:
1195
- var this_0 = suspendResult;
1196
- var tmp_0 = getKClass(Unit);
1197
- var tmp_1 = null instanceof Unit;
1198
- var tmp_2;
1199
- try {
1200
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1201
- } catch ($p) {
1202
- var tmp_3;
1203
- if ($p instanceof Error) {
1204
- var _unused_var__etf5q3 = $p;
1205
- tmp_3 = null;
1206
- } else {
1207
- throw $p;
768
+ this.exceptionState_1 = 4;
769
+ if (this._this__u8e3s4__1.updateInvoiceNotification === protoOf(InvoiceApi).updateInvoiceNotification) {
770
+ this.state_1 = 2;
771
+ suspendResult = this._this__u8e3s4__1.updateInvoiceNotification_usomn4_k$(this.companyId_1, this.updateSupplierInvoiceNotificationCommand_1, this);
772
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
773
+ return suspendResult;
1208
774
  }
1209
- tmp_2 = tmp_3;
775
+ continue $sm;
776
+ } else {
777
+ this.state_1 = 1;
778
+ suspendResult = await_0(this._this__u8e3s4__1.updateInvoiceNotification(this.companyId_1, this.updateSupplierInvoiceNotificationCommand_1), this);
779
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
780
+ return suspendResult;
781
+ }
782
+ continue $sm;
1210
783
  }
1211
784
 
1212
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
785
+ case 1:
786
+ this.WHEN_RESULT0__1 = suspendResult;
787
+ this.state_1 = 3;
788
+ continue $sm;
1213
789
  case 2:
790
+ this.WHEN_RESULT0__1 = suspendResult;
791
+ this.state_1 = 3;
792
+ continue $sm;
793
+ case 3:
794
+ return this.WHEN_RESULT0__1;
795
+ case 4:
1214
796
  throw this.exception_1;
1215
797
  }
1216
- } catch ($p_0) {
1217
- var e = $p_0;
1218
- if (this.exceptionState_1 === 2) {
798
+ } catch ($p) {
799
+ var e = $p;
800
+ if (this.exceptionState_1 === 4) {
1219
801
  throw e;
1220
802
  } else {
1221
803
  this.state_1 = this.exceptionState_1;
@@ -1224,12 +806,13 @@ protoOf($showAccountingAvailabilityCOROUTINE$).doResume_5yljmg_k$ = function ()
1224
806
  }
1225
807
  while (true);
1226
808
  };
1227
- function $showAccountingAvailability$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, resultContinuation) {
809
+ function $updateInvoiceRealtimeNotification$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, updateRealtimeSupplierInvoiceNotificationCommand, resultContinuation) {
1228
810
  CoroutineImpl.call(this, resultContinuation);
1229
811
  this._this__u8e3s4__1 = _this__u8e3s4;
1230
812
  this.companyId_1 = companyId;
813
+ this.updateRealtimeSupplierInvoiceNotificationCommand_1 = updateRealtimeSupplierInvoiceNotificationCommand;
1231
814
  }
1232
- protoOf($showAccountingAvailability$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
815
+ protoOf($updateInvoiceRealtimeNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1233
816
  var suspendResult = this.result_1;
1234
817
  $sm: do
1235
818
  try {
@@ -1237,16 +820,16 @@ protoOf($showAccountingAvailability$suspendBridgeCOROUTINE$).doResume_5yljmg_k$
1237
820
  switch (tmp) {
1238
821
  case 0:
1239
822
  this.exceptionState_1 = 4;
1240
- if (this._this__u8e3s4__1.showAccountingAvailability === protoOf(InvoiceApi).showAccountingAvailability) {
823
+ if (this._this__u8e3s4__1.updateInvoiceRealtimeNotification === protoOf(InvoiceApi).updateInvoiceRealtimeNotification) {
1241
824
  this.state_1 = 2;
1242
- suspendResult = this._this__u8e3s4__1.showAccountingAvailability_nuy07h_k$(this.companyId_1, this);
825
+ suspendResult = this._this__u8e3s4__1.updateInvoiceRealtimeNotification_ccf05c_k$(this.companyId_1, this.updateRealtimeSupplierInvoiceNotificationCommand_1, this);
1243
826
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1244
827
  return suspendResult;
1245
828
  }
1246
829
  continue $sm;
1247
830
  } else {
1248
831
  this.state_1 = 1;
1249
- suspendResult = await_0(this._this__u8e3s4__1.showAccountingAvailability(this.companyId_1), this);
832
+ suspendResult = await_0(this._this__u8e3s4__1.updateInvoiceRealtimeNotification(this.companyId_1, this.updateRealtimeSupplierInvoiceNotificationCommand_1), this);
1250
833
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1251
834
  return suspendResult;
1252
835
  }
@@ -1277,120 +860,298 @@ protoOf($showAccountingAvailability$suspendBridgeCOROUTINE$).doResume_5yljmg_k$
1277
860
  }
1278
861
  while (true);
1279
862
  };
1280
- function $showInvoiceNotificationCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
1281
- CoroutineImpl.call(this, resultContinuation);
1282
- this._this__u8e3s4__1 = _this__u8e3s4;
1283
- this.companyId_1 = companyId;
1284
- this.fields_1 = fields;
1285
- }
1286
- protoOf($showInvoiceNotificationCOROUTINE$).doResume_5yljmg_k$ = function () {
1287
- var suspendResult = this.result_1;
1288
- $sm: do
1289
- try {
1290
- var tmp = this.state_1;
1291
- switch (tmp) {
1292
- case 0:
1293
- this.exceptionState_1 = 2;
1294
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1295
- var localVariableBody = EmptyContent_getInstance();
1296
- var localVariableQuery = LinkedHashMap_init_$Create$();
1297
- if (this.fields_1 == null)
1298
- null;
1299
- else {
1300
- var value = listOf_0(this.fields_1);
1301
- localVariableQuery.put_4fpzoq_k$('fields', value);
1302
- }
1303
-
1304
- var localVariableHeaders = LinkedHashMap_init_$Create$();
1305
- var tmp1_method = RequestMethod_GET_getInstance();
1306
- var tmp2_path = replace('/companies/{companyId}/economy/supplierInvoices/notification', '{companyId}', this.companyId_1.toString());
1307
- var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
1308
- this.state_1 = 1;
1309
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1310
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1311
- return suspendResult;
1312
- }
1313
-
1314
- continue $sm;
1315
- case 1:
1316
- var this_0 = suspendResult;
1317
- var tmp_0 = getKClass(SupplierInvoiceNotification);
1318
- var tmp_1 = null instanceof SupplierInvoiceNotification;
1319
- var tmp_2;
1320
- try {
1321
- tmp_2 = createKType(getKClass(SupplierInvoiceNotification), arrayOf([]), false);
1322
- } catch ($p) {
1323
- var tmp_3;
1324
- if ($p instanceof Error) {
1325
- var _unused_var__etf5q3 = $p;
1326
- tmp_3 = null;
1327
- } else {
1328
- throw $p;
1329
- }
1330
- tmp_2 = tmp_3;
1331
- }
1332
-
1333
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1334
- case 2:
1335
- throw this.exception_1;
1336
- }
1337
- } catch ($p_0) {
1338
- var e = $p_0;
1339
- if (this.exceptionState_1 === 2) {
1340
- throw e;
1341
- } else {
1342
- this.state_1 = this.exceptionState_1;
1343
- this.exception_1 = e;
1344
- }
1345
- }
1346
- while (true);
863
+ protoOf(InvoiceApi).createInvoiceApproval_8myc44_k$ = function (companyId, invoiceId, approveSupplierInvoiceCommand, $completion) {
864
+ return createInvoiceApprovalOperation_0(this, companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
1347
865
  };
1348
- function $showInvoiceNotification$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
866
+ protoOf(InvoiceApi).createInvoiceApproval = function (companyId, invoiceId, approveSupplierInvoiceCommand) {
867
+ var tmp = this;
868
+ return promisify(function ($completion) {
869
+ return tmp.createInvoiceApproval_8myc44_k$(companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
870
+ });
871
+ };
872
+ protoOf(InvoiceApi).createInvoiceApproval$suspendBridge_ge51yj_k$ = function (companyId, invoiceId, approveSupplierInvoiceCommand, $completion) {
873
+ var tmp = new $createInvoiceApproval$suspendBridgeCOROUTINE$(this, companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
874
+ tmp.result_1 = Unit_instance;
875
+ tmp.exception_1 = null;
876
+ return tmp.doResume_5yljmg_k$();
877
+ };
878
+ protoOf(InvoiceApi).createInvoiceNotice_lhhk87_k$ = function (companyId, createSupplierInvoiceNotificationCommand, $completion) {
879
+ return createInvoiceNoticeOperation_0(this, companyId, createSupplierInvoiceNotificationCommand, $completion);
880
+ };
881
+ protoOf(InvoiceApi).createInvoiceNotice = function (companyId, createSupplierInvoiceNotificationCommand) {
882
+ var tmp = this;
883
+ return promisify(function ($completion) {
884
+ return tmp.createInvoiceNotice_lhhk87_k$(companyId, createSupplierInvoiceNotificationCommand, $completion);
885
+ });
886
+ };
887
+ protoOf(InvoiceApi).createInvoiceNotice$suspendBridge_wstm0_k$ = function (companyId, createSupplierInvoiceNotificationCommand, $completion) {
888
+ var tmp = new $createInvoiceNotice$suspendBridgeCOROUTINE$(this, companyId, createSupplierInvoiceNotificationCommand, $completion);
889
+ tmp.result_1 = Unit_instance;
890
+ tmp.exception_1 = null;
891
+ return tmp.doResume_5yljmg_k$();
892
+ };
893
+ protoOf(InvoiceApi).createInvoiceRejection_si9a56_k$ = function (companyId, invoiceId, rejectSupplierInvoiceCommand, $completion) {
894
+ return createInvoiceRejectionOperation_0(this, companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
895
+ };
896
+ protoOf(InvoiceApi).createInvoiceRejection = function (companyId, invoiceId, rejectSupplierInvoiceCommand) {
897
+ var tmp = this;
898
+ return promisify(function ($completion) {
899
+ return tmp.createInvoiceRejection_si9a56_k$(companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
900
+ });
901
+ };
902
+ protoOf(InvoiceApi).createInvoiceRejection$suspendBridge_4il2yt_k$ = function (companyId, invoiceId, rejectSupplierInvoiceCommand, $completion) {
903
+ var tmp = new $createInvoiceRejection$suspendBridgeCOROUTINE$(this, companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
904
+ tmp.result_1 = Unit_instance;
905
+ tmp.exception_1 = null;
906
+ return tmp.doResume_5yljmg_k$();
907
+ };
908
+ protoOf(InvoiceApi).indexCachedApprovalCounts_tuc1gj_k$ = function (fields, $completion) {
909
+ return indexCachedApprovalCountsOperation_0(this, fields, $completion);
910
+ };
911
+ protoOf(InvoiceApi).indexCachedApprovalCounts$default_1a7kld_k$ = function (fields, $completion, $super) {
912
+ fields = fields === VOID ? null : fields;
913
+ return $super === VOID ? this.indexCachedApprovalCounts_tuc1gj_k$(fields, $completion) : $super.indexCachedApprovalCounts_tuc1gj_k$.call(this, fields, $completion);
914
+ };
915
+ protoOf(InvoiceApi).indexCachedApprovalCounts = function (fields) {
916
+ var tmp = this;
917
+ return promisify(function ($completion) {
918
+ return tmp.indexCachedApprovalCounts$default_1a7kld_k$(fields, $completion);
919
+ });
920
+ };
921
+ protoOf(InvoiceApi).indexCachedApprovalCounts$suspendBridge_vmv938_k$ = function (fields, $completion) {
922
+ var tmp = new $indexCachedApprovalCounts$suspendBridgeCOROUTINE$(this, fields, $completion);
923
+ tmp.result_1 = Unit_instance;
924
+ tmp.exception_1 = null;
925
+ return tmp.doResume_5yljmg_k$();
926
+ };
927
+ protoOf(InvoiceApi).indexInvoice_rq8yvh_k$ = function (companyId, archive, year, fields, $completion) {
928
+ return indexInvoiceOperation_0(this, companyId, archive, year, fields, $completion);
929
+ };
930
+ protoOf(InvoiceApi).indexInvoice$default_bk0ktl_k$ = function (companyId, archive, year, fields, $completion, $super) {
931
+ archive = archive === VOID ? null : archive;
932
+ year = year === VOID ? null : year;
933
+ fields = fields === VOID ? null : fields;
934
+ return $super === VOID ? this.indexInvoice_rq8yvh_k$(companyId, archive, year, fields, $completion) : $super.indexInvoice_rq8yvh_k$.call(this, companyId, archive, year, fields, $completion);
935
+ };
936
+ protoOf(InvoiceApi).indexInvoice = function (companyId, archive, year, fields) {
937
+ var tmp = this;
938
+ return promisify(function ($completion) {
939
+ return tmp.indexInvoice$default_bk0ktl_k$(companyId, archive, year, fields, $completion);
940
+ });
941
+ };
942
+ protoOf(InvoiceApi).indexInvoice$suspendBridge_lriupg_k$ = function (companyId, archive, year, fields, $completion) {
943
+ var tmp = new $indexInvoice$suspendBridgeCOROUTINE$(this, companyId, archive, year, fields, $completion);
944
+ tmp.result_1 = Unit_instance;
945
+ tmp.exception_1 = null;
946
+ return tmp.doResume_5yljmg_k$();
947
+ };
948
+ protoOf(InvoiceApi).indexInvoiceCount_u0kqhd_k$ = function (companyId, fields, $completion) {
949
+ return indexInvoiceCountOperation_0(this, companyId, fields, $completion);
950
+ };
951
+ protoOf(InvoiceApi).indexInvoiceCount$default_takr8j_k$ = function (companyId, fields, $completion, $super) {
952
+ fields = fields === VOID ? null : fields;
953
+ return $super === VOID ? this.indexInvoiceCount_u0kqhd_k$(companyId, fields, $completion) : $super.indexInvoiceCount_u0kqhd_k$.call(this, companyId, fields, $completion);
954
+ };
955
+ protoOf(InvoiceApi).indexInvoiceCount = function (companyId, fields) {
956
+ var tmp = this;
957
+ return promisify(function ($completion) {
958
+ return tmp.indexInvoiceCount$default_takr8j_k$(companyId, fields, $completion);
959
+ });
960
+ };
961
+ protoOf(InvoiceApi).indexInvoiceCount$suspendBridge_rya5g2_k$ = function (companyId, fields, $completion) {
962
+ var tmp = new $indexInvoiceCount$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
963
+ tmp.result_1 = Unit_instance;
964
+ tmp.exception_1 = null;
965
+ return tmp.doResume_5yljmg_k$();
966
+ };
967
+ protoOf(InvoiceApi).indexInvoiceUnattestedCount_smwz5x_k$ = function (companyId, fields, $completion) {
968
+ return indexInvoiceUnattestedCountOperation_0(this, companyId, fields, $completion);
969
+ };
970
+ protoOf(InvoiceApi).indexInvoiceUnattestedCount$default_upxckv_k$ = function (companyId, fields, $completion, $super) {
971
+ fields = fields === VOID ? null : fields;
972
+ return $super === VOID ? this.indexInvoiceUnattestedCount_smwz5x_k$(companyId, fields, $completion) : $super.indexInvoiceUnattestedCount_smwz5x_k$.call(this, companyId, fields, $completion);
973
+ };
974
+ protoOf(InvoiceApi).indexInvoiceUnattestedCount = function (companyId, fields) {
975
+ var tmp = this;
976
+ return promisify(function ($completion) {
977
+ return tmp.indexInvoiceUnattestedCount$default_upxckv_k$(companyId, fields, $completion);
978
+ });
979
+ };
980
+ protoOf(InvoiceApi).indexInvoiceUnattestedCount$suspendBridge_ahytng_k$ = function (companyId, fields, $completion) {
981
+ var tmp = new $indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
982
+ tmp.result_1 = Unit_instance;
983
+ tmp.exception_1 = null;
984
+ return tmp.doResume_5yljmg_k$();
985
+ };
986
+ protoOf(InvoiceApi).indexSupplierInvoicesUser_1intmq_k$ = function (companyIds, fields, pageToken, autoPaginate, count, $completion) {
987
+ return indexSupplierInvoicesUserOperation_0(this, companyIds, fields, pageToken, autoPaginate, count, $completion);
988
+ };
989
+ protoOf(InvoiceApi).indexSupplierInvoicesUser$default_klw2gq_k$ = function (companyIds, fields, pageToken, autoPaginate, count, $completion, $super) {
990
+ companyIds = companyIds === VOID ? null : companyIds;
991
+ fields = fields === VOID ? null : fields;
992
+ pageToken = pageToken === VOID ? null : pageToken;
993
+ autoPaginate = autoPaginate === VOID ? null : autoPaginate;
994
+ count = count === VOID ? null : count;
995
+ return $super === VOID ? this.indexSupplierInvoicesUser_1intmq_k$(companyIds, fields, pageToken, autoPaginate, count, $completion) : $super.indexSupplierInvoicesUser_1intmq_k$.call(this, companyIds, fields, pageToken, autoPaginate, count, $completion);
996
+ };
997
+ protoOf(InvoiceApi).indexSupplierInvoicesUser = function (companyIds, fields, pageToken, autoPaginate, count) {
998
+ var tmp = this;
999
+ return promisify(function ($completion) {
1000
+ return tmp.indexSupplierInvoicesUser$default_klw2gq_k$(companyIds, fields, pageToken, autoPaginate, count, $completion);
1001
+ });
1002
+ };
1003
+ protoOf(InvoiceApi).indexSupplierInvoicesUser$suspendBridge_rxz4wv_k$ = function (companyIds, fields, pageToken, autoPaginate, count, $completion) {
1004
+ var tmp = new $indexSupplierInvoicesUser$suspendBridgeCOROUTINE$(this, companyIds, fields, pageToken, autoPaginate, count, $completion);
1005
+ tmp.result_1 = Unit_instance;
1006
+ tmp.exception_1 = null;
1007
+ return tmp.doResume_5yljmg_k$();
1008
+ };
1009
+ protoOf(InvoiceApi).showAccountingAvailability_nuy07h_k$ = function (companyId, $completion) {
1010
+ return showAccountingAvailabilityOperation_0(this, companyId, $completion);
1011
+ };
1012
+ protoOf(InvoiceApi).showAccountingAvailability = function (companyId) {
1013
+ var tmp = this;
1014
+ return promisify(function ($completion) {
1015
+ return tmp.showAccountingAvailability_nuy07h_k$(companyId, $completion);
1016
+ });
1017
+ };
1018
+ protoOf(InvoiceApi).showAccountingAvailability$suspendBridge_mc6qvm_k$ = function (companyId, $completion) {
1019
+ var tmp = new $showAccountingAvailability$suspendBridgeCOROUTINE$(this, companyId, $completion);
1020
+ tmp.result_1 = Unit_instance;
1021
+ tmp.exception_1 = null;
1022
+ return tmp.doResume_5yljmg_k$();
1023
+ };
1024
+ protoOf(InvoiceApi).showInvoiceNotification_ys4lor_k$ = function (companyId, fields, $completion) {
1025
+ return showInvoiceNotificationOperation_0(this, companyId, fields, $completion);
1026
+ };
1027
+ protoOf(InvoiceApi).showInvoiceNotification$default_dx0k41_k$ = function (companyId, fields, $completion, $super) {
1028
+ fields = fields === VOID ? null : fields;
1029
+ return $super === VOID ? this.showInvoiceNotification_ys4lor_k$(companyId, fields, $completion) : $super.showInvoiceNotification_ys4lor_k$.call(this, companyId, fields, $completion);
1030
+ };
1031
+ protoOf(InvoiceApi).showInvoiceNotification = function (companyId, fields) {
1032
+ var tmp = this;
1033
+ return promisify(function ($completion) {
1034
+ return tmp.showInvoiceNotification$default_dx0k41_k$(companyId, fields, $completion);
1035
+ });
1036
+ };
1037
+ protoOf(InvoiceApi).showInvoiceNotification$suspendBridge_4b2q4_k$ = function (companyId, fields, $completion) {
1038
+ var tmp = new $showInvoiceNotification$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
1039
+ tmp.result_1 = Unit_instance;
1040
+ tmp.exception_1 = null;
1041
+ return tmp.doResume_5yljmg_k$();
1042
+ };
1043
+ protoOf(InvoiceApi).showInvoicePdf_bzn8t6_k$ = function (companyId, tripletexInvoiceId, $completion) {
1044
+ return showInvoicePdfOperation_0(this, companyId, tripletexInvoiceId, $completion);
1045
+ };
1046
+ protoOf(InvoiceApi).showInvoicePdf = function (companyId, tripletexInvoiceId) {
1047
+ var tmp = this;
1048
+ return promisify(function ($completion) {
1049
+ return tmp.showInvoicePdf_bzn8t6_k$(companyId, tripletexInvoiceId, $completion);
1050
+ });
1051
+ };
1052
+ protoOf(InvoiceApi).showInvoicePdf$suspendBridge_x5ciuz_k$ = function (companyId, tripletexInvoiceId, $completion) {
1053
+ var tmp = new $showInvoicePdf$suspendBridgeCOROUTINE$(this, companyId, tripletexInvoiceId, $completion);
1054
+ tmp.result_1 = Unit_instance;
1055
+ tmp.exception_1 = null;
1056
+ return tmp.doResume_5yljmg_k$();
1057
+ };
1058
+ protoOf(InvoiceApi).updateInvoiceNotification_usomn4_k$ = function (companyId, updateSupplierInvoiceNotificationCommand, $completion) {
1059
+ return updateInvoiceNotificationOperation_0(this, companyId, updateSupplierInvoiceNotificationCommand, $completion);
1060
+ };
1061
+ protoOf(InvoiceApi).updateInvoiceNotification = function (companyId, updateSupplierInvoiceNotificationCommand) {
1062
+ var tmp = this;
1063
+ return promisify(function ($completion) {
1064
+ return tmp.updateInvoiceNotification_usomn4_k$(companyId, updateSupplierInvoiceNotificationCommand, $completion);
1065
+ });
1066
+ };
1067
+ protoOf(InvoiceApi).updateInvoiceNotification$suspendBridge_6ofzhd_k$ = function (companyId, updateSupplierInvoiceNotificationCommand, $completion) {
1068
+ var tmp = new $updateInvoiceNotification$suspendBridgeCOROUTINE$(this, companyId, updateSupplierInvoiceNotificationCommand, $completion);
1069
+ tmp.result_1 = Unit_instance;
1070
+ tmp.exception_1 = null;
1071
+ return tmp.doResume_5yljmg_k$();
1072
+ };
1073
+ protoOf(InvoiceApi).updateInvoiceRealtimeNotification_ccf05c_k$ = function (companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion) {
1074
+ return updateInvoiceRealtimeNotificationOperation_0(this, companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
1075
+ };
1076
+ protoOf(InvoiceApi).updateInvoiceRealtimeNotification = function (companyId, updateRealtimeSupplierInvoiceNotificationCommand) {
1077
+ var tmp = this;
1078
+ return promisify(function ($completion) {
1079
+ return tmp.updateInvoiceRealtimeNotification_ccf05c_k$(companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
1080
+ });
1081
+ };
1082
+ protoOf(InvoiceApi).updateInvoiceRealtimeNotification$suspendBridge_kdrytb_k$ = function (companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion) {
1083
+ var tmp = new $updateInvoiceRealtimeNotification$suspendBridgeCOROUTINE$(this, companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
1084
+ tmp.result_1 = Unit_instance;
1085
+ tmp.exception_1 = null;
1086
+ return tmp.doResume_5yljmg_k$();
1087
+ };
1088
+ function InvoiceApi() {
1089
+ }
1090
+ function createInvoiceApprovalOperation(client, companyId, invoiceId, approveSupplierInvoiceCommand) {
1091
+ return promisify(function ($completion) {
1092
+ return createInvoiceApprovalOperation_0(client, companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
1093
+ });
1094
+ }
1095
+ function createInvoiceApprovalOperation_0(client, companyId, invoiceId, approveSupplierInvoiceCommand, $completion) {
1096
+ var tmp = new $createInvoiceApprovalOperationCOROUTINE$(client, companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
1097
+ tmp.result_1 = Unit_instance;
1098
+ tmp.exception_1 = null;
1099
+ return tmp.doResume_5yljmg_k$();
1100
+ }
1101
+ function $createInvoiceApprovalOperationCOROUTINE$(client, companyId, invoiceId, approveSupplierInvoiceCommand, resultContinuation) {
1349
1102
  CoroutineImpl.call(this, resultContinuation);
1350
- this._this__u8e3s4__1 = _this__u8e3s4;
1103
+ this.client_1 = client;
1351
1104
  this.companyId_1 = companyId;
1352
- this.fields_1 = fields;
1105
+ this.invoiceId_1 = invoiceId;
1106
+ this.approveSupplierInvoiceCommand_1 = approveSupplierInvoiceCommand;
1353
1107
  }
1354
- protoOf($showInvoiceNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1108
+ protoOf($createInvoiceApprovalOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1355
1109
  var suspendResult = this.result_1;
1356
1110
  $sm: do
1357
1111
  try {
1358
1112
  var tmp = this.state_1;
1359
1113
  switch (tmp) {
1360
1114
  case 0:
1361
- this.exceptionState_1 = 4;
1362
- if (this._this__u8e3s4__1.showInvoiceNotification === protoOf(InvoiceApi).showInvoiceNotification) {
1363
- this.state_1 = 2;
1364
- suspendResult = this._this__u8e3s4__1.showInvoiceNotification$default_dx0k41_k$(this.companyId_1, this.fields_1, this);
1365
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1366
- return suspendResult;
1367
- }
1368
- continue $sm;
1369
- } else {
1370
- this.state_1 = 1;
1371
- suspendResult = await_0(this._this__u8e3s4__1.showInvoiceNotification(this.companyId_1, this.fields_1), this);
1372
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1373
- return suspendResult;
1374
- }
1375
- continue $sm;
1115
+ this.exceptionState_1 = 2;
1116
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1117
+ var localVariableBody = this.approveSupplierInvoiceCommand_1;
1118
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1119
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1120
+ var tmp0_method = RequestMethod_POST_getInstance();
1121
+ var tmp1_path = replace(replace('/companies/{companyId}/economy/supplierInvoices/{invoiceId}/approve', '{companyId}', this.companyId_1.toString()), '{invoiceId}', this.invoiceId_1);
1122
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1123
+ this.state_1 = 1;
1124
+ suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1125
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1126
+ return suspendResult;
1376
1127
  }
1377
1128
 
1378
- case 1:
1379
- this.WHEN_RESULT0__1 = suspendResult;
1380
- this.state_1 = 3;
1381
1129
  continue $sm;
1130
+ case 1:
1131
+ var this_0 = suspendResult;
1132
+ var tmp_0 = getKClass(Unit);
1133
+ var tmp_1 = null instanceof Unit;
1134
+ var tmp_2;
1135
+ try {
1136
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1137
+ } catch ($p) {
1138
+ var tmp_3;
1139
+ if ($p instanceof Error) {
1140
+ var _unused_var__etf5q3 = $p;
1141
+ tmp_3 = null;
1142
+ } else {
1143
+ throw $p;
1144
+ }
1145
+ tmp_2 = tmp_3;
1146
+ }
1147
+
1148
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1382
1149
  case 2:
1383
- this.WHEN_RESULT0__1 = suspendResult;
1384
- this.state_1 = 3;
1385
- continue $sm;
1386
- case 3:
1387
- return this.WHEN_RESULT0__1;
1388
- case 4:
1389
1150
  throw this.exception_1;
1390
1151
  }
1391
- } catch ($p) {
1392
- var e = $p;
1393
- if (this.exceptionState_1 === 4) {
1152
+ } catch ($p_0) {
1153
+ var e = $p_0;
1154
+ if (this.exceptionState_1 === 2) {
1394
1155
  throw e;
1395
1156
  } else {
1396
1157
  this.state_1 = this.exceptionState_1;
@@ -1399,13 +1160,24 @@ protoOf($showInvoiceNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = f
1399
1160
  }
1400
1161
  while (true);
1401
1162
  };
1402
- function $showInvoicePdfCOROUTINE$(_this__u8e3s4, companyId, tripletexInvoiceId, resultContinuation) {
1163
+ function createInvoiceNoticeOperation(client, companyId, createSupplierInvoiceNotificationCommand) {
1164
+ return promisify(function ($completion) {
1165
+ return createInvoiceNoticeOperation_0(client, companyId, createSupplierInvoiceNotificationCommand, $completion);
1166
+ });
1167
+ }
1168
+ function createInvoiceNoticeOperation_0(client, companyId, createSupplierInvoiceNotificationCommand, $completion) {
1169
+ var tmp = new $createInvoiceNoticeOperationCOROUTINE$(client, companyId, createSupplierInvoiceNotificationCommand, $completion);
1170
+ tmp.result_1 = Unit_instance;
1171
+ tmp.exception_1 = null;
1172
+ return tmp.doResume_5yljmg_k$();
1173
+ }
1174
+ function $createInvoiceNoticeOperationCOROUTINE$(client, companyId, createSupplierInvoiceNotificationCommand, resultContinuation) {
1403
1175
  CoroutineImpl.call(this, resultContinuation);
1404
- this._this__u8e3s4__1 = _this__u8e3s4;
1176
+ this.client_1 = client;
1405
1177
  this.companyId_1 = companyId;
1406
- this.tripletexInvoiceId_1 = tripletexInvoiceId;
1178
+ this.createSupplierInvoiceNotificationCommand_1 = createSupplierInvoiceNotificationCommand;
1407
1179
  }
1408
- protoOf($showInvoicePdfCOROUTINE$).doResume_5yljmg_k$ = function () {
1180
+ protoOf($createInvoiceNoticeOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1409
1181
  var suspendResult = this.result_1;
1410
1182
  $sm: do
1411
1183
  try {
@@ -1414,14 +1186,14 @@ protoOf($showInvoicePdfCOROUTINE$).doResume_5yljmg_k$ = function () {
1414
1186
  case 0:
1415
1187
  this.exceptionState_1 = 2;
1416
1188
  var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1417
- var localVariableBody = EmptyContent_getInstance();
1189
+ var localVariableBody = this.createSupplierInvoiceNotificationCommand_1;
1418
1190
  var localVariableQuery = LinkedHashMap_init_$Create$();
1419
1191
  var localVariableHeaders = LinkedHashMap_init_$Create$();
1420
- var tmp0_method = RequestMethod_GET_getInstance();
1421
- var tmp1_path = replace(replace('/companies/{companyId}/economy/supplierInvoices/{tripletexInvoiceId}/pdf', '{companyId}', this.companyId_1.toString()), '{tripletexInvoiceId}', this.tripletexInvoiceId_1);
1192
+ var tmp0_method = RequestMethod_POST_getInstance();
1193
+ var tmp1_path = replace('/companies/{companyId}/economy/supplierInvoices/notify', '{companyId}', this.companyId_1.toString());
1422
1194
  var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1423
1195
  this.state_1 = 1;
1424
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1196
+ suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1425
1197
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1426
1198
  return suspendResult;
1427
1199
  }
@@ -1429,11 +1201,11 @@ protoOf($showInvoicePdfCOROUTINE$).doResume_5yljmg_k$ = function () {
1429
1201
  continue $sm;
1430
1202
  case 1:
1431
1203
  var this_0 = suspendResult;
1432
- var tmp_0 = getKClass(Base64ByteArray);
1433
- var tmp_1 = null instanceof Base64ByteArray;
1204
+ var tmp_0 = getKClass(Unit);
1205
+ var tmp_1 = null instanceof Unit;
1434
1206
  var tmp_2;
1435
1207
  try {
1436
- tmp_2 = createKType(getKClass(Base64ByteArray), arrayOf([]), false);
1208
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1437
1209
  } catch ($p) {
1438
1210
  var tmp_3;
1439
1211
  if ($p instanceof Error) {
@@ -1460,52 +1232,71 @@ protoOf($showInvoicePdfCOROUTINE$).doResume_5yljmg_k$ = function () {
1460
1232
  }
1461
1233
  while (true);
1462
1234
  };
1463
- function $showInvoicePdf$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, tripletexInvoiceId, resultContinuation) {
1235
+ function createInvoiceRejectionOperation(client, companyId, invoiceId, rejectSupplierInvoiceCommand) {
1236
+ return promisify(function ($completion) {
1237
+ return createInvoiceRejectionOperation_0(client, companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
1238
+ });
1239
+ }
1240
+ function createInvoiceRejectionOperation_0(client, companyId, invoiceId, rejectSupplierInvoiceCommand, $completion) {
1241
+ var tmp = new $createInvoiceRejectionOperationCOROUTINE$(client, companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
1242
+ tmp.result_1 = Unit_instance;
1243
+ tmp.exception_1 = null;
1244
+ return tmp.doResume_5yljmg_k$();
1245
+ }
1246
+ function $createInvoiceRejectionOperationCOROUTINE$(client, companyId, invoiceId, rejectSupplierInvoiceCommand, resultContinuation) {
1464
1247
  CoroutineImpl.call(this, resultContinuation);
1465
- this._this__u8e3s4__1 = _this__u8e3s4;
1248
+ this.client_1 = client;
1466
1249
  this.companyId_1 = companyId;
1467
- this.tripletexInvoiceId_1 = tripletexInvoiceId;
1250
+ this.invoiceId_1 = invoiceId;
1251
+ this.rejectSupplierInvoiceCommand_1 = rejectSupplierInvoiceCommand;
1468
1252
  }
1469
- protoOf($showInvoicePdf$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1253
+ protoOf($createInvoiceRejectionOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1470
1254
  var suspendResult = this.result_1;
1471
1255
  $sm: do
1472
1256
  try {
1473
1257
  var tmp = this.state_1;
1474
1258
  switch (tmp) {
1475
1259
  case 0:
1476
- this.exceptionState_1 = 4;
1477
- if (this._this__u8e3s4__1.showInvoicePdf === protoOf(InvoiceApi).showInvoicePdf) {
1478
- this.state_1 = 2;
1479
- suspendResult = this._this__u8e3s4__1.showInvoicePdf_bzn8t6_k$(this.companyId_1, this.tripletexInvoiceId_1, this);
1480
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1481
- return suspendResult;
1482
- }
1483
- continue $sm;
1484
- } else {
1485
- this.state_1 = 1;
1486
- suspendResult = await_0(this._this__u8e3s4__1.showInvoicePdf(this.companyId_1, this.tripletexInvoiceId_1), this);
1487
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1488
- return suspendResult;
1489
- }
1490
- continue $sm;
1260
+ this.exceptionState_1 = 2;
1261
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1262
+ var localVariableBody = this.rejectSupplierInvoiceCommand_1;
1263
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1264
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1265
+ var tmp0_method = RequestMethod_POST_getInstance();
1266
+ var tmp1_path = replace(replace('/companies/{companyId}/economy/supplierInvoices/{invoiceId}/reject', '{companyId}', this.companyId_1.toString()), '{invoiceId}', this.invoiceId_1);
1267
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1268
+ this.state_1 = 1;
1269
+ suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1270
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1271
+ return suspendResult;
1491
1272
  }
1492
1273
 
1493
- case 1:
1494
- this.WHEN_RESULT0__1 = suspendResult;
1495
- this.state_1 = 3;
1496
1274
  continue $sm;
1275
+ case 1:
1276
+ var this_0 = suspendResult;
1277
+ var tmp_0 = getKClass(Unit);
1278
+ var tmp_1 = null instanceof Unit;
1279
+ var tmp_2;
1280
+ try {
1281
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1282
+ } catch ($p) {
1283
+ var tmp_3;
1284
+ if ($p instanceof Error) {
1285
+ var _unused_var__etf5q3 = $p;
1286
+ tmp_3 = null;
1287
+ } else {
1288
+ throw $p;
1289
+ }
1290
+ tmp_2 = tmp_3;
1291
+ }
1292
+
1293
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1497
1294
  case 2:
1498
- this.WHEN_RESULT0__1 = suspendResult;
1499
- this.state_1 = 3;
1500
- continue $sm;
1501
- case 3:
1502
- return this.WHEN_RESULT0__1;
1503
- case 4:
1504
1295
  throw this.exception_1;
1505
1296
  }
1506
- } catch ($p) {
1507
- var e = $p;
1508
- if (this.exceptionState_1 === 4) {
1297
+ } catch ($p_0) {
1298
+ var e = $p_0;
1299
+ if (this.exceptionState_1 === 2) {
1509
1300
  throw e;
1510
1301
  } else {
1511
1302
  this.state_1 = this.exceptionState_1;
@@ -1514,13 +1305,24 @@ protoOf($showInvoicePdf$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function (
1514
1305
  }
1515
1306
  while (true);
1516
1307
  };
1517
- function $updateInvoiceNotificationCOROUTINE$(_this__u8e3s4, companyId, updateSupplierInvoiceNotificationCommand, resultContinuation) {
1308
+ function indexCachedApprovalCountsOperation(client, fields) {
1309
+ return promisify(function ($completion) {
1310
+ return indexCachedApprovalCountsOperation_0(client, fields, $completion);
1311
+ });
1312
+ }
1313
+ function indexCachedApprovalCountsOperation_0(client, fields, $completion) {
1314
+ fields = fields === VOID ? null : fields;
1315
+ var tmp = new $indexCachedApprovalCountsOperationCOROUTINE$(client, fields, $completion);
1316
+ tmp.result_1 = Unit_instance;
1317
+ tmp.exception_1 = null;
1318
+ return tmp.doResume_5yljmg_k$();
1319
+ }
1320
+ function $indexCachedApprovalCountsOperationCOROUTINE$(client, fields, resultContinuation) {
1518
1321
  CoroutineImpl.call(this, resultContinuation);
1519
- this._this__u8e3s4__1 = _this__u8e3s4;
1520
- this.companyId_1 = companyId;
1521
- this.updateSupplierInvoiceNotificationCommand_1 = updateSupplierInvoiceNotificationCommand;
1322
+ this.client_1 = client;
1323
+ this.fields_1 = fields;
1522
1324
  }
1523
- protoOf($updateInvoiceNotificationCOROUTINE$).doResume_5yljmg_k$ = function () {
1325
+ protoOf($indexCachedApprovalCountsOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1524
1326
  var suspendResult = this.result_1;
1525
1327
  $sm: do
1526
1328
  try {
@@ -1529,14 +1331,20 @@ protoOf($updateInvoiceNotificationCOROUTINE$).doResume_5yljmg_k$ = function () {
1529
1331
  case 0:
1530
1332
  this.exceptionState_1 = 2;
1531
1333
  var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1532
- var localVariableBody = this.updateSupplierInvoiceNotificationCommand_1;
1334
+ var localVariableBody = EmptyContent_getInstance();
1533
1335
  var localVariableQuery = LinkedHashMap_init_$Create$();
1336
+ if (this.fields_1 == null)
1337
+ null;
1338
+ else {
1339
+ var value = listOf_0(this.fields_1);
1340
+ localVariableQuery.put_4fpzoq_k$('fields', value);
1341
+ }
1342
+
1534
1343
  var localVariableHeaders = LinkedHashMap_init_$Create$();
1535
- var tmp0_method = RequestMethod_PUT_getInstance();
1536
- var tmp1_path = replace('/companies/{companyId}/economy/supplierInvoices/notification', '{companyId}', this.companyId_1.toString());
1537
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1344
+ var tmp1_method = RequestMethod_GET_getInstance();
1345
+ var localVariableConfig = new RequestConfig(tmp1_method, '/companies/economy/supplierInvoices/approvalCounts', localVariableHeaders, VOID, localVariableQuery, true);
1538
1346
  this.state_1 = 1;
1539
- suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1347
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1540
1348
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1541
1349
  return suspendResult;
1542
1350
  }
@@ -1544,11 +1352,11 @@ protoOf($updateInvoiceNotificationCOROUTINE$).doResume_5yljmg_k$ = function () {
1544
1352
  continue $sm;
1545
1353
  case 1:
1546
1354
  var this_0 = suspendResult;
1547
- var tmp_0 = getKClass(Unit);
1548
- var tmp_1 = null instanceof Unit;
1355
+ var tmp_0 = getKClass(SupplierInvoiceApprovalCounts);
1356
+ var tmp_1 = null instanceof SupplierInvoiceApprovalCounts;
1549
1357
  var tmp_2;
1550
1358
  try {
1551
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1359
+ tmp_2 = createKType(getKClass(SupplierInvoiceApprovalCounts), arrayOf([]), false);
1552
1360
  } catch ($p) {
1553
1361
  var tmp_3;
1554
1362
  if ($p instanceof Error) {
@@ -1575,52 +1383,78 @@ protoOf($updateInvoiceNotificationCOROUTINE$).doResume_5yljmg_k$ = function () {
1575
1383
  }
1576
1384
  while (true);
1577
1385
  };
1578
- function $updateInvoiceNotification$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, updateSupplierInvoiceNotificationCommand, resultContinuation) {
1386
+ function indexInvoiceCountOperation(client, companyId, fields) {
1387
+ return promisify(function ($completion) {
1388
+ return indexInvoiceCountOperation_0(client, companyId, fields, $completion);
1389
+ });
1390
+ }
1391
+ function indexInvoiceCountOperation_0(client, companyId, fields, $completion) {
1392
+ fields = fields === VOID ? null : fields;
1393
+ var tmp = new $indexInvoiceCountOperationCOROUTINE$(client, companyId, fields, $completion);
1394
+ tmp.result_1 = Unit_instance;
1395
+ tmp.exception_1 = null;
1396
+ return tmp.doResume_5yljmg_k$();
1397
+ }
1398
+ function $indexInvoiceCountOperationCOROUTINE$(client, companyId, fields, resultContinuation) {
1579
1399
  CoroutineImpl.call(this, resultContinuation);
1580
- this._this__u8e3s4__1 = _this__u8e3s4;
1400
+ this.client_1 = client;
1581
1401
  this.companyId_1 = companyId;
1582
- this.updateSupplierInvoiceNotificationCommand_1 = updateSupplierInvoiceNotificationCommand;
1402
+ this.fields_1 = fields;
1583
1403
  }
1584
- protoOf($updateInvoiceNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1404
+ protoOf($indexInvoiceCountOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1585
1405
  var suspendResult = this.result_1;
1586
1406
  $sm: do
1587
1407
  try {
1588
1408
  var tmp = this.state_1;
1589
1409
  switch (tmp) {
1590
1410
  case 0:
1591
- this.exceptionState_1 = 4;
1592
- if (this._this__u8e3s4__1.updateInvoiceNotification === protoOf(InvoiceApi).updateInvoiceNotification) {
1593
- this.state_1 = 2;
1594
- suspendResult = this._this__u8e3s4__1.updateInvoiceNotification_usomn4_k$(this.companyId_1, this.updateSupplierInvoiceNotificationCommand_1, this);
1595
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1596
- return suspendResult;
1597
- }
1598
- continue $sm;
1599
- } else {
1600
- this.state_1 = 1;
1601
- suspendResult = await_0(this._this__u8e3s4__1.updateInvoiceNotification(this.companyId_1, this.updateSupplierInvoiceNotificationCommand_1), this);
1602
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1603
- return suspendResult;
1604
- }
1605
- continue $sm;
1411
+ this.exceptionState_1 = 2;
1412
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1413
+ var localVariableBody = EmptyContent_getInstance();
1414
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1415
+ if (this.fields_1 == null)
1416
+ null;
1417
+ else {
1418
+ var value = listOf_0(this.fields_1);
1419
+ localVariableQuery.put_4fpzoq_k$('fields', value);
1420
+ }
1421
+
1422
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1423
+ var tmp1_method = RequestMethod_GET_getInstance();
1424
+ var tmp2_path = replace('/companies/{companyId}/economy/supplierInvoices/forApprovalCount', '{companyId}', this.companyId_1.toString());
1425
+ var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
1426
+ this.state_1 = 1;
1427
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1428
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1429
+ return suspendResult;
1606
1430
  }
1607
1431
 
1608
- case 1:
1609
- this.WHEN_RESULT0__1 = suspendResult;
1610
- this.state_1 = 3;
1611
1432
  continue $sm;
1433
+ case 1:
1434
+ var this_0 = suspendResult;
1435
+ var tmp_0 = getKClass(SupplierInvoiceList);
1436
+ var tmp_1 = null instanceof SupplierInvoiceList;
1437
+ var tmp_2;
1438
+ try {
1439
+ tmp_2 = createKType(getKClass(SupplierInvoiceList), arrayOf([]), false);
1440
+ } catch ($p) {
1441
+ var tmp_3;
1442
+ if ($p instanceof Error) {
1443
+ var _unused_var__etf5q3 = $p;
1444
+ tmp_3 = null;
1445
+ } else {
1446
+ throw $p;
1447
+ }
1448
+ tmp_2 = tmp_3;
1449
+ }
1450
+
1451
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1612
1452
  case 2:
1613
- this.WHEN_RESULT0__1 = suspendResult;
1614
- this.state_1 = 3;
1615
- continue $sm;
1616
- case 3:
1617
- return this.WHEN_RESULT0__1;
1618
- case 4:
1619
1453
  throw this.exception_1;
1620
1454
  }
1621
- } catch ($p) {
1622
- var e = $p;
1623
- if (this.exceptionState_1 === 4) {
1455
+ } catch ($p_0) {
1456
+ var e = $p_0;
1457
+ if (this.exceptionState_1 === 2) {
1624
1458
  throw e;
1625
1459
  } else {
1626
1460
  this.state_1 = this.exceptionState_1;
@@ -1629,13 +1463,29 @@ protoOf($updateInvoiceNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ =
1629
1463
  }
1630
1464
  while (true);
1631
1465
  };
1632
- function $updateInvoiceRealtimeNotificationCOROUTINE$(_this__u8e3s4, companyId, updateRealtimeSupplierInvoiceNotificationCommand, resultContinuation) {
1466
+ function indexInvoiceOperation(client, companyId, archive, year, fields) {
1467
+ return promisify(function ($completion) {
1468
+ return indexInvoiceOperation_0(client, companyId, archive, year, fields, $completion);
1469
+ });
1470
+ }
1471
+ function indexInvoiceOperation_0(client, companyId, archive, year, fields, $completion) {
1472
+ archive = archive === VOID ? null : archive;
1473
+ year = year === VOID ? null : year;
1474
+ fields = fields === VOID ? null : fields;
1475
+ var tmp = new $indexInvoiceOperationCOROUTINE$(client, companyId, archive, year, fields, $completion);
1476
+ tmp.result_1 = Unit_instance;
1477
+ tmp.exception_1 = null;
1478
+ return tmp.doResume_5yljmg_k$();
1479
+ }
1480
+ function $indexInvoiceOperationCOROUTINE$(client, companyId, archive, year, fields, resultContinuation) {
1633
1481
  CoroutineImpl.call(this, resultContinuation);
1634
- this._this__u8e3s4__1 = _this__u8e3s4;
1482
+ this.client_1 = client;
1635
1483
  this.companyId_1 = companyId;
1636
- this.updateRealtimeSupplierInvoiceNotificationCommand_1 = updateRealtimeSupplierInvoiceNotificationCommand;
1484
+ this.archive_1 = archive;
1485
+ this.year_1 = year;
1486
+ this.fields_1 = fields;
1637
1487
  }
1638
- protoOf($updateInvoiceRealtimeNotificationCOROUTINE$).doResume_5yljmg_k$ = function () {
1488
+ protoOf($indexInvoiceOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1639
1489
  var suspendResult = this.result_1;
1640
1490
  $sm: do
1641
1491
  try {
@@ -1644,14 +1494,35 @@ protoOf($updateInvoiceRealtimeNotificationCOROUTINE$).doResume_5yljmg_k$ = funct
1644
1494
  case 0:
1645
1495
  this.exceptionState_1 = 2;
1646
1496
  var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1647
- var localVariableBody = this.updateRealtimeSupplierInvoiceNotificationCommand_1;
1497
+ var localVariableBody = EmptyContent_getInstance();
1648
1498
  var localVariableQuery = LinkedHashMap_init_$Create$();
1499
+ if (this.archive_1 == null)
1500
+ null;
1501
+ else {
1502
+ var value = listOf_0('' + this.archive_1);
1503
+ localVariableQuery.put_4fpzoq_k$('archive', value);
1504
+ }
1505
+
1506
+ if (this.year_1 == null)
1507
+ null;
1508
+ else {
1509
+ var value_0 = listOf_0('' + this.year_1);
1510
+ localVariableQuery.put_4fpzoq_k$('year', value_0);
1511
+ }
1512
+
1513
+ if (this.fields_1 == null)
1514
+ null;
1515
+ else {
1516
+ var value_1 = listOf_0(this.fields_1);
1517
+ localVariableQuery.put_4fpzoq_k$('fields', value_1);
1518
+ }
1519
+
1649
1520
  var localVariableHeaders = LinkedHashMap_init_$Create$();
1650
- var tmp0_method = RequestMethod_PUT_getInstance();
1651
- var tmp1_path = replace('/companies/{companyId}/economy/supplierInvoices/realtimeNotification', '{companyId}', this.companyId_1.toString());
1652
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1521
+ var tmp3_method = RequestMethod_GET_getInstance();
1522
+ var tmp4_path = replace('/companies/{companyId}/economy/supplierInvoices', '{companyId}', this.companyId_1.toString());
1523
+ var localVariableConfig = new RequestConfig(tmp3_method, tmp4_path, localVariableHeaders, VOID, localVariableQuery, true);
1653
1524
  this.state_1 = 1;
1654
- suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1525
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1655
1526
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1656
1527
  return suspendResult;
1657
1528
  }
@@ -1659,11 +1530,11 @@ protoOf($updateInvoiceRealtimeNotificationCOROUTINE$).doResume_5yljmg_k$ = funct
1659
1530
  continue $sm;
1660
1531
  case 1:
1661
1532
  var this_0 = suspendResult;
1662
- var tmp_0 = getKClass(Unit);
1663
- var tmp_1 = null instanceof Unit;
1533
+ var tmp_0 = getKClass(SupplierInvoiceList);
1534
+ var tmp_1 = null instanceof SupplierInvoiceList;
1664
1535
  var tmp_2;
1665
1536
  try {
1666
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1537
+ tmp_2 = createKType(getKClass(SupplierInvoiceList), arrayOf([]), false);
1667
1538
  } catch ($p) {
1668
1539
  var tmp_3;
1669
1540
  if ($p instanceof Error) {
@@ -1690,326 +1561,571 @@ protoOf($updateInvoiceRealtimeNotificationCOROUTINE$).doResume_5yljmg_k$ = funct
1690
1561
  }
1691
1562
  while (true);
1692
1563
  };
1693
- function $updateInvoiceRealtimeNotification$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, updateRealtimeSupplierInvoiceNotificationCommand, resultContinuation) {
1564
+ function indexInvoiceUnattestedCountOperation(client, companyId, fields) {
1565
+ return promisify(function ($completion) {
1566
+ return indexInvoiceUnattestedCountOperation_0(client, companyId, fields, $completion);
1567
+ });
1568
+ }
1569
+ function indexInvoiceUnattestedCountOperation_0(client, companyId, fields, $completion) {
1570
+ fields = fields === VOID ? null : fields;
1571
+ var tmp = new $indexInvoiceUnattestedCountOperationCOROUTINE$(client, companyId, fields, $completion);
1572
+ tmp.result_1 = Unit_instance;
1573
+ tmp.exception_1 = null;
1574
+ return tmp.doResume_5yljmg_k$();
1575
+ }
1576
+ function $indexInvoiceUnattestedCountOperationCOROUTINE$(client, companyId, fields, resultContinuation) {
1694
1577
  CoroutineImpl.call(this, resultContinuation);
1695
- this._this__u8e3s4__1 = _this__u8e3s4;
1578
+ this.client_1 = client;
1696
1579
  this.companyId_1 = companyId;
1697
- this.updateRealtimeSupplierInvoiceNotificationCommand_1 = updateRealtimeSupplierInvoiceNotificationCommand;
1580
+ this.fields_1 = fields;
1698
1581
  }
1699
- protoOf($updateInvoiceRealtimeNotification$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1582
+ protoOf($indexInvoiceUnattestedCountOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1700
1583
  var suspendResult = this.result_1;
1701
1584
  $sm: do
1702
1585
  try {
1703
1586
  var tmp = this.state_1;
1704
1587
  switch (tmp) {
1705
1588
  case 0:
1706
- this.exceptionState_1 = 4;
1707
- if (this._this__u8e3s4__1.updateInvoiceRealtimeNotification === protoOf(InvoiceApi).updateInvoiceRealtimeNotification) {
1708
- this.state_1 = 2;
1709
- suspendResult = this._this__u8e3s4__1.updateInvoiceRealtimeNotification_ccf05c_k$(this.companyId_1, this.updateRealtimeSupplierInvoiceNotificationCommand_1, this);
1710
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1711
- return suspendResult;
1712
- }
1713
- continue $sm;
1714
- } else {
1715
- this.state_1 = 1;
1716
- suspendResult = await_0(this._this__u8e3s4__1.updateInvoiceRealtimeNotification(this.companyId_1, this.updateRealtimeSupplierInvoiceNotificationCommand_1), this);
1717
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1718
- return suspendResult;
1719
- }
1720
- continue $sm;
1589
+ this.exceptionState_1 = 2;
1590
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1591
+ var localVariableBody = EmptyContent_getInstance();
1592
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1593
+ if (this.fields_1 == null)
1594
+ null;
1595
+ else {
1596
+ var value = listOf_0(this.fields_1);
1597
+ localVariableQuery.put_4fpzoq_k$('fields', value);
1598
+ }
1599
+
1600
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1601
+ var tmp1_method = RequestMethod_GET_getInstance();
1602
+ var tmp2_path = replace('/companies/{companyId}/economy/supplierInvoices/unAttested', '{companyId}', this.companyId_1.toString());
1603
+ var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
1604
+ this.state_1 = 1;
1605
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1606
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1607
+ return suspendResult;
1721
1608
  }
1722
1609
 
1723
- case 1:
1724
- this.WHEN_RESULT0__1 = suspendResult;
1725
- this.state_1 = 3;
1726
- continue $sm;
1727
- case 2:
1728
- this.WHEN_RESULT0__1 = suspendResult;
1729
- this.state_1 = 3;
1730
1610
  continue $sm;
1731
- case 3:
1732
- return this.WHEN_RESULT0__1;
1733
- case 4:
1734
- throw this.exception_1;
1735
- }
1736
- } catch ($p) {
1737
- var e = $p;
1738
- if (this.exceptionState_1 === 4) {
1739
- throw e;
1740
- } else {
1741
- this.state_1 = this.exceptionState_1;
1742
- this.exception_1 = e;
1743
- }
1744
- }
1745
- while (true);
1746
- };
1747
- protoOf(InvoiceApi).createInvoiceApproval_8myc44_k$ = function (companyId, invoiceId, approveSupplierInvoiceCommand, $completion) {
1748
- var tmp = new $createInvoiceApprovalCOROUTINE$(this, companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
1749
- tmp.result_1 = Unit_instance;
1750
- tmp.exception_1 = null;
1751
- return tmp.doResume_5yljmg_k$();
1752
- };
1753
- protoOf(InvoiceApi).createInvoiceApproval = function (companyId, invoiceId, approveSupplierInvoiceCommand) {
1754
- var tmp = this;
1755
- return promisify(function ($completion) {
1756
- return tmp.createInvoiceApproval_8myc44_k$(companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
1757
- });
1758
- };
1759
- protoOf(InvoiceApi).createInvoiceApproval$suspendBridge_ge51yj_k$ = function (companyId, invoiceId, approveSupplierInvoiceCommand, $completion) {
1760
- var tmp = new $createInvoiceApproval$suspendBridgeCOROUTINE$(this, companyId, invoiceId, approveSupplierInvoiceCommand, $completion);
1761
- tmp.result_1 = Unit_instance;
1762
- tmp.exception_1 = null;
1763
- return tmp.doResume_5yljmg_k$();
1764
- };
1765
- protoOf(InvoiceApi).createInvoiceNotice_lhhk87_k$ = function (companyId, createSupplierInvoiceNotificationCommand, $completion) {
1766
- var tmp = new $createInvoiceNoticeCOROUTINE$(this, companyId, createSupplierInvoiceNotificationCommand, $completion);
1767
- tmp.result_1 = Unit_instance;
1768
- tmp.exception_1 = null;
1769
- return tmp.doResume_5yljmg_k$();
1770
- };
1771
- protoOf(InvoiceApi).createInvoiceNotice = function (companyId, createSupplierInvoiceNotificationCommand) {
1772
- var tmp = this;
1773
- return promisify(function ($completion) {
1774
- return tmp.createInvoiceNotice_lhhk87_k$(companyId, createSupplierInvoiceNotificationCommand, $completion);
1775
- });
1776
- };
1777
- protoOf(InvoiceApi).createInvoiceNotice$suspendBridge_wstm0_k$ = function (companyId, createSupplierInvoiceNotificationCommand, $completion) {
1778
- var tmp = new $createInvoiceNotice$suspendBridgeCOROUTINE$(this, companyId, createSupplierInvoiceNotificationCommand, $completion);
1779
- tmp.result_1 = Unit_instance;
1780
- tmp.exception_1 = null;
1781
- return tmp.doResume_5yljmg_k$();
1782
- };
1783
- protoOf(InvoiceApi).createInvoiceRejection_si9a56_k$ = function (companyId, invoiceId, rejectSupplierInvoiceCommand, $completion) {
1784
- var tmp = new $createInvoiceRejectionCOROUTINE$(this, companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
1785
- tmp.result_1 = Unit_instance;
1786
- tmp.exception_1 = null;
1787
- return tmp.doResume_5yljmg_k$();
1788
- };
1789
- protoOf(InvoiceApi).createInvoiceRejection = function (companyId, invoiceId, rejectSupplierInvoiceCommand) {
1790
- var tmp = this;
1791
- return promisify(function ($completion) {
1792
- return tmp.createInvoiceRejection_si9a56_k$(companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
1793
- });
1794
- };
1795
- protoOf(InvoiceApi).createInvoiceRejection$suspendBridge_4il2yt_k$ = function (companyId, invoiceId, rejectSupplierInvoiceCommand, $completion) {
1796
- var tmp = new $createInvoiceRejection$suspendBridgeCOROUTINE$(this, companyId, invoiceId, rejectSupplierInvoiceCommand, $completion);
1797
- tmp.result_1 = Unit_instance;
1798
- tmp.exception_1 = null;
1799
- return tmp.doResume_5yljmg_k$();
1800
- };
1801
- protoOf(InvoiceApi).indexCachedApprovalCounts_tuc1gj_k$ = function (fields, $completion) {
1802
- var tmp = new $indexCachedApprovalCountsCOROUTINE$(this, fields, $completion);
1803
- tmp.result_1 = Unit_instance;
1804
- tmp.exception_1 = null;
1805
- return tmp.doResume_5yljmg_k$();
1806
- };
1807
- protoOf(InvoiceApi).indexCachedApprovalCounts$default_1a7kld_k$ = function (fields, $completion, $super) {
1808
- fields = fields === VOID ? null : fields;
1809
- return $super === VOID ? this.indexCachedApprovalCounts_tuc1gj_k$(fields, $completion) : $super.indexCachedApprovalCounts_tuc1gj_k$.call(this, fields, $completion);
1810
- };
1811
- protoOf(InvoiceApi).indexCachedApprovalCounts = function (fields) {
1812
- var tmp = this;
1813
- return promisify(function ($completion) {
1814
- return tmp.indexCachedApprovalCounts$default_1a7kld_k$(fields, $completion);
1815
- });
1816
- };
1817
- protoOf(InvoiceApi).indexCachedApprovalCounts$suspendBridge_vmv938_k$ = function (fields, $completion) {
1818
- var tmp = new $indexCachedApprovalCounts$suspendBridgeCOROUTINE$(this, fields, $completion);
1819
- tmp.result_1 = Unit_instance;
1820
- tmp.exception_1 = null;
1821
- return tmp.doResume_5yljmg_k$();
1822
- };
1823
- protoOf(InvoiceApi).indexInvoice_rq8yvh_k$ = function (companyId, archive, year, fields, $completion) {
1824
- var tmp = new $indexInvoiceCOROUTINE$(this, companyId, archive, year, fields, $completion);
1825
- tmp.result_1 = Unit_instance;
1826
- tmp.exception_1 = null;
1827
- return tmp.doResume_5yljmg_k$();
1828
- };
1829
- protoOf(InvoiceApi).indexInvoice$default_bk0ktl_k$ = function (companyId, archive, year, fields, $completion, $super) {
1830
- archive = archive === VOID ? null : archive;
1831
- year = year === VOID ? null : year;
1832
- fields = fields === VOID ? null : fields;
1833
- return $super === VOID ? this.indexInvoice_rq8yvh_k$(companyId, archive, year, fields, $completion) : $super.indexInvoice_rq8yvh_k$.call(this, companyId, archive, year, fields, $completion);
1834
- };
1835
- protoOf(InvoiceApi).indexInvoice = function (companyId, archive, year, fields) {
1836
- var tmp = this;
1837
- return promisify(function ($completion) {
1838
- return tmp.indexInvoice$default_bk0ktl_k$(companyId, archive, year, fields, $completion);
1839
- });
1840
- };
1841
- protoOf(InvoiceApi).indexInvoice$suspendBridge_lriupg_k$ = function (companyId, archive, year, fields, $completion) {
1842
- var tmp = new $indexInvoice$suspendBridgeCOROUTINE$(this, companyId, archive, year, fields, $completion);
1843
- tmp.result_1 = Unit_instance;
1844
- tmp.exception_1 = null;
1845
- return tmp.doResume_5yljmg_k$();
1846
- };
1847
- protoOf(InvoiceApi).indexInvoiceCount_u0kqhd_k$ = function (companyId, fields, $completion) {
1848
- var tmp = new $indexInvoiceCountCOROUTINE$(this, companyId, fields, $completion);
1849
- tmp.result_1 = Unit_instance;
1850
- tmp.exception_1 = null;
1851
- return tmp.doResume_5yljmg_k$();
1852
- };
1853
- protoOf(InvoiceApi).indexInvoiceCount$default_takr8j_k$ = function (companyId, fields, $completion, $super) {
1854
- fields = fields === VOID ? null : fields;
1855
- return $super === VOID ? this.indexInvoiceCount_u0kqhd_k$(companyId, fields, $completion) : $super.indexInvoiceCount_u0kqhd_k$.call(this, companyId, fields, $completion);
1856
- };
1857
- protoOf(InvoiceApi).indexInvoiceCount = function (companyId, fields) {
1858
- var tmp = this;
1859
- return promisify(function ($completion) {
1860
- return tmp.indexInvoiceCount$default_takr8j_k$(companyId, fields, $completion);
1861
- });
1862
- };
1863
- protoOf(InvoiceApi).indexInvoiceCount$suspendBridge_rya5g2_k$ = function (companyId, fields, $completion) {
1864
- var tmp = new $indexInvoiceCount$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
1865
- tmp.result_1 = Unit_instance;
1866
- tmp.exception_1 = null;
1867
- return tmp.doResume_5yljmg_k$();
1868
- };
1869
- protoOf(InvoiceApi).indexInvoiceUnattestedCount_smwz5x_k$ = function (companyId, fields, $completion) {
1870
- var tmp = new $indexInvoiceUnattestedCountCOROUTINE$(this, companyId, fields, $completion);
1871
- tmp.result_1 = Unit_instance;
1872
- tmp.exception_1 = null;
1873
- return tmp.doResume_5yljmg_k$();
1874
- };
1875
- protoOf(InvoiceApi).indexInvoiceUnattestedCount$default_upxckv_k$ = function (companyId, fields, $completion, $super) {
1876
- fields = fields === VOID ? null : fields;
1877
- return $super === VOID ? this.indexInvoiceUnattestedCount_smwz5x_k$(companyId, fields, $completion) : $super.indexInvoiceUnattestedCount_smwz5x_k$.call(this, companyId, fields, $completion);
1611
+ case 1:
1612
+ var this_0 = suspendResult;
1613
+ var tmp_0 = getKClass(SupplierInvoiceCount);
1614
+ var tmp_1 = null instanceof SupplierInvoiceCount;
1615
+ var tmp_2;
1616
+ try {
1617
+ tmp_2 = createKType(getKClass(SupplierInvoiceCount), arrayOf([]), false);
1618
+ } catch ($p) {
1619
+ var tmp_3;
1620
+ if ($p instanceof Error) {
1621
+ var _unused_var__etf5q3 = $p;
1622
+ tmp_3 = null;
1623
+ } else {
1624
+ throw $p;
1625
+ }
1626
+ tmp_2 = tmp_3;
1627
+ }
1628
+
1629
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1630
+ case 2:
1631
+ throw this.exception_1;
1632
+ }
1633
+ } catch ($p_0) {
1634
+ var e = $p_0;
1635
+ if (this.exceptionState_1 === 2) {
1636
+ throw e;
1637
+ } else {
1638
+ this.state_1 = this.exceptionState_1;
1639
+ this.exception_1 = e;
1640
+ }
1641
+ }
1642
+ while (true);
1878
1643
  };
1879
- protoOf(InvoiceApi).indexInvoiceUnattestedCount = function (companyId, fields) {
1880
- var tmp = this;
1644
+ function indexSupplierInvoicesUserOperation(client, companyIds, fields, pageToken, autoPaginate, count) {
1881
1645
  return promisify(function ($completion) {
1882
- return tmp.indexInvoiceUnattestedCount$default_upxckv_k$(companyId, fields, $completion);
1646
+ return indexSupplierInvoicesUserOperation_0(client, companyIds, fields, pageToken, autoPaginate, count, $completion);
1883
1647
  });
1884
- };
1885
- protoOf(InvoiceApi).indexInvoiceUnattestedCount$suspendBridge_ahytng_k$ = function (companyId, fields, $completion) {
1886
- var tmp = new $indexInvoiceUnattestedCount$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
1887
- tmp.result_1 = Unit_instance;
1888
- tmp.exception_1 = null;
1889
- return tmp.doResume_5yljmg_k$();
1890
- };
1891
- protoOf(InvoiceApi).indexSupplierInvoicesUser_1intmq_k$ = function (companyIds, fields, pageToken, autoPaginate, count, $completion) {
1892
- var tmp = new $indexSupplierInvoicesUserCOROUTINE$(this, companyIds, fields, pageToken, autoPaginate, count, $completion);
1893
- tmp.result_1 = Unit_instance;
1894
- tmp.exception_1 = null;
1895
- return tmp.doResume_5yljmg_k$();
1896
- };
1897
- protoOf(InvoiceApi).indexSupplierInvoicesUser$default_klw2gq_k$ = function (companyIds, fields, pageToken, autoPaginate, count, $completion, $super) {
1648
+ }
1649
+ function indexSupplierInvoicesUserOperation_0(client, companyIds, fields, pageToken, autoPaginate, count, $completion) {
1898
1650
  companyIds = companyIds === VOID ? null : companyIds;
1899
1651
  fields = fields === VOID ? null : fields;
1900
1652
  pageToken = pageToken === VOID ? null : pageToken;
1901
1653
  autoPaginate = autoPaginate === VOID ? null : autoPaginate;
1902
1654
  count = count === VOID ? null : count;
1903
- return $super === VOID ? this.indexSupplierInvoicesUser_1intmq_k$(companyIds, fields, pageToken, autoPaginate, count, $completion) : $super.indexSupplierInvoicesUser_1intmq_k$.call(this, companyIds, fields, pageToken, autoPaginate, count, $completion);
1904
- };
1905
- protoOf(InvoiceApi).indexSupplierInvoicesUser = function (companyIds, fields, pageToken, autoPaginate, count) {
1906
- var tmp = this;
1907
- return promisify(function ($completion) {
1908
- return tmp.indexSupplierInvoicesUser$default_klw2gq_k$(companyIds, fields, pageToken, autoPaginate, count, $completion);
1909
- });
1910
- };
1911
- protoOf(InvoiceApi).indexSupplierInvoicesUser$suspendBridge_rxz4wv_k$ = function (companyIds, fields, pageToken, autoPaginate, count, $completion) {
1912
- var tmp = new $indexSupplierInvoicesUser$suspendBridgeCOROUTINE$(this, companyIds, fields, pageToken, autoPaginate, count, $completion);
1913
- tmp.result_1 = Unit_instance;
1914
- tmp.exception_1 = null;
1915
- return tmp.doResume_5yljmg_k$();
1916
- };
1917
- protoOf(InvoiceApi).showAccountingAvailability_nuy07h_k$ = function (companyId, $completion) {
1918
- var tmp = new $showAccountingAvailabilityCOROUTINE$(this, companyId, $completion);
1919
- tmp.result_1 = Unit_instance;
1920
- tmp.exception_1 = null;
1921
- return tmp.doResume_5yljmg_k$();
1922
- };
1923
- protoOf(InvoiceApi).showAccountingAvailability = function (companyId) {
1924
- var tmp = this;
1925
- return promisify(function ($completion) {
1926
- return tmp.showAccountingAvailability_nuy07h_k$(companyId, $completion);
1927
- });
1928
- };
1929
- protoOf(InvoiceApi).showAccountingAvailability$suspendBridge_mc6qvm_k$ = function (companyId, $completion) {
1930
- var tmp = new $showAccountingAvailability$suspendBridgeCOROUTINE$(this, companyId, $completion);
1931
- tmp.result_1 = Unit_instance;
1932
- tmp.exception_1 = null;
1933
- return tmp.doResume_5yljmg_k$();
1934
- };
1935
- protoOf(InvoiceApi).showInvoiceNotification_ys4lor_k$ = function (companyId, fields, $completion) {
1936
- var tmp = new $showInvoiceNotificationCOROUTINE$(this, companyId, fields, $completion);
1655
+ var tmp = new $indexSupplierInvoicesUserOperationCOROUTINE$(client, companyIds, fields, pageToken, autoPaginate, count, $completion);
1937
1656
  tmp.result_1 = Unit_instance;
1938
1657
  tmp.exception_1 = null;
1939
1658
  return tmp.doResume_5yljmg_k$();
1659
+ }
1660
+ function $indexSupplierInvoicesUserOperationCOROUTINE$(client, companyIds, fields, pageToken, autoPaginate, count, resultContinuation) {
1661
+ CoroutineImpl.call(this, resultContinuation);
1662
+ this.client_1 = client;
1663
+ this.companyIds_1 = companyIds;
1664
+ this.fields_1 = fields;
1665
+ this.pageToken_1 = pageToken;
1666
+ this.autoPaginate_1 = autoPaginate;
1667
+ this.count_1 = count;
1668
+ }
1669
+ protoOf($indexSupplierInvoicesUserOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1670
+ var suspendResult = this.result_1;
1671
+ $sm: do
1672
+ try {
1673
+ var tmp = this.state_1;
1674
+ switch (tmp) {
1675
+ case 0:
1676
+ this.exceptionState_1 = 2;
1677
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1678
+ var localVariableBody = EmptyContent_getInstance();
1679
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1680
+ var tmp0_safe_receiver = this.companyIds_1;
1681
+ if (tmp0_safe_receiver == null)
1682
+ null;
1683
+ else {
1684
+ var tmp2 = 'companyIds';
1685
+ var value = toMultiValue(tmp0_safe_receiver, 'multi');
1686
+ localVariableQuery.put_4fpzoq_k$(tmp2, value);
1687
+ }
1688
+
1689
+ if (this.fields_1 == null)
1690
+ null;
1691
+ else {
1692
+ var value_0 = listOf_0(this.fields_1);
1693
+ localVariableQuery.put_4fpzoq_k$('fields', value_0);
1694
+ }
1695
+
1696
+ if (this.pageToken_1 == null)
1697
+ null;
1698
+ else {
1699
+ var tmp2_0 = 'pageToken';
1700
+ var value_1 = listOf_0(this.pageToken_1);
1701
+ localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
1702
+ }
1703
+
1704
+ if (this.autoPaginate_1 == null)
1705
+ null;
1706
+ else {
1707
+ var tmp2_1 = 'autoPaginate';
1708
+ var value_2 = listOf_0('' + this.autoPaginate_1);
1709
+ localVariableQuery.put_4fpzoq_k$(tmp2_1, value_2);
1710
+ }
1711
+
1712
+ if (this.count_1 == null)
1713
+ null;
1714
+ else {
1715
+ var value_3 = listOf_0('' + this.count_1);
1716
+ localVariableQuery.put_4fpzoq_k$('count', value_3);
1717
+ }
1718
+
1719
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1720
+ var tmp5_method = RequestMethod_GET_getInstance();
1721
+ var localVariableConfig = new RequestConfig(tmp5_method, '/companies/economy/supplierInvoices', localVariableHeaders, VOID, localVariableQuery, true);
1722
+ this.state_1 = 1;
1723
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1724
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1725
+ return suspendResult;
1726
+ }
1727
+
1728
+ continue $sm;
1729
+ case 1:
1730
+ var this_0 = suspendResult;
1731
+ var tmp_0 = getKClass(PagedListSupplierInvoice);
1732
+ var tmp_1 = null instanceof PagedListSupplierInvoice;
1733
+ var tmp_2;
1734
+ try {
1735
+ tmp_2 = createKType(getKClass(PagedListSupplierInvoice), arrayOf([]), false);
1736
+ } catch ($p) {
1737
+ var tmp_3;
1738
+ if ($p instanceof Error) {
1739
+ var _unused_var__etf5q3 = $p;
1740
+ tmp_3 = null;
1741
+ } else {
1742
+ throw $p;
1743
+ }
1744
+ tmp_2 = tmp_3;
1745
+ }
1746
+
1747
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1748
+ case 2:
1749
+ throw this.exception_1;
1750
+ }
1751
+ } catch ($p_0) {
1752
+ var e = $p_0;
1753
+ if (this.exceptionState_1 === 2) {
1754
+ throw e;
1755
+ } else {
1756
+ this.state_1 = this.exceptionState_1;
1757
+ this.exception_1 = e;
1758
+ }
1759
+ }
1760
+ while (true);
1940
1761
  };
1941
- protoOf(InvoiceApi).showInvoiceNotification$default_dx0k41_k$ = function (companyId, fields, $completion, $super) {
1942
- fields = fields === VOID ? null : fields;
1943
- return $super === VOID ? this.showInvoiceNotification_ys4lor_k$(companyId, fields, $completion) : $super.showInvoiceNotification_ys4lor_k$.call(this, companyId, fields, $completion);
1944
- };
1945
- protoOf(InvoiceApi).showInvoiceNotification = function (companyId, fields) {
1946
- var tmp = this;
1762
+ function showAccountingAvailabilityOperation(client, companyId) {
1947
1763
  return promisify(function ($completion) {
1948
- return tmp.showInvoiceNotification$default_dx0k41_k$(companyId, fields, $completion);
1764
+ return showAccountingAvailabilityOperation_0(client, companyId, $completion);
1949
1765
  });
1950
- };
1951
- protoOf(InvoiceApi).showInvoiceNotification$suspendBridge_4b2q4_k$ = function (companyId, fields, $completion) {
1952
- var tmp = new $showInvoiceNotification$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
1953
- tmp.result_1 = Unit_instance;
1954
- tmp.exception_1 = null;
1955
- return tmp.doResume_5yljmg_k$();
1956
- };
1957
- protoOf(InvoiceApi).showInvoicePdf_bzn8t6_k$ = function (companyId, tripletexInvoiceId, $completion) {
1958
- var tmp = new $showInvoicePdfCOROUTINE$(this, companyId, tripletexInvoiceId, $completion);
1766
+ }
1767
+ function showAccountingAvailabilityOperation_0(client, companyId, $completion) {
1768
+ var tmp = new $showAccountingAvailabilityOperationCOROUTINE$(client, companyId, $completion);
1959
1769
  tmp.result_1 = Unit_instance;
1960
1770
  tmp.exception_1 = null;
1961
1771
  return tmp.doResume_5yljmg_k$();
1772
+ }
1773
+ function $showAccountingAvailabilityOperationCOROUTINE$(client, companyId, resultContinuation) {
1774
+ CoroutineImpl.call(this, resultContinuation);
1775
+ this.client_1 = client;
1776
+ this.companyId_1 = companyId;
1777
+ }
1778
+ protoOf($showAccountingAvailabilityOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1779
+ var suspendResult = this.result_1;
1780
+ $sm: do
1781
+ try {
1782
+ var tmp = this.state_1;
1783
+ switch (tmp) {
1784
+ case 0:
1785
+ this.exceptionState_1 = 2;
1786
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1787
+ var localVariableBody = EmptyContent_getInstance();
1788
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1789
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1790
+ var tmp0_method = RequestMethod_GET_getInstance();
1791
+ var tmp1_path = replace('/companies/{companyId}/economy/accounting/enabled', '{companyId}', this.companyId_1.toString());
1792
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1793
+ this.state_1 = 1;
1794
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1795
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1796
+ return suspendResult;
1797
+ }
1798
+
1799
+ continue $sm;
1800
+ case 1:
1801
+ var this_0 = suspendResult;
1802
+ var tmp_0 = getKClass(Unit);
1803
+ var tmp_1 = null instanceof Unit;
1804
+ var tmp_2;
1805
+ try {
1806
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1807
+ } catch ($p) {
1808
+ var tmp_3;
1809
+ if ($p instanceof Error) {
1810
+ var _unused_var__etf5q3 = $p;
1811
+ tmp_3 = null;
1812
+ } else {
1813
+ throw $p;
1814
+ }
1815
+ tmp_2 = tmp_3;
1816
+ }
1817
+
1818
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1819
+ case 2:
1820
+ throw this.exception_1;
1821
+ }
1822
+ } catch ($p_0) {
1823
+ var e = $p_0;
1824
+ if (this.exceptionState_1 === 2) {
1825
+ throw e;
1826
+ } else {
1827
+ this.state_1 = this.exceptionState_1;
1828
+ this.exception_1 = e;
1829
+ }
1830
+ }
1831
+ while (true);
1962
1832
  };
1963
- protoOf(InvoiceApi).showInvoicePdf = function (companyId, tripletexInvoiceId) {
1964
- var tmp = this;
1833
+ function showInvoiceNotificationOperation(client, companyId, fields) {
1965
1834
  return promisify(function ($completion) {
1966
- return tmp.showInvoicePdf_bzn8t6_k$(companyId, tripletexInvoiceId, $completion);
1835
+ return showInvoiceNotificationOperation_0(client, companyId, fields, $completion);
1967
1836
  });
1968
- };
1969
- protoOf(InvoiceApi).showInvoicePdf$suspendBridge_x5ciuz_k$ = function (companyId, tripletexInvoiceId, $completion) {
1970
- var tmp = new $showInvoicePdf$suspendBridgeCOROUTINE$(this, companyId, tripletexInvoiceId, $completion);
1971
- tmp.result_1 = Unit_instance;
1972
- tmp.exception_1 = null;
1973
- return tmp.doResume_5yljmg_k$();
1974
- };
1975
- protoOf(InvoiceApi).updateInvoiceNotification_usomn4_k$ = function (companyId, updateSupplierInvoiceNotificationCommand, $completion) {
1976
- var tmp = new $updateInvoiceNotificationCOROUTINE$(this, companyId, updateSupplierInvoiceNotificationCommand, $completion);
1837
+ }
1838
+ function showInvoiceNotificationOperation_0(client, companyId, fields, $completion) {
1839
+ fields = fields === VOID ? null : fields;
1840
+ var tmp = new $showInvoiceNotificationOperationCOROUTINE$(client, companyId, fields, $completion);
1977
1841
  tmp.result_1 = Unit_instance;
1978
1842
  tmp.exception_1 = null;
1979
1843
  return tmp.doResume_5yljmg_k$();
1844
+ }
1845
+ function $showInvoiceNotificationOperationCOROUTINE$(client, companyId, fields, resultContinuation) {
1846
+ CoroutineImpl.call(this, resultContinuation);
1847
+ this.client_1 = client;
1848
+ this.companyId_1 = companyId;
1849
+ this.fields_1 = fields;
1850
+ }
1851
+ protoOf($showInvoiceNotificationOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1852
+ var suspendResult = this.result_1;
1853
+ $sm: do
1854
+ try {
1855
+ var tmp = this.state_1;
1856
+ switch (tmp) {
1857
+ case 0:
1858
+ this.exceptionState_1 = 2;
1859
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1860
+ var localVariableBody = EmptyContent_getInstance();
1861
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1862
+ if (this.fields_1 == null)
1863
+ null;
1864
+ else {
1865
+ var value = listOf_0(this.fields_1);
1866
+ localVariableQuery.put_4fpzoq_k$('fields', value);
1867
+ }
1868
+
1869
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1870
+ var tmp1_method = RequestMethod_GET_getInstance();
1871
+ var tmp2_path = replace('/companies/{companyId}/economy/supplierInvoices/notification', '{companyId}', this.companyId_1.toString());
1872
+ var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
1873
+ this.state_1 = 1;
1874
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1875
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1876
+ return suspendResult;
1877
+ }
1878
+
1879
+ continue $sm;
1880
+ case 1:
1881
+ var this_0 = suspendResult;
1882
+ var tmp_0 = getKClass(SupplierInvoiceNotification);
1883
+ var tmp_1 = null instanceof SupplierInvoiceNotification;
1884
+ var tmp_2;
1885
+ try {
1886
+ tmp_2 = createKType(getKClass(SupplierInvoiceNotification), arrayOf([]), false);
1887
+ } catch ($p) {
1888
+ var tmp_3;
1889
+ if ($p instanceof Error) {
1890
+ var _unused_var__etf5q3 = $p;
1891
+ tmp_3 = null;
1892
+ } else {
1893
+ throw $p;
1894
+ }
1895
+ tmp_2 = tmp_3;
1896
+ }
1897
+
1898
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1899
+ case 2:
1900
+ throw this.exception_1;
1901
+ }
1902
+ } catch ($p_0) {
1903
+ var e = $p_0;
1904
+ if (this.exceptionState_1 === 2) {
1905
+ throw e;
1906
+ } else {
1907
+ this.state_1 = this.exceptionState_1;
1908
+ this.exception_1 = e;
1909
+ }
1910
+ }
1911
+ while (true);
1980
1912
  };
1981
- protoOf(InvoiceApi).updateInvoiceNotification = function (companyId, updateSupplierInvoiceNotificationCommand) {
1982
- var tmp = this;
1913
+ function showInvoicePdfOperation(client, companyId, tripletexInvoiceId) {
1983
1914
  return promisify(function ($completion) {
1984
- return tmp.updateInvoiceNotification_usomn4_k$(companyId, updateSupplierInvoiceNotificationCommand, $completion);
1915
+ return showInvoicePdfOperation_0(client, companyId, tripletexInvoiceId, $completion);
1985
1916
  });
1986
- };
1987
- protoOf(InvoiceApi).updateInvoiceNotification$suspendBridge_6ofzhd_k$ = function (companyId, updateSupplierInvoiceNotificationCommand, $completion) {
1988
- var tmp = new $updateInvoiceNotification$suspendBridgeCOROUTINE$(this, companyId, updateSupplierInvoiceNotificationCommand, $completion);
1917
+ }
1918
+ function showInvoicePdfOperation_0(client, companyId, tripletexInvoiceId, $completion) {
1919
+ var tmp = new $showInvoicePdfOperationCOROUTINE$(client, companyId, tripletexInvoiceId, $completion);
1989
1920
  tmp.result_1 = Unit_instance;
1990
1921
  tmp.exception_1 = null;
1991
1922
  return tmp.doResume_5yljmg_k$();
1923
+ }
1924
+ function $showInvoicePdfOperationCOROUTINE$(client, companyId, tripletexInvoiceId, resultContinuation) {
1925
+ CoroutineImpl.call(this, resultContinuation);
1926
+ this.client_1 = client;
1927
+ this.companyId_1 = companyId;
1928
+ this.tripletexInvoiceId_1 = tripletexInvoiceId;
1929
+ }
1930
+ protoOf($showInvoicePdfOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1931
+ var suspendResult = this.result_1;
1932
+ $sm: do
1933
+ try {
1934
+ var tmp = this.state_1;
1935
+ switch (tmp) {
1936
+ case 0:
1937
+ this.exceptionState_1 = 2;
1938
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1939
+ var localVariableBody = EmptyContent_getInstance();
1940
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1941
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1942
+ var tmp0_method = RequestMethod_GET_getInstance();
1943
+ var tmp1_path = replace(replace('/companies/{companyId}/economy/supplierInvoices/{tripletexInvoiceId}/pdf', '{companyId}', this.companyId_1.toString()), '{tripletexInvoiceId}', this.tripletexInvoiceId_1);
1944
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1945
+ this.state_1 = 1;
1946
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1947
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1948
+ return suspendResult;
1949
+ }
1950
+
1951
+ continue $sm;
1952
+ case 1:
1953
+ var this_0 = suspendResult;
1954
+ var tmp_0 = getKClass(Base64ByteArray);
1955
+ var tmp_1 = null instanceof Base64ByteArray;
1956
+ var tmp_2;
1957
+ try {
1958
+ tmp_2 = createKType(getKClass(Base64ByteArray), arrayOf([]), false);
1959
+ } catch ($p) {
1960
+ var tmp_3;
1961
+ if ($p instanceof Error) {
1962
+ var _unused_var__etf5q3 = $p;
1963
+ tmp_3 = null;
1964
+ } else {
1965
+ throw $p;
1966
+ }
1967
+ tmp_2 = tmp_3;
1968
+ }
1969
+
1970
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1971
+ case 2:
1972
+ throw this.exception_1;
1973
+ }
1974
+ } catch ($p_0) {
1975
+ var e = $p_0;
1976
+ if (this.exceptionState_1 === 2) {
1977
+ throw e;
1978
+ } else {
1979
+ this.state_1 = this.exceptionState_1;
1980
+ this.exception_1 = e;
1981
+ }
1982
+ }
1983
+ while (true);
1992
1984
  };
1993
- protoOf(InvoiceApi).updateInvoiceRealtimeNotification_ccf05c_k$ = function (companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion) {
1994
- var tmp = new $updateInvoiceRealtimeNotificationCOROUTINE$(this, companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
1985
+ function updateInvoiceNotificationOperation(client, companyId, updateSupplierInvoiceNotificationCommand) {
1986
+ return promisify(function ($completion) {
1987
+ return updateInvoiceNotificationOperation_0(client, companyId, updateSupplierInvoiceNotificationCommand, $completion);
1988
+ });
1989
+ }
1990
+ function updateInvoiceNotificationOperation_0(client, companyId, updateSupplierInvoiceNotificationCommand, $completion) {
1991
+ var tmp = new $updateInvoiceNotificationOperationCOROUTINE$(client, companyId, updateSupplierInvoiceNotificationCommand, $completion);
1995
1992
  tmp.result_1 = Unit_instance;
1996
1993
  tmp.exception_1 = null;
1997
1994
  return tmp.doResume_5yljmg_k$();
1995
+ }
1996
+ function $updateInvoiceNotificationOperationCOROUTINE$(client, companyId, updateSupplierInvoiceNotificationCommand, resultContinuation) {
1997
+ CoroutineImpl.call(this, resultContinuation);
1998
+ this.client_1 = client;
1999
+ this.companyId_1 = companyId;
2000
+ this.updateSupplierInvoiceNotificationCommand_1 = updateSupplierInvoiceNotificationCommand;
2001
+ }
2002
+ protoOf($updateInvoiceNotificationOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
2003
+ var suspendResult = this.result_1;
2004
+ $sm: do
2005
+ try {
2006
+ var tmp = this.state_1;
2007
+ switch (tmp) {
2008
+ case 0:
2009
+ this.exceptionState_1 = 2;
2010
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
2011
+ var localVariableBody = this.updateSupplierInvoiceNotificationCommand_1;
2012
+ var localVariableQuery = LinkedHashMap_init_$Create$();
2013
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
2014
+ var tmp0_method = RequestMethod_PUT_getInstance();
2015
+ var tmp1_path = replace('/companies/{companyId}/economy/supplierInvoices/notification', '{companyId}', this.companyId_1.toString());
2016
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
2017
+ this.state_1 = 1;
2018
+ suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
2019
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2020
+ return suspendResult;
2021
+ }
2022
+
2023
+ continue $sm;
2024
+ case 1:
2025
+ var this_0 = suspendResult;
2026
+ var tmp_0 = getKClass(Unit);
2027
+ var tmp_1 = null instanceof Unit;
2028
+ var tmp_2;
2029
+ try {
2030
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
2031
+ } catch ($p) {
2032
+ var tmp_3;
2033
+ if ($p instanceof Error) {
2034
+ var _unused_var__etf5q3 = $p;
2035
+ tmp_3 = null;
2036
+ } else {
2037
+ throw $p;
2038
+ }
2039
+ tmp_2 = tmp_3;
2040
+ }
2041
+
2042
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
2043
+ case 2:
2044
+ throw this.exception_1;
2045
+ }
2046
+ } catch ($p_0) {
2047
+ var e = $p_0;
2048
+ if (this.exceptionState_1 === 2) {
2049
+ throw e;
2050
+ } else {
2051
+ this.state_1 = this.exceptionState_1;
2052
+ this.exception_1 = e;
2053
+ }
2054
+ }
2055
+ while (true);
1998
2056
  };
1999
- protoOf(InvoiceApi).updateInvoiceRealtimeNotification = function (companyId, updateRealtimeSupplierInvoiceNotificationCommand) {
2000
- var tmp = this;
2057
+ function updateInvoiceRealtimeNotificationOperation(client, companyId, updateRealtimeSupplierInvoiceNotificationCommand) {
2001
2058
  return promisify(function ($completion) {
2002
- return tmp.updateInvoiceRealtimeNotification_ccf05c_k$(companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
2059
+ return updateInvoiceRealtimeNotificationOperation_0(client, companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
2003
2060
  });
2004
- };
2005
- protoOf(InvoiceApi).updateInvoiceRealtimeNotification$suspendBridge_kdrytb_k$ = function (companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion) {
2006
- var tmp = new $updateInvoiceRealtimeNotification$suspendBridgeCOROUTINE$(this, companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
2061
+ }
2062
+ function updateInvoiceRealtimeNotificationOperation_0(client, companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion) {
2063
+ var tmp = new $updateInvoiceRealtimeNotificationOperationCOROUTINE$(client, companyId, updateRealtimeSupplierInvoiceNotificationCommand, $completion);
2007
2064
  tmp.result_1 = Unit_instance;
2008
2065
  tmp.exception_1 = null;
2009
2066
  return tmp.doResume_5yljmg_k$();
2010
- };
2011
- function InvoiceApi() {
2012
2067
  }
2068
+ function $updateInvoiceRealtimeNotificationOperationCOROUTINE$(client, companyId, updateRealtimeSupplierInvoiceNotificationCommand, resultContinuation) {
2069
+ CoroutineImpl.call(this, resultContinuation);
2070
+ this.client_1 = client;
2071
+ this.companyId_1 = companyId;
2072
+ this.updateRealtimeSupplierInvoiceNotificationCommand_1 = updateRealtimeSupplierInvoiceNotificationCommand;
2073
+ }
2074
+ protoOf($updateInvoiceRealtimeNotificationOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
2075
+ var suspendResult = this.result_1;
2076
+ $sm: do
2077
+ try {
2078
+ var tmp = this.state_1;
2079
+ switch (tmp) {
2080
+ case 0:
2081
+ this.exceptionState_1 = 2;
2082
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
2083
+ var localVariableBody = this.updateRealtimeSupplierInvoiceNotificationCommand_1;
2084
+ var localVariableQuery = LinkedHashMap_init_$Create$();
2085
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
2086
+ var tmp0_method = RequestMethod_PUT_getInstance();
2087
+ var tmp1_path = replace('/companies/{companyId}/economy/supplierInvoices/realtimeNotification', '{companyId}', this.companyId_1.toString());
2088
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
2089
+ this.state_1 = 1;
2090
+ suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
2091
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2092
+ return suspendResult;
2093
+ }
2094
+
2095
+ continue $sm;
2096
+ case 1:
2097
+ var this_0 = suspendResult;
2098
+ var tmp_0 = getKClass(Unit);
2099
+ var tmp_1 = null instanceof Unit;
2100
+ var tmp_2;
2101
+ try {
2102
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
2103
+ } catch ($p) {
2104
+ var tmp_3;
2105
+ if ($p instanceof Error) {
2106
+ var _unused_var__etf5q3 = $p;
2107
+ tmp_3 = null;
2108
+ } else {
2109
+ throw $p;
2110
+ }
2111
+ tmp_2 = tmp_3;
2112
+ }
2113
+
2114
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
2115
+ case 2:
2116
+ throw this.exception_1;
2117
+ }
2118
+ } catch ($p_0) {
2119
+ var e = $p_0;
2120
+ if (this.exceptionState_1 === 2) {
2121
+ throw e;
2122
+ } else {
2123
+ this.state_1 = this.exceptionState_1;
2124
+ this.exception_1 = e;
2125
+ }
2126
+ }
2127
+ while (true);
2128
+ };
2013
2129
  function Companion() {
2014
2130
  }
2015
2131
  var Companion_instance;
@@ -3330,6 +3446,19 @@ InvoiceApi.createWithClient = createWithClient;
3330
3446
  export {
3331
3447
  invoiceApi as invoiceApi,
3332
3448
  InvoiceApi as InvoiceApi,
3449
+ createInvoiceApprovalOperation as createInvoiceApprovalOperation,
3450
+ createInvoiceNoticeOperation as createInvoiceNoticeOperation,
3451
+ createInvoiceRejectionOperation as createInvoiceRejectionOperation,
3452
+ indexCachedApprovalCountsOperation as indexCachedApprovalCountsOperation,
3453
+ indexInvoiceCountOperation as indexInvoiceCountOperation,
3454
+ indexInvoiceOperation as indexInvoiceOperation,
3455
+ indexInvoiceUnattestedCountOperation as indexInvoiceUnattestedCountOperation,
3456
+ indexSupplierInvoicesUserOperation as indexSupplierInvoicesUserOperation,
3457
+ showAccountingAvailabilityOperation as showAccountingAvailabilityOperation,
3458
+ showInvoiceNotificationOperation as showInvoiceNotificationOperation,
3459
+ showInvoicePdfOperation as showInvoicePdfOperation,
3460
+ updateInvoiceNotificationOperation as updateInvoiceNotificationOperation,
3461
+ updateInvoiceRealtimeNotificationOperation as updateInvoiceRealtimeNotificationOperation,
3333
3462
  ApproveSupplierInvoiceCommand as ApproveSupplierInvoiceCommand,
3334
3463
  CreateSupplierInvoiceNotificationCommand as CreateSupplierInvoiceNotificationCommand,
3335
3464
  RejectSupplierInvoiceCommand as RejectSupplierInvoiceCommand,