@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.
- package/kotlin-kotlin-stdlib.mjs +4 -8
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlinx-coroutines-core.mjs +7 -7
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2 -234
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
- package/ktor-ktor-utils.mjs +2 -2
- package/ktor-ktor-websockets.mjs +2 -2
- package/package.json +1 -1
- package/solibo-sdk-sdk-api-accounting.mjs +581 -514
- package/solibo-sdk-sdk-api-accounting.mjs.map +1 -1
- package/solibo-sdk-sdk-api-board.mjs +531 -472
- package/solibo-sdk-sdk-api-board.mjs.map +1 -1
- package/solibo-sdk-sdk-api-communication.mjs +3595 -3221
- package/solibo-sdk-sdk-api-communication.mjs.map +1 -1
- package/solibo-sdk-sdk-api-company.mjs +4382 -3959
- package/solibo-sdk-sdk-api-company.mjs.map +1 -1
- package/solibo-sdk-sdk-api-conversation.mjs +9152 -8320
- package/solibo-sdk-sdk-api-conversation.mjs.map +1 -1
- package/solibo-sdk-sdk-api-document.mjs +7517 -6991
- package/solibo-sdk-sdk-api-document.mjs.map +1 -1
- package/solibo-sdk-sdk-api-economy.mjs +966 -856
- package/solibo-sdk-sdk-api-economy.mjs.map +1 -1
- package/solibo-sdk-sdk-api-expense.mjs +1015 -902
- package/solibo-sdk-sdk-api-expense.mjs.map +1 -1
- package/solibo-sdk-sdk-api-follow-up.mjs +113 -98
- package/solibo-sdk-sdk-api-follow-up.mjs.map +1 -1
- package/solibo-sdk-sdk-api-homepage.mjs +4147 -3763
- package/solibo-sdk-sdk-api-homepage.mjs.map +1 -1
- package/solibo-sdk-sdk-api-insurance.mjs +778 -695
- package/solibo-sdk-sdk-api-insurance.mjs.map +1 -1
- package/solibo-sdk-sdk-api-invoice.mjs +1179 -1050
- package/solibo-sdk-sdk-api-invoice.mjs.map +1 -1
- package/solibo-sdk-sdk-api-invoicing.mjs +11671 -10553
- package/solibo-sdk-sdk-api-invoicing.mjs.map +1 -1
- package/solibo-sdk-sdk-api-issue.mjs +1750 -1566
- package/solibo-sdk-sdk-api-issue.mjs.map +1 -1
- package/solibo-sdk-sdk-api-loan.mjs +1281 -1143
- package/solibo-sdk-sdk-api-loan.mjs.map +1 -1
- package/solibo-sdk-sdk-api-marketing.mjs +383 -337
- package/solibo-sdk-sdk-api-marketing.mjs.map +1 -1
- package/solibo-sdk-sdk-api-meeting.mjs +2388 -2154
- package/solibo-sdk-sdk-api-meeting.mjs.map +1 -1
- package/solibo-sdk-sdk-api-organization.mjs +1577 -1408
- package/solibo-sdk-sdk-api-organization.mjs.map +1 -1
- package/solibo-sdk-sdk-api-parking.mjs +1660 -1489
- package/solibo-sdk-sdk-api-parking.mjs.map +1 -1
- package/solibo-sdk-sdk-api-person.mjs +1488 -1339
- package/solibo-sdk-sdk-api-person.mjs.map +1 -1
- package/solibo-sdk-sdk-api-resident-communication.mjs +5547 -5028
- package/solibo-sdk-sdk-api-resident-communication.mjs.map +1 -1
- package/solibo-sdk-sdk-api-resident.mjs +2699 -2368
- package/solibo-sdk-sdk-api-resident.mjs.map +1 -1
- package/solibo-sdk-sdk-api-routines.mjs +1235 -1096
- package/solibo-sdk-sdk-api-routines.mjs.map +1 -1
- package/solibo-sdk-sdk-api-scoped-contact.mjs +704 -638
- package/solibo-sdk-sdk-api-scoped-contact.mjs.map +1 -1
- package/solibo-sdk-sdk-api-section.mjs +4076 -3685
- package/solibo-sdk-sdk-api-section.mjs.map +1 -1
- package/solibo-sdk-sdk-api-settlement.mjs +2151 -1931
- package/solibo-sdk-sdk-api-settlement.mjs.map +1 -1
- package/solibo-sdk-sdk-api-storage.mjs +1621 -1454
- package/solibo-sdk-sdk-api-storage.mjs.map +1 -1
- package/solibo-sdk-sdk-api-supplier.mjs +2286 -2044
- package/solibo-sdk-sdk-api-supplier.mjs.map +1 -1
- package/solibo-sdk-sdk-api-task.mjs +818 -727
- package/solibo-sdk-sdk-api-task.mjs.map +1 -1
- package/solibo-sdk-sdk-api-third-party-information.mjs +1332 -1185
- package/solibo-sdk-sdk-api-third-party-information.mjs.map +1 -1
- package/solibo-sdk-sdk-api-user.mjs +1059 -945
- package/solibo-sdk-sdk-api-user.mjs.map +1 -1
- package/solibo-sdk-sdk-core.mjs +121 -155
- package/solibo-sdk-sdk-core.mjs.map +1 -1
- 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
|
arrayOf1akklvh2at202 as arrayOf,
|
|
12
17
|
createKType31ecntyyaay3k as createKType,
|
|
13
|
-
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
|
|
14
|
-
await3n7kedgocftsv as await_0,
|
|
15
18
|
Unitkvevlwgzwiuc as Unit,
|
|
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,
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
Companion_getInstance1if1t4zy98q04 as Companion_getInstance,
|
|
34
34
|
ApiClient_init_$Init$1zeqbeizsm394 as ApiClient_init_$Init$,
|
|
35
35
|
ApiClient_init_$Init$38ftv1s10hf6v as ApiClient_init_$Init$_0,
|
|
36
|
+
ApiClient2azxax1pjdtdm as ApiClient,
|
|
36
37
|
RequestMethod_PUT_getInstance20qfhqm35d9pr as RequestMethod_PUT_getInstance,
|
|
37
38
|
RequestConfig10esd7ix0dbbm as RequestConfig,
|
|
38
39
|
TypedBodyProvider2ertybblisp23 as TypedBodyProvider,
|
|
@@ -41,7 +42,6 @@ import {
|
|
|
41
42
|
RequestMethod_DELETE_getInstance298derfb6aued as RequestMethod_DELETE_getInstance,
|
|
42
43
|
RequestMethod_GET_getInstance1hbf807ypkdh8 as RequestMethod_GET_getInstance,
|
|
43
44
|
toMultiValue5gsdsvx60e2f as toMultiValue,
|
|
44
|
-
ApiClient2azxax1pjdtdm as ApiClient,
|
|
45
45
|
$serializer_getInstance2u6e9d36lcolu as $serializer_getInstance,
|
|
46
46
|
$serializer_getInstance2ubvlf5l752ie as $serializer_getInstance_0,
|
|
47
47
|
} from './solibo-sdk-sdk-core.mjs';
|
|
@@ -64,21 +64,21 @@ import {
|
|
|
64
64
|
var imul = Math.imul;
|
|
65
65
|
//endregion
|
|
66
66
|
//region block: pre-declaration
|
|
67
|
-
initMetadataForCoroutine($addInsuranceAgreementDocumentCOROUTINE$, CoroutineImpl);
|
|
68
67
|
initMetadataForCoroutine($addInsuranceAgreementDocument$suspendBridgeCOROUTINE$, CoroutineImpl);
|
|
69
|
-
initMetadataForCoroutine($closeInsuranceCOROUTINE$, CoroutineImpl);
|
|
70
68
|
initMetadataForCoroutine($closeInsurance$suspendBridgeCOROUTINE$, CoroutineImpl);
|
|
71
|
-
initMetadataForCoroutine($createInsuranceCOROUTINE$, CoroutineImpl);
|
|
72
69
|
initMetadataForCoroutine($createInsurance$suspendBridgeCOROUTINE$, CoroutineImpl);
|
|
73
|
-
initMetadataForCoroutine($deleteInsuranceCOROUTINE$, CoroutineImpl);
|
|
74
70
|
initMetadataForCoroutine($deleteInsurance$suspendBridgeCOROUTINE$, CoroutineImpl);
|
|
75
|
-
initMetadataForCoroutine($indexInsurancesCOROUTINE$, CoroutineImpl);
|
|
76
71
|
initMetadataForCoroutine($indexInsurances$suspendBridgeCOROUTINE$, CoroutineImpl);
|
|
77
|
-
initMetadataForCoroutine($indexInsurancesUserCOROUTINE$, CoroutineImpl);
|
|
78
72
|
initMetadataForCoroutine($indexInsurancesUser$suspendBridgeCOROUTINE$, CoroutineImpl);
|
|
79
|
-
initMetadataForCoroutine($showInsuranceCOROUTINE$, CoroutineImpl);
|
|
80
73
|
initMetadataForCoroutine($showInsurance$suspendBridgeCOROUTINE$, CoroutineImpl);
|
|
81
74
|
initMetadataForClass(InsuranceApi, 'InsuranceApi', create, ApiClient, VOID, [3, 2, 10]);
|
|
75
|
+
initMetadataForCoroutine($addInsuranceAgreementDocumentOperationCOROUTINE$, CoroutineImpl);
|
|
76
|
+
initMetadataForCoroutine($closeInsuranceOperationCOROUTINE$, CoroutineImpl);
|
|
77
|
+
initMetadataForCoroutine($createInsuranceOperationCOROUTINE$, CoroutineImpl);
|
|
78
|
+
initMetadataForCoroutine($deleteInsuranceOperationCOROUTINE$, CoroutineImpl);
|
|
79
|
+
initMetadataForCoroutine($indexInsurancesOperationCOROUTINE$, CoroutineImpl);
|
|
80
|
+
initMetadataForCoroutine($indexInsurancesUserOperationCOROUTINE$, CoroutineImpl);
|
|
81
|
+
initMetadataForCoroutine($showInsuranceOperationCOROUTINE$, CoroutineImpl);
|
|
82
82
|
initMetadataForCompanion(Companion);
|
|
83
83
|
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
84
84
|
initMetadataForClass(AddAgreementDocumentToInsuranceCommand, 'AddAgreementDocumentToInsuranceCommand', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});
|
|
@@ -125,68 +125,6 @@ function InsuranceApi_init_$Init$_0(baseUrl, httpClient, $this) {
|
|
|
125
125
|
function createWithClient(baseUrl, httpClient) {
|
|
126
126
|
return InsuranceApi_init_$Init$_0(baseUrl, httpClient, objectCreate(protoOf(InsuranceApi)));
|
|
127
127
|
}
|
|
128
|
-
function $addInsuranceAgreementDocumentCOROUTINE$(_this__u8e3s4, companyId, insuranceId, addAgreementDocumentToInsuranceCommand, resultContinuation) {
|
|
129
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
130
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
131
|
-
this.companyId_1 = companyId;
|
|
132
|
-
this.insuranceId_1 = insuranceId;
|
|
133
|
-
this.addAgreementDocumentToInsuranceCommand_1 = addAgreementDocumentToInsuranceCommand;
|
|
134
|
-
}
|
|
135
|
-
protoOf($addInsuranceAgreementDocumentCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
136
|
-
var suspendResult = this.result_1;
|
|
137
|
-
$sm: do
|
|
138
|
-
try {
|
|
139
|
-
var tmp = this.state_1;
|
|
140
|
-
switch (tmp) {
|
|
141
|
-
case 0:
|
|
142
|
-
this.exceptionState_1 = 2;
|
|
143
|
-
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
144
|
-
var localVariableBody = this.addAgreementDocumentToInsuranceCommand_1;
|
|
145
|
-
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
146
|
-
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
147
|
-
var tmp0_method = RequestMethod_PUT_getInstance();
|
|
148
|
-
var tmp1_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}/agreement', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
149
|
-
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
150
|
-
this.state_1 = 1;
|
|
151
|
-
suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
152
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
153
|
-
return suspendResult;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
continue $sm;
|
|
157
|
-
case 1:
|
|
158
|
-
var this_0 = suspendResult;
|
|
159
|
-
var tmp_0 = getKClass(Insurance);
|
|
160
|
-
var tmp_1 = null instanceof Insurance;
|
|
161
|
-
var tmp_2;
|
|
162
|
-
try {
|
|
163
|
-
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
164
|
-
} catch ($p) {
|
|
165
|
-
var tmp_3;
|
|
166
|
-
if ($p instanceof Error) {
|
|
167
|
-
var _unused_var__etf5q3 = $p;
|
|
168
|
-
tmp_3 = null;
|
|
169
|
-
} else {
|
|
170
|
-
throw $p;
|
|
171
|
-
}
|
|
172
|
-
tmp_2 = tmp_3;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
176
|
-
case 2:
|
|
177
|
-
throw this.exception_1;
|
|
178
|
-
}
|
|
179
|
-
} catch ($p_0) {
|
|
180
|
-
var e = $p_0;
|
|
181
|
-
if (this.exceptionState_1 === 2) {
|
|
182
|
-
throw e;
|
|
183
|
-
} else {
|
|
184
|
-
this.state_1 = this.exceptionState_1;
|
|
185
|
-
this.exception_1 = e;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
while (true);
|
|
189
|
-
};
|
|
190
128
|
function $addInsuranceAgreementDocument$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, insuranceId, addAgreementDocumentToInsuranceCommand, resultContinuation) {
|
|
191
129
|
CoroutineImpl.call(this, resultContinuation);
|
|
192
130
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
@@ -242,68 +180,6 @@ protoOf($addInsuranceAgreementDocument$suspendBridgeCOROUTINE$).doResume_5yljmg_
|
|
|
242
180
|
}
|
|
243
181
|
while (true);
|
|
244
182
|
};
|
|
245
|
-
function $closeInsuranceCOROUTINE$(_this__u8e3s4, companyId, insuranceId, closeInsuranceCommand, resultContinuation) {
|
|
246
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
247
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
248
|
-
this.companyId_1 = companyId;
|
|
249
|
-
this.insuranceId_1 = insuranceId;
|
|
250
|
-
this.closeInsuranceCommand_1 = closeInsuranceCommand;
|
|
251
|
-
}
|
|
252
|
-
protoOf($closeInsuranceCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
253
|
-
var suspendResult = this.result_1;
|
|
254
|
-
$sm: do
|
|
255
|
-
try {
|
|
256
|
-
var tmp = this.state_1;
|
|
257
|
-
switch (tmp) {
|
|
258
|
-
case 0:
|
|
259
|
-
this.exceptionState_1 = 2;
|
|
260
|
-
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
261
|
-
var localVariableBody = this.closeInsuranceCommand_1;
|
|
262
|
-
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
263
|
-
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
264
|
-
var tmp0_method = RequestMethod_PUT_getInstance();
|
|
265
|
-
var tmp1_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}/close', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
266
|
-
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
267
|
-
this.state_1 = 1;
|
|
268
|
-
suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
269
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
270
|
-
return suspendResult;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
continue $sm;
|
|
274
|
-
case 1:
|
|
275
|
-
var this_0 = suspendResult;
|
|
276
|
-
var tmp_0 = getKClass(Insurance);
|
|
277
|
-
var tmp_1 = null instanceof Insurance;
|
|
278
|
-
var tmp_2;
|
|
279
|
-
try {
|
|
280
|
-
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
281
|
-
} catch ($p) {
|
|
282
|
-
var tmp_3;
|
|
283
|
-
if ($p instanceof Error) {
|
|
284
|
-
var _unused_var__etf5q3 = $p;
|
|
285
|
-
tmp_3 = null;
|
|
286
|
-
} else {
|
|
287
|
-
throw $p;
|
|
288
|
-
}
|
|
289
|
-
tmp_2 = tmp_3;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
293
|
-
case 2:
|
|
294
|
-
throw this.exception_1;
|
|
295
|
-
}
|
|
296
|
-
} catch ($p_0) {
|
|
297
|
-
var e = $p_0;
|
|
298
|
-
if (this.exceptionState_1 === 2) {
|
|
299
|
-
throw e;
|
|
300
|
-
} else {
|
|
301
|
-
this.state_1 = this.exceptionState_1;
|
|
302
|
-
this.exception_1 = e;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
while (true);
|
|
306
|
-
};
|
|
307
183
|
function $closeInsurance$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, insuranceId, closeInsuranceCommand, resultContinuation) {
|
|
308
184
|
CoroutineImpl.call(this, resultContinuation);
|
|
309
185
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
@@ -359,67 +235,6 @@ protoOf($closeInsurance$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function (
|
|
|
359
235
|
}
|
|
360
236
|
while (true);
|
|
361
237
|
};
|
|
362
|
-
function $createInsuranceCOROUTINE$(_this__u8e3s4, companyId, createInsuranceCommand, resultContinuation) {
|
|
363
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
364
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
365
|
-
this.companyId_1 = companyId;
|
|
366
|
-
this.createInsuranceCommand_1 = createInsuranceCommand;
|
|
367
|
-
}
|
|
368
|
-
protoOf($createInsuranceCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
369
|
-
var suspendResult = this.result_1;
|
|
370
|
-
$sm: do
|
|
371
|
-
try {
|
|
372
|
-
var tmp = this.state_1;
|
|
373
|
-
switch (tmp) {
|
|
374
|
-
case 0:
|
|
375
|
-
this.exceptionState_1 = 2;
|
|
376
|
-
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
377
|
-
var localVariableBody = this.createInsuranceCommand_1;
|
|
378
|
-
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
379
|
-
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
380
|
-
var tmp0_method = RequestMethod_POST_getInstance();
|
|
381
|
-
var tmp1_path = replace('/companies/{companyId}/economy/insurances', '{companyId}', this.companyId_1.toString());
|
|
382
|
-
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
383
|
-
this.state_1 = 1;
|
|
384
|
-
suspendResult = this._this__u8e3s4__1.jsonRequest$suspendBridge_ao9kpg_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
385
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
386
|
-
return suspendResult;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
continue $sm;
|
|
390
|
-
case 1:
|
|
391
|
-
var this_0 = suspendResult;
|
|
392
|
-
var tmp_0 = getKClass(Insurance);
|
|
393
|
-
var tmp_1 = null instanceof Insurance;
|
|
394
|
-
var tmp_2;
|
|
395
|
-
try {
|
|
396
|
-
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
397
|
-
} catch ($p) {
|
|
398
|
-
var tmp_3;
|
|
399
|
-
if ($p instanceof Error) {
|
|
400
|
-
var _unused_var__etf5q3 = $p;
|
|
401
|
-
tmp_3 = null;
|
|
402
|
-
} else {
|
|
403
|
-
throw $p;
|
|
404
|
-
}
|
|
405
|
-
tmp_2 = tmp_3;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
409
|
-
case 2:
|
|
410
|
-
throw this.exception_1;
|
|
411
|
-
}
|
|
412
|
-
} catch ($p_0) {
|
|
413
|
-
var e = $p_0;
|
|
414
|
-
if (this.exceptionState_1 === 2) {
|
|
415
|
-
throw e;
|
|
416
|
-
} else {
|
|
417
|
-
this.state_1 = this.exceptionState_1;
|
|
418
|
-
this.exception_1 = e;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
while (true);
|
|
422
|
-
};
|
|
423
238
|
function $createInsurance$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, createInsuranceCommand, resultContinuation) {
|
|
424
239
|
CoroutineImpl.call(this, resultContinuation);
|
|
425
240
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
@@ -474,67 +289,6 @@ protoOf($createInsurance$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function
|
|
|
474
289
|
}
|
|
475
290
|
while (true);
|
|
476
291
|
};
|
|
477
|
-
function $deleteInsuranceCOROUTINE$(_this__u8e3s4, companyId, insuranceId, resultContinuation) {
|
|
478
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
479
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
480
|
-
this.companyId_1 = companyId;
|
|
481
|
-
this.insuranceId_1 = insuranceId;
|
|
482
|
-
}
|
|
483
|
-
protoOf($deleteInsuranceCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
484
|
-
var suspendResult = this.result_1;
|
|
485
|
-
$sm: do
|
|
486
|
-
try {
|
|
487
|
-
var tmp = this.state_1;
|
|
488
|
-
switch (tmp) {
|
|
489
|
-
case 0:
|
|
490
|
-
this.exceptionState_1 = 2;
|
|
491
|
-
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
492
|
-
var localVariableBody = EmptyContent_getInstance();
|
|
493
|
-
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
494
|
-
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
495
|
-
var tmp0_method = RequestMethod_DELETE_getInstance();
|
|
496
|
-
var tmp1_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
497
|
-
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
498
|
-
this.state_1 = 1;
|
|
499
|
-
suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
500
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
501
|
-
return suspendResult;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
continue $sm;
|
|
505
|
-
case 1:
|
|
506
|
-
var this_0 = suspendResult;
|
|
507
|
-
var tmp_0 = getKClass(Unit);
|
|
508
|
-
var tmp_1 = null instanceof Unit;
|
|
509
|
-
var tmp_2;
|
|
510
|
-
try {
|
|
511
|
-
tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
|
|
512
|
-
} catch ($p) {
|
|
513
|
-
var tmp_3;
|
|
514
|
-
if ($p instanceof Error) {
|
|
515
|
-
var _unused_var__etf5q3 = $p;
|
|
516
|
-
tmp_3 = null;
|
|
517
|
-
} else {
|
|
518
|
-
throw $p;
|
|
519
|
-
}
|
|
520
|
-
tmp_2 = tmp_3;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
524
|
-
case 2:
|
|
525
|
-
throw this.exception_1;
|
|
526
|
-
}
|
|
527
|
-
} catch ($p_0) {
|
|
528
|
-
var e = $p_0;
|
|
529
|
-
if (this.exceptionState_1 === 2) {
|
|
530
|
-
throw e;
|
|
531
|
-
} else {
|
|
532
|
-
this.state_1 = this.exceptionState_1;
|
|
533
|
-
this.exception_1 = e;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
while (true);
|
|
537
|
-
};
|
|
538
292
|
function $deleteInsurance$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, insuranceId, resultContinuation) {
|
|
539
293
|
CoroutineImpl.call(this, resultContinuation);
|
|
540
294
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
@@ -589,7 +343,7 @@ protoOf($deleteInsurance$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function
|
|
|
589
343
|
}
|
|
590
344
|
while (true);
|
|
591
345
|
};
|
|
592
|
-
function $
|
|
346
|
+
function $indexInsurances$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, resultContinuation) {
|
|
593
347
|
CoroutineImpl.call(this, resultContinuation);
|
|
594
348
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
595
349
|
this.companyId_1 = companyId;
|
|
@@ -603,122 +357,46 @@ function $indexInsurancesCOROUTINE$(_this__u8e3s4, companyId, search, startDateF
|
|
|
603
357
|
this.autoPaginate_1 = autoPaginate;
|
|
604
358
|
this.count_1 = count;
|
|
605
359
|
}
|
|
606
|
-
protoOf($
|
|
360
|
+
protoOf($indexInsurances$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
607
361
|
var suspendResult = this.result_1;
|
|
608
362
|
$sm: do
|
|
609
363
|
try {
|
|
610
364
|
var tmp = this.state_1;
|
|
611
365
|
switch (tmp) {
|
|
612
366
|
case 0:
|
|
613
|
-
this.exceptionState_1 =
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
else {
|
|
620
|
-
var value = listOf_0(this.search_1);
|
|
621
|
-
localVariableQuery.put_4fpzoq_k$('search', value);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
if (this.startDateFrom_1 == null)
|
|
625
|
-
null;
|
|
626
|
-
else {
|
|
627
|
-
var tmp2 = 'startDateFrom';
|
|
628
|
-
var value_0 = listOf_0(this.startDateFrom_1.toString());
|
|
629
|
-
localVariableQuery.put_4fpzoq_k$(tmp2, value_0);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
if (this.startDateTo_1 == null)
|
|
633
|
-
null;
|
|
634
|
-
else {
|
|
635
|
-
var tmp2_0 = 'startDateTo';
|
|
636
|
-
var value_1 = listOf_0(this.startDateTo_1.toString());
|
|
637
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
if (this.endDateFrom_1 == null)
|
|
641
|
-
null;
|
|
642
|
-
else {
|
|
643
|
-
var tmp2_1 = 'endDateFrom';
|
|
644
|
-
var value_2 = listOf_0(this.endDateFrom_1.toString());
|
|
645
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_1, value_2);
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
if (this.endDateTo_1 == null)
|
|
649
|
-
null;
|
|
650
|
-
else {
|
|
651
|
-
var tmp2_2 = 'endDateTo';
|
|
652
|
-
var value_3 = listOf_0(this.endDateTo_1.toString());
|
|
653
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_2, value_3);
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
if (this.fields_1 == null)
|
|
657
|
-
null;
|
|
658
|
-
else {
|
|
659
|
-
var value_4 = listOf_0(this.fields_1);
|
|
660
|
-
localVariableQuery.put_4fpzoq_k$('fields', value_4);
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
if (this.pageToken_1 == null)
|
|
664
|
-
null;
|
|
665
|
-
else {
|
|
666
|
-
var tmp2_3 = 'pageToken';
|
|
667
|
-
var value_5 = listOf_0(this.pageToken_1);
|
|
668
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_3, value_5);
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
if (this.autoPaginate_1 == null)
|
|
672
|
-
null;
|
|
673
|
-
else {
|
|
674
|
-
var tmp2_4 = 'autoPaginate';
|
|
675
|
-
var value_6 = listOf_0('' + this.autoPaginate_1);
|
|
676
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_4, value_6);
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
if (this.count_1 == null)
|
|
680
|
-
null;
|
|
681
|
-
else {
|
|
682
|
-
var value_7 = listOf_0('' + this.count_1);
|
|
683
|
-
localVariableQuery.put_4fpzoq_k$('count', value_7);
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
687
|
-
var tmp9_method = RequestMethod_GET_getInstance();
|
|
688
|
-
var tmp10_path = replace('/companies/{companyId}/economy/insurances', '{companyId}', this.companyId_1.toString());
|
|
689
|
-
var localVariableConfig = new RequestConfig(tmp9_method, tmp10_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
690
|
-
this.state_1 = 1;
|
|
691
|
-
suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
692
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
693
|
-
return suspendResult;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
continue $sm;
|
|
697
|
-
case 1:
|
|
698
|
-
var this_0 = suspendResult;
|
|
699
|
-
var tmp_0 = getKClass(PagedListInsurance);
|
|
700
|
-
var tmp_1 = null instanceof PagedListInsurance;
|
|
701
|
-
var tmp_2;
|
|
702
|
-
try {
|
|
703
|
-
tmp_2 = createKType(getKClass(PagedListInsurance), arrayOf([]), false);
|
|
704
|
-
} catch ($p) {
|
|
705
|
-
var tmp_3;
|
|
706
|
-
if ($p instanceof Error) {
|
|
707
|
-
var _unused_var__etf5q3 = $p;
|
|
708
|
-
tmp_3 = null;
|
|
709
|
-
} else {
|
|
710
|
-
throw $p;
|
|
367
|
+
this.exceptionState_1 = 4;
|
|
368
|
+
if (this._this__u8e3s4__1.indexInsurances === protoOf(InsuranceApi).indexInsurances) {
|
|
369
|
+
this.state_1 = 2;
|
|
370
|
+
suspendResult = this._this__u8e3s4__1.indexInsurances$default_bfau1g_k$(this.companyId_1, this.search_1, this.startDateFrom_1, this.startDateTo_1, this.endDateFrom_1, this.endDateTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
|
|
371
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
372
|
+
return suspendResult;
|
|
711
373
|
}
|
|
712
|
-
|
|
374
|
+
continue $sm;
|
|
375
|
+
} else {
|
|
376
|
+
this.state_1 = 1;
|
|
377
|
+
suspendResult = await_0(this._this__u8e3s4__1.indexInsurances(this.companyId_1, this.search_1, this.startDateFrom_1, this.startDateTo_1, this.endDateFrom_1, this.endDateTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
|
|
378
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
379
|
+
return suspendResult;
|
|
380
|
+
}
|
|
381
|
+
continue $sm;
|
|
713
382
|
}
|
|
714
383
|
|
|
715
|
-
|
|
384
|
+
case 1:
|
|
385
|
+
this.WHEN_RESULT0__1 = suspendResult;
|
|
386
|
+
this.state_1 = 3;
|
|
387
|
+
continue $sm;
|
|
716
388
|
case 2:
|
|
389
|
+
this.WHEN_RESULT0__1 = suspendResult;
|
|
390
|
+
this.state_1 = 3;
|
|
391
|
+
continue $sm;
|
|
392
|
+
case 3:
|
|
393
|
+
return this.WHEN_RESULT0__1;
|
|
394
|
+
case 4:
|
|
717
395
|
throw this.exception_1;
|
|
718
396
|
}
|
|
719
|
-
} catch ($
|
|
720
|
-
var e = $
|
|
721
|
-
if (this.exceptionState_1 ===
|
|
397
|
+
} catch ($p) {
|
|
398
|
+
var e = $p;
|
|
399
|
+
if (this.exceptionState_1 === 4) {
|
|
722
400
|
throw e;
|
|
723
401
|
} else {
|
|
724
402
|
this.state_1 = this.exceptionState_1;
|
|
@@ -727,10 +405,10 @@ protoOf($indexInsurancesCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
|
727
405
|
}
|
|
728
406
|
while (true);
|
|
729
407
|
};
|
|
730
|
-
function $
|
|
408
|
+
function $indexInsurancesUser$suspendBridgeCOROUTINE$(_this__u8e3s4, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, resultContinuation) {
|
|
731
409
|
CoroutineImpl.call(this, resultContinuation);
|
|
732
410
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
733
|
-
this.
|
|
411
|
+
this.companyIds_1 = companyIds;
|
|
734
412
|
this.search_1 = search;
|
|
735
413
|
this.startDateFrom_1 = startDateFrom;
|
|
736
414
|
this.startDateTo_1 = startDateTo;
|
|
@@ -741,7 +419,7 @@ function $indexInsurances$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, sear
|
|
|
741
419
|
this.autoPaginate_1 = autoPaginate;
|
|
742
420
|
this.count_1 = count;
|
|
743
421
|
}
|
|
744
|
-
protoOf($
|
|
422
|
+
protoOf($indexInsurancesUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
745
423
|
var suspendResult = this.result_1;
|
|
746
424
|
$sm: do
|
|
747
425
|
try {
|
|
@@ -749,16 +427,16 @@ protoOf($indexInsurances$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function
|
|
|
749
427
|
switch (tmp) {
|
|
750
428
|
case 0:
|
|
751
429
|
this.exceptionState_1 = 4;
|
|
752
|
-
if (this._this__u8e3s4__1.
|
|
430
|
+
if (this._this__u8e3s4__1.indexInsurancesUser === protoOf(InsuranceApi).indexInsurancesUser) {
|
|
753
431
|
this.state_1 = 2;
|
|
754
|
-
suspendResult = this._this__u8e3s4__1.
|
|
432
|
+
suspendResult = this._this__u8e3s4__1.indexInsurancesUser$default_w1bdmh_k$(this.companyIds_1, this.search_1, this.startDateFrom_1, this.startDateTo_1, this.endDateFrom_1, this.endDateTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
|
|
755
433
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
756
434
|
return suspendResult;
|
|
757
435
|
}
|
|
758
436
|
continue $sm;
|
|
759
437
|
} else {
|
|
760
438
|
this.state_1 = 1;
|
|
761
|
-
suspendResult = await_0(this._this__u8e3s4__1.
|
|
439
|
+
suspendResult = await_0(this._this__u8e3s4__1.indexInsurancesUser(this.companyIds_1, this.search_1, this.startDateFrom_1, this.startDateTo_1, this.endDateFrom_1, this.endDateTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
|
|
762
440
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
763
441
|
return suspendResult;
|
|
764
442
|
}
|
|
@@ -789,312 +467,35 @@ protoOf($indexInsurances$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function
|
|
|
789
467
|
}
|
|
790
468
|
while (true);
|
|
791
469
|
};
|
|
792
|
-
function $
|
|
470
|
+
function $showInsurance$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, insuranceId, fields, resultContinuation) {
|
|
793
471
|
CoroutineImpl.call(this, resultContinuation);
|
|
794
472
|
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
797
|
-
this.startDateFrom_1 = startDateFrom;
|
|
798
|
-
this.startDateTo_1 = startDateTo;
|
|
799
|
-
this.endDateFrom_1 = endDateFrom;
|
|
800
|
-
this.endDateTo_1 = endDateTo;
|
|
473
|
+
this.companyId_1 = companyId;
|
|
474
|
+
this.insuranceId_1 = insuranceId;
|
|
801
475
|
this.fields_1 = fields;
|
|
802
|
-
this.pageToken_1 = pageToken;
|
|
803
|
-
this.autoPaginate_1 = autoPaginate;
|
|
804
|
-
this.count_1 = count;
|
|
805
476
|
}
|
|
806
|
-
protoOf($
|
|
477
|
+
protoOf($showInsurance$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
807
478
|
var suspendResult = this.result_1;
|
|
808
479
|
$sm: do
|
|
809
480
|
try {
|
|
810
481
|
var tmp = this.state_1;
|
|
811
482
|
switch (tmp) {
|
|
812
483
|
case 0:
|
|
813
|
-
this.exceptionState_1 =
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
else {
|
|
829
|
-
var value_0 = listOf_0(this.search_1);
|
|
830
|
-
localVariableQuery.put_4fpzoq_k$('search', value_0);
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
if (this.startDateFrom_1 == null)
|
|
834
|
-
null;
|
|
835
|
-
else {
|
|
836
|
-
var tmp2_0 = 'startDateFrom';
|
|
837
|
-
var value_1 = listOf_0(this.startDateFrom_1.toString());
|
|
838
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
if (this.startDateTo_1 == null)
|
|
842
|
-
null;
|
|
843
|
-
else {
|
|
844
|
-
var tmp2_1 = 'startDateTo';
|
|
845
|
-
var value_2 = listOf_0(this.startDateTo_1.toString());
|
|
846
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_1, value_2);
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
if (this.endDateFrom_1 == null)
|
|
850
|
-
null;
|
|
851
|
-
else {
|
|
852
|
-
var tmp2_2 = 'endDateFrom';
|
|
853
|
-
var value_3 = listOf_0(this.endDateFrom_1.toString());
|
|
854
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_2, value_3);
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
if (this.endDateTo_1 == null)
|
|
858
|
-
null;
|
|
859
|
-
else {
|
|
860
|
-
var tmp2_3 = 'endDateTo';
|
|
861
|
-
var value_4 = listOf_0(this.endDateTo_1.toString());
|
|
862
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_3, value_4);
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
if (this.fields_1 == null)
|
|
866
|
-
null;
|
|
867
|
-
else {
|
|
868
|
-
var value_5 = listOf_0(this.fields_1);
|
|
869
|
-
localVariableQuery.put_4fpzoq_k$('fields', value_5);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
if (this.pageToken_1 == null)
|
|
873
|
-
null;
|
|
874
|
-
else {
|
|
875
|
-
var tmp2_4 = 'pageToken';
|
|
876
|
-
var value_6 = listOf_0(this.pageToken_1);
|
|
877
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_4, value_6);
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
if (this.autoPaginate_1 == null)
|
|
881
|
-
null;
|
|
882
|
-
else {
|
|
883
|
-
var tmp2_5 = 'autoPaginate';
|
|
884
|
-
var value_7 = listOf_0('' + this.autoPaginate_1);
|
|
885
|
-
localVariableQuery.put_4fpzoq_k$(tmp2_5, value_7);
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
if (this.count_1 == null)
|
|
889
|
-
null;
|
|
890
|
-
else {
|
|
891
|
-
var value_8 = listOf_0('' + this.count_1);
|
|
892
|
-
localVariableQuery.put_4fpzoq_k$('count', value_8);
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
896
|
-
var tmp10_method = RequestMethod_GET_getInstance();
|
|
897
|
-
var localVariableConfig = new RequestConfig(tmp10_method, '/companies/economy/insurances', localVariableHeaders, VOID, localVariableQuery, true);
|
|
898
|
-
this.state_1 = 1;
|
|
899
|
-
suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
900
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
901
|
-
return suspendResult;
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
continue $sm;
|
|
905
|
-
case 1:
|
|
906
|
-
var this_0 = suspendResult;
|
|
907
|
-
var tmp_0 = getKClass(PagedListInsurance);
|
|
908
|
-
var tmp_1 = null instanceof PagedListInsurance;
|
|
909
|
-
var tmp_2;
|
|
910
|
-
try {
|
|
911
|
-
tmp_2 = createKType(getKClass(PagedListInsurance), arrayOf([]), false);
|
|
912
|
-
} catch ($p) {
|
|
913
|
-
var tmp_3;
|
|
914
|
-
if ($p instanceof Error) {
|
|
915
|
-
var _unused_var__etf5q3 = $p;
|
|
916
|
-
tmp_3 = null;
|
|
917
|
-
} else {
|
|
918
|
-
throw $p;
|
|
919
|
-
}
|
|
920
|
-
tmp_2 = tmp_3;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
924
|
-
case 2:
|
|
925
|
-
throw this.exception_1;
|
|
926
|
-
}
|
|
927
|
-
} catch ($p_0) {
|
|
928
|
-
var e = $p_0;
|
|
929
|
-
if (this.exceptionState_1 === 2) {
|
|
930
|
-
throw e;
|
|
931
|
-
} else {
|
|
932
|
-
this.state_1 = this.exceptionState_1;
|
|
933
|
-
this.exception_1 = e;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
while (true);
|
|
937
|
-
};
|
|
938
|
-
function $indexInsurancesUser$suspendBridgeCOROUTINE$(_this__u8e3s4, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, resultContinuation) {
|
|
939
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
940
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
941
|
-
this.companyIds_1 = companyIds;
|
|
942
|
-
this.search_1 = search;
|
|
943
|
-
this.startDateFrom_1 = startDateFrom;
|
|
944
|
-
this.startDateTo_1 = startDateTo;
|
|
945
|
-
this.endDateFrom_1 = endDateFrom;
|
|
946
|
-
this.endDateTo_1 = endDateTo;
|
|
947
|
-
this.fields_1 = fields;
|
|
948
|
-
this.pageToken_1 = pageToken;
|
|
949
|
-
this.autoPaginate_1 = autoPaginate;
|
|
950
|
-
this.count_1 = count;
|
|
951
|
-
}
|
|
952
|
-
protoOf($indexInsurancesUser$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
953
|
-
var suspendResult = this.result_1;
|
|
954
|
-
$sm: do
|
|
955
|
-
try {
|
|
956
|
-
var tmp = this.state_1;
|
|
957
|
-
switch (tmp) {
|
|
958
|
-
case 0:
|
|
959
|
-
this.exceptionState_1 = 4;
|
|
960
|
-
if (this._this__u8e3s4__1.indexInsurancesUser === protoOf(InsuranceApi).indexInsurancesUser) {
|
|
961
|
-
this.state_1 = 2;
|
|
962
|
-
suspendResult = this._this__u8e3s4__1.indexInsurancesUser$default_w1bdmh_k$(this.companyIds_1, this.search_1, this.startDateFrom_1, this.startDateTo_1, this.endDateFrom_1, this.endDateTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1, this);
|
|
963
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
964
|
-
return suspendResult;
|
|
965
|
-
}
|
|
966
|
-
continue $sm;
|
|
967
|
-
} else {
|
|
968
|
-
this.state_1 = 1;
|
|
969
|
-
suspendResult = await_0(this._this__u8e3s4__1.indexInsurancesUser(this.companyIds_1, this.search_1, this.startDateFrom_1, this.startDateTo_1, this.endDateFrom_1, this.endDateTo_1, this.fields_1, this.pageToken_1, this.autoPaginate_1, this.count_1), this);
|
|
970
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
971
|
-
return suspendResult;
|
|
972
|
-
}
|
|
973
|
-
continue $sm;
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
case 1:
|
|
977
|
-
this.WHEN_RESULT0__1 = suspendResult;
|
|
978
|
-
this.state_1 = 3;
|
|
979
|
-
continue $sm;
|
|
980
|
-
case 2:
|
|
981
|
-
this.WHEN_RESULT0__1 = suspendResult;
|
|
982
|
-
this.state_1 = 3;
|
|
983
|
-
continue $sm;
|
|
984
|
-
case 3:
|
|
985
|
-
return this.WHEN_RESULT0__1;
|
|
986
|
-
case 4:
|
|
987
|
-
throw this.exception_1;
|
|
988
|
-
}
|
|
989
|
-
} catch ($p) {
|
|
990
|
-
var e = $p;
|
|
991
|
-
if (this.exceptionState_1 === 4) {
|
|
992
|
-
throw e;
|
|
993
|
-
} else {
|
|
994
|
-
this.state_1 = this.exceptionState_1;
|
|
995
|
-
this.exception_1 = e;
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
while (true);
|
|
999
|
-
};
|
|
1000
|
-
function $showInsuranceCOROUTINE$(_this__u8e3s4, companyId, insuranceId, fields, resultContinuation) {
|
|
1001
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1002
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1003
|
-
this.companyId_1 = companyId;
|
|
1004
|
-
this.insuranceId_1 = insuranceId;
|
|
1005
|
-
this.fields_1 = fields;
|
|
1006
|
-
}
|
|
1007
|
-
protoOf($showInsuranceCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1008
|
-
var suspendResult = this.result_1;
|
|
1009
|
-
$sm: do
|
|
1010
|
-
try {
|
|
1011
|
-
var tmp = this.state_1;
|
|
1012
|
-
switch (tmp) {
|
|
1013
|
-
case 0:
|
|
1014
|
-
this.exceptionState_1 = 2;
|
|
1015
|
-
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
1016
|
-
var localVariableBody = EmptyContent_getInstance();
|
|
1017
|
-
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
1018
|
-
if (this.fields_1 == null)
|
|
1019
|
-
null;
|
|
1020
|
-
else {
|
|
1021
|
-
var value = listOf_0(this.fields_1);
|
|
1022
|
-
localVariableQuery.put_4fpzoq_k$('fields', value);
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
1026
|
-
var tmp1_method = RequestMethod_GET_getInstance();
|
|
1027
|
-
var tmp2_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
1028
|
-
var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
1029
|
-
this.state_1 = 1;
|
|
1030
|
-
suspendResult = this._this__u8e3s4__1.request$suspendBridge_gbq0ws_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
1031
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1032
|
-
return suspendResult;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
continue $sm;
|
|
1036
|
-
case 1:
|
|
1037
|
-
var this_0 = suspendResult;
|
|
1038
|
-
var tmp_0 = getKClass(Insurance);
|
|
1039
|
-
var tmp_1 = null instanceof Insurance;
|
|
1040
|
-
var tmp_2;
|
|
1041
|
-
try {
|
|
1042
|
-
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
1043
|
-
} catch ($p) {
|
|
1044
|
-
var tmp_3;
|
|
1045
|
-
if ($p instanceof Error) {
|
|
1046
|
-
var _unused_var__etf5q3 = $p;
|
|
1047
|
-
tmp_3 = null;
|
|
1048
|
-
} else {
|
|
1049
|
-
throw $p;
|
|
1050
|
-
}
|
|
1051
|
-
tmp_2 = tmp_3;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
1055
|
-
case 2:
|
|
1056
|
-
throw this.exception_1;
|
|
1057
|
-
}
|
|
1058
|
-
} catch ($p_0) {
|
|
1059
|
-
var e = $p_0;
|
|
1060
|
-
if (this.exceptionState_1 === 2) {
|
|
1061
|
-
throw e;
|
|
1062
|
-
} else {
|
|
1063
|
-
this.state_1 = this.exceptionState_1;
|
|
1064
|
-
this.exception_1 = e;
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
while (true);
|
|
1068
|
-
};
|
|
1069
|
-
function $showInsurance$suspendBridgeCOROUTINE$(_this__u8e3s4, companyId, insuranceId, fields, resultContinuation) {
|
|
1070
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1071
|
-
this._this__u8e3s4__1 = _this__u8e3s4;
|
|
1072
|
-
this.companyId_1 = companyId;
|
|
1073
|
-
this.insuranceId_1 = insuranceId;
|
|
1074
|
-
this.fields_1 = fields;
|
|
1075
|
-
}
|
|
1076
|
-
protoOf($showInsurance$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1077
|
-
var suspendResult = this.result_1;
|
|
1078
|
-
$sm: do
|
|
1079
|
-
try {
|
|
1080
|
-
var tmp = this.state_1;
|
|
1081
|
-
switch (tmp) {
|
|
1082
|
-
case 0:
|
|
1083
|
-
this.exceptionState_1 = 4;
|
|
1084
|
-
if (this._this__u8e3s4__1.showInsurance === protoOf(InsuranceApi).showInsurance) {
|
|
1085
|
-
this.state_1 = 2;
|
|
1086
|
-
suspendResult = this._this__u8e3s4__1.showInsurance$default_kxnr8_k$(this.companyId_1, this.insuranceId_1, this.fields_1, this);
|
|
1087
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1088
|
-
return suspendResult;
|
|
1089
|
-
}
|
|
1090
|
-
continue $sm;
|
|
1091
|
-
} else {
|
|
1092
|
-
this.state_1 = 1;
|
|
1093
|
-
suspendResult = await_0(this._this__u8e3s4__1.showInsurance(this.companyId_1, this.insuranceId_1, this.fields_1), this);
|
|
1094
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1095
|
-
return suspendResult;
|
|
1096
|
-
}
|
|
1097
|
-
continue $sm;
|
|
484
|
+
this.exceptionState_1 = 4;
|
|
485
|
+
if (this._this__u8e3s4__1.showInsurance === protoOf(InsuranceApi).showInsurance) {
|
|
486
|
+
this.state_1 = 2;
|
|
487
|
+
suspendResult = this._this__u8e3s4__1.showInsurance$default_kxnr8_k$(this.companyId_1, this.insuranceId_1, this.fields_1, this);
|
|
488
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
489
|
+
return suspendResult;
|
|
490
|
+
}
|
|
491
|
+
continue $sm;
|
|
492
|
+
} else {
|
|
493
|
+
this.state_1 = 1;
|
|
494
|
+
suspendResult = await_0(this._this__u8e3s4__1.showInsurance(this.companyId_1, this.insuranceId_1, this.fields_1), this);
|
|
495
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
496
|
+
return suspendResult;
|
|
497
|
+
}
|
|
498
|
+
continue $sm;
|
|
1098
499
|
}
|
|
1099
500
|
|
|
1100
501
|
case 1:
|
|
@@ -1122,10 +523,7 @@ protoOf($showInsurance$suspendBridgeCOROUTINE$).doResume_5yljmg_k$ = function ()
|
|
|
1122
523
|
while (true);
|
|
1123
524
|
};
|
|
1124
525
|
protoOf(InsuranceApi).addInsuranceAgreementDocument_pazj3u_k$ = function (companyId, insuranceId, addAgreementDocumentToInsuranceCommand, $completion) {
|
|
1125
|
-
|
|
1126
|
-
tmp.result_1 = Unit_instance;
|
|
1127
|
-
tmp.exception_1 = null;
|
|
1128
|
-
return tmp.doResume_5yljmg_k$();
|
|
526
|
+
return addInsuranceAgreementDocumentOperation_0(this, companyId, insuranceId, addAgreementDocumentToInsuranceCommand, $completion);
|
|
1129
527
|
};
|
|
1130
528
|
protoOf(InsuranceApi).addInsuranceAgreementDocument = function (companyId, insuranceId, addAgreementDocumentToInsuranceCommand) {
|
|
1131
529
|
var tmp = this;
|
|
@@ -1140,10 +538,7 @@ protoOf(InsuranceApi).addInsuranceAgreementDocument$suspendBridge_chf7qz_k$ = fu
|
|
|
1140
538
|
return tmp.doResume_5yljmg_k$();
|
|
1141
539
|
};
|
|
1142
540
|
protoOf(InsuranceApi).closeInsurance_y3eue9_k$ = function (companyId, insuranceId, closeInsuranceCommand, $completion) {
|
|
1143
|
-
|
|
1144
|
-
tmp.result_1 = Unit_instance;
|
|
1145
|
-
tmp.exception_1 = null;
|
|
1146
|
-
return tmp.doResume_5yljmg_k$();
|
|
541
|
+
return closeInsuranceOperation_0(this, companyId, insuranceId, closeInsuranceCommand, $completion);
|
|
1147
542
|
};
|
|
1148
543
|
protoOf(InsuranceApi).closeInsurance = function (companyId, insuranceId, closeInsuranceCommand) {
|
|
1149
544
|
var tmp = this;
|
|
@@ -1158,10 +553,7 @@ protoOf(InsuranceApi).closeInsurance$suspendBridge_aqd2kg_k$ = function (company
|
|
|
1158
553
|
return tmp.doResume_5yljmg_k$();
|
|
1159
554
|
};
|
|
1160
555
|
protoOf(InsuranceApi).createInsurance_fntedr_k$ = function (companyId, createInsuranceCommand, $completion) {
|
|
1161
|
-
|
|
1162
|
-
tmp.result_1 = Unit_instance;
|
|
1163
|
-
tmp.exception_1 = null;
|
|
1164
|
-
return tmp.doResume_5yljmg_k$();
|
|
556
|
+
return createInsuranceOperation_0(this, companyId, createInsuranceCommand, $completion);
|
|
1165
557
|
};
|
|
1166
558
|
protoOf(InsuranceApi).createInsurance = function (companyId, createInsuranceCommand) {
|
|
1167
559
|
var tmp = this;
|
|
@@ -1176,10 +568,7 @@ protoOf(InsuranceApi).createInsurance$suspendBridge_4dihgw_k$ = function (compan
|
|
|
1176
568
|
return tmp.doResume_5yljmg_k$();
|
|
1177
569
|
};
|
|
1178
570
|
protoOf(InsuranceApi).deleteInsurance_il5mdx_k$ = function (companyId, insuranceId, $completion) {
|
|
1179
|
-
|
|
1180
|
-
tmp.result_1 = Unit_instance;
|
|
1181
|
-
tmp.exception_1 = null;
|
|
1182
|
-
return tmp.doResume_5yljmg_k$();
|
|
571
|
+
return deleteInsuranceOperation_0(this, companyId, insuranceId, $completion);
|
|
1183
572
|
};
|
|
1184
573
|
protoOf(InsuranceApi).deleteInsurance = function (companyId, insuranceId) {
|
|
1185
574
|
var tmp = this;
|
|
@@ -1194,10 +583,7 @@ protoOf(InsuranceApi).deleteInsurance$suspendBridge_gsidbg_k$ = function (compan
|
|
|
1194
583
|
return tmp.doResume_5yljmg_k$();
|
|
1195
584
|
};
|
|
1196
585
|
protoOf(InsuranceApi).indexInsurances_q47ecl_k$ = function (companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion) {
|
|
1197
|
-
|
|
1198
|
-
tmp.result_1 = Unit_instance;
|
|
1199
|
-
tmp.exception_1 = null;
|
|
1200
|
-
return tmp.doResume_5yljmg_k$();
|
|
586
|
+
return indexInsurancesOperation_0(this, companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion);
|
|
1201
587
|
};
|
|
1202
588
|
protoOf(InsuranceApi).indexInsurances$default_bfau1g_k$ = function (companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion, $super) {
|
|
1203
589
|
search = search === VOID ? null : search;
|
|
@@ -1224,10 +610,7 @@ protoOf(InsuranceApi).indexInsurances$suspendBridge_prsyka_k$ = function (compan
|
|
|
1224
610
|
return tmp.doResume_5yljmg_k$();
|
|
1225
611
|
};
|
|
1226
612
|
protoOf(InsuranceApi).indexInsurancesUser_2otvzt_k$ = function (companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion) {
|
|
1227
|
-
|
|
1228
|
-
tmp.result_1 = Unit_instance;
|
|
1229
|
-
tmp.exception_1 = null;
|
|
1230
|
-
return tmp.doResume_5yljmg_k$();
|
|
613
|
+
return indexInsurancesUserOperation_0(this, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion);
|
|
1231
614
|
};
|
|
1232
615
|
protoOf(InsuranceApi).indexInsurancesUser$default_w1bdmh_k$ = function (companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion, $super) {
|
|
1233
616
|
companyIds = companyIds === VOID ? null : companyIds;
|
|
@@ -1255,10 +638,7 @@ protoOf(InsuranceApi).indexInsurancesUser$suspendBridge_ghfr16_k$ = function (co
|
|
|
1255
638
|
return tmp.doResume_5yljmg_k$();
|
|
1256
639
|
};
|
|
1257
640
|
protoOf(InsuranceApi).showInsurance_zgagc7_k$ = function (companyId, insuranceId, fields, $completion) {
|
|
1258
|
-
|
|
1259
|
-
tmp.result_1 = Unit_instance;
|
|
1260
|
-
tmp.exception_1 = null;
|
|
1261
|
-
return tmp.doResume_5yljmg_k$();
|
|
641
|
+
return showInsuranceOperation_0(this, companyId, insuranceId, fields, $completion);
|
|
1262
642
|
};
|
|
1263
643
|
protoOf(InsuranceApi).showInsurance$default_kxnr8_k$ = function (companyId, insuranceId, fields, $completion, $super) {
|
|
1264
644
|
fields = fields === VOID ? null : fields;
|
|
@@ -1278,6 +658,702 @@ protoOf(InsuranceApi).showInsurance$suspendBridge_a1i78o_k$ = function (companyI
|
|
|
1278
658
|
};
|
|
1279
659
|
function InsuranceApi() {
|
|
1280
660
|
}
|
|
661
|
+
function addInsuranceAgreementDocumentOperation(client, companyId, insuranceId, addAgreementDocumentToInsuranceCommand) {
|
|
662
|
+
return promisify(function ($completion) {
|
|
663
|
+
return addInsuranceAgreementDocumentOperation_0(client, companyId, insuranceId, addAgreementDocumentToInsuranceCommand, $completion);
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
function addInsuranceAgreementDocumentOperation_0(client, companyId, insuranceId, addAgreementDocumentToInsuranceCommand, $completion) {
|
|
667
|
+
var tmp = new $addInsuranceAgreementDocumentOperationCOROUTINE$(client, companyId, insuranceId, addAgreementDocumentToInsuranceCommand, $completion);
|
|
668
|
+
tmp.result_1 = Unit_instance;
|
|
669
|
+
tmp.exception_1 = null;
|
|
670
|
+
return tmp.doResume_5yljmg_k$();
|
|
671
|
+
}
|
|
672
|
+
function $addInsuranceAgreementDocumentOperationCOROUTINE$(client, companyId, insuranceId, addAgreementDocumentToInsuranceCommand, resultContinuation) {
|
|
673
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
674
|
+
this.client_1 = client;
|
|
675
|
+
this.companyId_1 = companyId;
|
|
676
|
+
this.insuranceId_1 = insuranceId;
|
|
677
|
+
this.addAgreementDocumentToInsuranceCommand_1 = addAgreementDocumentToInsuranceCommand;
|
|
678
|
+
}
|
|
679
|
+
protoOf($addInsuranceAgreementDocumentOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
680
|
+
var suspendResult = this.result_1;
|
|
681
|
+
$sm: do
|
|
682
|
+
try {
|
|
683
|
+
var tmp = this.state_1;
|
|
684
|
+
switch (tmp) {
|
|
685
|
+
case 0:
|
|
686
|
+
this.exceptionState_1 = 2;
|
|
687
|
+
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
688
|
+
var localVariableBody = this.addAgreementDocumentToInsuranceCommand_1;
|
|
689
|
+
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
690
|
+
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
691
|
+
var tmp0_method = RequestMethod_PUT_getInstance();
|
|
692
|
+
var tmp1_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}/agreement', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
693
|
+
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
694
|
+
this.state_1 = 1;
|
|
695
|
+
suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
696
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
697
|
+
return suspendResult;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
continue $sm;
|
|
701
|
+
case 1:
|
|
702
|
+
var this_0 = suspendResult;
|
|
703
|
+
var tmp_0 = getKClass(Insurance);
|
|
704
|
+
var tmp_1 = null instanceof Insurance;
|
|
705
|
+
var tmp_2;
|
|
706
|
+
try {
|
|
707
|
+
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
708
|
+
} catch ($p) {
|
|
709
|
+
var tmp_3;
|
|
710
|
+
if ($p instanceof Error) {
|
|
711
|
+
var _unused_var__etf5q3 = $p;
|
|
712
|
+
tmp_3 = null;
|
|
713
|
+
} else {
|
|
714
|
+
throw $p;
|
|
715
|
+
}
|
|
716
|
+
tmp_2 = tmp_3;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
720
|
+
case 2:
|
|
721
|
+
throw this.exception_1;
|
|
722
|
+
}
|
|
723
|
+
} catch ($p_0) {
|
|
724
|
+
var e = $p_0;
|
|
725
|
+
if (this.exceptionState_1 === 2) {
|
|
726
|
+
throw e;
|
|
727
|
+
} else {
|
|
728
|
+
this.state_1 = this.exceptionState_1;
|
|
729
|
+
this.exception_1 = e;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
while (true);
|
|
733
|
+
};
|
|
734
|
+
function closeInsuranceOperation(client, companyId, insuranceId, closeInsuranceCommand) {
|
|
735
|
+
return promisify(function ($completion) {
|
|
736
|
+
return closeInsuranceOperation_0(client, companyId, insuranceId, closeInsuranceCommand, $completion);
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
function closeInsuranceOperation_0(client, companyId, insuranceId, closeInsuranceCommand, $completion) {
|
|
740
|
+
var tmp = new $closeInsuranceOperationCOROUTINE$(client, companyId, insuranceId, closeInsuranceCommand, $completion);
|
|
741
|
+
tmp.result_1 = Unit_instance;
|
|
742
|
+
tmp.exception_1 = null;
|
|
743
|
+
return tmp.doResume_5yljmg_k$();
|
|
744
|
+
}
|
|
745
|
+
function $closeInsuranceOperationCOROUTINE$(client, companyId, insuranceId, closeInsuranceCommand, resultContinuation) {
|
|
746
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
747
|
+
this.client_1 = client;
|
|
748
|
+
this.companyId_1 = companyId;
|
|
749
|
+
this.insuranceId_1 = insuranceId;
|
|
750
|
+
this.closeInsuranceCommand_1 = closeInsuranceCommand;
|
|
751
|
+
}
|
|
752
|
+
protoOf($closeInsuranceOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
753
|
+
var suspendResult = this.result_1;
|
|
754
|
+
$sm: do
|
|
755
|
+
try {
|
|
756
|
+
var tmp = this.state_1;
|
|
757
|
+
switch (tmp) {
|
|
758
|
+
case 0:
|
|
759
|
+
this.exceptionState_1 = 2;
|
|
760
|
+
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
761
|
+
var localVariableBody = this.closeInsuranceCommand_1;
|
|
762
|
+
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
763
|
+
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
764
|
+
var tmp0_method = RequestMethod_PUT_getInstance();
|
|
765
|
+
var tmp1_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}/close', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
766
|
+
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
767
|
+
this.state_1 = 1;
|
|
768
|
+
suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
769
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
770
|
+
return suspendResult;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
continue $sm;
|
|
774
|
+
case 1:
|
|
775
|
+
var this_0 = suspendResult;
|
|
776
|
+
var tmp_0 = getKClass(Insurance);
|
|
777
|
+
var tmp_1 = null instanceof Insurance;
|
|
778
|
+
var tmp_2;
|
|
779
|
+
try {
|
|
780
|
+
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
781
|
+
} catch ($p) {
|
|
782
|
+
var tmp_3;
|
|
783
|
+
if ($p instanceof Error) {
|
|
784
|
+
var _unused_var__etf5q3 = $p;
|
|
785
|
+
tmp_3 = null;
|
|
786
|
+
} else {
|
|
787
|
+
throw $p;
|
|
788
|
+
}
|
|
789
|
+
tmp_2 = tmp_3;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
793
|
+
case 2:
|
|
794
|
+
throw this.exception_1;
|
|
795
|
+
}
|
|
796
|
+
} catch ($p_0) {
|
|
797
|
+
var e = $p_0;
|
|
798
|
+
if (this.exceptionState_1 === 2) {
|
|
799
|
+
throw e;
|
|
800
|
+
} else {
|
|
801
|
+
this.state_1 = this.exceptionState_1;
|
|
802
|
+
this.exception_1 = e;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
while (true);
|
|
806
|
+
};
|
|
807
|
+
function createInsuranceOperation(client, companyId, createInsuranceCommand) {
|
|
808
|
+
return promisify(function ($completion) {
|
|
809
|
+
return createInsuranceOperation_0(client, companyId, createInsuranceCommand, $completion);
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
function createInsuranceOperation_0(client, companyId, createInsuranceCommand, $completion) {
|
|
813
|
+
var tmp = new $createInsuranceOperationCOROUTINE$(client, companyId, createInsuranceCommand, $completion);
|
|
814
|
+
tmp.result_1 = Unit_instance;
|
|
815
|
+
tmp.exception_1 = null;
|
|
816
|
+
return tmp.doResume_5yljmg_k$();
|
|
817
|
+
}
|
|
818
|
+
function $createInsuranceOperationCOROUTINE$(client, companyId, createInsuranceCommand, resultContinuation) {
|
|
819
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
820
|
+
this.client_1 = client;
|
|
821
|
+
this.companyId_1 = companyId;
|
|
822
|
+
this.createInsuranceCommand_1 = createInsuranceCommand;
|
|
823
|
+
}
|
|
824
|
+
protoOf($createInsuranceOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
825
|
+
var suspendResult = this.result_1;
|
|
826
|
+
$sm: do
|
|
827
|
+
try {
|
|
828
|
+
var tmp = this.state_1;
|
|
829
|
+
switch (tmp) {
|
|
830
|
+
case 0:
|
|
831
|
+
this.exceptionState_1 = 2;
|
|
832
|
+
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
833
|
+
var localVariableBody = this.createInsuranceCommand_1;
|
|
834
|
+
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
835
|
+
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
836
|
+
var tmp0_method = RequestMethod_POST_getInstance();
|
|
837
|
+
var tmp1_path = replace('/companies/{companyId}/economy/insurances', '{companyId}', this.companyId_1.toString());
|
|
838
|
+
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
839
|
+
this.state_1 = 1;
|
|
840
|
+
suspendResult = this.client_1.executeJsonRequest_99yh5u_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
841
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
842
|
+
return suspendResult;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
continue $sm;
|
|
846
|
+
case 1:
|
|
847
|
+
var this_0 = suspendResult;
|
|
848
|
+
var tmp_0 = getKClass(Insurance);
|
|
849
|
+
var tmp_1 = null instanceof Insurance;
|
|
850
|
+
var tmp_2;
|
|
851
|
+
try {
|
|
852
|
+
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
853
|
+
} catch ($p) {
|
|
854
|
+
var tmp_3;
|
|
855
|
+
if ($p instanceof Error) {
|
|
856
|
+
var _unused_var__etf5q3 = $p;
|
|
857
|
+
tmp_3 = null;
|
|
858
|
+
} else {
|
|
859
|
+
throw $p;
|
|
860
|
+
}
|
|
861
|
+
tmp_2 = tmp_3;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
865
|
+
case 2:
|
|
866
|
+
throw this.exception_1;
|
|
867
|
+
}
|
|
868
|
+
} catch ($p_0) {
|
|
869
|
+
var e = $p_0;
|
|
870
|
+
if (this.exceptionState_1 === 2) {
|
|
871
|
+
throw e;
|
|
872
|
+
} else {
|
|
873
|
+
this.state_1 = this.exceptionState_1;
|
|
874
|
+
this.exception_1 = e;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
while (true);
|
|
878
|
+
};
|
|
879
|
+
function deleteInsuranceOperation(client, companyId, insuranceId) {
|
|
880
|
+
return promisify(function ($completion) {
|
|
881
|
+
return deleteInsuranceOperation_0(client, companyId, insuranceId, $completion);
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
function deleteInsuranceOperation_0(client, companyId, insuranceId, $completion) {
|
|
885
|
+
var tmp = new $deleteInsuranceOperationCOROUTINE$(client, companyId, insuranceId, $completion);
|
|
886
|
+
tmp.result_1 = Unit_instance;
|
|
887
|
+
tmp.exception_1 = null;
|
|
888
|
+
return tmp.doResume_5yljmg_k$();
|
|
889
|
+
}
|
|
890
|
+
function $deleteInsuranceOperationCOROUTINE$(client, companyId, insuranceId, resultContinuation) {
|
|
891
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
892
|
+
this.client_1 = client;
|
|
893
|
+
this.companyId_1 = companyId;
|
|
894
|
+
this.insuranceId_1 = insuranceId;
|
|
895
|
+
}
|
|
896
|
+
protoOf($deleteInsuranceOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
897
|
+
var suspendResult = this.result_1;
|
|
898
|
+
$sm: do
|
|
899
|
+
try {
|
|
900
|
+
var tmp = this.state_1;
|
|
901
|
+
switch (tmp) {
|
|
902
|
+
case 0:
|
|
903
|
+
this.exceptionState_1 = 2;
|
|
904
|
+
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
905
|
+
var localVariableBody = EmptyContent_getInstance();
|
|
906
|
+
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
907
|
+
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
908
|
+
var tmp0_method = RequestMethod_DELETE_getInstance();
|
|
909
|
+
var tmp1_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
910
|
+
var localVariableConfig = new RequestConfig(tmp0_method, tmp1_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
911
|
+
this.state_1 = 1;
|
|
912
|
+
suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
913
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
914
|
+
return suspendResult;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
continue $sm;
|
|
918
|
+
case 1:
|
|
919
|
+
var this_0 = suspendResult;
|
|
920
|
+
var tmp_0 = getKClass(Unit);
|
|
921
|
+
var tmp_1 = null instanceof Unit;
|
|
922
|
+
var tmp_2;
|
|
923
|
+
try {
|
|
924
|
+
tmp_2 = createKType(getKClass(Unit), arrayOf([]), false);
|
|
925
|
+
} catch ($p) {
|
|
926
|
+
var tmp_3;
|
|
927
|
+
if ($p instanceof Error) {
|
|
928
|
+
var _unused_var__etf5q3 = $p;
|
|
929
|
+
tmp_3 = null;
|
|
930
|
+
} else {
|
|
931
|
+
throw $p;
|
|
932
|
+
}
|
|
933
|
+
tmp_2 = tmp_3;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
937
|
+
case 2:
|
|
938
|
+
throw this.exception_1;
|
|
939
|
+
}
|
|
940
|
+
} catch ($p_0) {
|
|
941
|
+
var e = $p_0;
|
|
942
|
+
if (this.exceptionState_1 === 2) {
|
|
943
|
+
throw e;
|
|
944
|
+
} else {
|
|
945
|
+
this.state_1 = this.exceptionState_1;
|
|
946
|
+
this.exception_1 = e;
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
while (true);
|
|
950
|
+
};
|
|
951
|
+
function indexInsurancesOperation(client, companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count) {
|
|
952
|
+
return promisify(function ($completion) {
|
|
953
|
+
return indexInsurancesOperation_0(client, companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion);
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
function indexInsurancesOperation_0(client, companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion) {
|
|
957
|
+
search = search === VOID ? null : search;
|
|
958
|
+
startDateFrom = startDateFrom === VOID ? null : startDateFrom;
|
|
959
|
+
startDateTo = startDateTo === VOID ? null : startDateTo;
|
|
960
|
+
endDateFrom = endDateFrom === VOID ? null : endDateFrom;
|
|
961
|
+
endDateTo = endDateTo === VOID ? null : endDateTo;
|
|
962
|
+
fields = fields === VOID ? null : fields;
|
|
963
|
+
pageToken = pageToken === VOID ? null : pageToken;
|
|
964
|
+
autoPaginate = autoPaginate === VOID ? null : autoPaginate;
|
|
965
|
+
count = count === VOID ? null : count;
|
|
966
|
+
var tmp = new $indexInsurancesOperationCOROUTINE$(client, companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion);
|
|
967
|
+
tmp.result_1 = Unit_instance;
|
|
968
|
+
tmp.exception_1 = null;
|
|
969
|
+
return tmp.doResume_5yljmg_k$();
|
|
970
|
+
}
|
|
971
|
+
function $indexInsurancesOperationCOROUTINE$(client, companyId, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, resultContinuation) {
|
|
972
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
973
|
+
this.client_1 = client;
|
|
974
|
+
this.companyId_1 = companyId;
|
|
975
|
+
this.search_1 = search;
|
|
976
|
+
this.startDateFrom_1 = startDateFrom;
|
|
977
|
+
this.startDateTo_1 = startDateTo;
|
|
978
|
+
this.endDateFrom_1 = endDateFrom;
|
|
979
|
+
this.endDateTo_1 = endDateTo;
|
|
980
|
+
this.fields_1 = fields;
|
|
981
|
+
this.pageToken_1 = pageToken;
|
|
982
|
+
this.autoPaginate_1 = autoPaginate;
|
|
983
|
+
this.count_1 = count;
|
|
984
|
+
}
|
|
985
|
+
protoOf($indexInsurancesOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
986
|
+
var suspendResult = this.result_1;
|
|
987
|
+
$sm: do
|
|
988
|
+
try {
|
|
989
|
+
var tmp = this.state_1;
|
|
990
|
+
switch (tmp) {
|
|
991
|
+
case 0:
|
|
992
|
+
this.exceptionState_1 = 2;
|
|
993
|
+
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
994
|
+
var localVariableBody = EmptyContent_getInstance();
|
|
995
|
+
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
996
|
+
if (this.search_1 == null)
|
|
997
|
+
null;
|
|
998
|
+
else {
|
|
999
|
+
var value = listOf_0(this.search_1);
|
|
1000
|
+
localVariableQuery.put_4fpzoq_k$('search', value);
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
if (this.startDateFrom_1 == null)
|
|
1004
|
+
null;
|
|
1005
|
+
else {
|
|
1006
|
+
var tmp2 = 'startDateFrom';
|
|
1007
|
+
var value_0 = listOf_0(this.startDateFrom_1.toString());
|
|
1008
|
+
localVariableQuery.put_4fpzoq_k$(tmp2, value_0);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
if (this.startDateTo_1 == null)
|
|
1012
|
+
null;
|
|
1013
|
+
else {
|
|
1014
|
+
var tmp2_0 = 'startDateTo';
|
|
1015
|
+
var value_1 = listOf_0(this.startDateTo_1.toString());
|
|
1016
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
if (this.endDateFrom_1 == null)
|
|
1020
|
+
null;
|
|
1021
|
+
else {
|
|
1022
|
+
var tmp2_1 = 'endDateFrom';
|
|
1023
|
+
var value_2 = listOf_0(this.endDateFrom_1.toString());
|
|
1024
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_1, value_2);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
if (this.endDateTo_1 == null)
|
|
1028
|
+
null;
|
|
1029
|
+
else {
|
|
1030
|
+
var tmp2_2 = 'endDateTo';
|
|
1031
|
+
var value_3 = listOf_0(this.endDateTo_1.toString());
|
|
1032
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_2, value_3);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
if (this.fields_1 == null)
|
|
1036
|
+
null;
|
|
1037
|
+
else {
|
|
1038
|
+
var value_4 = listOf_0(this.fields_1);
|
|
1039
|
+
localVariableQuery.put_4fpzoq_k$('fields', value_4);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
if (this.pageToken_1 == null)
|
|
1043
|
+
null;
|
|
1044
|
+
else {
|
|
1045
|
+
var tmp2_3 = 'pageToken';
|
|
1046
|
+
var value_5 = listOf_0(this.pageToken_1);
|
|
1047
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_3, value_5);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
if (this.autoPaginate_1 == null)
|
|
1051
|
+
null;
|
|
1052
|
+
else {
|
|
1053
|
+
var tmp2_4 = 'autoPaginate';
|
|
1054
|
+
var value_6 = listOf_0('' + this.autoPaginate_1);
|
|
1055
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_4, value_6);
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
if (this.count_1 == null)
|
|
1059
|
+
null;
|
|
1060
|
+
else {
|
|
1061
|
+
var value_7 = listOf_0('' + this.count_1);
|
|
1062
|
+
localVariableQuery.put_4fpzoq_k$('count', value_7);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
1066
|
+
var tmp9_method = RequestMethod_GET_getInstance();
|
|
1067
|
+
var tmp10_path = replace('/companies/{companyId}/economy/insurances', '{companyId}', this.companyId_1.toString());
|
|
1068
|
+
var localVariableConfig = new RequestConfig(tmp9_method, tmp10_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
1069
|
+
this.state_1 = 1;
|
|
1070
|
+
suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
1071
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1072
|
+
return suspendResult;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
continue $sm;
|
|
1076
|
+
case 1:
|
|
1077
|
+
var this_0 = suspendResult;
|
|
1078
|
+
var tmp_0 = getKClass(PagedListInsurance);
|
|
1079
|
+
var tmp_1 = null instanceof PagedListInsurance;
|
|
1080
|
+
var tmp_2;
|
|
1081
|
+
try {
|
|
1082
|
+
tmp_2 = createKType(getKClass(PagedListInsurance), arrayOf([]), false);
|
|
1083
|
+
} catch ($p) {
|
|
1084
|
+
var tmp_3;
|
|
1085
|
+
if ($p instanceof Error) {
|
|
1086
|
+
var _unused_var__etf5q3 = $p;
|
|
1087
|
+
tmp_3 = null;
|
|
1088
|
+
} else {
|
|
1089
|
+
throw $p;
|
|
1090
|
+
}
|
|
1091
|
+
tmp_2 = tmp_3;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
1095
|
+
case 2:
|
|
1096
|
+
throw this.exception_1;
|
|
1097
|
+
}
|
|
1098
|
+
} catch ($p_0) {
|
|
1099
|
+
var e = $p_0;
|
|
1100
|
+
if (this.exceptionState_1 === 2) {
|
|
1101
|
+
throw e;
|
|
1102
|
+
} else {
|
|
1103
|
+
this.state_1 = this.exceptionState_1;
|
|
1104
|
+
this.exception_1 = e;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
while (true);
|
|
1108
|
+
};
|
|
1109
|
+
function indexInsurancesUserOperation(client, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count) {
|
|
1110
|
+
return promisify(function ($completion) {
|
|
1111
|
+
return indexInsurancesUserOperation_0(client, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion);
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
function indexInsurancesUserOperation_0(client, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion) {
|
|
1115
|
+
companyIds = companyIds === VOID ? null : companyIds;
|
|
1116
|
+
search = search === VOID ? null : search;
|
|
1117
|
+
startDateFrom = startDateFrom === VOID ? null : startDateFrom;
|
|
1118
|
+
startDateTo = startDateTo === VOID ? null : startDateTo;
|
|
1119
|
+
endDateFrom = endDateFrom === VOID ? null : endDateFrom;
|
|
1120
|
+
endDateTo = endDateTo === VOID ? null : endDateTo;
|
|
1121
|
+
fields = fields === VOID ? null : fields;
|
|
1122
|
+
pageToken = pageToken === VOID ? null : pageToken;
|
|
1123
|
+
autoPaginate = autoPaginate === VOID ? null : autoPaginate;
|
|
1124
|
+
count = count === VOID ? null : count;
|
|
1125
|
+
var tmp = new $indexInsurancesUserOperationCOROUTINE$(client, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, $completion);
|
|
1126
|
+
tmp.result_1 = Unit_instance;
|
|
1127
|
+
tmp.exception_1 = null;
|
|
1128
|
+
return tmp.doResume_5yljmg_k$();
|
|
1129
|
+
}
|
|
1130
|
+
function $indexInsurancesUserOperationCOROUTINE$(client, companyIds, search, startDateFrom, startDateTo, endDateFrom, endDateTo, fields, pageToken, autoPaginate, count, resultContinuation) {
|
|
1131
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1132
|
+
this.client_1 = client;
|
|
1133
|
+
this.companyIds_1 = companyIds;
|
|
1134
|
+
this.search_1 = search;
|
|
1135
|
+
this.startDateFrom_1 = startDateFrom;
|
|
1136
|
+
this.startDateTo_1 = startDateTo;
|
|
1137
|
+
this.endDateFrom_1 = endDateFrom;
|
|
1138
|
+
this.endDateTo_1 = endDateTo;
|
|
1139
|
+
this.fields_1 = fields;
|
|
1140
|
+
this.pageToken_1 = pageToken;
|
|
1141
|
+
this.autoPaginate_1 = autoPaginate;
|
|
1142
|
+
this.count_1 = count;
|
|
1143
|
+
}
|
|
1144
|
+
protoOf($indexInsurancesUserOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1145
|
+
var suspendResult = this.result_1;
|
|
1146
|
+
$sm: do
|
|
1147
|
+
try {
|
|
1148
|
+
var tmp = this.state_1;
|
|
1149
|
+
switch (tmp) {
|
|
1150
|
+
case 0:
|
|
1151
|
+
this.exceptionState_1 = 2;
|
|
1152
|
+
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
1153
|
+
var localVariableBody = EmptyContent_getInstance();
|
|
1154
|
+
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
1155
|
+
var tmp0_safe_receiver = this.companyIds_1;
|
|
1156
|
+
if (tmp0_safe_receiver == null)
|
|
1157
|
+
null;
|
|
1158
|
+
else {
|
|
1159
|
+
var tmp2 = 'companyIds';
|
|
1160
|
+
var value = toMultiValue(tmp0_safe_receiver, 'multi');
|
|
1161
|
+
localVariableQuery.put_4fpzoq_k$(tmp2, value);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
if (this.search_1 == null)
|
|
1165
|
+
null;
|
|
1166
|
+
else {
|
|
1167
|
+
var value_0 = listOf_0(this.search_1);
|
|
1168
|
+
localVariableQuery.put_4fpzoq_k$('search', value_0);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
if (this.startDateFrom_1 == null)
|
|
1172
|
+
null;
|
|
1173
|
+
else {
|
|
1174
|
+
var tmp2_0 = 'startDateFrom';
|
|
1175
|
+
var value_1 = listOf_0(this.startDateFrom_1.toString());
|
|
1176
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_0, value_1);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
if (this.startDateTo_1 == null)
|
|
1180
|
+
null;
|
|
1181
|
+
else {
|
|
1182
|
+
var tmp2_1 = 'startDateTo';
|
|
1183
|
+
var value_2 = listOf_0(this.startDateTo_1.toString());
|
|
1184
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_1, value_2);
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
if (this.endDateFrom_1 == null)
|
|
1188
|
+
null;
|
|
1189
|
+
else {
|
|
1190
|
+
var tmp2_2 = 'endDateFrom';
|
|
1191
|
+
var value_3 = listOf_0(this.endDateFrom_1.toString());
|
|
1192
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_2, value_3);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
if (this.endDateTo_1 == null)
|
|
1196
|
+
null;
|
|
1197
|
+
else {
|
|
1198
|
+
var tmp2_3 = 'endDateTo';
|
|
1199
|
+
var value_4 = listOf_0(this.endDateTo_1.toString());
|
|
1200
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_3, value_4);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
if (this.fields_1 == null)
|
|
1204
|
+
null;
|
|
1205
|
+
else {
|
|
1206
|
+
var value_5 = listOf_0(this.fields_1);
|
|
1207
|
+
localVariableQuery.put_4fpzoq_k$('fields', value_5);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
if (this.pageToken_1 == null)
|
|
1211
|
+
null;
|
|
1212
|
+
else {
|
|
1213
|
+
var tmp2_4 = 'pageToken';
|
|
1214
|
+
var value_6 = listOf_0(this.pageToken_1);
|
|
1215
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_4, value_6);
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
if (this.autoPaginate_1 == null)
|
|
1219
|
+
null;
|
|
1220
|
+
else {
|
|
1221
|
+
var tmp2_5 = 'autoPaginate';
|
|
1222
|
+
var value_7 = listOf_0('' + this.autoPaginate_1);
|
|
1223
|
+
localVariableQuery.put_4fpzoq_k$(tmp2_5, value_7);
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
if (this.count_1 == null)
|
|
1227
|
+
null;
|
|
1228
|
+
else {
|
|
1229
|
+
var value_8 = listOf_0('' + this.count_1);
|
|
1230
|
+
localVariableQuery.put_4fpzoq_k$('count', value_8);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
1234
|
+
var tmp10_method = RequestMethod_GET_getInstance();
|
|
1235
|
+
var localVariableConfig = new RequestConfig(tmp10_method, '/companies/economy/insurances', localVariableHeaders, VOID, localVariableQuery, true);
|
|
1236
|
+
this.state_1 = 1;
|
|
1237
|
+
suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
1238
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1239
|
+
return suspendResult;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
continue $sm;
|
|
1243
|
+
case 1:
|
|
1244
|
+
var this_0 = suspendResult;
|
|
1245
|
+
var tmp_0 = getKClass(PagedListInsurance);
|
|
1246
|
+
var tmp_1 = null instanceof PagedListInsurance;
|
|
1247
|
+
var tmp_2;
|
|
1248
|
+
try {
|
|
1249
|
+
tmp_2 = createKType(getKClass(PagedListInsurance), arrayOf([]), false);
|
|
1250
|
+
} catch ($p) {
|
|
1251
|
+
var tmp_3;
|
|
1252
|
+
if ($p instanceof Error) {
|
|
1253
|
+
var _unused_var__etf5q3 = $p;
|
|
1254
|
+
tmp_3 = null;
|
|
1255
|
+
} else {
|
|
1256
|
+
throw $p;
|
|
1257
|
+
}
|
|
1258
|
+
tmp_2 = tmp_3;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
1262
|
+
case 2:
|
|
1263
|
+
throw this.exception_1;
|
|
1264
|
+
}
|
|
1265
|
+
} catch ($p_0) {
|
|
1266
|
+
var e = $p_0;
|
|
1267
|
+
if (this.exceptionState_1 === 2) {
|
|
1268
|
+
throw e;
|
|
1269
|
+
} else {
|
|
1270
|
+
this.state_1 = this.exceptionState_1;
|
|
1271
|
+
this.exception_1 = e;
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
while (true);
|
|
1275
|
+
};
|
|
1276
|
+
function showInsuranceOperation(client, companyId, insuranceId, fields) {
|
|
1277
|
+
return promisify(function ($completion) {
|
|
1278
|
+
return showInsuranceOperation_0(client, companyId, insuranceId, fields, $completion);
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
function showInsuranceOperation_0(client, companyId, insuranceId, fields, $completion) {
|
|
1282
|
+
fields = fields === VOID ? null : fields;
|
|
1283
|
+
var tmp = new $showInsuranceOperationCOROUTINE$(client, companyId, insuranceId, fields, $completion);
|
|
1284
|
+
tmp.result_1 = Unit_instance;
|
|
1285
|
+
tmp.exception_1 = null;
|
|
1286
|
+
return tmp.doResume_5yljmg_k$();
|
|
1287
|
+
}
|
|
1288
|
+
function $showInsuranceOperationCOROUTINE$(client, companyId, insuranceId, fields, resultContinuation) {
|
|
1289
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1290
|
+
this.client_1 = client;
|
|
1291
|
+
this.companyId_1 = companyId;
|
|
1292
|
+
this.insuranceId_1 = insuranceId;
|
|
1293
|
+
this.fields_1 = fields;
|
|
1294
|
+
}
|
|
1295
|
+
protoOf($showInsuranceOperationCOROUTINE$).doResume_5yljmg_k$ = function () {
|
|
1296
|
+
var suspendResult = this.result_1;
|
|
1297
|
+
$sm: do
|
|
1298
|
+
try {
|
|
1299
|
+
var tmp = this.state_1;
|
|
1300
|
+
switch (tmp) {
|
|
1301
|
+
case 0:
|
|
1302
|
+
this.exceptionState_1 = 2;
|
|
1303
|
+
var localVariableAuthNames = listOf(['cognito', 'cognito-direct']);
|
|
1304
|
+
var localVariableBody = EmptyContent_getInstance();
|
|
1305
|
+
var localVariableQuery = LinkedHashMap_init_$Create$();
|
|
1306
|
+
if (this.fields_1 == null)
|
|
1307
|
+
null;
|
|
1308
|
+
else {
|
|
1309
|
+
var value = listOf_0(this.fields_1);
|
|
1310
|
+
localVariableQuery.put_4fpzoq_k$('fields', value);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
var localVariableHeaders = LinkedHashMap_init_$Create$();
|
|
1314
|
+
var tmp1_method = RequestMethod_GET_getInstance();
|
|
1315
|
+
var tmp2_path = replace(replace('/companies/{companyId}/economy/insurances/{insuranceId}', '{companyId}', this.companyId_1.toString()), '{insuranceId}', this.insuranceId_1.toString());
|
|
1316
|
+
var localVariableConfig = new RequestConfig(tmp1_method, tmp2_path, localVariableHeaders, VOID, localVariableQuery, true);
|
|
1317
|
+
this.state_1 = 1;
|
|
1318
|
+
suspendResult = this.client_1.executeRequest_c2mqzq_k$(localVariableConfig, localVariableBody, localVariableAuthNames, this);
|
|
1319
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1320
|
+
return suspendResult;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
continue $sm;
|
|
1324
|
+
case 1:
|
|
1325
|
+
var this_0 = suspendResult;
|
|
1326
|
+
var tmp_0 = getKClass(Insurance);
|
|
1327
|
+
var tmp_1 = null instanceof Insurance;
|
|
1328
|
+
var tmp_2;
|
|
1329
|
+
try {
|
|
1330
|
+
tmp_2 = createKType(getKClass(Insurance), arrayOf([]), false);
|
|
1331
|
+
} catch ($p) {
|
|
1332
|
+
var tmp_3;
|
|
1333
|
+
if ($p instanceof Error) {
|
|
1334
|
+
var _unused_var__etf5q3 = $p;
|
|
1335
|
+
tmp_3 = null;
|
|
1336
|
+
} else {
|
|
1337
|
+
throw $p;
|
|
1338
|
+
}
|
|
1339
|
+
tmp_2 = tmp_3;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
return new HttpResponse(this_0, new TypedBodyProvider(new TypeInfo(tmp_0, tmp_1, tmp_2)));
|
|
1343
|
+
case 2:
|
|
1344
|
+
throw this.exception_1;
|
|
1345
|
+
}
|
|
1346
|
+
} catch ($p_0) {
|
|
1347
|
+
var e = $p_0;
|
|
1348
|
+
if (this.exceptionState_1 === 2) {
|
|
1349
|
+
throw e;
|
|
1350
|
+
} else {
|
|
1351
|
+
this.state_1 = this.exceptionState_1;
|
|
1352
|
+
this.exception_1 = e;
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
while (true);
|
|
1356
|
+
};
|
|
1281
1357
|
function Companion() {
|
|
1282
1358
|
}
|
|
1283
1359
|
var Companion_instance;
|
|
@@ -2131,6 +2207,13 @@ InsuranceApi.createWithClient = createWithClient;
|
|
|
2131
2207
|
export {
|
|
2132
2208
|
insuranceApi as insuranceApi,
|
|
2133
2209
|
InsuranceApi as InsuranceApi,
|
|
2210
|
+
addInsuranceAgreementDocumentOperation as addInsuranceAgreementDocumentOperation,
|
|
2211
|
+
closeInsuranceOperation as closeInsuranceOperation,
|
|
2212
|
+
createInsuranceOperation as createInsuranceOperation,
|
|
2213
|
+
deleteInsuranceOperation as deleteInsuranceOperation,
|
|
2214
|
+
indexInsurancesOperation as indexInsurancesOperation,
|
|
2215
|
+
indexInsurancesUserOperation as indexInsurancesUserOperation,
|
|
2216
|
+
showInsuranceOperation as showInsuranceOperation,
|
|
2134
2217
|
AddAgreementDocumentToInsuranceCommand as AddAgreementDocumentToInsuranceCommand,
|
|
2135
2218
|
CloseInsuranceCommand as CloseInsuranceCommand,
|
|
2136
2219
|
CreateInsuranceCommand as CreateInsuranceCommand,
|