@doordeck/doordeck-headless-sdk 0.169.0 → 0.171.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/Kermit-kermit-core.js +58 -58
- package/kotlin/Kermit-kermit.js +8 -8
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +39 -39
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +23 -23
- package/kotlin/doordeck-sdk.js +10863 -10750
- package/kotlin/kotlin-kotlin-stdlib.js +1174 -980
- package/kotlin/kotlinx-atomicfu.js +22 -22
- package/kotlin/kotlinx-coroutines-core.js +1991 -1979
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +49 -49
- package/kotlin/kotlinx-io-kotlinx-io-core.js +479 -479
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1922 -1922
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1461 -1461
- package/kotlin/ktor-ktor-client-auth.js +261 -261
- package/kotlin/ktor-ktor-client-content-negotiation.js +158 -158
- package/kotlin/ktor-ktor-client-core.js +2695 -1886
- package/kotlin/ktor-ktor-client-logging.js +658 -658
- package/kotlin/ktor-ktor-events.js +13 -13
- package/kotlin/ktor-ktor-http-cio.js +376 -376
- package/kotlin/ktor-ktor-http.js +786 -786
- package/kotlin/ktor-ktor-io.js +663 -663
- package/kotlin/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/kotlin/ktor-ktor-serialization-kotlinx.js +155 -155
- package/kotlin/ktor-ktor-serialization.js +74 -74
- package/kotlin/ktor-ktor-utils.js +780 -780
- package/kotlin/ktor-ktor-websockets.js +53 -53
- package/package.json +1 -1
|
@@ -1,70 +1,70 @@
|
|
|
1
1
|
(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_serialization, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils) {
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
5
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
6
|
-
var plus = kotlin_kotlin.$_$.
|
|
7
|
-
var toMutableSet = kotlin_kotlin.$_$.
|
|
4
|
+
var protoOf = kotlin_kotlin.$_$.ac;
|
|
5
|
+
var initMetadataForClass = kotlin_kotlin.$_$.bb;
|
|
6
|
+
var plus = kotlin_kotlin.$_$.q7;
|
|
7
|
+
var toMutableSet = kotlin_kotlin.$_$.m8;
|
|
8
8
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j;
|
|
9
9
|
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
10
10
|
var register$default = kotlin_io_ktor_ktor_serialization.$_$.b;
|
|
11
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
11
|
+
var Unit_instance = kotlin_kotlin.$_$.b5;
|
|
12
12
|
var Configuration = kotlin_io_ktor_ktor_serialization.$_$.c;
|
|
13
13
|
var VOID = kotlin_kotlin.$_$.b;
|
|
14
|
-
var Exception = kotlin_kotlin.$_$.
|
|
14
|
+
var Exception = kotlin_kotlin.$_$.rf;
|
|
15
15
|
var Exception_init_$Init$ = kotlin_kotlin.$_$.h1;
|
|
16
|
-
var captureStack = kotlin_kotlin.$_$.
|
|
16
|
+
var captureStack = kotlin_kotlin.$_$.la;
|
|
17
17
|
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.o;
|
|
18
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
19
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
18
|
+
var CoroutineImpl = kotlin_kotlin.$_$.j9;
|
|
19
|
+
var THROW_CCE = kotlin_kotlin.$_$.zf;
|
|
20
20
|
var TransformRequestBodyContext = kotlin_io_ktor_ktor_client_core.$_$.l;
|
|
21
21
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.b1;
|
|
22
22
|
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.m;
|
|
23
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
24
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
23
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.t8;
|
|
24
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.gb;
|
|
25
25
|
var TransformResponseBodyContext = kotlin_io_ktor_ktor_client_core.$_$.m;
|
|
26
26
|
var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.i1;
|
|
27
27
|
var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.l1;
|
|
28
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
28
|
+
var isInterface = kotlin_kotlin.$_$.qb;
|
|
29
29
|
var contentType = kotlin_io_ktor_ktor_http.$_$.n1;
|
|
30
30
|
var get_request = kotlin_io_ktor_ktor_client_core.$_$.k1;
|
|
31
31
|
var suitableCharset = kotlin_io_ktor_ktor_serialization.$_$.f;
|
|
32
|
-
var toString = kotlin_kotlin.$_$.
|
|
33
|
-
var Collection = kotlin_kotlin.$_$.
|
|
32
|
+
var toString = kotlin_kotlin.$_$.dc;
|
|
33
|
+
var Collection = kotlin_kotlin.$_$.d5;
|
|
34
34
|
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
|
|
35
|
-
var emptyList = kotlin_kotlin.$_$.
|
|
35
|
+
var emptyList = kotlin_kotlin.$_$.q6;
|
|
36
36
|
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.c;
|
|
37
37
|
var accept = kotlin_io_ktor_ktor_client_core.$_$.d1;
|
|
38
38
|
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.v;
|
|
39
|
-
var getKClassFromExpression = kotlin_kotlin.$_$.
|
|
39
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.qc;
|
|
40
40
|
var contentType_0 = kotlin_io_ktor_ktor_http.$_$.m1;
|
|
41
41
|
var EmptyContent_getInstance = kotlin_io_ktor_ktor_client_core.$_$.g;
|
|
42
|
-
var Unit = kotlin_kotlin.$_$.
|
|
42
|
+
var Unit = kotlin_kotlin.$_$.kg;
|
|
43
43
|
var charset = kotlin_io_ktor_ktor_http.$_$.k1;
|
|
44
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
44
|
+
var ensureNotNull = kotlin_kotlin.$_$.rg;
|
|
45
45
|
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
|
|
46
|
-
var equals = kotlin_kotlin.$_$.
|
|
47
|
-
var joinToString = kotlin_kotlin.$_$.
|
|
48
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
49
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
46
|
+
var equals = kotlin_kotlin.$_$.ua;
|
|
47
|
+
var joinToString = kotlin_kotlin.$_$.f7;
|
|
48
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.db;
|
|
49
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.w5;
|
|
50
50
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.i;
|
|
51
51
|
var deserialize = kotlin_io_ktor_ktor_serialization.$_$.a;
|
|
52
52
|
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.h;
|
|
53
|
-
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.
|
|
53
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.p4;
|
|
54
54
|
var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.a1;
|
|
55
|
-
var getKClass = kotlin_kotlin.$_$.
|
|
55
|
+
var getKClass = kotlin_kotlin.$_$.rc;
|
|
56
56
|
var ClientSSESession = kotlin_io_ktor_ktor_client_core.$_$.q;
|
|
57
57
|
var ClientSSESessionWithDeserialization = kotlin_io_ktor_ktor_client_core.$_$.p;
|
|
58
|
-
var setOf = kotlin_kotlin.$_$.
|
|
59
|
-
var KtList = kotlin_kotlin.$_$.
|
|
58
|
+
var setOf = kotlin_kotlin.$_$.y7;
|
|
59
|
+
var KtList = kotlin_kotlin.$_$.i5;
|
|
60
60
|
var ContentType = kotlin_io_ktor_ktor_http.$_$.y;
|
|
61
|
-
var arrayOf = kotlin_kotlin.$_$.
|
|
62
|
-
var createKType = kotlin_kotlin.$_$.
|
|
63
|
-
var createInvariantKTypeProjection = kotlin_kotlin.$_$.
|
|
61
|
+
var arrayOf = kotlin_kotlin.$_$.ng;
|
|
62
|
+
var createKType = kotlin_kotlin.$_$.pc;
|
|
63
|
+
var createInvariantKTypeProjection = kotlin_kotlin.$_$.nc;
|
|
64
64
|
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.o;
|
|
65
65
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.n;
|
|
66
|
-
var endsWith = kotlin_kotlin.$_$.
|
|
67
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
66
|
+
var endsWith = kotlin_kotlin.$_$.jd;
|
|
67
|
+
var initMetadataForObject = kotlin_kotlin.$_$.hb;
|
|
68
68
|
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.u;
|
|
69
69
|
//endregion
|
|
70
70
|
//region block: pre-declaration
|
|
@@ -99,35 +99,35 @@
|
|
|
99
99
|
}
|
|
100
100
|
var ContentNegotiation;
|
|
101
101
|
function ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher) {
|
|
102
|
-
this.
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
102
|
+
this.m5a_1 = converter;
|
|
103
|
+
this.n5a_1 = contentTypeToSend;
|
|
104
|
+
this.o5a_1 = contentTypeMatcher;
|
|
105
105
|
}
|
|
106
106
|
function defaultMatcher($this, pattern) {
|
|
107
107
|
return new ContentNegotiationConfig$defaultMatcher$1(pattern);
|
|
108
108
|
}
|
|
109
109
|
function ContentNegotiationConfig$defaultMatcher$1($pattern) {
|
|
110
|
-
this.
|
|
110
|
+
this.p5a_1 = $pattern;
|
|
111
111
|
}
|
|
112
|
-
protoOf(ContentNegotiationConfig$defaultMatcher$1).
|
|
113
|
-
return contentType.
|
|
112
|
+
protoOf(ContentNegotiationConfig$defaultMatcher$1).q5a = function (contentType) {
|
|
113
|
+
return contentType.i2t(this.p5a_1);
|
|
114
114
|
};
|
|
115
115
|
function ContentNegotiationConfig() {
|
|
116
|
-
this.
|
|
116
|
+
this.r5a_1 = toMutableSet(plus(get_DefaultIgnoredTypes(), get_DefaultCommonIgnoredTypes()));
|
|
117
117
|
var tmp = this;
|
|
118
118
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
119
|
-
tmp.
|
|
120
|
-
this.
|
|
119
|
+
tmp.s5a_1 = ArrayList_init_$Create$();
|
|
120
|
+
this.t5a_1 = null;
|
|
121
121
|
}
|
|
122
|
-
protoOf(ContentNegotiationConfig).
|
|
123
|
-
var matcher = contentType.
|
|
124
|
-
this.
|
|
122
|
+
protoOf(ContentNegotiationConfig).p3b = function (contentType, converter, configuration) {
|
|
123
|
+
var matcher = contentType.i2t(Application_getInstance().o2r_1) ? JsonContentTypeMatcher_instance : defaultMatcher(this, contentType);
|
|
124
|
+
this.u5a(contentType, converter, matcher, configuration);
|
|
125
125
|
};
|
|
126
|
-
protoOf(ContentNegotiationConfig).
|
|
126
|
+
protoOf(ContentNegotiationConfig).u5a = function (contentTypeToSend, converter, contentTypeMatcher, configuration) {
|
|
127
127
|
// Inline function 'kotlin.apply' call
|
|
128
128
|
configuration(converter);
|
|
129
129
|
var registration = new ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher);
|
|
130
|
-
this.
|
|
130
|
+
this.s5a_1.p(registration);
|
|
131
131
|
};
|
|
132
132
|
function ContentConverterException(message) {
|
|
133
133
|
Exception_init_$Init$(message, this);
|
|
@@ -142,10 +142,10 @@
|
|
|
142
142
|
}
|
|
143
143
|
function ContentNegotiation$lambda($this$createClientPlugin) {
|
|
144
144
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
145
|
-
var registrations = $this$createClientPlugin.
|
|
146
|
-
var ignoredTypes = $this$createClientPlugin.
|
|
147
|
-
$this$createClientPlugin.
|
|
148
|
-
$this$createClientPlugin.
|
|
145
|
+
var registrations = $this$createClientPlugin.r3n_1.s5a_1;
|
|
146
|
+
var ignoredTypes = $this$createClientPlugin.r3n_1.r5a_1;
|
|
147
|
+
$this$createClientPlugin.l48(ContentNegotiation$lambda$slambda_0(registrations, $this$createClientPlugin, ignoredTypes, null));
|
|
148
|
+
$this$createClientPlugin.x3w(ContentNegotiation$lambda$slambda_2(ignoredTypes, registrations, $this$createClientPlugin, null));
|
|
149
149
|
return Unit_instance;
|
|
150
150
|
}
|
|
151
151
|
function invoke$convertRequest(registrations, $this_createClientPlugin, ignoredTypes, request, body, $completion) {
|
|
@@ -155,29 +155,29 @@
|
|
|
155
155
|
return tmp.c9();
|
|
156
156
|
}
|
|
157
157
|
function invoke$convertResponse(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion) {
|
|
158
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
158
|
+
charset = charset === VOID ? Charsets_getInstance().h1w_1 : charset;
|
|
159
159
|
var tmp = new $invoke$convertResponseCOROUTINE$(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion);
|
|
160
160
|
tmp.w8_1 = Unit_instance;
|
|
161
161
|
tmp.x8_1 = null;
|
|
162
162
|
return tmp.c9();
|
|
163
163
|
}
|
|
164
164
|
function ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
|
|
165
|
-
this.
|
|
166
|
-
this.
|
|
167
|
-
this.
|
|
165
|
+
this.m5c_1 = $registrations;
|
|
166
|
+
this.n5c_1 = $this_createClientPlugin;
|
|
167
|
+
this.o5c_1 = $ignoredTypes;
|
|
168
168
|
CoroutineImpl.call(this, resultContinuation);
|
|
169
169
|
}
|
|
170
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
171
|
-
var tmp = this.
|
|
170
|
+
protoOf(ContentNegotiation$lambda$slambda).t5c = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
171
|
+
var tmp = this.u5c($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
172
172
|
tmp.w8_1 = Unit_instance;
|
|
173
173
|
tmp.x8_1 = null;
|
|
174
174
|
return tmp.c9();
|
|
175
175
|
};
|
|
176
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
176
|
+
protoOf(ContentNegotiation$lambda$slambda).c3y = function (p1, p2, p3, p4, $completion) {
|
|
177
177
|
var tmp = p1 instanceof TransformRequestBodyContext ? p1 : THROW_CCE();
|
|
178
178
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
179
179
|
var tmp_1 = !(p3 == null) ? p3 : THROW_CCE();
|
|
180
|
-
return this.
|
|
180
|
+
return this.t5c(tmp, tmp_0, tmp_1, (p4 == null ? true : p4 instanceof TypeInfo) ? p4 : THROW_CCE(), $completion);
|
|
181
181
|
};
|
|
182
182
|
protoOf(ContentNegotiation$lambda$slambda).c9 = function () {
|
|
183
183
|
var suspendResult = this.w8_1;
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
case 0:
|
|
189
189
|
this.v8_1 = 2;
|
|
190
190
|
this.u8_1 = 1;
|
|
191
|
-
suspendResult = invoke$convertRequest(this.
|
|
191
|
+
suspendResult = invoke$convertRequest(this.m5c_1, this.n5c_1, this.o5c_1, this.q5c_1, this.r5c_1, this);
|
|
192
192
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
193
193
|
return suspendResult;
|
|
194
194
|
}
|
|
@@ -210,39 +210,39 @@
|
|
|
210
210
|
}
|
|
211
211
|
while (true);
|
|
212
212
|
};
|
|
213
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
214
|
-
var i = new ContentNegotiation$lambda$slambda(this.
|
|
215
|
-
i.
|
|
216
|
-
i.
|
|
217
|
-
i.
|
|
218
|
-
i.
|
|
213
|
+
protoOf(ContentNegotiation$lambda$slambda).u5c = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, completion) {
|
|
214
|
+
var i = new ContentNegotiation$lambda$slambda(this.m5c_1, this.n5c_1, this.o5c_1, completion);
|
|
215
|
+
i.p5c_1 = $this$transformRequestBody;
|
|
216
|
+
i.q5c_1 = request;
|
|
217
|
+
i.r5c_1 = body;
|
|
218
|
+
i.s5c_1 = _unused_var__etf5q3;
|
|
219
219
|
return i;
|
|
220
220
|
};
|
|
221
221
|
function ContentNegotiation$lambda$slambda_0($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
|
|
222
222
|
var i = new ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation);
|
|
223
223
|
var l = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
224
|
-
return i.
|
|
224
|
+
return i.t5c($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
225
225
|
};
|
|
226
226
|
l.$arity = 4;
|
|
227
227
|
return l;
|
|
228
228
|
}
|
|
229
229
|
function ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
230
|
-
this.
|
|
231
|
-
this.
|
|
232
|
-
this.
|
|
230
|
+
this.d5d_1 = $ignoredTypes;
|
|
231
|
+
this.e5d_1 = $registrations;
|
|
232
|
+
this.f5d_1 = $this_createClientPlugin;
|
|
233
233
|
CoroutineImpl.call(this, resultContinuation);
|
|
234
234
|
}
|
|
235
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
236
|
-
var tmp = this.
|
|
235
|
+
protoOf(ContentNegotiation$lambda$slambda_1).a3y = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
236
|
+
var tmp = this.b3y($this$transformResponseBody, response, body, info, $completion);
|
|
237
237
|
tmp.w8_1 = Unit_instance;
|
|
238
238
|
tmp.x8_1 = null;
|
|
239
239
|
return tmp.c9();
|
|
240
240
|
};
|
|
241
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
241
|
+
protoOf(ContentNegotiation$lambda$slambda_1).c3y = function (p1, p2, p3, p4, $completion) {
|
|
242
242
|
var tmp = p1 instanceof TransformResponseBodyContext ? p1 : THROW_CCE();
|
|
243
243
|
var tmp_0 = p2 instanceof HttpResponse ? p2 : THROW_CCE();
|
|
244
244
|
var tmp_1 = (!(p3 == null) ? isInterface(p3, ByteReadChannel) : false) ? p3 : THROW_CCE();
|
|
245
|
-
return this.
|
|
245
|
+
return this.a3y(tmp, tmp_0, tmp_1, p4 instanceof TypeInfo ? p4 : THROW_CCE(), $completion);
|
|
246
246
|
};
|
|
247
247
|
protoOf(ContentNegotiation$lambda$slambda_1).c9 = function () {
|
|
248
248
|
var suspendResult = this.w8_1;
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
switch (tmp) {
|
|
253
253
|
case 0:
|
|
254
254
|
this.v8_1 = 2;
|
|
255
|
-
var tmp0_elvis_lhs = contentType(this.
|
|
255
|
+
var tmp0_elvis_lhs = contentType(this.h5d_1);
|
|
256
256
|
var tmp_0;
|
|
257
257
|
if (tmp0_elvis_lhs == null) {
|
|
258
258
|
return null;
|
|
@@ -261,9 +261,9 @@
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
var contentType_0 = tmp_0;
|
|
264
|
-
var charset = suitableCharset(get_request(this.
|
|
264
|
+
var charset = suitableCharset(get_request(this.h5d_1).s2x());
|
|
265
265
|
this.u8_1 = 1;
|
|
266
|
-
suspendResult = invoke$convertResponse(this.
|
|
266
|
+
suspendResult = invoke$convertResponse(this.d5d_1, this.e5d_1, this.f5d_1, get_request(this.h5d_1).f3h(), this.j5d_1, this.i5d_1, contentType_0, charset, this);
|
|
267
267
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
268
268
|
return suspendResult;
|
|
269
269
|
}
|
|
@@ -285,33 +285,33 @@
|
|
|
285
285
|
}
|
|
286
286
|
while (true);
|
|
287
287
|
};
|
|
288
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
289
|
-
var i = new ContentNegotiation$lambda$slambda_1(this.
|
|
290
|
-
i.
|
|
291
|
-
i.
|
|
292
|
-
i.
|
|
293
|
-
i.
|
|
288
|
+
protoOf(ContentNegotiation$lambda$slambda_1).b3y = function ($this$transformResponseBody, response, body, info, completion) {
|
|
289
|
+
var i = new ContentNegotiation$lambda$slambda_1(this.d5d_1, this.e5d_1, this.f5d_1, completion);
|
|
290
|
+
i.g5d_1 = $this$transformResponseBody;
|
|
291
|
+
i.h5d_1 = response;
|
|
292
|
+
i.i5d_1 = body;
|
|
293
|
+
i.j5d_1 = info;
|
|
294
294
|
return i;
|
|
295
295
|
};
|
|
296
296
|
function ContentNegotiation$lambda$slambda_2($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
297
297
|
var i = new ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation);
|
|
298
298
|
var l = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
299
|
-
return i.
|
|
299
|
+
return i.a3y($this$transformResponseBody, response, body, info, $completion);
|
|
300
300
|
};
|
|
301
301
|
l.$arity = 4;
|
|
302
302
|
return l;
|
|
303
303
|
}
|
|
304
304
|
function ContentNegotiation$lambda$convertRequest$lambda(it) {
|
|
305
305
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
306
|
-
return toString(it.
|
|
306
|
+
return toString(it.m5a_1);
|
|
307
307
|
}
|
|
308
308
|
function $invoke$convertRequestCOROUTINE$(registrations, $this_createClientPlugin, ignoredTypes, request, body, resultContinuation) {
|
|
309
309
|
CoroutineImpl.call(this, resultContinuation);
|
|
310
|
-
this.
|
|
311
|
-
this.
|
|
312
|
-
this.
|
|
313
|
-
this.
|
|
314
|
-
this.
|
|
310
|
+
this.d5b_1 = registrations;
|
|
311
|
+
this.e5b_1 = $this_createClientPlugin;
|
|
312
|
+
this.f5b_1 = ignoredTypes;
|
|
313
|
+
this.g5b_1 = request;
|
|
314
|
+
this.h5b_1 = body;
|
|
315
315
|
}
|
|
316
316
|
protoOf($invoke$convertRequestCOROUTINE$).c9 = function () {
|
|
317
317
|
var suspendResult = this.w8_1;
|
|
@@ -322,9 +322,9 @@
|
|
|
322
322
|
case 0:
|
|
323
323
|
this.v8_1 = 7;
|
|
324
324
|
var tmp_0;
|
|
325
|
-
if (this.
|
|
326
|
-
var excluded = this.
|
|
327
|
-
var tmp0 = this.
|
|
325
|
+
if (this.g5b_1.t3f_1.e2i(get_ExcludedContentTypes())) {
|
|
326
|
+
var excluded = this.g5b_1.t3f_1.c2i(get_ExcludedContentTypes());
|
|
327
|
+
var tmp0 = this.d5b_1;
|
|
328
328
|
var destination = ArrayList_init_$Create$();
|
|
329
329
|
var _iterator__ex2g4s = tmp0.r();
|
|
330
330
|
while (_iterator__ex2g4s.s()) {
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
var _iterator__ex2g4s_0 = excluded.r();
|
|
345
345
|
while (_iterator__ex2g4s_0.s()) {
|
|
346
346
|
var element_0 = _iterator__ex2g4s_0.t();
|
|
347
|
-
if (element.
|
|
347
|
+
if (element.n5a_1.i2t(element_0)) {
|
|
348
348
|
tmp$ret$0 = false;
|
|
349
349
|
break l$ret$1;
|
|
350
350
|
}
|
|
@@ -358,11 +358,11 @@
|
|
|
358
358
|
}
|
|
359
359
|
tmp_0 = destination;
|
|
360
360
|
} else {
|
|
361
|
-
tmp_0 = this.
|
|
361
|
+
tmp_0 = this.d5b_1;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
var requestRegistrations = tmp_0;
|
|
365
|
-
var tmp0_elvis_lhs = this.
|
|
365
|
+
var tmp0_elvis_lhs = this.g5b_1.q3f_1.g2m(HttpHeaders_getInstance().o2t_1);
|
|
366
366
|
var acceptHeaders = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
367
367
|
var _iterator__ex2g4s_1 = requestRegistrations.r();
|
|
368
368
|
while (_iterator__ex2g4s_1.s()) {
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
var _iterator__ex2g4s_2 = acceptHeaders.r();
|
|
383
383
|
while (_iterator__ex2g4s_2.s()) {
|
|
384
384
|
var element_2 = _iterator__ex2g4s_2.t();
|
|
385
|
-
if (Companion_getInstance().
|
|
385
|
+
if (Companion_getInstance().gm(element_2).i2t(element_1.n5a_1)) {
|
|
386
386
|
tmp$ret$2 = false;
|
|
387
387
|
break l$ret$3;
|
|
388
388
|
}
|
|
@@ -391,19 +391,19 @@
|
|
|
391
391
|
}
|
|
392
392
|
while (false);
|
|
393
393
|
if (tmp$ret$2) {
|
|
394
|
-
var qValue = this.
|
|
395
|
-
var contentTypeToSend = qValue == null ? element_1.
|
|
396
|
-
get_LOGGER().
|
|
397
|
-
accept(this.
|
|
394
|
+
var qValue = this.e5b_1.r3n_1.t5a_1;
|
|
395
|
+
var contentTypeToSend = qValue == null ? element_1.n5a_1 : element_1.n5a_1.g2t('q', qValue.toString());
|
|
396
|
+
get_LOGGER().w2q('Adding Accept=' + contentTypeToSend.toString() + ' header for ' + this.g5b_1.o3f_1.toString());
|
|
397
|
+
accept(this.g5b_1, contentTypeToSend);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
var tmp_3;
|
|
402
|
-
var tmp_4 = this.
|
|
402
|
+
var tmp_4 = this.h5b_1;
|
|
403
403
|
if (tmp_4 instanceof OutgoingContent) {
|
|
404
404
|
tmp_3 = true;
|
|
405
405
|
} else {
|
|
406
|
-
var tmp0_0 = this.
|
|
406
|
+
var tmp0_0 = this.f5b_1;
|
|
407
407
|
var tmp$ret$4;
|
|
408
408
|
l$ret$5: do {
|
|
409
409
|
var tmp_5;
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
var _iterator__ex2g4s_3 = tmp0_0.r();
|
|
420
420
|
while (_iterator__ex2g4s_3.s()) {
|
|
421
421
|
var element_3 = _iterator__ex2g4s_3.t();
|
|
422
|
-
if (element_3.wa(this.
|
|
422
|
+
if (element_3.wa(this.h5b_1)) {
|
|
423
423
|
tmp$ret$4 = true;
|
|
424
424
|
break l$ret$5;
|
|
425
425
|
}
|
|
@@ -431,36 +431,36 @@
|
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
if (tmp_3) {
|
|
434
|
-
get_LOGGER().
|
|
434
|
+
get_LOGGER().w2q('Body type ' + toString(getKClassFromExpression(this.h5b_1)) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.g5b_1.o3f_1.toString() + '.'));
|
|
435
435
|
return null;
|
|
436
436
|
}
|
|
437
437
|
|
|
438
438
|
var tmp_6 = this;
|
|
439
|
-
var tmp0_elvis_lhs_0 = contentType_0(this.
|
|
439
|
+
var tmp0_elvis_lhs_0 = contentType_0(this.g5b_1);
|
|
440
440
|
var tmp_7;
|
|
441
441
|
if (tmp0_elvis_lhs_0 == null) {
|
|
442
|
-
this.
|
|
443
|
-
get_LOGGER().
|
|
442
|
+
this.e5b_1;
|
|
443
|
+
get_LOGGER().w2q("Request doesn't have Content-Type header. Skipping ContentNegotiation for " + this.g5b_1.o3f_1.toString() + '.');
|
|
444
444
|
return null;
|
|
445
445
|
} else {
|
|
446
446
|
tmp_7 = tmp0_elvis_lhs_0;
|
|
447
447
|
}
|
|
448
448
|
|
|
449
|
-
tmp_6.
|
|
450
|
-
var tmp_8 = this.
|
|
449
|
+
tmp_6.j5b_1 = tmp_7;
|
|
450
|
+
var tmp_8 = this.h5b_1;
|
|
451
451
|
if (tmp_8 instanceof Unit) {
|
|
452
|
-
get_LOGGER().
|
|
453
|
-
this.
|
|
452
|
+
get_LOGGER().w2q('Sending empty body for ' + this.g5b_1.o3f_1.toString());
|
|
453
|
+
this.g5b_1.q3f_1.q2m(HttpHeaders_getInstance().g2u_1);
|
|
454
454
|
return EmptyContent_getInstance();
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
var tmp_9 = this;
|
|
458
|
-
var tmp0_1 = this.
|
|
458
|
+
var tmp0_1 = this.d5b_1;
|
|
459
459
|
var destination_0 = ArrayList_init_$Create$();
|
|
460
460
|
var _iterator__ex2g4s_4 = tmp0_1.r();
|
|
461
461
|
while (_iterator__ex2g4s_4.s()) {
|
|
462
462
|
var element_4 = _iterator__ex2g4s_4.t();
|
|
463
|
-
if (element_4.
|
|
463
|
+
if (element_4.o5a_1.q5a(this.j5b_1)) {
|
|
464
464
|
destination_0.p(element_4);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
@@ -475,41 +475,41 @@
|
|
|
475
475
|
var tmp1_elvis_lhs = tmp_10;
|
|
476
476
|
var tmp_11;
|
|
477
477
|
if (tmp1_elvis_lhs == null) {
|
|
478
|
-
this.
|
|
479
|
-
get_LOGGER().
|
|
478
|
+
this.e5b_1;
|
|
479
|
+
get_LOGGER().w2q('None of the registered converters match request Content-Type=' + this.j5b_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.g5b_1.o3f_1.toString() + '.'));
|
|
480
480
|
return null;
|
|
481
481
|
} else {
|
|
482
482
|
tmp_11 = tmp1_elvis_lhs;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
tmp_9.
|
|
486
|
-
if (this.
|
|
487
|
-
get_LOGGER().
|
|
485
|
+
tmp_9.i5b_1 = tmp_11;
|
|
486
|
+
if (this.g5b_1.t4a() == null) {
|
|
487
|
+
get_LOGGER().w2q('Request has unknown body type. Skipping ContentNegotiation for ' + this.g5b_1.o3f_1.toString() + '.');
|
|
488
488
|
return null;
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
-
this.
|
|
491
|
+
this.g5b_1.q3f_1.q2m(HttpHeaders_getInstance().g2u_1);
|
|
492
492
|
var tmp_12 = this;
|
|
493
|
-
tmp_12.
|
|
493
|
+
tmp_12.n5b_1 = this.i5b_1;
|
|
494
494
|
this.u8_1 = 1;
|
|
495
495
|
continue $sm;
|
|
496
496
|
case 1:
|
|
497
|
-
this.
|
|
497
|
+
this.m5b_1 = this.n5b_1.r();
|
|
498
498
|
this.u8_1 = 2;
|
|
499
499
|
continue $sm;
|
|
500
500
|
case 2:
|
|
501
|
-
if (!this.
|
|
501
|
+
if (!this.m5b_1.s()) {
|
|
502
502
|
this.u8_1 = 5;
|
|
503
503
|
continue $sm;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
|
-
var element_5 = this.
|
|
507
|
-
this.
|
|
506
|
+
var element_5 = this.m5b_1.t();
|
|
507
|
+
this.l5b_1 = element_5;
|
|
508
508
|
this.u8_1 = 3;
|
|
509
|
-
var tmp0_elvis_lhs_1 = charset(this.
|
|
510
|
-
var tmp_13 = tmp0_elvis_lhs_1 == null ? Charsets_getInstance().
|
|
511
|
-
var tmp_14 = ensureNotNull(this.
|
|
512
|
-
var this_0 = this.
|
|
509
|
+
var tmp0_elvis_lhs_1 = charset(this.j5b_1);
|
|
510
|
+
var tmp_13 = tmp0_elvis_lhs_1 == null ? Charsets_getInstance().h1w_1 : tmp0_elvis_lhs_1;
|
|
511
|
+
var tmp_14 = ensureNotNull(this.g5b_1.t4a());
|
|
512
|
+
var this_0 = this.h5b_1;
|
|
513
513
|
var tmp_15;
|
|
514
514
|
if (!equals(this_0, NullBody_instance)) {
|
|
515
515
|
tmp_15 = this_0;
|
|
@@ -517,7 +517,7 @@
|
|
|
517
517
|
tmp_15 = null;
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
-
suspendResult = this.
|
|
520
|
+
suspendResult = this.l5b_1.m5a_1.k5d(this.j5b_1, tmp_13, tmp_14, tmp_15, this);
|
|
521
521
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
522
522
|
return suspendResult;
|
|
523
523
|
}
|
|
@@ -526,12 +526,12 @@
|
|
|
526
526
|
case 3:
|
|
527
527
|
var result = suspendResult;
|
|
528
528
|
if (!(result == null)) {
|
|
529
|
-
get_LOGGER().
|
|
529
|
+
get_LOGGER().w2q('Converted request body using ' + toString(this.l5b_1.m5a_1) + ' for ' + this.g5b_1.o3f_1.toString());
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
var result_0 = result;
|
|
533
533
|
if (!(result_0 == null)) {
|
|
534
|
-
this.
|
|
534
|
+
this.k5b_1 = result_0;
|
|
535
535
|
this.u8_1 = 6;
|
|
536
536
|
continue $sm;
|
|
537
537
|
} else {
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
this.u8_1 = 2;
|
|
544
544
|
continue $sm;
|
|
545
545
|
case 5:
|
|
546
|
-
this.
|
|
546
|
+
this.k5b_1 = null;
|
|
547
547
|
if (false) {
|
|
548
548
|
this.u8_1 = 1;
|
|
549
549
|
continue $sm;
|
|
@@ -552,11 +552,11 @@
|
|
|
552
552
|
this.u8_1 = 6;
|
|
553
553
|
continue $sm;
|
|
554
554
|
case 6:
|
|
555
|
-
var tmp2_elvis_lhs = this.
|
|
555
|
+
var tmp2_elvis_lhs = this.k5b_1;
|
|
556
556
|
var tmp_16;
|
|
557
557
|
if (tmp2_elvis_lhs == null) {
|
|
558
|
-
var tmp_17 = "Can't convert " + toString(this.
|
|
559
|
-
throw new ContentConverterException(tmp_17 + joinToString(this.
|
|
558
|
+
var tmp_17 = "Can't convert " + toString(this.h5b_1) + ' with contentType ' + this.j5b_1.toString() + ' using converters ';
|
|
559
|
+
throw new ContentConverterException(tmp_17 + joinToString(this.i5b_1, VOID, VOID, VOID, VOID, VOID, ContentNegotiation$lambda$convertRequest$lambda));
|
|
560
560
|
} else {
|
|
561
561
|
tmp_16 = tmp2_elvis_lhs;
|
|
562
562
|
}
|
|
@@ -579,14 +579,14 @@
|
|
|
579
579
|
};
|
|
580
580
|
function $invoke$convertResponseCOROUTINE$(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, resultContinuation) {
|
|
581
581
|
CoroutineImpl.call(this, resultContinuation);
|
|
582
|
-
this.
|
|
583
|
-
this.
|
|
584
|
-
this.
|
|
585
|
-
this.
|
|
586
|
-
this.
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
582
|
+
this.w5b_1 = ignoredTypes;
|
|
583
|
+
this.x5b_1 = registrations;
|
|
584
|
+
this.y5b_1 = $this_createClientPlugin;
|
|
585
|
+
this.z5b_1 = requestUrl;
|
|
586
|
+
this.a5c_1 = info;
|
|
587
|
+
this.b5c_1 = body;
|
|
588
|
+
this.c5c_1 = responseContentType;
|
|
589
|
+
this.d5c_1 = charset;
|
|
590
590
|
}
|
|
591
591
|
protoOf($invoke$convertResponseCOROUTINE$).c9 = function () {
|
|
592
592
|
var suspendResult = this.w8_1;
|
|
@@ -596,23 +596,23 @@
|
|
|
596
596
|
switch (tmp) {
|
|
597
597
|
case 0:
|
|
598
598
|
this.v8_1 = 2;
|
|
599
|
-
var tmp_0 = this.
|
|
599
|
+
var tmp_0 = this.b5c_1;
|
|
600
600
|
if (!isInterface(tmp_0, ByteReadChannel)) {
|
|
601
|
-
get_LOGGER().
|
|
601
|
+
get_LOGGER().w2q('Response body is already transformed. Skipping ContentNegotiation for ' + this.z5b_1.toString() + '.');
|
|
602
602
|
return null;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
-
if (this.
|
|
606
|
-
get_LOGGER().
|
|
605
|
+
if (this.w5b_1.u1(this.a5c_1.f2q_1)) {
|
|
606
|
+
get_LOGGER().w2q('Response body type ' + toString(this.a5c_1.f2q_1) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.z5b_1.toString() + '.'));
|
|
607
607
|
return null;
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
-
var tmp0 = this.
|
|
610
|
+
var tmp0 = this.x5b_1;
|
|
611
611
|
var destination = ArrayList_init_$Create$();
|
|
612
612
|
var _iterator__ex2g4s = tmp0.r();
|
|
613
613
|
while (_iterator__ex2g4s.s()) {
|
|
614
614
|
var element = _iterator__ex2g4s.t();
|
|
615
|
-
if (element.
|
|
615
|
+
if (element.o5a_1.q5a(this.c5c_1)) {
|
|
616
616
|
destination.p(element);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
@@ -621,7 +621,7 @@
|
|
|
621
621
|
var _iterator__ex2g4s_0 = destination.r();
|
|
622
622
|
while (_iterator__ex2g4s_0.s()) {
|
|
623
623
|
var item = _iterator__ex2g4s_0.t();
|
|
624
|
-
destination_0.p(item.
|
|
624
|
+
destination_0.p(item.m5a_1);
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
var tmp_1;
|
|
@@ -634,8 +634,8 @@
|
|
|
634
634
|
var tmp0_elvis_lhs = tmp_1;
|
|
635
635
|
var tmp_2;
|
|
636
636
|
if (tmp0_elvis_lhs == null) {
|
|
637
|
-
this.
|
|
638
|
-
get_LOGGER().
|
|
637
|
+
this.y5b_1;
|
|
638
|
+
get_LOGGER().w2q('None of the registered converters match response with Content-Type=' + this.c5c_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.z5b_1.toString() + '.'));
|
|
639
639
|
return null;
|
|
640
640
|
} else {
|
|
641
641
|
tmp_2 = tmp0_elvis_lhs;
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
|
|
644
644
|
var suitableConverters = tmp_2;
|
|
645
645
|
this.u8_1 = 1;
|
|
646
|
-
suspendResult = deserialize(suitableConverters, this.
|
|
646
|
+
suspendResult = deserialize(suitableConverters, this.b5c_1, this.a5c_1, this.d5c_1, this);
|
|
647
647
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
648
648
|
return suspendResult;
|
|
649
649
|
}
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
case 1:
|
|
653
653
|
var result = suspendResult;
|
|
654
654
|
if (!isInterface(result, ByteReadChannel)) {
|
|
655
|
-
get_LOGGER().
|
|
655
|
+
get_LOGGER().w2q('Response body was converted to ' + toString(getKClassFromExpression(result)) + ' for ' + this.z5b_1.toString() + '.');
|
|
656
656
|
}
|
|
657
657
|
|
|
658
658
|
return result;
|
|
@@ -703,12 +703,12 @@
|
|
|
703
703
|
}
|
|
704
704
|
function JsonContentTypeMatcher() {
|
|
705
705
|
}
|
|
706
|
-
protoOf(JsonContentTypeMatcher).
|
|
707
|
-
if (contentType.
|
|
706
|
+
protoOf(JsonContentTypeMatcher).q5a = function (contentType) {
|
|
707
|
+
if (contentType.i2t(Application_getInstance().o2r_1)) {
|
|
708
708
|
return true;
|
|
709
709
|
}
|
|
710
|
-
var value = contentType.
|
|
711
|
-
return Application_getInstance().
|
|
710
|
+
var value = contentType.h2t().toString();
|
|
711
|
+
return Application_getInstance().i2s(value) && endsWith(value, '+json', true);
|
|
712
712
|
};
|
|
713
713
|
var JsonContentTypeMatcher_instance;
|
|
714
714
|
function JsonContentTypeMatcher_getInstance() {
|
|
@@ -728,7 +728,7 @@
|
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
//region block: post-declaration
|
|
731
|
-
protoOf(ContentNegotiationConfig).
|
|
731
|
+
protoOf(ContentNegotiationConfig).q3b = register$default;
|
|
732
732
|
//endregion
|
|
733
733
|
//region block: init
|
|
734
734
|
JsonContentTypeMatcher_instance = new JsonContentTypeMatcher();
|