@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,
@@ -43,6 +43,7 @@ import {
43
43
  Companion_getInstance1if1t4zy98q04 as Companion_getInstance,
44
44
  ApiClient_init_$Init$1zeqbeizsm394 as ApiClient_init_$Init$,
45
45
  ApiClient_init_$Init$38ftv1s10hf6v as ApiClient_init_$Init$_0,
46
+ ApiClient2azxax1pjdtdm as ApiClient,
46
47
  RequestMethod_POST_getInstance29fppyvplo8n0 as RequestMethod_POST_getInstance,
47
48
  RequestConfig10esd7ix0dbbm as RequestConfig,
48
49
  TypedBodyProvider2ertybblisp23 as TypedBodyProvider,
@@ -50,7 +51,6 @@ import {
50
51
  RequestMethod_DELETE_getInstance298derfb6aued as RequestMethod_DELETE_getInstance,
51
52
  toMultiValue5gsdsvx60e2f as toMultiValue,
52
53
  RequestMethod_GET_getInstance1hbf807ypkdh8 as RequestMethod_GET_getInstance,
53
- ApiClient2azxax1pjdtdm as ApiClient,
54
54
  $serializer_getInstancernln83sjtidj as $serializer_getInstance,
55
55
  $serializer_getInstance2u6e9d36lcolu as $serializer_getInstance_0,
56
56
  $serializer_getInstance2ubvlf5l752ie as $serializer_getInstance_1,
@@ -78,27 +78,27 @@ import { LocalDateSerializer_getInstance3qg2c8779i3ej as LocalDateSerializer_get
78
78
  var imul = Math.imul;
79
79
  //endregion
80
80
  //region block: pre-declaration
81
- initMetadataForCoroutine($acceptExpenseCOROUTINE$, CoroutineImpl);
82
81
  initMetadataForCoroutine($acceptExpense$suspendBridgeCOROUTINE$, CoroutineImpl);
83
- initMetadataForCoroutine($createExpenseCOROUTINE$, CoroutineImpl);
84
82
  initMetadataForCoroutine($createExpense$suspendBridgeCOROUTINE$, CoroutineImpl);
85
- initMetadataForCoroutine($deleteExpenseCOROUTINE$, CoroutineImpl);
86
83
  initMetadataForCoroutine($deleteExpense$suspendBridgeCOROUTINE$, CoroutineImpl);
87
- initMetadataForCoroutine($indexExpenseCOROUTINE$, CoroutineImpl);
88
84
  initMetadataForCoroutine($indexExpense$suspendBridgeCOROUTINE$, CoroutineImpl);
89
- initMetadataForCoroutine($indexExpenseTypesCOROUTINE$, CoroutineImpl);
90
85
  initMetadataForCoroutine($indexExpenseTypes$suspendBridgeCOROUTINE$, CoroutineImpl);
91
- initMetadataForCoroutine($indexExpenseUnattestedCOROUTINE$, CoroutineImpl);
92
86
  initMetadataForCoroutine($indexExpenseUnattested$suspendBridgeCOROUTINE$, CoroutineImpl);
93
- initMetadataForCoroutine($indexExpenseUserCOROUTINE$, CoroutineImpl);
94
87
  initMetadataForCoroutine($indexExpenseUser$suspendBridgeCOROUTINE$, CoroutineImpl);
95
- initMetadataForCoroutine($rejectExpenseCOROUTINE$, CoroutineImpl);
96
88
  initMetadataForCoroutine($rejectExpense$suspendBridgeCOROUTINE$, CoroutineImpl);
97
- initMetadataForCoroutine($remindExpenseCOROUTINE$, CoroutineImpl);
98
89
  initMetadataForCoroutine($remindExpense$suspendBridgeCOROUTINE$, CoroutineImpl);
99
- initMetadataForCoroutine($showExpenseCOROUTINE$, CoroutineImpl);
100
90
  initMetadataForCoroutine($showExpense$suspendBridgeCOROUTINE$, CoroutineImpl);
101
91
  initMetadataForClass(ExpenseApi, 'ExpenseApi', create, ApiClient, VOID, [2, 9, 5, 3]);
92
+ initMetadataForCoroutine($acceptExpenseOperationCOROUTINE$, CoroutineImpl);
93
+ initMetadataForCoroutine($createExpenseOperationCOROUTINE$, CoroutineImpl);
94
+ initMetadataForCoroutine($deleteExpenseOperationCOROUTINE$, CoroutineImpl);
95
+ initMetadataForCoroutine($indexExpenseOperationCOROUTINE$, CoroutineImpl);
96
+ initMetadataForCoroutine($indexExpenseTypesOperationCOROUTINE$, CoroutineImpl);
97
+ initMetadataForCoroutine($indexExpenseUnattestedOperationCOROUTINE$, CoroutineImpl);
98
+ initMetadataForCoroutine($indexExpenseUserOperationCOROUTINE$, CoroutineImpl);
99
+ initMetadataForCoroutine($rejectExpenseOperationCOROUTINE$, CoroutineImpl);
100
+ initMetadataForCoroutine($remindExpenseOperationCOROUTINE$, CoroutineImpl);
101
+ initMetadataForCoroutine($showExpenseOperationCOROUTINE$, CoroutineImpl);
102
102
  initMetadataForCompanion(Companion);
103
103
  initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
104
104
  initMetadataForClass(CreateExpenseCommand, 'CreateExpenseCommand', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_2});
@@ -161,59 +161,52 @@ function ExpenseApi_init_$Init$_0(baseUrl, httpClient, $this) {
161
161
  function createWithClient(baseUrl, httpClient) {
162
162
  return ExpenseApi_init_$Init$_0(baseUrl, httpClient, objectCreate(protoOf(ExpenseApi)));
163
163
  }
164
- function $acceptExpenseCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
164
+ function $acceptExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
165
165
  CoroutineImpl.call(this, resultContinuation);
166
166
  this._this__u8e3s4__1 = _this__u8e3s4;
167
167
  this.companyId_1 = companyId;
168
168
  this.expenseId_1 = expenseId;
169
169
  }
170
- protoOf($acceptExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
170
+ protoOf($acceptExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
171
171
  var suspendResult = this.result_1;
172
172
  $sm: do
173
173
  try {
174
174
  var tmp = this.state_1;
175
175
  switch (tmp) {
176
176
  case 0:
177
- this.exceptionState_1 = 2;
178
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
179
- var localVariableBody = EmptyContent_getInstance();
180
- var localVariableQuery = LinkedHashMap_init_$Create$();
181
- var localVariableHeaders = LinkedHashMap_init_$Create$();
182
- var tmp0_method = RequestMethod_POST_getInstance();
183
- var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}/approve', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
184
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
185
- this.state_1 = 1;
186
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
187
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
188
- return suspendResult;
189
- }
190
-
191
- continue $sm;
192
- case 1:
193
- var this_0 = suspendResult;
194
- var tmp_0 = getKClass(Unit);
195
- var tmp_1 = null instanceof Unit;
196
- var tmp_2;
197
- try {
198
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
199
- } catch ($p) {
200
- var tmp_3;
201
- if ($p instanceof Error) {
202
- var _unused_var__etf5q3 = $p;
203
- tmp_3 = null;
204
- } else {
205
- throw $p;
177
+ this.exceptionState_1 = 4;
178
+ if (this._this__u8e3s4__1.acceptExpense === protoOf(ExpenseApi).acceptExpense) {
179
+ this.state_1 = 2;
180
+ suspendResult = this._this__u8e3s4__1.acceptExpense_z1y8us_k$(this.companyId_1, this.expenseId_1, this);
181
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
182
+ return suspendResult;
206
183
  }
207
- tmp_2 = tmp_3;
184
+ continue $sm;
185
+ } else {
186
+ this.state_1 = 1;
187
+ suspendResult = await_0(this._this__u8e3s4__1.acceptExpense(this.companyId_1, this.expenseId_1), this);
188
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
189
+ return suspendResult;
190
+ }
191
+ continue $sm;
208
192
  }
209
193
 
210
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
194
+ case 1:
195
+ this.WHEN_RESULT0__1 = suspendResult;
196
+ this.state_1 = 3;
197
+ continue $sm;
211
198
  case 2:
199
+ this.WHEN_RESULT0__1 = suspendResult;
200
+ this.state_1 = 3;
201
+ continue $sm;
202
+ case 3:
203
+ return this.WHEN_RESULT0__1;
204
+ case 4:
212
205
  throw this.exception_1;
213
206
  }
214
- } catch ($p_0) {
215
- var e = $p_0;
216
- if (this.exceptionState_1 === 2) {
207
+ } catch ($p) {
208
+ var e = $p;
209
+ if (this.exceptionState_1 === 4) {
217
210
  throw e;
218
211
  } else {
219
212
  this.state_1 = this.exceptionState_1;
@@ -222,13 +215,13 @@ protoOf($acceptExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
222
215
  }
223
216
  while (true);
224
217
  };
225
- function $acceptExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
218
+ function $createExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, createExpenseCommand, resultContinuation) {
226
219
  CoroutineImpl.call(this, resultContinuation);
227
220
  this._this__u8e3s4__1 = _this__u8e3s4;
228
221
  this.companyId_1 = companyId;
229
- this.expenseId_1 = expenseId;
222
+ this.createExpenseCommand_1 = createExpenseCommand;
230
223
  }
231
- protoOf($acceptExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
224
+ protoOf($createExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
232
225
  var suspendResult = this.result_1;
233
226
  $sm: do
234
227
  try {
@@ -236,16 +229,16 @@ protoOf($acceptExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
236
229
  switch (tmp) {
237
230
  case 0:
238
231
  this.exceptionState_1 = 4;
239
- if (this._this__u8e3s4__1.acceptExpense === protoOf(ExpenseApi).acceptExpense) {
232
+ if (this._this__u8e3s4__1.createExpense === protoOf(ExpenseApi).createExpense) {
240
233
  this.state_1 = 2;
241
- suspendResult = this._this__u8e3s4__1.acceptExpense_z1y8us_k$(this.companyId_1, this.expenseId_1, this);
234
+ suspendResult = this._this__u8e3s4__1.createExpense_tm55ft_k$(this.companyId_1, this.createExpenseCommand_1, this);
242
235
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
243
236
  return suspendResult;
244
237
  }
245
238
  continue $sm;
246
239
  } else {
247
240
  this.state_1 = 1;
248
- suspendResult = await_0(this._this__u8e3s4__1.acceptExpense(this.companyId_1, this.expenseId_1), this);
241
+ suspendResult = await_0(this._this__u8e3s4__1.createExpense(this.companyId_1, this.createExpenseCommand_1), this);
249
242
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
250
243
  return suspendResult;
251
244
  }
@@ -276,59 +269,52 @@ protoOf($acceptExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
276
269
  }
277
270
  while (true);
278
271
  };
279
- function $createExpenseCOROUTINE$(_this__u8e3s4, companyId, createExpenseCommand, resultContinuation) {
272
+ function $deleteExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
280
273
  CoroutineImpl.call(this, resultContinuation);
281
274
  this._this__u8e3s4__1 = _this__u8e3s4;
282
275
  this.companyId_1 = companyId;
283
- this.createExpenseCommand_1 = createExpenseCommand;
276
+ this.expenseId_1 = expenseId;
284
277
  }
285
- protoOf($createExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
278
+ protoOf($deleteExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
286
279
  var suspendResult = this.result_1;
287
280
  $sm: do
288
281
  try {
289
282
  var tmp = this.state_1;
290
283
  switch (tmp) {
291
284
  case 0:
292
- this.exceptionState_1 = 2;
293
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
294
- var localVariableBody = this.createExpenseCommand_1;
295
- var localVariableQuery = LinkedHashMap_init_$Create$();
296
- var localVariableHeaders = LinkedHashMap_init_$Create$();
297
- var tmp0_method = RequestMethod_POST_getInstance();
298
- var tmp1_path = replace('/companies/{companyId}/economy/expense', '{companyId}', this.companyId_1.toString());
299
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
300
- this.state_1 = 1;
301
- suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
302
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
303
- return suspendResult;
304
- }
305
-
306
- continue $sm;
307
- case 1:
308
- var this_0 = suspendResult;
309
- var tmp_0 = getKClass(Expense);
310
- var tmp_1 = null instanceof Expense;
311
- var tmp_2;
312
- try {
313
- tmp_2 = createKType(getKClass(Expense), arrayOf([]), false);
314
- } catch ($p) {
315
- var tmp_3;
316
- if ($p instanceof Error) {
317
- var _unused_var__etf5q3 = $p;
318
- tmp_3 = null;
319
- } else {
320
- throw $p;
285
+ this.exceptionState_1 = 4;
286
+ if (this._this__u8e3s4__1.deleteExpense === protoOf(ExpenseApi).deleteExpense) {
287
+ this.state_1 = 2;
288
+ suspendResult = this._this__u8e3s4__1.deleteExpense_wooht5_k$(this.companyId_1, this.expenseId_1, this);
289
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
290
+ return suspendResult;
321
291
  }
322
- tmp_2 = tmp_3;
292
+ continue $sm;
293
+ } else {
294
+ this.state_1 = 1;
295
+ suspendResult = await_0(this._this__u8e3s4__1.deleteExpense(this.companyId_1, this.expenseId_1), this);
296
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
297
+ return suspendResult;
298
+ }
299
+ continue $sm;
323
300
  }
324
301
 
325
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
302
+ case 1:
303
+ this.WHEN_RESULT0__1 = suspendResult;
304
+ this.state_1 = 3;
305
+ continue $sm;
326
306
  case 2:
307
+ this.WHEN_RESULT0__1 = suspendResult;
308
+ this.state_1 = 3;
309
+ continue $sm;
310
+ case 3:
311
+ return this.WHEN_RESULT0__1;
312
+ case 4:
327
313
  throw this.exception_1;
328
314
  }
329
- } catch ($p_0) {
330
- var e = $p_0;
331
- if (this.exceptionState_1 === 2) {
315
+ } catch ($p) {
316
+ var e = $p;
317
+ if (this.exceptionState_1 === 4) {
332
318
  throw e;
333
319
  } else {
334
320
  this.state_1 = this.exceptionState_1;
@@ -337,13 +323,20 @@ protoOf($createExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
337
323
  }
338
324
  while (true);
339
325
  };
340
- function $createExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, createExpenseCommand, resultContinuation) {
326
+ function $indexExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
341
327
  CoroutineImpl.call(this, resultContinuation);
342
328
  this._this__u8e3s4__1 = _this__u8e3s4;
343
329
  this.companyId_1 = companyId;
344
- this.createExpenseCommand_1 = createExpenseCommand;
330
+ this.search_1 = search;
331
+ this.status_1 = status;
332
+ this.dateOfPurchaseFrom_1 = dateOfPurchaseFrom;
333
+ this.dateOfPurchaseTo_1 = dateOfPurchaseTo;
334
+ this.fields_1 = fields;
335
+ this.pageToken_1 = pageToken;
336
+ this.autoPaginate_1 = autoPaginate;
337
+ this.count_1 = count;
345
338
  }
346
- protoOf($createExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
339
+ protoOf($indexExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
347
340
  var suspendResult = this.result_1;
348
341
  $sm: do
349
342
  try {
@@ -351,16 +344,16 @@ protoOf($createExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
351
344
  switch (tmp) {
352
345
  case 0:
353
346
  this.exceptionState_1 = 4;
354
- if (this._this__u8e3s4__1.createExpense === protoOf(ExpenseApi).createExpense) {
347
+ if (this._this__u8e3s4__1.indexExpense === protoOf(ExpenseApi).indexExpense) {
355
348
  this.state_1 = 2;
356
- suspendResult = this._this__u8e3s4__1.createExpense_tm55ft_k$(this.companyId_1, this.createExpenseCommand_1, this);
349
+ suspendResult = this._this__u8e3s4__1.indexExpense$default_tniyce_k$(this.companyId_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
357
350
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
358
351
  return suspendResult;
359
352
  }
360
353
  continue $sm;
361
354
  } else {
362
355
  this.state_1 = 1;
363
- suspendResult = await_0(this._this__u8e3s4__1.createExpense(this.companyId_1, this.createExpenseCommand_1), this);
356
+ suspendResult = await_0(this._this__u8e3s4__1.indexExpense(this.companyId_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
364
357
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
365
358
  return suspendResult;
366
359
  }
@@ -391,59 +384,55 @@ protoOf($createExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
391
384
  }
392
385
  while (true);
393
386
  };
394
- function $deleteExpenseCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
387
+ function $indexExpenseTypes$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, pageToken, autoPaginate, count, resultContinuation) {
395
388
  CoroutineImpl.call(this, resultContinuation);
396
389
  this._this__u8e3s4__1 = _this__u8e3s4;
397
390
  this.companyId_1 = companyId;
398
- this.expenseId_1 = expenseId;
391
+ this.fields_1 = fields;
392
+ this.pageToken_1 = pageToken;
393
+ this.autoPaginate_1 = autoPaginate;
394
+ this.count_1 = count;
399
395
  }
400
- protoOf($deleteExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
396
+ protoOf($indexExpenseTypes$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
401
397
  var suspendResult = this.result_1;
402
398
  $sm: do
403
399
  try {
404
400
  var tmp = this.state_1;
405
401
  switch (tmp) {
406
402
  case 0:
407
- this.exceptionState_1 = 2;
408
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
409
- var localVariableBody = EmptyContent_getInstance();
410
- var localVariableQuery = LinkedHashMap_init_$Create$();
411
- var localVariableHeaders = LinkedHashMap_init_$Create$();
412
- var tmp0_method = RequestMethod_DELETE_getInstance();
413
- var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
414
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
415
- this.state_1 = 1;
416
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
417
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
418
- return suspendResult;
419
- }
420
-
421
- continue $sm;
422
- case 1:
423
- var this_0 = suspendResult;
424
- var tmp_0 = getKClass(Unit);
425
- var tmp_1 = null instanceof Unit;
426
- var tmp_2;
427
- try {
428
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
429
- } catch ($p) {
430
- var tmp_3;
431
- if ($p instanceof Error) {
432
- var _unused_var__etf5q3 = $p;
433
- tmp_3 = null;
434
- } else {
435
- throw $p;
403
+ this.exceptionState_1 = 4;
404
+ if (this._this__u8e3s4__1.indexExpenseTypes === protoOf(ExpenseApi).indexExpenseTypes) {
405
+ this.state_1 = 2;
406
+ suspendResult = this._this__u8e3s4__1.indexExpenseTypes$default_vl01zw_k$(this.companyId_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
407
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
408
+ return suspendResult;
436
409
  }
437
- tmp_2 = tmp_3;
410
+ continue $sm;
411
+ } else {
412
+ this.state_1 = 1;
413
+ suspendResult = await_0(this._this__u8e3s4__1.indexExpenseTypes(this.companyId_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
414
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
415
+ return suspendResult;
416
+ }
417
+ continue $sm;
438
418
  }
439
419
 
440
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
420
+ case 1:
421
+ this.WHEN_RESULT0__1 = suspendResult;
422
+ this.state_1 = 3;
423
+ continue $sm;
441
424
  case 2:
425
+ this.WHEN_RESULT0__1 = suspendResult;
426
+ this.state_1 = 3;
427
+ continue $sm;
428
+ case 3:
429
+ return this.WHEN_RESULT0__1;
430
+ case 4:
442
431
  throw this.exception_1;
443
432
  }
444
- } catch ($p_0) {
445
- var e = $p_0;
446
- if (this.exceptionState_1 === 2) {
433
+ } catch ($p) {
434
+ var e = $p;
435
+ if (this.exceptionState_1 === 4) {
447
436
  throw e;
448
437
  } else {
449
438
  this.state_1 = this.exceptionState_1;
@@ -452,13 +441,13 @@ protoOf($deleteExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
452
441
  }
453
442
  while (true);
454
443
  };
455
- function $deleteExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
444
+ function $indexExpenseUnattested$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
456
445
  CoroutineImpl.call(this, resultContinuation);
457
446
  this._this__u8e3s4__1 = _this__u8e3s4;
458
447
  this.companyId_1 = companyId;
459
- this.expenseId_1 = expenseId;
448
+ this.fields_1 = fields;
460
449
  }
461
- protoOf($deleteExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
450
+ protoOf($indexExpenseUnattested$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
462
451
  var suspendResult = this.result_1;
463
452
  $sm: do
464
453
  try {
@@ -466,16 +455,16 @@ protoOf($deleteExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
466
455
  switch (tmp) {
467
456
  case 0:
468
457
  this.exceptionState_1 = 4;
469
- if (this._this__u8e3s4__1.deleteExpense === protoOf(ExpenseApi).deleteExpense) {
458
+ if (this._this__u8e3s4__1.indexExpenseUnattested === protoOf(ExpenseApi).indexExpenseUnattested) {
470
459
  this.state_1 = 2;
471
- suspendResult = this._this__u8e3s4__1.deleteExpense_wooht5_k$(this.companyId_1, this.expenseId_1, this);
460
+ suspendResult = this._this__u8e3s4__1.indexExpenseUnattested$default_7vhio1_k$(this.companyId_1, this.fields_1, this);
472
461
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
473
462
  return suspendResult;
474
463
  }
475
464
  continue $sm;
476
465
  } else {
477
466
  this.state_1 = 1;
478
- suspendResult = await_0(this._this__u8e3s4__1.deleteExpense(this.companyId_1, this.expenseId_1), this);
467
+ suspendResult = await_0(this._this__u8e3s4__1.indexExpenseUnattested(this.companyId_1, this.fields_1), this);
479
468
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
480
469
  return suspendResult;
481
470
  }
@@ -506,10 +495,10 @@ protoOf($deleteExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
506
495
  }
507
496
  while (true);
508
497
  };
509
- function $indexExpenseCOROUTINE$(_this__u8e3s4, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
498
+ function $indexExpenseUser$suspendBridgeCOROUTINE$(_this__u8e3s4, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
510
499
  CoroutineImpl.call(this, resultContinuation);
511
500
  this._this__u8e3s4__1 = _this__u8e3s4;
512
- this.companyId_1 = companyId;
501
+ this.companyIds_1 = companyIds;
513
502
  this.search_1 = search;
514
503
  this.status_1 = status;
515
504
  this.dateOfPurchaseFrom_1 = dateOfPurchaseFrom;
@@ -519,114 +508,46 @@ function $indexExpenseCOROUTINE$(_this__u8e3s4, companyId, search, status, dateO
519
508
  this.autoPaginate_1 = autoPaginate;
520
509
  this.count_1 = count;
521
510
  }
522
- protoOf($indexExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
511
+ protoOf($indexExpenseUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
523
512
  var suspendResult = this.result_1;
524
513
  $sm: do
525
514
  try {
526
515
  var tmp = this.state_1;
527
516
  switch (tmp) {
528
517
  case 0:
529
- this.exceptionState_1 = 2;
530
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
531
- var localVariableBody = EmptyContent_getInstance();
532
- var localVariableQuery = LinkedHashMap_init_$Create$();
533
- if (this.search_1 == null)
534
- null;
535
- else {
536
- var value = listOf_0(this.search_1);
537
- localVariableQuery.put_4fpzoq_k$('search', value);
538
- }
539
-
540
- var tmp1_safe_receiver = this.status_1;
541
- if (tmp1_safe_receiver == null)
542
- null;
543
- else {
544
- var value_0 = toMultiValue(tmp1_safe_receiver, 'multi');
545
- localVariableQuery.put_4fpzoq_k$('status', value_0);
546
- }
547
-
548
- if (this.dateOfPurchaseFrom_1 == null)
549
- null;
550
- else {
551
- var tmp2 = 'dateOfPurchaseFrom';
552
- var value_1 = listOf_0(this.dateOfPurchaseFrom_1.toString());
553
- localVariableQuery.put_4fpzoq_k$(tmp2, value_1);
554
- }
555
-
556
- if (this.dateOfPurchaseTo_1 == null)
557
- null;
558
- else {
559
- var tmp2_0 = 'dateOfPurchaseTo';
560
- var value_2 = listOf_0(this.dateOfPurchaseTo_1.toString());
561
- localVariableQuery.put_4fpzoq_k$(tmp2_0, value_2);
562
- }
563
-
564
- if (this.fields_1 == null)
565
- null;
566
- else {
567
- var value_3 = listOf_0(this.fields_1);
568
- localVariableQuery.put_4fpzoq_k$('fields', value_3);
569
- }
570
-
571
- if (this.pageToken_1 == null)
572
- null;
573
- else {
574
- var tmp2_1 = 'pageToken';
575
- var value_4 = listOf_0(this.pageToken_1);
576
- localVariableQuery.put_4fpzoq_k$(tmp2_1, value_4);
577
- }
578
-
579
- if (this.autoPaginate_1 == null)
580
- null;
581
- else {
582
- var tmp2_2 = 'autoPaginate';
583
- var value_5 = listOf_0('' + this.autoPaginate_1);
584
- localVariableQuery.put_4fpzoq_k$(tmp2_2, value_5);
585
- }
586
-
587
- if (this.count_1 == null)
588
- null;
589
- else {
590
- var value_6 = listOf_0('' + this.count_1);
591
- localVariableQuery.put_4fpzoq_k$('count', value_6);
592
- }
593
-
594
- var localVariableHeaders = LinkedHashMap_init_$Create$();
595
- var tmp8_method = RequestMethod_GET_getInstance();
596
- var tmp9_path = replace('/companies/{companyId}/economy/expense', '{companyId}', this.companyId_1.toString());
597
- var localVariableConfig = new RequestConfig(tmp8_method, tmp9_path, localVariableHeaders, VOID, localVariableQuery, true);
598
- this.state_1 = 1;
599
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
600
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
601
- return suspendResult;
602
- }
603
-
604
- continue $sm;
605
- case 1:
606
- var this_0 = suspendResult;
607
- var tmp_0 = getKClass(PagedListExpense);
608
- var tmp_1 = null instanceof PagedListExpense;
609
- var tmp_2;
610
- try {
611
- tmp_2 = createKType(getKClass(PagedListExpense), arrayOf([]), false);
612
- } catch ($p) {
613
- var tmp_3;
614
- if ($p instanceof Error) {
615
- var _unused_var__etf5q3 = $p;
616
- tmp_3 = null;
617
- } else {
618
- throw $p;
518
+ this.exceptionState_1 = 4;
519
+ if (this._this__u8e3s4__1.indexExpenseUser === protoOf(ExpenseApi).indexExpenseUser) {
520
+ this.state_1 = 2;
521
+ suspendResult = this._this__u8e3s4__1.indexExpenseUser$default_ub788j_k$(this.companyIds_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
522
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
523
+ return suspendResult;
619
524
  }
620
- tmp_2 = tmp_3;
525
+ continue $sm;
526
+ } else {
527
+ this.state_1 = 1;
528
+ suspendResult = await_0(this._this__u8e3s4__1.indexExpenseUser(this.companyIds_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
529
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
530
+ return suspendResult;
531
+ }
532
+ continue $sm;
621
533
  }
622
534
 
623
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
535
+ case 1:
536
+ this.WHEN_RESULT0__1 = suspendResult;
537
+ this.state_1 = 3;
538
+ continue $sm;
624
539
  case 2:
540
+ this.WHEN_RESULT0__1 = suspendResult;
541
+ this.state_1 = 3;
542
+ continue $sm;
543
+ case 3:
544
+ return this.WHEN_RESULT0__1;
545
+ case 4:
625
546
  throw this.exception_1;
626
547
  }
627
- } catch ($p_0) {
628
- var e = $p_0;
629
- if (this.exceptionState_1 === 2) {
548
+ } catch ($p) {
549
+ var e = $p;
550
+ if (this.exceptionState_1 === 4) {
630
551
  throw e;
631
552
  } else {
632
553
  this.state_1 = this.exceptionState_1;
@@ -635,20 +556,14 @@ protoOf($indexExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
635
556
  }
636
557
  while (true);
637
558
  };
638
- function $indexExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
559
+ function $rejectExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, rejectExpenseCommand, resultContinuation) {
639
560
  CoroutineImpl.call(this, resultContinuation);
640
561
  this._this__u8e3s4__1 = _this__u8e3s4;
641
562
  this.companyId_1 = companyId;
642
- this.search_1 = search;
643
- this.status_1 = status;
644
- this.dateOfPurchaseFrom_1 = dateOfPurchaseFrom;
645
- this.dateOfPurchaseTo_1 = dateOfPurchaseTo;
646
- this.fields_1 = fields;
647
- this.pageToken_1 = pageToken;
648
- this.autoPaginate_1 = autoPaginate;
649
- this.count_1 = count;
563
+ this.expenseId_1 = expenseId;
564
+ this.rejectExpenseCommand_1 = rejectExpenseCommand;
650
565
  }
651
- protoOf($indexExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
566
+ protoOf($rejectExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
652
567
  var suspendResult = this.result_1;
653
568
  $sm: do
654
569
  try {
@@ -656,16 +571,16 @@ protoOf($indexExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
656
571
  switch (tmp) {
657
572
  case 0:
658
573
  this.exceptionState_1 = 4;
659
- if (this._this__u8e3s4__1.indexExpense === protoOf(ExpenseApi).indexExpense) {
574
+ if (this._this__u8e3s4__1.rejectExpense === protoOf(ExpenseApi).rejectExpense) {
660
575
  this.state_1 = 2;
661
- suspendResult = this._this__u8e3s4__1.indexExpense$default_tniyce_k$(this.companyId_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
576
+ suspendResult = this._this__u8e3s4__1.rejectExpense_wr6zla_k$(this.companyId_1, this.expenseId_1, this.rejectExpenseCommand_1, this);
662
577
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
663
578
  return suspendResult;
664
579
  }
665
580
  continue $sm;
666
581
  } else {
667
582
  this.state_1 = 1;
668
- suspendResult = await_0(this._this__u8e3s4__1.indexExpense(this.companyId_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
583
+ suspendResult = await_0(this._this__u8e3s4__1.rejectExpense(this.companyId_1, this.expenseId_1, this.rejectExpenseCommand_1), this);
669
584
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
670
585
  return suspendResult;
671
586
  }
@@ -696,92 +611,52 @@ protoOf($indexExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
696
611
  }
697
612
  while (true);
698
613
  };
699
- function $indexExpenseTypesCOROUTINE$(_this__u8e3s4, companyId, fields, pageToken, autoPaginate, count, resultContinuation) {
614
+ function $remindExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
700
615
  CoroutineImpl.call(this, resultContinuation);
701
616
  this._this__u8e3s4__1 = _this__u8e3s4;
702
617
  this.companyId_1 = companyId;
703
- this.fields_1 = fields;
704
- this.pageToken_1 = pageToken;
705
- this.autoPaginate_1 = autoPaginate;
706
- this.count_1 = count;
618
+ this.expenseId_1 = expenseId;
707
619
  }
708
- protoOf($indexExpenseTypesCOROUTINE$).doResume_5yljmg_k$ = function () {
620
+ protoOf($remindExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
709
621
  var suspendResult = this.result_1;
710
622
  $sm: do
711
623
  try {
712
624
  var tmp = this.state_1;
713
625
  switch (tmp) {
714
626
  case 0:
715
- this.exceptionState_1 = 2;
716
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
717
- var localVariableBody = EmptyContent_getInstance();
718
- var localVariableQuery = LinkedHashMap_init_$Create$();
719
- if (this.fields_1 == null)
720
- null;
721
- else {
722
- var value = listOf_0(this.fields_1);
723
- localVariableQuery.put_4fpzoq_k$('fields', value);
724
- }
725
-
726
- if (this.pageToken_1 == null)
727
- null;
728
- else {
729
- var tmp2 = 'pageToken';
730
- var value_0 = listOf_0(this.pageToken_1);
731
- localVariableQuery.put_4fpzoq_k$(tmp2, value_0);
732
- }
733
-
734
- if (this.autoPaginate_1 == null)
735
- null;
736
- else {
737
- var tmp2_0 = 'autoPaginate';
738
- var value_1 = listOf_0('' + this.autoPaginate_1);
739
- localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
740
- }
741
-
742
- if (this.count_1 == null)
743
- null;
744
- else {
745
- var value_2 = listOf_0('' + this.count_1);
746
- localVariableQuery.put_4fpzoq_k$('count', value_2);
747
- }
748
-
749
- var localVariableHeaders = LinkedHashMap_init_$Create$();
750
- var tmp4_method = RequestMethod_GET_getInstance();
751
- var tmp5_path = replace('/companies/{companyId}/economy/expense/types', '{companyId}', this.companyId_1.toString());
752
- var localVariableConfig = new RequestConfig(tmp4_method, tmp5_path, localVariableHeaders, VOID, localVariableQuery, true);
753
- this.state_1 = 1;
754
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
755
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
756
- return suspendResult;
757
- }
758
-
759
- continue $sm;
760
- case 1:
761
- var this_0 = suspendResult;
762
- var tmp_0 = getKClass(PagedListExpenseType);
763
- var tmp_1 = null instanceof PagedListExpenseType;
764
- var tmp_2;
765
- try {
766
- tmp_2 = createKType(getKClass(PagedListExpenseType), arrayOf([]), false);
767
- } catch ($p) {
768
- var tmp_3;
769
- if ($p instanceof Error) {
770
- var _unused_var__etf5q3 = $p;
771
- tmp_3 = null;
772
- } else {
773
- throw $p;
627
+ this.exceptionState_1 = 4;
628
+ if (this._this__u8e3s4__1.remindExpense === protoOf(ExpenseApi).remindExpense) {
629
+ this.state_1 = 2;
630
+ suspendResult = this._this__u8e3s4__1.remindExpense_gd8i58_k$(this.companyId_1, this.expenseId_1, this);
631
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
632
+ return suspendResult;
774
633
  }
775
- tmp_2 = tmp_3;
634
+ continue $sm;
635
+ } else {
636
+ this.state_1 = 1;
637
+ suspendResult = await_0(this._this__u8e3s4__1.remindExpense(this.companyId_1, this.expenseId_1), this);
638
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
639
+ return suspendResult;
640
+ }
641
+ continue $sm;
776
642
  }
777
643
 
778
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
644
+ case 1:
645
+ this.WHEN_RESULT0__1 = suspendResult;
646
+ this.state_1 = 3;
647
+ continue $sm;
779
648
  case 2:
649
+ this.WHEN_RESULT0__1 = suspendResult;
650
+ this.state_1 = 3;
651
+ continue $sm;
652
+ case 3:
653
+ return this.WHEN_RESULT0__1;
654
+ case 4:
780
655
  throw this.exception_1;
781
656
  }
782
- } catch ($p_0) {
783
- var e = $p_0;
784
- if (this.exceptionState_1 === 2) {
657
+ } catch ($p) {
658
+ var e = $p;
659
+ if (this.exceptionState_1 === 4) {
785
660
  throw e;
786
661
  } else {
787
662
  this.state_1 = this.exceptionState_1;
@@ -790,16 +665,14 @@ protoOf($indexExpenseTypesCOROUTINE$).doResume_5yljmg_k$ = function () {
790
665
  }
791
666
  while (true);
792
667
  };
793
- function $indexExpenseTypes$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, pageToken, autoPaginate, count, resultContinuation) {
668
+ function $showExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, fields, resultContinuation) {
794
669
  CoroutineImpl.call(this, resultContinuation);
795
670
  this._this__u8e3s4__1 = _this__u8e3s4;
796
671
  this.companyId_1 = companyId;
672
+ this.expenseId_1 = expenseId;
797
673
  this.fields_1 = fields;
798
- this.pageToken_1 = pageToken;
799
- this.autoPaginate_1 = autoPaginate;
800
- this.count_1 = count;
801
674
  }
802
- protoOf($indexExpenseTypes$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
675
+ protoOf($showExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
803
676
  var suspendResult = this.result_1;
804
677
  $sm: do
805
678
  try {
@@ -807,16 +680,16 @@ protoOf($indexExpenseTypes$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = functio
807
680
  switch (tmp) {
808
681
  case 0:
809
682
  this.exceptionState_1 = 4;
810
- if (this._this__u8e3s4__1.indexExpenseTypes === protoOf(ExpenseApi).indexExpenseTypes) {
683
+ if (this._this__u8e3s4__1.showExpense === protoOf(ExpenseApi).showExpense) {
811
684
  this.state_1 = 2;
812
- suspendResult = this._this__u8e3s4__1.indexExpenseTypes$default_vl01zw_k$(this.companyId_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
685
+ suspendResult = this._this__u8e3s4__1.showExpense$default_oumpty_k$(this.companyId_1, this.expenseId_1, this.fields_1, this);
813
686
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
814
687
  return suspendResult;
815
688
  }
816
689
  continue $sm;
817
690
  } else {
818
691
  this.state_1 = 1;
819
- suspendResult = await_0(this._this__u8e3s4__1.indexExpenseTypes(this.companyId_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
692
+ suspendResult = await_0(this._this__u8e3s4__1.showExpense(this.companyId_1, this.expenseId_1, this.fields_1), this);
820
693
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
821
694
  return suspendResult;
822
695
  }
@@ -847,14 +720,215 @@ protoOf($indexExpenseTypes$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = functio
847
720
  }
848
721
  while (true);
849
722
  };
850
- function $indexExpenseUnattestedCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
851
- CoroutineImpl.call(this, resultContinuation);
852
- this._this__u8e3s4__1 = _this__u8e3s4;
853
- this.companyId_1 = companyId;
854
- this.fields_1 = fields;
855
- }
856
- protoOf($indexExpenseUnattestedCOROUTINE$).doResume_5yljmg_k$ = function () {
857
- var suspendResult = this.result_1;
723
+ protoOf(ExpenseApi).acceptExpense_z1y8us_k$ = function (companyId, expenseId, $completion) {
724
+ return acceptExpenseOperation_0(this, companyId, expenseId, $completion);
725
+ };
726
+ protoOf(ExpenseApi).acceptExpense = function (companyId, expenseId) {
727
+ var tmp = this;
728
+ return promisify(function ($completion) {
729
+ return tmp.acceptExpense_z1y8us_k$(companyId, expenseId, $completion);
730
+ });
731
+ };
732
+ protoOf(ExpenseApi).acceptExpense$suspendBridge_b9bonn_k$ = function (companyId, expenseId, $completion) {
733
+ var tmp = new $acceptExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, $completion);
734
+ tmp.result_1 = Unit_instance;
735
+ tmp.exception_1 = null;
736
+ return tmp.doResume_5yljmg_k$();
737
+ };
738
+ protoOf(ExpenseApi).createExpense_tm55ft_k$ = function (companyId, createExpenseCommand, $completion) {
739
+ return createExpenseOperation_0(this, companyId, createExpenseCommand, $completion);
740
+ };
741
+ protoOf(ExpenseApi).createExpense = function (companyId, createExpenseCommand) {
742
+ var tmp = this;
743
+ return promisify(function ($completion) {
744
+ return tmp.createExpense_tm55ft_k$(companyId, createExpenseCommand, $completion);
745
+ });
746
+ };
747
+ protoOf(ExpenseApi).createExpense$suspendBridge_v2lokq_k$ = function (companyId, createExpenseCommand, $completion) {
748
+ var tmp = new $createExpense$suspendBridgeCOROUTINE$(this, companyId, createExpenseCommand, $completion);
749
+ tmp.result_1 = Unit_instance;
750
+ tmp.exception_1 = null;
751
+ return tmp.doResume_5yljmg_k$();
752
+ };
753
+ protoOf(ExpenseApi).deleteExpense_wooht5_k$ = function (companyId, expenseId, $completion) {
754
+ return deleteExpenseOperation_0(this, companyId, expenseId, $completion);
755
+ };
756
+ protoOf(ExpenseApi).deleteExpense = function (companyId, expenseId) {
757
+ var tmp = this;
758
+ return promisify(function ($completion) {
759
+ return tmp.deleteExpense_wooht5_k$(companyId, expenseId, $completion);
760
+ });
761
+ };
762
+ protoOf(ExpenseApi).deleteExpense$suspendBridge_np8xm2_k$ = function (companyId, expenseId, $completion) {
763
+ var tmp = new $deleteExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, $completion);
764
+ tmp.result_1 = Unit_instance;
765
+ tmp.exception_1 = null;
766
+ return tmp.doResume_5yljmg_k$();
767
+ };
768
+ protoOf(ExpenseApi).indexExpense_7ju6z2_k$ = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
769
+ return indexExpenseOperation_0(this, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
770
+ };
771
+ protoOf(ExpenseApi).indexExpense$default_tniyce_k$ = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion, $super) {
772
+ search = search === VOID ? null : search;
773
+ status = status === VOID ? null : status;
774
+ dateOfPurchaseFrom = dateOfPurchaseFrom === VOID ? null : dateOfPurchaseFrom;
775
+ dateOfPurchaseTo = dateOfPurchaseTo === VOID ? null : dateOfPurchaseTo;
776
+ fields = fields === VOID ? null : fields;
777
+ pageToken = pageToken === VOID ? null : pageToken;
778
+ autoPaginate = autoPaginate === VOID ? null : autoPaginate;
779
+ count = count === VOID ? null : count;
780
+ return $super === VOID ? this.indexExpense_7ju6z2_k$(companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) : $super.indexExpense_7ju6z2_k$.call(this, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
781
+ };
782
+ protoOf(ExpenseApi).indexExpense = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count) {
783
+ var tmp = this;
784
+ return promisify(function ($completion) {
785
+ return tmp.indexExpense$default_tniyce_k$(companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
786
+ });
787
+ };
788
+ protoOf(ExpenseApi).indexExpense$suspendBridge_3kqydv_k$ = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
789
+ var tmp = new $indexExpense$suspendBridgeCOROUTINE$(this, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
790
+ tmp.result_1 = Unit_instance;
791
+ tmp.exception_1 = null;
792
+ return tmp.doResume_5yljmg_k$();
793
+ };
794
+ protoOf(ExpenseApi).indexExpenseTypes_p7w8zu_k$ = function (companyId, fields, pageToken, autoPaginate, count, $completion) {
795
+ return indexExpenseTypesOperation_0(this, companyId, fields, pageToken, autoPaginate, count, $completion);
796
+ };
797
+ protoOf(ExpenseApi).indexExpenseTypes$default_vl01zw_k$ = function (companyId, fields, pageToken, autoPaginate, count, $completion, $super) {
798
+ fields = fields === VOID ? null : fields;
799
+ pageToken = pageToken === VOID ? null : pageToken;
800
+ autoPaginate = autoPaginate === VOID ? null : autoPaginate;
801
+ count = count === VOID ? null : count;
802
+ return $super === VOID ? this.indexExpenseTypes_p7w8zu_k$(companyId, fields, pageToken, autoPaginate, count, $completion) : $super.indexExpenseTypes_p7w8zu_k$.call(this, companyId, fields, pageToken, autoPaginate, count, $completion);
803
+ };
804
+ protoOf(ExpenseApi).indexExpenseTypes = function (companyId, fields, pageToken, autoPaginate, count) {
805
+ var tmp = this;
806
+ return promisify(function ($completion) {
807
+ return tmp.indexExpenseTypes$default_vl01zw_k$(companyId, fields, pageToken, autoPaginate, count, $completion);
808
+ });
809
+ };
810
+ protoOf(ExpenseApi).indexExpenseTypes$suspendBridge_k83wd1_k$ = function (companyId, fields, pageToken, autoPaginate, count, $completion) {
811
+ var tmp = new $indexExpenseTypes$suspendBridgeCOROUTINE$(this, companyId, fields, pageToken, autoPaginate, count, $completion);
812
+ tmp.result_1 = Unit_instance;
813
+ tmp.exception_1 = null;
814
+ return tmp.doResume_5yljmg_k$();
815
+ };
816
+ protoOf(ExpenseApi).indexExpenseUnattested_mlb7f4_k$ = function (companyId, fields, $completion) {
817
+ return indexExpenseUnattestedOperation_0(this, companyId, fields, $completion);
818
+ };
819
+ protoOf(ExpenseApi).indexExpenseUnattested$default_7vhio1_k$ = function (companyId, fields, $completion, $super) {
820
+ fields = fields === VOID ? null : fields;
821
+ return $super === VOID ? this.indexExpenseUnattested_mlb7f4_k$(companyId, fields, $completion) : $super.indexExpenseUnattested_mlb7f4_k$.call(this, companyId, fields, $completion);
822
+ };
823
+ protoOf(ExpenseApi).indexExpenseUnattested = function (companyId, fields) {
824
+ var tmp = this;
825
+ return promisify(function ($completion) {
826
+ return tmp.indexExpenseUnattested$default_7vhio1_k$(companyId, fields, $completion);
827
+ });
828
+ };
829
+ protoOf(ExpenseApi).indexExpenseUnattested$suspendBridge_pzqtxr_k$ = function (companyId, fields, $completion) {
830
+ var tmp = new $indexExpenseUnattested$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
831
+ tmp.result_1 = Unit_instance;
832
+ tmp.exception_1 = null;
833
+ return tmp.doResume_5yljmg_k$();
834
+ };
835
+ protoOf(ExpenseApi).indexExpenseUser_5sayrq_k$ = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
836
+ return indexExpenseUserOperation_0(this, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
837
+ };
838
+ protoOf(ExpenseApi).indexExpenseUser$default_ub788j_k$ = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion, $super) {
839
+ companyIds = companyIds === VOID ? null : companyIds;
840
+ search = search === VOID ? null : search;
841
+ status = status === VOID ? null : status;
842
+ dateOfPurchaseFrom = dateOfPurchaseFrom === VOID ? null : dateOfPurchaseFrom;
843
+ dateOfPurchaseTo = dateOfPurchaseTo === VOID ? null : dateOfPurchaseTo;
844
+ fields = fields === VOID ? null : fields;
845
+ pageToken = pageToken === VOID ? null : pageToken;
846
+ autoPaginate = autoPaginate === VOID ? null : autoPaginate;
847
+ count = count === VOID ? null : count;
848
+ return $super === VOID ? this.indexExpenseUser_5sayrq_k$(companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) : $super.indexExpenseUser_5sayrq_k$.call(this, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
849
+ };
850
+ protoOf(ExpenseApi).indexExpenseUser = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count) {
851
+ var tmp = this;
852
+ return promisify(function ($completion) {
853
+ return tmp.indexExpenseUser$default_ub788j_k$(companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
854
+ });
855
+ };
856
+ protoOf(ExpenseApi).indexExpenseUser$suspendBridge_969w7t_k$ = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
857
+ var tmp = new $indexExpenseUser$suspendBridgeCOROUTINE$(this, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
858
+ tmp.result_1 = Unit_instance;
859
+ tmp.exception_1 = null;
860
+ return tmp.doResume_5yljmg_k$();
861
+ };
862
+ protoOf(ExpenseApi).rejectExpense_wr6zla_k$ = function (companyId, expenseId, rejectExpenseCommand, $completion) {
863
+ return rejectExpenseOperation_0(this, companyId, expenseId, rejectExpenseCommand, $completion);
864
+ };
865
+ protoOf(ExpenseApi).rejectExpense = function (companyId, expenseId, rejectExpenseCommand) {
866
+ var tmp = this;
867
+ return promisify(function ($completion) {
868
+ return tmp.rejectExpense_wr6zla_k$(companyId, expenseId, rejectExpenseCommand, $completion);
869
+ });
870
+ };
871
+ protoOf(ExpenseApi).rejectExpense$suspendBridge_952bnz_k$ = function (companyId, expenseId, rejectExpenseCommand, $completion) {
872
+ var tmp = new $rejectExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, rejectExpenseCommand, $completion);
873
+ tmp.result_1 = Unit_instance;
874
+ tmp.exception_1 = null;
875
+ return tmp.doResume_5yljmg_k$();
876
+ };
877
+ protoOf(ExpenseApi).remindExpense_gd8i58_k$ = function (companyId, expenseId, $completion) {
878
+ return remindExpenseOperation_0(this, companyId, expenseId, $completion);
879
+ };
880
+ protoOf(ExpenseApi).remindExpense = function (companyId, expenseId) {
881
+ var tmp = this;
882
+ return promisify(function ($completion) {
883
+ return tmp.remindExpense_gd8i58_k$(companyId, expenseId, $completion);
884
+ });
885
+ };
886
+ protoOf(ExpenseApi).remindExpense$suspendBridge_v2iqyt_k$ = function (companyId, expenseId, $completion) {
887
+ var tmp = new $remindExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, $completion);
888
+ tmp.result_1 = Unit_instance;
889
+ tmp.exception_1 = null;
890
+ return tmp.doResume_5yljmg_k$();
891
+ };
892
+ protoOf(ExpenseApi).showExpense_y8nlhp_k$ = function (companyId, expenseId, fields, $completion) {
893
+ return showExpenseOperation_0(this, companyId, expenseId, fields, $completion);
894
+ };
895
+ protoOf(ExpenseApi).showExpense$default_oumpty_k$ = function (companyId, expenseId, fields, $completion, $super) {
896
+ fields = fields === VOID ? null : fields;
897
+ return $super === VOID ? this.showExpense_y8nlhp_k$(companyId, expenseId, fields, $completion) : $super.showExpense_y8nlhp_k$.call(this, companyId, expenseId, fields, $completion);
898
+ };
899
+ protoOf(ExpenseApi).showExpense = function (companyId, expenseId, fields) {
900
+ var tmp = this;
901
+ return promisify(function ($completion) {
902
+ return tmp.showExpense$default_oumpty_k$(companyId, expenseId, fields, $completion);
903
+ });
904
+ };
905
+ protoOf(ExpenseApi).showExpense$suspendBridge_i6b7e4_k$ = function (companyId, expenseId, fields, $completion) {
906
+ var tmp = new $showExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, fields, $completion);
907
+ tmp.result_1 = Unit_instance;
908
+ tmp.exception_1 = null;
909
+ return tmp.doResume_5yljmg_k$();
910
+ };
911
+ function ExpenseApi() {
912
+ }
913
+ function acceptExpenseOperation(client, companyId, expenseId) {
914
+ return promisify(function ($completion) {
915
+ return acceptExpenseOperation_0(client, companyId, expenseId, $completion);
916
+ });
917
+ }
918
+ function acceptExpenseOperation_0(client, companyId, expenseId, $completion) {
919
+ var tmp = new $acceptExpenseOperationCOROUTINE$(client, companyId, expenseId, $completion);
920
+ tmp.result_1 = Unit_instance;
921
+ tmp.exception_1 = null;
922
+ return tmp.doResume_5yljmg_k$();
923
+ }
924
+ function $acceptExpenseOperationCOROUTINE$(client, companyId, expenseId, resultContinuation) {
925
+ CoroutineImpl.call(this, resultContinuation);
926
+ this.client_1 = client;
927
+ this.companyId_1 = companyId;
928
+ this.expenseId_1 = expenseId;
929
+ }
930
+ protoOf($acceptExpenseOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
931
+ var suspendResult = this.result_1;
858
932
  $sm: do
859
933
  try {
860
934
  var tmp = this.state_1;
@@ -864,19 +938,12 @@ protoOf($indexExpenseUnattestedCOROUTINE$).doResume_5yljmg_k$ = function () {
864
938
  var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
865
939
  var localVariableBody = EmptyContent_getInstance();
866
940
  var localVariableQuery = LinkedHashMap_init_$Create$();
867
- if (this.fields_1 == null)
868
- null;
869
- else {
870
- var value = listOf_0(this.fields_1);
871
- localVariableQuery.put_4fpzoq_k$('fields', value);
872
- }
873
-
874
941
  var localVariableHeaders = LinkedHashMap_init_$Create$();
875
- var tmp1_method = RequestMethod_GET_getInstance();
876
- var tmp2_path = replace('/companies/{companyId}/economy/expense/unAttested', '{companyId}', this.companyId_1.toString());
877
- var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
942
+ var tmp0_method = RequestMethod_POST_getInstance();
943
+ var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}/approve', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
944
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
878
945
  this.state_1 = 1;
879
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
946
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
880
947
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
881
948
  return suspendResult;
882
949
  }
@@ -884,11 +951,11 @@ protoOf($indexExpenseUnattestedCOROUTINE$).doResume_5yljmg_k$ = function () {
884
951
  continue $sm;
885
952
  case 1:
886
953
  var this_0 = suspendResult;
887
- var tmp_0 = getKClass(ExpenseCount);
888
- var tmp_1 = null instanceof ExpenseCount;
954
+ var tmp_0 = getKClass(Unit);
955
+ var tmp_1 = null instanceof Unit;
889
956
  var tmp_2;
890
957
  try {
891
- tmp_2 = createKType(getKClass(ExpenseCount), arrayOf([]), false);
958
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
892
959
  } catch ($p) {
893
960
  var tmp_3;
894
961
  if ($p instanceof Error) {
@@ -915,52 +982,70 @@ protoOf($indexExpenseUnattestedCOROUTINE$).doResume_5yljmg_k$ = function () {
915
982
  }
916
983
  while (true);
917
984
  };
918
- function $indexExpenseUnattested$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, fields, resultContinuation) {
985
+ function createExpenseOperation(client, companyId, createExpenseCommand) {
986
+ return promisify(function ($completion) {
987
+ return createExpenseOperation_0(client, companyId, createExpenseCommand, $completion);
988
+ });
989
+ }
990
+ function createExpenseOperation_0(client, companyId, createExpenseCommand, $completion) {
991
+ var tmp = new $createExpenseOperationCOROUTINE$(client, companyId, createExpenseCommand, $completion);
992
+ tmp.result_1 = Unit_instance;
993
+ tmp.exception_1 = null;
994
+ return tmp.doResume_5yljmg_k$();
995
+ }
996
+ function $createExpenseOperationCOROUTINE$(client, companyId, createExpenseCommand, resultContinuation) {
919
997
  CoroutineImpl.call(this, resultContinuation);
920
- this._this__u8e3s4__1 = _this__u8e3s4;
998
+ this.client_1 = client;
921
999
  this.companyId_1 = companyId;
922
- this.fields_1 = fields;
1000
+ this.createExpenseCommand_1 = createExpenseCommand;
923
1001
  }
924
- protoOf($indexExpenseUnattested$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1002
+ protoOf($createExpenseOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
925
1003
  var suspendResult = this.result_1;
926
1004
  $sm: do
927
1005
  try {
928
1006
  var tmp = this.state_1;
929
1007
  switch (tmp) {
930
1008
  case 0:
931
- this.exceptionState_1 = 4;
932
- if (this._this__u8e3s4__1.indexExpenseUnattested === protoOf(ExpenseApi).indexExpenseUnattested) {
933
- this.state_1 = 2;
934
- suspendResult = this._this__u8e3s4__1.indexExpenseUnattested$default_7vhio1_k$(this.companyId_1, this.fields_1, this);
935
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
936
- return suspendResult;
937
- }
938
- continue $sm;
939
- } else {
940
- this.state_1 = 1;
941
- suspendResult = await_0(this._this__u8e3s4__1.indexExpenseUnattested(this.companyId_1, this.fields_1), this);
942
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
943
- return suspendResult;
944
- }
945
- continue $sm;
1009
+ this.exceptionState_1 = 2;
1010
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1011
+ var localVariableBody = this.createExpenseCommand_1;
1012
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1013
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1014
+ var tmp0_method = RequestMethod_POST_getInstance();
1015
+ var tmp1_path = replace('/companies/{companyId}/economy/expense', '{companyId}', this.companyId_1.toString());
1016
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1017
+ this.state_1 = 1;
1018
+ suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1019
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1020
+ return suspendResult;
946
1021
  }
947
1022
 
948
- case 1:
949
- this.WHEN_RESULT0__1 = suspendResult;
950
- this.state_1 = 3;
951
- continue $sm;
952
- case 2:
953
- this.WHEN_RESULT0__1 = suspendResult;
954
- this.state_1 = 3;
955
1023
  continue $sm;
956
- case 3:
957
- return this.WHEN_RESULT0__1;
958
- case 4:
1024
+ case 1:
1025
+ var this_0 = suspendResult;
1026
+ var tmp_0 = getKClass(Expense);
1027
+ var tmp_1 = null instanceof Expense;
1028
+ var tmp_2;
1029
+ try {
1030
+ tmp_2 = createKType(getKClass(Expense), arrayOf([]), false);
1031
+ } catch ($p) {
1032
+ var tmp_3;
1033
+ if ($p instanceof Error) {
1034
+ var _unused_var__etf5q3 = $p;
1035
+ tmp_3 = null;
1036
+ } else {
1037
+ throw $p;
1038
+ }
1039
+ tmp_2 = tmp_3;
1040
+ }
1041
+
1042
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1043
+ case 2:
959
1044
  throw this.exception_1;
960
1045
  }
961
- } catch ($p) {
962
- var e = $p;
963
- if (this.exceptionState_1 === 4) {
1046
+ } catch ($p_0) {
1047
+ var e = $p_0;
1048
+ if (this.exceptionState_1 === 2) {
964
1049
  throw e;
965
1050
  } else {
966
1051
  this.state_1 = this.exceptionState_1;
@@ -969,10 +1054,101 @@ protoOf($indexExpenseUnattested$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = fu
969
1054
  }
970
1055
  while (true);
971
1056
  };
972
- function $indexExpenseUserCOROUTINE$(_this__u8e3s4, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
1057
+ function deleteExpenseOperation(client, companyId, expenseId) {
1058
+ return promisify(function ($completion) {
1059
+ return deleteExpenseOperation_0(client, companyId, expenseId, $completion);
1060
+ });
1061
+ }
1062
+ function deleteExpenseOperation_0(client, companyId, expenseId, $completion) {
1063
+ var tmp = new $deleteExpenseOperationCOROUTINE$(client, companyId, expenseId, $completion);
1064
+ tmp.result_1 = Unit_instance;
1065
+ tmp.exception_1 = null;
1066
+ return tmp.doResume_5yljmg_k$();
1067
+ }
1068
+ function $deleteExpenseOperationCOROUTINE$(client, companyId, expenseId, resultContinuation) {
973
1069
  CoroutineImpl.call(this, resultContinuation);
974
- this._this__u8e3s4__1 = _this__u8e3s4;
975
- this.companyIds_1 = companyIds;
1070
+ this.client_1 = client;
1071
+ this.companyId_1 = companyId;
1072
+ this.expenseId_1 = expenseId;
1073
+ }
1074
+ protoOf($deleteExpenseOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1075
+ var suspendResult = this.result_1;
1076
+ $sm: do
1077
+ try {
1078
+ var tmp = this.state_1;
1079
+ switch (tmp) {
1080
+ case 0:
1081
+ this.exceptionState_1 = 2;
1082
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1083
+ var localVariableBody = EmptyContent_getInstance();
1084
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1085
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1086
+ var tmp0_method = RequestMethod_DELETE_getInstance();
1087
+ var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
1088
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1089
+ this.state_1 = 1;
1090
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1091
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1092
+ return suspendResult;
1093
+ }
1094
+
1095
+ continue $sm;
1096
+ case 1:
1097
+ var this_0 = suspendResult;
1098
+ var tmp_0 = getKClass(Unit);
1099
+ var tmp_1 = null instanceof Unit;
1100
+ var tmp_2;
1101
+ try {
1102
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1103
+ } catch ($p) {
1104
+ var tmp_3;
1105
+ if ($p instanceof Error) {
1106
+ var _unused_var__etf5q3 = $p;
1107
+ tmp_3 = null;
1108
+ } else {
1109
+ throw $p;
1110
+ }
1111
+ tmp_2 = tmp_3;
1112
+ }
1113
+
1114
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1115
+ case 2:
1116
+ throw this.exception_1;
1117
+ }
1118
+ } catch ($p_0) {
1119
+ var e = $p_0;
1120
+ if (this.exceptionState_1 === 2) {
1121
+ throw e;
1122
+ } else {
1123
+ this.state_1 = this.exceptionState_1;
1124
+ this.exception_1 = e;
1125
+ }
1126
+ }
1127
+ while (true);
1128
+ };
1129
+ function indexExpenseOperation(client, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count) {
1130
+ return promisify(function ($completion) {
1131
+ return indexExpenseOperation_0(client, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1132
+ });
1133
+ }
1134
+ function indexExpenseOperation_0(client, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
1135
+ search = search === VOID ? null : search;
1136
+ status = status === VOID ? null : status;
1137
+ dateOfPurchaseFrom = dateOfPurchaseFrom === VOID ? null : dateOfPurchaseFrom;
1138
+ dateOfPurchaseTo = dateOfPurchaseTo === VOID ? null : dateOfPurchaseTo;
1139
+ fields = fields === VOID ? null : fields;
1140
+ pageToken = pageToken === VOID ? null : pageToken;
1141
+ autoPaginate = autoPaginate === VOID ? null : autoPaginate;
1142
+ count = count === VOID ? null : count;
1143
+ var tmp = new $indexExpenseOperationCOROUTINE$(client, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1144
+ tmp.result_1 = Unit_instance;
1145
+ tmp.exception_1 = null;
1146
+ return tmp.doResume_5yljmg_k$();
1147
+ }
1148
+ function $indexExpenseOperationCOROUTINE$(client, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
1149
+ CoroutineImpl.call(this, resultContinuation);
1150
+ this.client_1 = client;
1151
+ this.companyId_1 = companyId;
976
1152
  this.search_1 = search;
977
1153
  this.status_1 = status;
978
1154
  this.dateOfPurchaseFrom_1 = dateOfPurchaseFrom;
@@ -982,7 +1158,7 @@ function $indexExpenseUserCOROUTINE$(_this__u8e3s4, companyIds, search, status,
982
1158
  this.autoPaginate_1 = autoPaginate;
983
1159
  this.count_1 = count;
984
1160
  }
985
- protoOf($indexExpenseUserCOROUTINE$).doResume_5yljmg_k$ = function () {
1161
+ protoOf($indexExpenseOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
986
1162
  var suspendResult = this.result_1;
987
1163
  $sm: do
988
1164
  try {
@@ -993,81 +1169,73 @@ protoOf($indexExpenseUserCOROUTINE$).doResume_5yljmg_k$ = function () {
993
1169
  var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
994
1170
  var localVariableBody = EmptyContent_getInstance();
995
1171
  var localVariableQuery = LinkedHashMap_init_$Create$();
996
- var tmp0_safe_receiver = this.companyIds_1;
997
- if (tmp0_safe_receiver == null)
998
- null;
999
- else {
1000
- var tmp2 = 'companyIds';
1001
- var value = toMultiValue(tmp0_safe_receiver, 'multi');
1002
- localVariableQuery.put_4fpzoq_k$(tmp2, value);
1003
- }
1004
-
1005
1172
  if (this.search_1 == null)
1006
1173
  null;
1007
1174
  else {
1008
- var value_0 = listOf_0(this.search_1);
1009
- localVariableQuery.put_4fpzoq_k$('search', value_0);
1175
+ var value = listOf_0(this.search_1);
1176
+ localVariableQuery.put_4fpzoq_k$('search', value);
1010
1177
  }
1011
1178
 
1012
- var tmp2_safe_receiver = this.status_1;
1013
- if (tmp2_safe_receiver == null)
1179
+ var tmp1_safe_receiver = this.status_1;
1180
+ if (tmp1_safe_receiver == null)
1014
1181
  null;
1015
1182
  else {
1016
- var value_1 = toMultiValue(tmp2_safe_receiver, 'multi');
1017
- localVariableQuery.put_4fpzoq_k$('status', value_1);
1183
+ var value_0 = toMultiValue(tmp1_safe_receiver, 'multi');
1184
+ localVariableQuery.put_4fpzoq_k$('status', value_0);
1018
1185
  }
1019
1186
 
1020
1187
  if (this.dateOfPurchaseFrom_1 == null)
1021
1188
  null;
1022
1189
  else {
1023
- var tmp2_0 = 'dateOfPurchaseFrom';
1024
- var value_2 = listOf_0(this.dateOfPurchaseFrom_1.toString());
1025
- localVariableQuery.put_4fpzoq_k$(tmp2_0, value_2);
1190
+ var tmp2 = 'dateOfPurchaseFrom';
1191
+ var value_1 = listOf_0(this.dateOfPurchaseFrom_1.toString());
1192
+ localVariableQuery.put_4fpzoq_k$(tmp2, value_1);
1026
1193
  }
1027
1194
 
1028
1195
  if (this.dateOfPurchaseTo_1 == null)
1029
1196
  null;
1030
1197
  else {
1031
- var tmp2_1 = 'dateOfPurchaseTo';
1032
- var value_3 = listOf_0(this.dateOfPurchaseTo_1.toString());
1033
- localVariableQuery.put_4fpzoq_k$(tmp2_1, value_3);
1198
+ var tmp2_0 = 'dateOfPurchaseTo';
1199
+ var value_2 = listOf_0(this.dateOfPurchaseTo_1.toString());
1200
+ localVariableQuery.put_4fpzoq_k$(tmp2_0, value_2);
1034
1201
  }
1035
1202
 
1036
1203
  if (this.fields_1 == null)
1037
1204
  null;
1038
1205
  else {
1039
- var value_4 = listOf_0(this.fields_1);
1040
- localVariableQuery.put_4fpzoq_k$('fields', value_4);
1206
+ var value_3 = listOf_0(this.fields_1);
1207
+ localVariableQuery.put_4fpzoq_k$('fields', value_3);
1041
1208
  }
1042
1209
 
1043
1210
  if (this.pageToken_1 == null)
1044
1211
  null;
1045
1212
  else {
1046
- var tmp2_2 = 'pageToken';
1047
- var value_5 = listOf_0(this.pageToken_1);
1048
- localVariableQuery.put_4fpzoq_k$(tmp2_2, value_5);
1213
+ var tmp2_1 = 'pageToken';
1214
+ var value_4 = listOf_0(this.pageToken_1);
1215
+ localVariableQuery.put_4fpzoq_k$(tmp2_1, value_4);
1049
1216
  }
1050
1217
 
1051
1218
  if (this.autoPaginate_1 == null)
1052
1219
  null;
1053
1220
  else {
1054
- var tmp2_3 = 'autoPaginate';
1055
- var value_6 = listOf_0('' + this.autoPaginate_1);
1056
- localVariableQuery.put_4fpzoq_k$(tmp2_3, value_6);
1221
+ var tmp2_2 = 'autoPaginate';
1222
+ var value_5 = listOf_0('' + this.autoPaginate_1);
1223
+ localVariableQuery.put_4fpzoq_k$(tmp2_2, value_5);
1057
1224
  }
1058
1225
 
1059
1226
  if (this.count_1 == null)
1060
1227
  null;
1061
1228
  else {
1062
- var value_7 = listOf_0('' + this.count_1);
1063
- localVariableQuery.put_4fpzoq_k$('count', value_7);
1229
+ var value_6 = listOf_0('' + this.count_1);
1230
+ localVariableQuery.put_4fpzoq_k$('count', value_6);
1064
1231
  }
1065
1232
 
1066
1233
  var localVariableHeaders = LinkedHashMap_init_$Create$();
1067
- var tmp9_method = RequestMethod_GET_getInstance();
1068
- var localVariableConfig = new RequestConfig(tmp9_method, '/companies/economy/expense', localVariableHeaders, VOID, localVariableQuery, true);
1234
+ var tmp8_method = RequestMethod_GET_getInstance();
1235
+ var tmp9_path = replace('/companies/{companyId}/economy/expense', '{companyId}', this.companyId_1.toString());
1236
+ var localVariableConfig = new RequestConfig(tmp8_method, tmp9_path, localVariableHeaders, VOID, localVariableQuery, true);
1069
1237
  this.state_1 = 1;
1070
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1238
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1071
1239
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1072
1240
  return suspendResult;
1073
1241
  }
@@ -1106,75 +1274,31 @@ protoOf($indexExpenseUserCOROUTINE$).doResume_5yljmg_k$ = function () {
1106
1274
  }
1107
1275
  while (true);
1108
1276
  };
1109
- function $indexExpenseUser$suspendBridgeCOROUTINE$(_this__u8e3s4, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
1277
+ function indexExpenseTypesOperation(client, companyId, fields, pageToken, autoPaginate, count) {
1278
+ return promisify(function ($completion) {
1279
+ return indexExpenseTypesOperation_0(client, companyId, fields, pageToken, autoPaginate, count, $completion);
1280
+ });
1281
+ }
1282
+ function indexExpenseTypesOperation_0(client, companyId, fields, pageToken, autoPaginate, count, $completion) {
1283
+ fields = fields === VOID ? null : fields;
1284
+ pageToken = pageToken === VOID ? null : pageToken;
1285
+ autoPaginate = autoPaginate === VOID ? null : autoPaginate;
1286
+ count = count === VOID ? null : count;
1287
+ var tmp = new $indexExpenseTypesOperationCOROUTINE$(client, companyId, fields, pageToken, autoPaginate, count, $completion);
1288
+ tmp.result_1 = Unit_instance;
1289
+ tmp.exception_1 = null;
1290
+ return tmp.doResume_5yljmg_k$();
1291
+ }
1292
+ function $indexExpenseTypesOperationCOROUTINE$(client, companyId, fields, pageToken, autoPaginate, count, resultContinuation) {
1110
1293
  CoroutineImpl.call(this, resultContinuation);
1111
- this._this__u8e3s4__1 = _this__u8e3s4;
1112
- this.companyIds_1 = companyIds;
1113
- this.search_1 = search;
1114
- this.status_1 = status;
1115
- this.dateOfPurchaseFrom_1 = dateOfPurchaseFrom;
1116
- this.dateOfPurchaseTo_1 = dateOfPurchaseTo;
1294
+ this.client_1 = client;
1295
+ this.companyId_1 = companyId;
1117
1296
  this.fields_1 = fields;
1118
1297
  this.pageToken_1 = pageToken;
1119
1298
  this.autoPaginate_1 = autoPaginate;
1120
1299
  this.count_1 = count;
1121
1300
  }
1122
- protoOf($indexExpenseUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1123
- var suspendResult = this.result_1;
1124
- $sm: do
1125
- try {
1126
- var tmp = this.state_1;
1127
- switch (tmp) {
1128
- case 0:
1129
- this.exceptionState_1 = 4;
1130
- if (this._this__u8e3s4__1.indexExpenseUser === protoOf(ExpenseApi).indexExpenseUser) {
1131
- this.state_1 = 2;
1132
- suspendResult = this._this__u8e3s4__1.indexExpenseUser$default_ub788j_k$(this.companyIds_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
1133
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1134
- return suspendResult;
1135
- }
1136
- continue $sm;
1137
- } else {
1138
- this.state_1 = 1;
1139
- suspendResult = await_0(this._this__u8e3s4__1.indexExpenseUser(this.companyIds_1, this.search_1, this.status_1, this.dateOfPurchaseFrom_1, this.dateOfPurchaseTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
1140
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1141
- return suspendResult;
1142
- }
1143
- continue $sm;
1144
- }
1145
-
1146
- case 1:
1147
- this.WHEN_RESULT0__1 = suspendResult;
1148
- this.state_1 = 3;
1149
- continue $sm;
1150
- case 2:
1151
- this.WHEN_RESULT0__1 = suspendResult;
1152
- this.state_1 = 3;
1153
- continue $sm;
1154
- case 3:
1155
- return this.WHEN_RESULT0__1;
1156
- case 4:
1157
- throw this.exception_1;
1158
- }
1159
- } catch ($p) {
1160
- var e = $p;
1161
- if (this.exceptionState_1 === 4) {
1162
- throw e;
1163
- } else {
1164
- this.state_1 = this.exceptionState_1;
1165
- this.exception_1 = e;
1166
- }
1167
- }
1168
- while (true);
1169
- };
1170
- function $rejectExpenseCOROUTINE$(_this__u8e3s4, companyId, expenseId, rejectExpenseCommand, resultContinuation) {
1171
- CoroutineImpl.call(this, resultContinuation);
1172
- this._this__u8e3s4__1 = _this__u8e3s4;
1173
- this.companyId_1 = companyId;
1174
- this.expenseId_1 = expenseId;
1175
- this.rejectExpenseCommand_1 = rejectExpenseCommand;
1176
- }
1177
- protoOf($rejectExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1301
+ protoOf($indexExpenseTypesOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1178
1302
  var suspendResult = this.result_1;
1179
1303
  $sm: do
1180
1304
  try {
@@ -1183,130 +1307,44 @@ protoOf($rejectExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1183
1307
  case 0:
1184
1308
  this.exceptionState_1 = 2;
1185
1309
  var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1186
- var localVariableBody = this.rejectExpenseCommand_1;
1310
+ var localVariableBody = EmptyContent_getInstance();
1187
1311
  var localVariableQuery = LinkedHashMap_init_$Create$();
1188
- var localVariableHeaders = LinkedHashMap_init_$Create$();
1189
- var tmp0_method = RequestMethod_POST_getInstance();
1190
- var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}/reject', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
1191
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1192
- this.state_1 = 1;
1193
- suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1194
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1195
- return suspendResult;
1312
+ if (this.fields_1 == null)
1313
+ null;
1314
+ else {
1315
+ var value = listOf_0(this.fields_1);
1316
+ localVariableQuery.put_4fpzoq_k$('fields', value);
1196
1317
  }
1197
1318
 
1198
- continue $sm;
1199
- case 1:
1200
- var this_0 = suspendResult;
1201
- var tmp_0 = getKClass(Unit);
1202
- var tmp_1 = null instanceof Unit;
1203
- var tmp_2;
1204
- try {
1205
- tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1206
- } catch ($p) {
1207
- var tmp_3;
1208
- if ($p instanceof Error) {
1209
- var _unused_var__etf5q3 = $p;
1210
- tmp_3 = null;
1211
- } else {
1212
- throw $p;
1213
- }
1214
- tmp_2 = tmp_3;
1319
+ if (this.pageToken_1 == null)
1320
+ null;
1321
+ else {
1322
+ var tmp2 = 'pageToken';
1323
+ var value_0 = listOf_0(this.pageToken_1);
1324
+ localVariableQuery.put_4fpzoq_k$(tmp2, value_0);
1215
1325
  }
1216
1326
 
1217
- return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1218
- case 2:
1219
- throw this.exception_1;
1220
- }
1221
- } catch ($p_0) {
1222
- var e = $p_0;
1223
- if (this.exceptionState_1 === 2) {
1224
- throw e;
1225
- } else {
1226
- this.state_1 = this.exceptionState_1;
1227
- this.exception_1 = e;
1228
- }
1229
- }
1230
- while (true);
1231
- };
1232
- function $rejectExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, rejectExpenseCommand, resultContinuation) {
1233
- CoroutineImpl.call(this, resultContinuation);
1234
- this._this__u8e3s4__1 = _this__u8e3s4;
1235
- this.companyId_1 = companyId;
1236
- this.expenseId_1 = expenseId;
1237
- this.rejectExpenseCommand_1 = rejectExpenseCommand;
1238
- }
1239
- protoOf($rejectExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1240
- var suspendResult = this.result_1;
1241
- $sm: do
1242
- try {
1243
- var tmp = this.state_1;
1244
- switch (tmp) {
1245
- case 0:
1246
- this.exceptionState_1 = 4;
1247
- if (this._this__u8e3s4__1.rejectExpense === protoOf(ExpenseApi).rejectExpense) {
1248
- this.state_1 = 2;
1249
- suspendResult = this._this__u8e3s4__1.rejectExpense_wr6zla_k$(this.companyId_1, this.expenseId_1, this.rejectExpenseCommand_1, this);
1250
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1251
- return suspendResult;
1252
- }
1253
- continue $sm;
1254
- } else {
1255
- this.state_1 = 1;
1256
- suspendResult = await_0(this._this__u8e3s4__1.rejectExpense(this.companyId_1, this.expenseId_1, this.rejectExpenseCommand_1), this);
1257
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1258
- return suspendResult;
1259
- }
1260
- continue $sm;
1327
+ if (this.autoPaginate_1 == null)
1328
+ null;
1329
+ else {
1330
+ var tmp2_0 = 'autoPaginate';
1331
+ var value_1 = listOf_0('' + this.autoPaginate_1);
1332
+ localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
1333
+ }
1334
+
1335
+ if (this.count_1 == null)
1336
+ null;
1337
+ else {
1338
+ var value_2 = listOf_0('' + this.count_1);
1339
+ localVariableQuery.put_4fpzoq_k$('count', value_2);
1261
1340
  }
1262
1341
 
1263
- case 1:
1264
- this.WHEN_RESULT0__1 = suspendResult;
1265
- this.state_1 = 3;
1266
- continue $sm;
1267
- case 2:
1268
- this.WHEN_RESULT0__1 = suspendResult;
1269
- this.state_1 = 3;
1270
- continue $sm;
1271
- case 3:
1272
- return this.WHEN_RESULT0__1;
1273
- case 4:
1274
- throw this.exception_1;
1275
- }
1276
- } catch ($p) {
1277
- var e = $p;
1278
- if (this.exceptionState_1 === 4) {
1279
- throw e;
1280
- } else {
1281
- this.state_1 = this.exceptionState_1;
1282
- this.exception_1 = e;
1283
- }
1284
- }
1285
- while (true);
1286
- };
1287
- function $remindExpenseCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
1288
- CoroutineImpl.call(this, resultContinuation);
1289
- this._this__u8e3s4__1 = _this__u8e3s4;
1290
- this.companyId_1 = companyId;
1291
- this.expenseId_1 = expenseId;
1292
- }
1293
- protoOf($remindExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1294
- var suspendResult = this.result_1;
1295
- $sm: do
1296
- try {
1297
- var tmp = this.state_1;
1298
- switch (tmp) {
1299
- case 0:
1300
- this.exceptionState_1 = 2;
1301
- var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1302
- var localVariableBody = EmptyContent_getInstance();
1303
- var localVariableQuery = LinkedHashMap_init_$Create$();
1304
1342
  var localVariableHeaders = LinkedHashMap_init_$Create$();
1305
- var tmp0_method = RequestMethod_POST_getInstance();
1306
- var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}/remind', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
1307
- var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1343
+ var tmp4_method = RequestMethod_GET_getInstance();
1344
+ var tmp5_path = replace('/companies/{companyId}/economy/expense/types', '{companyId}', this.companyId_1.toString());
1345
+ var localVariableConfig = new RequestConfig(tmp4_method, tmp5_path, localVariableHeaders, VOID, localVariableQuery, true);
1308
1346
  this.state_1 = 1;
1309
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1347
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1310
1348
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1311
1349
  return suspendResult;
1312
1350
  }
@@ -1314,11 +1352,11 @@ protoOf($remindExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1314
1352
  continue $sm;
1315
1353
  case 1:
1316
1354
  var this_0 = suspendResult;
1317
- var tmp_0 = getKClass(ExpenseReminder);
1318
- var tmp_1 = null instanceof ExpenseReminder;
1355
+ var tmp_0 = getKClass(PagedListExpenseType);
1356
+ var tmp_1 = null instanceof PagedListExpenseType;
1319
1357
  var tmp_2;
1320
1358
  try {
1321
- tmp_2 = createKType(getKClass(ExpenseReminder), arrayOf([]), false);
1359
+ tmp_2 = createKType(getKClass(PagedListExpenseType), arrayOf([]), false);
1322
1360
  } catch ($p) {
1323
1361
  var tmp_3;
1324
1362
  if ($p instanceof Error) {
@@ -1345,68 +1383,25 @@ protoOf($remindExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1345
1383
  }
1346
1384
  while (true);
1347
1385
  };
1348
- function $remindExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, resultContinuation) {
1349
- CoroutineImpl.call(this, resultContinuation);
1350
- this._this__u8e3s4__1 = _this__u8e3s4;
1351
- this.companyId_1 = companyId;
1352
- this.expenseId_1 = expenseId;
1386
+ function indexExpenseUnattestedOperation(client, companyId, fields) {
1387
+ return promisify(function ($completion) {
1388
+ return indexExpenseUnattestedOperation_0(client, companyId, fields, $completion);
1389
+ });
1353
1390
  }
1354
- protoOf($remindExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1355
- var suspendResult = this.result_1;
1356
- $sm: do
1357
- try {
1358
- var tmp = this.state_1;
1359
- switch (tmp) {
1360
- case 0:
1361
- this.exceptionState_1 = 4;
1362
- if (this._this__u8e3s4__1.remindExpense === protoOf(ExpenseApi).remindExpense) {
1363
- this.state_1 = 2;
1364
- suspendResult = this._this__u8e3s4__1.remindExpense_gd8i58_k$(this.companyId_1, this.expenseId_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.remindExpense(this.companyId_1, this.expenseId_1), this);
1372
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1373
- return suspendResult;
1374
- }
1375
- continue $sm;
1376
- }
1377
-
1378
- case 1:
1379
- this.WHEN_RESULT0__1 = suspendResult;
1380
- this.state_1 = 3;
1381
- continue $sm;
1382
- 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
- throw this.exception_1;
1390
- }
1391
- } catch ($p) {
1392
- var e = $p;
1393
- if (this.exceptionState_1 === 4) {
1394
- throw e;
1395
- } else {
1396
- this.state_1 = this.exceptionState_1;
1397
- this.exception_1 = e;
1398
- }
1399
- }
1400
- while (true);
1401
- };
1402
- function $showExpenseCOROUTINE$(_this__u8e3s4, companyId, expenseId, fields, resultContinuation) {
1391
+ function indexExpenseUnattestedOperation_0(client, companyId, fields, $completion) {
1392
+ fields = fields === VOID ? null : fields;
1393
+ var tmp = new $indexExpenseUnattestedOperationCOROUTINE$(client, companyId, fields, $completion);
1394
+ tmp.result_1 = Unit_instance;
1395
+ tmp.exception_1 = null;
1396
+ return tmp.doResume_5yljmg_k$();
1397
+ }
1398
+ function $indexExpenseUnattestedOperationCOROUTINE$(client, companyId, fields, resultContinuation) {
1403
1399
  CoroutineImpl.call(this, resultContinuation);
1404
- this._this__u8e3s4__1 = _this__u8e3s4;
1400
+ this.client_1 = client;
1405
1401
  this.companyId_1 = companyId;
1406
- this.expenseId_1 = expenseId;
1407
1402
  this.fields_1 = fields;
1408
1403
  }
1409
- protoOf($showExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1404
+ protoOf($indexExpenseUnattestedOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1410
1405
  var suspendResult = this.result_1;
1411
1406
  $sm: do
1412
1407
  try {
@@ -1426,10 +1421,10 @@ protoOf($showExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1426
1421
 
1427
1422
  var localVariableHeaders = LinkedHashMap_init_$Create$();
1428
1423
  var tmp1_method = RequestMethod_GET_getInstance();
1429
- var tmp2_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
1424
+ var tmp2_path = replace('/companies/{companyId}/economy/expense/unAttested', '{companyId}', this.companyId_1.toString());
1430
1425
  var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
1431
1426
  this.state_1 = 1;
1432
- suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1427
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1433
1428
  if (suspendResult === get_COROUTINE_SUSPENDED()) {
1434
1429
  return suspendResult;
1435
1430
  }
@@ -1437,11 +1432,11 @@ protoOf($showExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1437
1432
  continue $sm;
1438
1433
  case 1:
1439
1434
  var this_0 = suspendResult;
1440
- var tmp_0 = getKClass(Expense);
1441
- var tmp_1 = null instanceof Expense;
1435
+ var tmp_0 = getKClass(ExpenseCount);
1436
+ var tmp_1 = null instanceof ExpenseCount;
1442
1437
  var tmp_2;
1443
1438
  try {
1444
- tmp_2 = createKType(getKClass(Expense), arrayOf([]), false);
1439
+ tmp_2 = createKType(getKClass(ExpenseCount), arrayOf([]), false);
1445
1440
  } catch ($p) {
1446
1441
  var tmp_3;
1447
1442
  if ($p instanceof Error) {
@@ -1468,53 +1463,155 @@ protoOf($showExpenseCOROUTINE$).doResume_5yljmg_k$ = function () {
1468
1463
  }
1469
1464
  while (true);
1470
1465
  };
1471
- function $showExpense$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, expenseId, fields, resultContinuation) {
1466
+ function indexExpenseUserOperation(client, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count) {
1467
+ return promisify(function ($completion) {
1468
+ return indexExpenseUserOperation_0(client, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1469
+ });
1470
+ }
1471
+ function indexExpenseUserOperation_0(client, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
1472
+ companyIds = companyIds === VOID ? null : companyIds;
1473
+ search = search === VOID ? null : search;
1474
+ status = status === VOID ? null : status;
1475
+ dateOfPurchaseFrom = dateOfPurchaseFrom === VOID ? null : dateOfPurchaseFrom;
1476
+ dateOfPurchaseTo = dateOfPurchaseTo === VOID ? null : dateOfPurchaseTo;
1477
+ fields = fields === VOID ? null : fields;
1478
+ pageToken = pageToken === VOID ? null : pageToken;
1479
+ autoPaginate = autoPaginate === VOID ? null : autoPaginate;
1480
+ count = count === VOID ? null : count;
1481
+ var tmp = new $indexExpenseUserOperationCOROUTINE$(client, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1482
+ tmp.result_1 = Unit_instance;
1483
+ tmp.exception_1 = null;
1484
+ return tmp.doResume_5yljmg_k$();
1485
+ }
1486
+ function $indexExpenseUserOperationCOROUTINE$(client, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, resultContinuation) {
1472
1487
  CoroutineImpl.call(this, resultContinuation);
1473
- this._this__u8e3s4__1 = _this__u8e3s4;
1474
- this.companyId_1 = companyId;
1475
- this.expenseId_1 = expenseId;
1488
+ this.client_1 = client;
1489
+ this.companyIds_1 = companyIds;
1490
+ this.search_1 = search;
1491
+ this.status_1 = status;
1492
+ this.dateOfPurchaseFrom_1 = dateOfPurchaseFrom;
1493
+ this.dateOfPurchaseTo_1 = dateOfPurchaseTo;
1476
1494
  this.fields_1 = fields;
1495
+ this.pageToken_1 = pageToken;
1496
+ this.autoPaginate_1 = autoPaginate;
1497
+ this.count_1 = count;
1477
1498
  }
1478
- protoOf($showExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1499
+ protoOf($indexExpenseUserOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1479
1500
  var suspendResult = this.result_1;
1480
1501
  $sm: do
1481
1502
  try {
1482
1503
  var tmp = this.state_1;
1483
1504
  switch (tmp) {
1484
1505
  case 0:
1485
- this.exceptionState_1 = 4;
1486
- if (this._this__u8e3s4__1.showExpense === protoOf(ExpenseApi).showExpense) {
1487
- this.state_1 = 2;
1488
- suspendResult = this._this__u8e3s4__1.showExpense$default_oumpty_k$(this.companyId_1, this.expenseId_1, this.fields_1, this);
1489
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1490
- return suspendResult;
1491
- }
1492
- continue $sm;
1493
- } else {
1494
- this.state_1 = 1;
1495
- suspendResult = await_0(this._this__u8e3s4__1.showExpense(this.companyId_1, this.expenseId_1, this.fields_1), this);
1496
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
1497
- return suspendResult;
1498
- }
1499
- continue $sm;
1506
+ this.exceptionState_1 = 2;
1507
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1508
+ var localVariableBody = EmptyContent_getInstance();
1509
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1510
+ var tmp0_safe_receiver = this.companyIds_1;
1511
+ if (tmp0_safe_receiver == null)
1512
+ null;
1513
+ else {
1514
+ var tmp2 = 'companyIds';
1515
+ var value = toMultiValue(tmp0_safe_receiver, 'multi');
1516
+ localVariableQuery.put_4fpzoq_k$(tmp2, value);
1517
+ }
1518
+
1519
+ if (this.search_1 == null)
1520
+ null;
1521
+ else {
1522
+ var value_0 = listOf_0(this.search_1);
1523
+ localVariableQuery.put_4fpzoq_k$('search', value_0);
1524
+ }
1525
+
1526
+ var tmp2_safe_receiver = this.status_1;
1527
+ if (tmp2_safe_receiver == null)
1528
+ null;
1529
+ else {
1530
+ var value_1 = toMultiValue(tmp2_safe_receiver, 'multi');
1531
+ localVariableQuery.put_4fpzoq_k$('status', value_1);
1532
+ }
1533
+
1534
+ if (this.dateOfPurchaseFrom_1 == null)
1535
+ null;
1536
+ else {
1537
+ var tmp2_0 = 'dateOfPurchaseFrom';
1538
+ var value_2 = listOf_0(this.dateOfPurchaseFrom_1.toString());
1539
+ localVariableQuery.put_4fpzoq_k$(tmp2_0, value_2);
1540
+ }
1541
+
1542
+ if (this.dateOfPurchaseTo_1 == null)
1543
+ null;
1544
+ else {
1545
+ var tmp2_1 = 'dateOfPurchaseTo';
1546
+ var value_3 = listOf_0(this.dateOfPurchaseTo_1.toString());
1547
+ localVariableQuery.put_4fpzoq_k$(tmp2_1, value_3);
1548
+ }
1549
+
1550
+ if (this.fields_1 == null)
1551
+ null;
1552
+ else {
1553
+ var value_4 = listOf_0(this.fields_1);
1554
+ localVariableQuery.put_4fpzoq_k$('fields', value_4);
1555
+ }
1556
+
1557
+ if (this.pageToken_1 == null)
1558
+ null;
1559
+ else {
1560
+ var tmp2_2 = 'pageToken';
1561
+ var value_5 = listOf_0(this.pageToken_1);
1562
+ localVariableQuery.put_4fpzoq_k$(tmp2_2, value_5);
1563
+ }
1564
+
1565
+ if (this.autoPaginate_1 == null)
1566
+ null;
1567
+ else {
1568
+ var tmp2_3 = 'autoPaginate';
1569
+ var value_6 = listOf_0('' + this.autoPaginate_1);
1570
+ localVariableQuery.put_4fpzoq_k$(tmp2_3, value_6);
1571
+ }
1572
+
1573
+ if (this.count_1 == null)
1574
+ null;
1575
+ else {
1576
+ var value_7 = listOf_0('' + this.count_1);
1577
+ localVariableQuery.put_4fpzoq_k$('count', value_7);
1578
+ }
1579
+
1580
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1581
+ var tmp9_method = RequestMethod_GET_getInstance();
1582
+ var localVariableConfig = new RequestConfig(tmp9_method, '/companies/economy/expense', localVariableHeaders, VOID, localVariableQuery, true);
1583
+ this.state_1 = 1;
1584
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1585
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1586
+ return suspendResult;
1500
1587
  }
1501
1588
 
1502
- case 1:
1503
- this.WHEN_RESULT0__1 = suspendResult;
1504
- this.state_1 = 3;
1505
1589
  continue $sm;
1590
+ case 1:
1591
+ var this_0 = suspendResult;
1592
+ var tmp_0 = getKClass(PagedListExpense);
1593
+ var tmp_1 = null instanceof PagedListExpense;
1594
+ var tmp_2;
1595
+ try {
1596
+ tmp_2 = createKType(getKClass(PagedListExpense), arrayOf([]), false);
1597
+ } catch ($p) {
1598
+ var tmp_3;
1599
+ if ($p instanceof Error) {
1600
+ var _unused_var__etf5q3 = $p;
1601
+ tmp_3 = null;
1602
+ } else {
1603
+ throw $p;
1604
+ }
1605
+ tmp_2 = tmp_3;
1606
+ }
1607
+
1608
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1506
1609
  case 2:
1507
- this.WHEN_RESULT0__1 = suspendResult;
1508
- this.state_1 = 3;
1509
- continue $sm;
1510
- case 3:
1511
- return this.WHEN_RESULT0__1;
1512
- case 4:
1513
1610
  throw this.exception_1;
1514
1611
  }
1515
- } catch ($p) {
1516
- var e = $p;
1517
- if (this.exceptionState_1 === 4) {
1612
+ } catch ($p_0) {
1613
+ var e = $p_0;
1614
+ if (this.exceptionState_1 === 2) {
1518
1615
  throw e;
1519
1616
  } else {
1520
1617
  this.state_1 = this.exceptionState_1;
@@ -1523,226 +1620,232 @@ protoOf($showExpense$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
1523
1620
  }
1524
1621
  while (true);
1525
1622
  };
1526
- protoOf(ExpenseApi).acceptExpense_z1y8us_k$ = function (companyId, expenseId, $completion) {
1527
- var tmp = new $acceptExpenseCOROUTINE$(this, companyId, expenseId, $completion);
1528
- tmp.result_1 = Unit_instance;
1529
- tmp.exception_1 = null;
1530
- return tmp.doResume_5yljmg_k$();
1531
- };
1532
- protoOf(ExpenseApi).acceptExpense = function (companyId, expenseId) {
1533
- var tmp = this;
1623
+ function rejectExpenseOperation(client, companyId, expenseId, rejectExpenseCommand) {
1534
1624
  return promisify(function ($completion) {
1535
- return tmp.acceptExpense_z1y8us_k$(companyId, expenseId, $completion);
1625
+ return rejectExpenseOperation_0(client, companyId, expenseId, rejectExpenseCommand, $completion);
1536
1626
  });
1537
- };
1538
- protoOf(ExpenseApi).acceptExpense$suspendBridge_b9bonn_k$ = function (companyId, expenseId, $completion) {
1539
- var tmp = new $acceptExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, $completion);
1540
- tmp.result_1 = Unit_instance;
1541
- tmp.exception_1 = null;
1542
- return tmp.doResume_5yljmg_k$();
1543
- };
1544
- protoOf(ExpenseApi).createExpense_tm55ft_k$ = function (companyId, createExpenseCommand, $completion) {
1545
- var tmp = new $createExpenseCOROUTINE$(this, companyId, createExpenseCommand, $completion);
1546
- tmp.result_1 = Unit_instance;
1547
- tmp.exception_1 = null;
1548
- return tmp.doResume_5yljmg_k$();
1549
- };
1550
- protoOf(ExpenseApi).createExpense = function (companyId, createExpenseCommand) {
1551
- var tmp = this;
1552
- return promisify(function ($completion) {
1553
- return tmp.createExpense_tm55ft_k$(companyId, createExpenseCommand, $completion);
1554
- });
1555
- };
1556
- protoOf(ExpenseApi).createExpense$suspendBridge_v2lokq_k$ = function (companyId, createExpenseCommand, $completion) {
1557
- var tmp = new $createExpense$suspendBridgeCOROUTINE$(this, companyId, createExpenseCommand, $completion);
1558
- tmp.result_1 = Unit_instance;
1559
- tmp.exception_1 = null;
1560
- return tmp.doResume_5yljmg_k$();
1561
- };
1562
- protoOf(ExpenseApi).deleteExpense_wooht5_k$ = function (companyId, expenseId, $completion) {
1563
- var tmp = new $deleteExpenseCOROUTINE$(this, companyId, expenseId, $completion);
1564
- tmp.result_1 = Unit_instance;
1565
- tmp.exception_1 = null;
1566
- return tmp.doResume_5yljmg_k$();
1567
- };
1568
- protoOf(ExpenseApi).deleteExpense = function (companyId, expenseId) {
1569
- var tmp = this;
1570
- return promisify(function ($completion) {
1571
- return tmp.deleteExpense_wooht5_k$(companyId, expenseId, $completion);
1572
- });
1573
- };
1574
- protoOf(ExpenseApi).deleteExpense$suspendBridge_np8xm2_k$ = function (companyId, expenseId, $completion) {
1575
- var tmp = new $deleteExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, $completion);
1576
- tmp.result_1 = Unit_instance;
1577
- tmp.exception_1 = null;
1578
- return tmp.doResume_5yljmg_k$();
1579
- };
1580
- protoOf(ExpenseApi).indexExpense_7ju6z2_k$ = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
1581
- var tmp = new $indexExpenseCOROUTINE$(this, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1582
- tmp.result_1 = Unit_instance;
1583
- tmp.exception_1 = null;
1584
- return tmp.doResume_5yljmg_k$();
1585
- };
1586
- protoOf(ExpenseApi).indexExpense$default_tniyce_k$ = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion, $super) {
1587
- search = search === VOID ? null : search;
1588
- status = status === VOID ? null : status;
1589
- dateOfPurchaseFrom = dateOfPurchaseFrom === VOID ? null : dateOfPurchaseFrom;
1590
- dateOfPurchaseTo = dateOfPurchaseTo === VOID ? null : dateOfPurchaseTo;
1591
- fields = fields === VOID ? null : fields;
1592
- pageToken = pageToken === VOID ? null : pageToken;
1593
- autoPaginate = autoPaginate === VOID ? null : autoPaginate;
1594
- count = count === VOID ? null : count;
1595
- return $super === VOID ? this.indexExpense_7ju6z2_k$(companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) : $super.indexExpense_7ju6z2_k$.call(this, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1596
- };
1597
- protoOf(ExpenseApi).indexExpense = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count) {
1598
- var tmp = this;
1599
- return promisify(function ($completion) {
1600
- return tmp.indexExpense$default_tniyce_k$(companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1601
- });
1602
- };
1603
- protoOf(ExpenseApi).indexExpense$suspendBridge_3kqydv_k$ = function (companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
1604
- var tmp = new $indexExpense$suspendBridgeCOROUTINE$(this, companyId, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1605
- tmp.result_1 = Unit_instance;
1606
- tmp.exception_1 = null;
1607
- return tmp.doResume_5yljmg_k$();
1608
- };
1609
- protoOf(ExpenseApi).indexExpenseTypes_p7w8zu_k$ = function (companyId, fields, pageToken, autoPaginate, count, $completion) {
1610
- var tmp = new $indexExpenseTypesCOROUTINE$(this, companyId, fields, pageToken, autoPaginate, count, $completion);
1611
- tmp.result_1 = Unit_instance;
1612
- tmp.exception_1 = null;
1613
- return tmp.doResume_5yljmg_k$();
1614
- };
1615
- protoOf(ExpenseApi).indexExpenseTypes$default_vl01zw_k$ = function (companyId, fields, pageToken, autoPaginate, count, $completion, $super) {
1616
- fields = fields === VOID ? null : fields;
1617
- pageToken = pageToken === VOID ? null : pageToken;
1618
- autoPaginate = autoPaginate === VOID ? null : autoPaginate;
1619
- count = count === VOID ? null : count;
1620
- return $super === VOID ? this.indexExpenseTypes_p7w8zu_k$(companyId, fields, pageToken, autoPaginate, count, $completion) : $super.indexExpenseTypes_p7w8zu_k$.call(this, companyId, fields, pageToken, autoPaginate, count, $completion);
1621
- };
1622
- protoOf(ExpenseApi).indexExpenseTypes = function (companyId, fields, pageToken, autoPaginate, count) {
1623
- var tmp = this;
1624
- return promisify(function ($completion) {
1625
- return tmp.indexExpenseTypes$default_vl01zw_k$(companyId, fields, pageToken, autoPaginate, count, $completion);
1626
- });
1627
- };
1628
- protoOf(ExpenseApi).indexExpenseTypes$suspendBridge_k83wd1_k$ = function (companyId, fields, pageToken, autoPaginate, count, $completion) {
1629
- var tmp = new $indexExpenseTypes$suspendBridgeCOROUTINE$(this, companyId, fields, pageToken, autoPaginate, count, $completion);
1630
- tmp.result_1 = Unit_instance;
1631
- tmp.exception_1 = null;
1632
- return tmp.doResume_5yljmg_k$();
1633
- };
1634
- protoOf(ExpenseApi).indexExpenseUnattested_mlb7f4_k$ = function (companyId, fields, $completion) {
1635
- var tmp = new $indexExpenseUnattestedCOROUTINE$(this, companyId, fields, $completion);
1636
- tmp.result_1 = Unit_instance;
1637
- tmp.exception_1 = null;
1638
- return tmp.doResume_5yljmg_k$();
1639
- };
1640
- protoOf(ExpenseApi).indexExpenseUnattested$default_7vhio1_k$ = function (companyId, fields, $completion, $super) {
1641
- fields = fields === VOID ? null : fields;
1642
- return $super === VOID ? this.indexExpenseUnattested_mlb7f4_k$(companyId, fields, $completion) : $super.indexExpenseUnattested_mlb7f4_k$.call(this, companyId, fields, $completion);
1643
- };
1644
- protoOf(ExpenseApi).indexExpenseUnattested = function (companyId, fields) {
1645
- var tmp = this;
1646
- return promisify(function ($completion) {
1647
- return tmp.indexExpenseUnattested$default_7vhio1_k$(companyId, fields, $completion);
1648
- });
1649
- };
1650
- protoOf(ExpenseApi).indexExpenseUnattested$suspendBridge_pzqtxr_k$ = function (companyId, fields, $completion) {
1651
- var tmp = new $indexExpenseUnattested$suspendBridgeCOROUTINE$(this, companyId, fields, $completion);
1652
- tmp.result_1 = Unit_instance;
1653
- tmp.exception_1 = null;
1654
- return tmp.doResume_5yljmg_k$();
1655
- };
1656
- protoOf(ExpenseApi).indexExpenseUser_5sayrq_k$ = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
1657
- var tmp = new $indexExpenseUserCOROUTINE$(this, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1658
- tmp.result_1 = Unit_instance;
1659
- tmp.exception_1 = null;
1660
- return tmp.doResume_5yljmg_k$();
1661
- };
1662
- protoOf(ExpenseApi).indexExpenseUser$default_ub788j_k$ = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion, $super) {
1663
- companyIds = companyIds === VOID ? null : companyIds;
1664
- search = search === VOID ? null : search;
1665
- status = status === VOID ? null : status;
1666
- dateOfPurchaseFrom = dateOfPurchaseFrom === VOID ? null : dateOfPurchaseFrom;
1667
- dateOfPurchaseTo = dateOfPurchaseTo === VOID ? null : dateOfPurchaseTo;
1668
- fields = fields === VOID ? null : fields;
1669
- pageToken = pageToken === VOID ? null : pageToken;
1670
- autoPaginate = autoPaginate === VOID ? null : autoPaginate;
1671
- count = count === VOID ? null : count;
1672
- return $super === VOID ? this.indexExpenseUser_5sayrq_k$(companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) : $super.indexExpenseUser_5sayrq_k$.call(this, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1673
- };
1674
- protoOf(ExpenseApi).indexExpenseUser = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count) {
1675
- var tmp = this;
1676
- return promisify(function ($completion) {
1677
- return tmp.indexExpenseUser$default_ub788j_k$(companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1678
- });
1679
- };
1680
- protoOf(ExpenseApi).indexExpenseUser$suspendBridge_969w7t_k$ = function (companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion) {
1681
- var tmp = new $indexExpenseUser$suspendBridgeCOROUTINE$(this, companyIds, search, status, dateOfPurchaseFrom, dateOfPurchaseTo, fields, pageToken, autoPaginate, count, $completion);
1682
- tmp.result_1 = Unit_instance;
1683
- tmp.exception_1 = null;
1684
- return tmp.doResume_5yljmg_k$();
1685
- };
1686
- protoOf(ExpenseApi).rejectExpense_wr6zla_k$ = function (companyId, expenseId, rejectExpenseCommand, $completion) {
1687
- var tmp = new $rejectExpenseCOROUTINE$(this, companyId, expenseId, rejectExpenseCommand, $completion);
1627
+ }
1628
+ function rejectExpenseOperation_0(client, companyId, expenseId, rejectExpenseCommand, $completion) {
1629
+ var tmp = new $rejectExpenseOperationCOROUTINE$(client, companyId, expenseId, rejectExpenseCommand, $completion);
1688
1630
  tmp.result_1 = Unit_instance;
1689
1631
  tmp.exception_1 = null;
1690
1632
  return tmp.doResume_5yljmg_k$();
1633
+ }
1634
+ function $rejectExpenseOperationCOROUTINE$(client, companyId, expenseId, rejectExpenseCommand, resultContinuation) {
1635
+ CoroutineImpl.call(this, resultContinuation);
1636
+ this.client_1 = client;
1637
+ this.companyId_1 = companyId;
1638
+ this.expenseId_1 = expenseId;
1639
+ this.rejectExpenseCommand_1 = rejectExpenseCommand;
1640
+ }
1641
+ protoOf($rejectExpenseOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1642
+ var suspendResult = this.result_1;
1643
+ $sm: do
1644
+ try {
1645
+ var tmp = this.state_1;
1646
+ switch (tmp) {
1647
+ case 0:
1648
+ this.exceptionState_1 = 2;
1649
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1650
+ var localVariableBody = this.rejectExpenseCommand_1;
1651
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1652
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1653
+ var tmp0_method = RequestMethod_POST_getInstance();
1654
+ var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}/reject', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
1655
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1656
+ this.state_1 = 1;
1657
+ suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1658
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1659
+ return suspendResult;
1660
+ }
1661
+
1662
+ continue $sm;
1663
+ case 1:
1664
+ var this_0 = suspendResult;
1665
+ var tmp_0 = getKClass(Unit);
1666
+ var tmp_1 = null instanceof Unit;
1667
+ var tmp_2;
1668
+ try {
1669
+ tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
1670
+ } catch ($p) {
1671
+ var tmp_3;
1672
+ if ($p instanceof Error) {
1673
+ var _unused_var__etf5q3 = $p;
1674
+ tmp_3 = null;
1675
+ } else {
1676
+ throw $p;
1677
+ }
1678
+ tmp_2 = tmp_3;
1679
+ }
1680
+
1681
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1682
+ case 2:
1683
+ throw this.exception_1;
1684
+ }
1685
+ } catch ($p_0) {
1686
+ var e = $p_0;
1687
+ if (this.exceptionState_1 === 2) {
1688
+ throw e;
1689
+ } else {
1690
+ this.state_1 = this.exceptionState_1;
1691
+ this.exception_1 = e;
1692
+ }
1693
+ }
1694
+ while (true);
1691
1695
  };
1692
- protoOf(ExpenseApi).rejectExpense = function (companyId, expenseId, rejectExpenseCommand) {
1693
- var tmp = this;
1696
+ function remindExpenseOperation(client, companyId, expenseId) {
1694
1697
  return promisify(function ($completion) {
1695
- return tmp.rejectExpense_wr6zla_k$(companyId, expenseId, rejectExpenseCommand, $completion);
1698
+ return remindExpenseOperation_0(client, companyId, expenseId, $completion);
1696
1699
  });
1697
- };
1698
- protoOf(ExpenseApi).rejectExpense$suspendBridge_952bnz_k$ = function (companyId, expenseId, rejectExpenseCommand, $completion) {
1699
- var tmp = new $rejectExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, rejectExpenseCommand, $completion);
1700
- tmp.result_1 = Unit_instance;
1701
- tmp.exception_1 = null;
1702
- return tmp.doResume_5yljmg_k$();
1703
- };
1704
- protoOf(ExpenseApi).remindExpense_gd8i58_k$ = function (companyId, expenseId, $completion) {
1705
- var tmp = new $remindExpenseCOROUTINE$(this, companyId, expenseId, $completion);
1700
+ }
1701
+ function remindExpenseOperation_0(client, companyId, expenseId, $completion) {
1702
+ var tmp = new $remindExpenseOperationCOROUTINE$(client, companyId, expenseId, $completion);
1706
1703
  tmp.result_1 = Unit_instance;
1707
1704
  tmp.exception_1 = null;
1708
1705
  return tmp.doResume_5yljmg_k$();
1706
+ }
1707
+ function $remindExpenseOperationCOROUTINE$(client, companyId, expenseId, resultContinuation) {
1708
+ CoroutineImpl.call(this, resultContinuation);
1709
+ this.client_1 = client;
1710
+ this.companyId_1 = companyId;
1711
+ this.expenseId_1 = expenseId;
1712
+ }
1713
+ protoOf($remindExpenseOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1714
+ var suspendResult = this.result_1;
1715
+ $sm: do
1716
+ try {
1717
+ var tmp = this.state_1;
1718
+ switch (tmp) {
1719
+ case 0:
1720
+ this.exceptionState_1 = 2;
1721
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1722
+ var localVariableBody = EmptyContent_getInstance();
1723
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1724
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1725
+ var tmp0_method = RequestMethod_POST_getInstance();
1726
+ var tmp1_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}/remind', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
1727
+ var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
1728
+ this.state_1 = 1;
1729
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1730
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1731
+ return suspendResult;
1732
+ }
1733
+
1734
+ continue $sm;
1735
+ case 1:
1736
+ var this_0 = suspendResult;
1737
+ var tmp_0 = getKClass(ExpenseReminder);
1738
+ var tmp_1 = null instanceof ExpenseReminder;
1739
+ var tmp_2;
1740
+ try {
1741
+ tmp_2 = createKType(getKClass(ExpenseReminder), arrayOf([]), false);
1742
+ } catch ($p) {
1743
+ var tmp_3;
1744
+ if ($p instanceof Error) {
1745
+ var _unused_var__etf5q3 = $p;
1746
+ tmp_3 = null;
1747
+ } else {
1748
+ throw $p;
1749
+ }
1750
+ tmp_2 = tmp_3;
1751
+ }
1752
+
1753
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1754
+ case 2:
1755
+ throw this.exception_1;
1756
+ }
1757
+ } catch ($p_0) {
1758
+ var e = $p_0;
1759
+ if (this.exceptionState_1 === 2) {
1760
+ throw e;
1761
+ } else {
1762
+ this.state_1 = this.exceptionState_1;
1763
+ this.exception_1 = e;
1764
+ }
1765
+ }
1766
+ while (true);
1709
1767
  };
1710
- protoOf(ExpenseApi).remindExpense = function (companyId, expenseId) {
1711
- var tmp = this;
1768
+ function showExpenseOperation(client, companyId, expenseId, fields) {
1712
1769
  return promisify(function ($completion) {
1713
- return tmp.remindExpense_gd8i58_k$(companyId, expenseId, $completion);
1770
+ return showExpenseOperation_0(client, companyId, expenseId, fields, $completion);
1714
1771
  });
1715
- };
1716
- protoOf(ExpenseApi).remindExpense$suspendBridge_v2iqyt_k$ = function (companyId, expenseId, $completion) {
1717
- var tmp = new $remindExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, $completion);
1718
- tmp.result_1 = Unit_instance;
1719
- tmp.exception_1 = null;
1720
- return tmp.doResume_5yljmg_k$();
1721
- };
1722
- protoOf(ExpenseApi).showExpense_y8nlhp_k$ = function (companyId, expenseId, fields, $completion) {
1723
- var tmp = new $showExpenseCOROUTINE$(this, companyId, expenseId, fields, $completion);
1724
- tmp.result_1 = Unit_instance;
1725
- tmp.exception_1 = null;
1726
- return tmp.doResume_5yljmg_k$();
1727
- };
1728
- protoOf(ExpenseApi).showExpense$default_oumpty_k$ = function (companyId, expenseId, fields, $completion, $super) {
1772
+ }
1773
+ function showExpenseOperation_0(client, companyId, expenseId, fields, $completion) {
1729
1774
  fields = fields === VOID ? null : fields;
1730
- return $super === VOID ? this.showExpense_y8nlhp_k$(companyId, expenseId, fields, $completion) : $super.showExpense_y8nlhp_k$.call(this, companyId, expenseId, fields, $completion);
1731
- };
1732
- protoOf(ExpenseApi).showExpense = function (companyId, expenseId, fields) {
1733
- var tmp = this;
1734
- return promisify(function ($completion) {
1735
- return tmp.showExpense$default_oumpty_k$(companyId, expenseId, fields, $completion);
1736
- });
1737
- };
1738
- protoOf(ExpenseApi).showExpense$suspendBridge_i6b7e4_k$ = function (companyId, expenseId, fields, $completion) {
1739
- var tmp = new $showExpense$suspendBridgeCOROUTINE$(this, companyId, expenseId, fields, $completion);
1775
+ var tmp = new $showExpenseOperationCOROUTINE$(client, companyId, expenseId, fields, $completion);
1740
1776
  tmp.result_1 = Unit_instance;
1741
1777
  tmp.exception_1 = null;
1742
1778
  return tmp.doResume_5yljmg_k$();
1743
- };
1744
- function ExpenseApi() {
1745
1779
  }
1780
+ function $showExpenseOperationCOROUTINE$(client, companyId, expenseId, fields, resultContinuation) {
1781
+ CoroutineImpl.call(this, resultContinuation);
1782
+ this.client_1 = client;
1783
+ this.companyId_1 = companyId;
1784
+ this.expenseId_1 = expenseId;
1785
+ this.fields_1 = fields;
1786
+ }
1787
+ protoOf($showExpenseOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
1788
+ var suspendResult = this.result_1;
1789
+ $sm: do
1790
+ try {
1791
+ var tmp = this.state_1;
1792
+ switch (tmp) {
1793
+ case 0:
1794
+ this.exceptionState_1 = 2;
1795
+ var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
1796
+ var localVariableBody = EmptyContent_getInstance();
1797
+ var localVariableQuery = LinkedHashMap_init_$Create$();
1798
+ if (this.fields_1 == null)
1799
+ null;
1800
+ else {
1801
+ var value = listOf_0(this.fields_1);
1802
+ localVariableQuery.put_4fpzoq_k$('fields', value);
1803
+ }
1804
+
1805
+ var localVariableHeaders = LinkedHashMap_init_$Create$();
1806
+ var tmp1_method = RequestMethod_GET_getInstance();
1807
+ var tmp2_path = replace(replace('/companies/{companyId}/economy/expense/{expenseId}', '{companyId}', this.companyId_1.toString()), '{expenseId}', this.expenseId_1.toString());
1808
+ var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
1809
+ this.state_1 = 1;
1810
+ suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
1811
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1812
+ return suspendResult;
1813
+ }
1814
+
1815
+ continue $sm;
1816
+ case 1:
1817
+ var this_0 = suspendResult;
1818
+ var tmp_0 = getKClass(Expense);
1819
+ var tmp_1 = null instanceof Expense;
1820
+ var tmp_2;
1821
+ try {
1822
+ tmp_2 = createKType(getKClass(Expense), arrayOf([]), false);
1823
+ } catch ($p) {
1824
+ var tmp_3;
1825
+ if ($p instanceof Error) {
1826
+ var _unused_var__etf5q3 = $p;
1827
+ tmp_3 = null;
1828
+ } else {
1829
+ throw $p;
1830
+ }
1831
+ tmp_2 = tmp_3;
1832
+ }
1833
+
1834
+ return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
1835
+ case 2:
1836
+ throw this.exception_1;
1837
+ }
1838
+ } catch ($p_0) {
1839
+ var e = $p_0;
1840
+ if (this.exceptionState_1 === 2) {
1841
+ throw e;
1842
+ } else {
1843
+ this.state_1 = this.exceptionState_1;
1844
+ this.exception_1 = e;
1845
+ }
1846
+ }
1847
+ while (true);
1848
+ };
1746
1849
  function Companion() {
1747
1850
  }
1748
1851
  var Companion_instance_0;
@@ -3794,6 +3897,16 @@ defineProp(ExpenseStatus, 'Companion', Companion_getInstance_6, VOID, true);
3794
3897
  export {
3795
3898
  expenseApi as expenseApi,
3796
3899
  ExpenseApi as ExpenseApi,
3900
+ acceptExpenseOperation as acceptExpenseOperation,
3901
+ createExpenseOperation as createExpenseOperation,
3902
+ deleteExpenseOperation as deleteExpenseOperation,
3903
+ indexExpenseOperation as indexExpenseOperation,
3904
+ indexExpenseTypesOperation as indexExpenseTypesOperation,
3905
+ indexExpenseUnattestedOperation as indexExpenseUnattestedOperation,
3906
+ indexExpenseUserOperation as indexExpenseUserOperation,
3907
+ rejectExpenseOperation as rejectExpenseOperation,
3908
+ remindExpenseOperation as remindExpenseOperation,
3909
+ showExpenseOperation as showExpenseOperation,
3797
3910
  CreateExpenseCommand as CreateExpenseCommand,
3798
3911
  Expense as Expense,
3799
3912
  ExpenseCount as ExpenseCount,