@flock/wirespec 0.16.8 → 0.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/arrow-arrow-core.mjs +306 -61
  2. package/arrow-arrow-core.mjs.map +1 -1
  3. package/clikt-clikt.mjs +1160 -1160
  4. package/colormath-root-colormath.mjs +425 -425
  5. package/kotlin-kotlin-stdlib.mjs +3 -3
  6. package/kotlin-openapi-bindings.mjs +4762 -4762
  7. package/kotlin-rgxgen.mjs +1769 -1769
  8. package/kotlinx-io-kotlinx-io-core.mjs +380 -380
  9. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1645 -1645
  10. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -1
  11. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1307 -1307
  12. package/markdown.mjs +1871 -1871
  13. package/mordant-mordant.mjs +1637 -1637
  14. package/package.json +1 -1
  15. package/wirespec-src-compiler-core.mjs +1672 -1502
  16. package/wirespec-src-compiler-core.mjs.map +1 -1
  17. package/wirespec-src-compiler-emitters-java.mjs +251 -251
  18. package/wirespec-src-compiler-emitters-java.mjs.map +1 -1
  19. package/wirespec-src-compiler-emitters-kotlin.mjs +193 -193
  20. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  21. package/wirespec-src-compiler-emitters-python.mjs +187 -187
  22. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  23. package/wirespec-src-compiler-emitters-typescript.mjs +195 -195
  24. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  25. package/wirespec-src-compiler-emitters-wirespec.mjs +76 -76
  26. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  27. package/wirespec-src-compiler-lib.mjs +342 -340
  28. package/wirespec-src-compiler-lib.mjs.map +1 -1
  29. package/wirespec-src-converter-avro.mjs +511 -511
  30. package/wirespec-src-converter-avro.mjs.map +1 -1
  31. package/wirespec-src-converter-openapi.mjs +578 -576
  32. package/wirespec-src-converter-openapi.mjs.map +1 -1
  33. package/wirespec-src-plugin-arguments.mjs +168 -167
  34. package/wirespec-src-plugin-arguments.mjs.map +1 -1
  35. package/wirespec-src-plugin-cli.mjs +82 -81
  36. package/wirespec-src-plugin-cli.mjs.map +1 -1
  37. package/wirespec-src-plugin-npm.mjs +30 -29
  38. package/wirespec-src-plugin-npm.mjs.map +1 -1
  39. package/wirespec-src-tools-generator.mjs +27 -27
@@ -78,7 +78,7 @@ function emit(identifier) {
78
78
  }
79
79
  initMetadataForInterface(TypeScriptIdentifierEmitter, 'TypeScriptIdentifierEmitter');
80
80
  function sanitizeSymbol(_this__u8e3s4) {
81
- return this.d2b(_this__u8e3s4.b1());
81
+ return this.j2b(_this__u8e3s4.b1());
82
82
  }
83
83
  function sanitizeSymbol_0(_this__u8e3s4) {
84
84
  var tmp = asSequence(_this__u8e3s4);
@@ -94,7 +94,7 @@ function emit_0(type, module_0) {
94
94
  while (tmp0_iterator.h()) {
95
95
  var e = tmp0_iterator.i();
96
96
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptTypeDefinitionEmitter.emit.<anonymous>' call
97
- var key = e.w28_1;
97
+ var key = e.c29_1;
98
98
  if (set.e(key)) {
99
99
  list.e(e);
100
100
  }
@@ -105,20 +105,20 @@ function emit_0(type, module_0) {
105
105
  while (tmp0_iterator_0.h()) {
106
106
  var item = tmp0_iterator_0.i();
107
107
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptTypeDefinitionEmitter.emit.<anonymous>' call
108
- var tmp$ret$2 = 'import {' + item.w28_1 + "} from './" + item.w28_1 + "'";
108
+ var tmp$ret$2 = 'import {' + item.c29_1 + "} from './" + item.c29_1 + "'";
109
109
  destination.e(tmp$ret$2);
110
110
  }
111
111
  var tmp = destination;
112
- return trimMargin('\n |' + joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda) + '\n |export type ' + this.g2b(type.h24_1) + ' = {\n |' + this.e25(type.i24_1) + '\n |}\n |\n ');
112
+ return trimMargin('\n |' + joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda) + '\n |export type ' + this.m2b(type.k24_1) + ' = {\n |' + this.h25(type.l24_1) + '\n |}\n |\n ');
113
113
  }
114
114
  function emit_1(_this__u8e3s4) {
115
115
  // Inline function 'kotlin.let' call
116
116
  var tmp;
117
117
  if (_this__u8e3s4 instanceof Dict) {
118
- tmp = 'Record<string, ' + this.g25(_this__u8e3s4.r23_1) + '>';
118
+ tmp = 'Record<string, ' + this.j25(_this__u8e3s4.u23_1) + '>';
119
119
  } else {
120
120
  if (_this__u8e3s4 instanceof Iterable) {
121
- tmp = this.g25(_this__u8e3s4.o23_1) + '[]';
121
+ tmp = this.j25(_this__u8e3s4.r23_1) + '[]';
122
122
  } else {
123
123
  if (_this__u8e3s4 instanceof Unit) {
124
124
  tmp = 'void';
@@ -127,10 +127,10 @@ function emit_1(_this__u8e3s4) {
127
127
  tmp = 'any';
128
128
  } else {
129
129
  if (_this__u8e3s4 instanceof Custom) {
130
- tmp = this.d2b(_this__u8e3s4.w28_1);
130
+ tmp = this.j2b(_this__u8e3s4.c29_1);
131
131
  } else {
132
132
  if (_this__u8e3s4 instanceof Primitive) {
133
- var tmp1_subject = _this__u8e3s4.a29_1;
133
+ var tmp1_subject = _this__u8e3s4.g29_1;
134
134
  var tmp_0;
135
135
  if (tmp1_subject instanceof String_0) {
136
136
  tmp_0 = 'string';
@@ -164,15 +164,15 @@ function emit_1(_this__u8e3s4) {
164
164
  }
165
165
  // Inline function 'kotlin.contracts.contract' call
166
166
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptTypeDefinitionEmitter.emit.<anonymous>' call
167
- return tmp + (_this__u8e3s4.hm() ? ' | undefined' : '');
167
+ return tmp + (_this__u8e3s4.jm() ? ' | undefined' : '');
168
168
  }
169
169
  function emit_2(_this__u8e3s4) {
170
170
  var tmp;
171
171
  if (_this__u8e3s4 instanceof RegExp_0) {
172
- tmp = _RegExp___get_value__impl__7o7618(_this__u8e3s4.a28_1) + '.test(value)';
172
+ tmp = _RegExp___get_value__impl__7o7618(_this__u8e3s4.g28_1) + '.test(value)';
173
173
  } else {
174
174
  if (_this__u8e3s4 instanceof Bound) {
175
- tmp = '' + _this__u8e3s4.b28_1 + ' < value && value < ' + _this__u8e3s4.c28_1 + ';';
175
+ tmp = '' + _this__u8e3s4.h28_1 + ' < value && value < ' + _this__u8e3s4.i28_1 + ';';
176
176
  } else {
177
177
  noWhenBranchMatchedException();
178
178
  }
@@ -180,35 +180,35 @@ function emit_2(_this__u8e3s4) {
180
180
  return tmp;
181
181
  }
182
182
  function emit_3(_this__u8e3s4) {
183
- return joinToString(_this__u8e3s4.f24_1, ',\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda_0(this));
183
+ return joinToString(_this__u8e3s4.i24_1, ',\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda_0(this));
184
184
  }
185
185
  function emit_4(_this__u8e3s4) {
186
- return Spacer_instance.toString() + this.f26(_this__u8e3s4.l24_1) + ': ' + this.g25(_this__u8e3s4.m24_1);
186
+ return Spacer_instance.toString() + this.i26(_this__u8e3s4.o24_1) + ': ' + this.j25(_this__u8e3s4.p24_1);
187
187
  }
188
188
  initMetadataForInterface(TypeScriptTypeDefinitionEmitter, 'TypeScriptTypeDefinitionEmitter', VOID, VOID, [TypeDefinitionEmitter, TypeScriptIdentifierEmitter]);
189
189
  function emitClient(ast) {
190
- var tmp = 'client.' + this.n25().w25_1;
191
- var tmp_0 = this.j25(ast);
190
+ var tmp = 'client.' + this.q25().z25_1;
191
+ var tmp_0 = this.m25(ast);
192
192
  var tmp_1 = joinToString(tmp_0, '\n', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClient$lambda);
193
193
  // Inline function 'kotlin.collections.distinctBy' call
194
194
  // Inline function 'kotlin.collections.flatMap' call
195
195
  // Inline function 'arrow.core.NonEmptyList.flatMap' call
196
- var this_0 = ast.k25_1;
196
+ var this_0 = ast.n25_1;
197
197
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptClientEmitter.emitClient.<anonymous>' call
198
- var tmp_2 = this_0.jk_1.m25_1.hk();
198
+ var tmp_2 = this_0.pk_1.p25_1.nk();
199
199
  // Inline function 'kotlin.collections.flatMap' call
200
200
  // Inline function 'kotlin.collections.flatMapTo' call
201
- var this_1 = this_0.kk_1;
201
+ var this_1 = this_0.qk_1;
202
202
  var destination = ArrayList_init_$Create$();
203
203
  var tmp0_iterator = this_1.g();
204
204
  while (tmp0_iterator.h()) {
205
205
  var element = tmp0_iterator.i();
206
206
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptClientEmitter.emitClient.<anonymous>' call
207
- var list = element.m25_1;
207
+ var list = element.p25_1;
208
208
  addAll(destination, list);
209
209
  }
210
210
  // Inline function 'kotlin.collections.flatMapTo' call
211
- var this_2 = tmp_2.ok(destination).nk();
211
+ var this_2 = tmp_2.uk(destination).tk();
212
212
  var destination_0 = ArrayList_init_$Create$();
213
213
  var tmp0_iterator_0 = this_2.g();
214
214
  while (tmp0_iterator_0.h()) {
@@ -223,18 +223,23 @@ function emitClient(ast) {
223
223
  while (tmp0_iterator_1.h()) {
224
224
  var e = tmp0_iterator_1.i();
225
225
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptClientEmitter.emitClient.<anonymous>' call
226
- var key = e.w28_1;
226
+ var key = e.c29_1;
227
227
  if (set.e(key)) {
228
228
  list_1.e(e);
229
229
  }
230
230
  }
231
231
  var tmp_3 = list_1;
232
232
  var tmp_4 = joinToString(tmp_3, '\n', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClient$lambda_0);
233
- var tmp_5 = this.j25(ast);
233
+ var tmp_5 = this.m25(ast);
234
234
  return new Emitted(tmp, trimMargin('\n |import {Wirespec} from "./Wirespec"\n |\n |' + tmp_1 + '\n |\n |' + tmp_4 + '\n |\n |type RawHandler = (req: Wirespec.RawRequest) => Promise<Wirespec.RawResponse>\n |\n |export const Client = (serialization: Wirespec.Serialization, handler: RawHandler) => ({\n |' + spacer(joinToString(tmp_5, '\n', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClient$lambda_1(this)), 1) + '\n |})\n |\n '));
235
235
  }
236
236
  initMetadataForInterface(TypeScriptClientEmitter, 'TypeScriptClientEmitter', VOID, VOID, [ClientEmitter, TypeScriptTypeDefinitionEmitter]);
237
- function emit_5(endpoint) {
237
+ function emit_5(enum_0, module_0) {
238
+ var tmp = this.m2b(enum_0.q26_1);
239
+ return 'export type ' + tmp + ' = ' + joinToString(enum_0.r26_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEnumDefinitionEmitter$emit$lambda) + '\n';
240
+ }
241
+ initMetadataForInterface(TypeScriptEnumDefinitionEmitter, 'TypeScriptEnumDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
242
+ function emit_6(endpoint) {
238
243
  // Inline function 'kotlin.collections.map' call
239
244
  // Inline function 'kotlin.collections.distinctBy' call
240
245
  var this_0 = importReferences(endpoint);
@@ -244,7 +249,7 @@ function emit_5(endpoint) {
244
249
  while (tmp0_iterator.h()) {
245
250
  var e = tmp0_iterator.i();
246
251
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEndpointDefinitionEmitter.emit.<anonymous>' call
247
- var key = e.w28_1;
252
+ var key = e.c29_1;
248
253
  if (set.e(key)) {
249
254
  list.e(e);
250
255
  }
@@ -255,64 +260,64 @@ function emit_5(endpoint) {
255
260
  while (tmp0_iterator_0.h()) {
256
261
  var item = tmp0_iterator_0.i();
257
262
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEndpointDefinitionEmitter.emit.<anonymous>' call
258
- var tmp$ret$2 = 'import {' + item.w28_1 + "} from '../model'";
263
+ var tmp$ret$2 = 'import {' + item.c29_1 + "} from '../model'";
259
264
  destination.e(tmp$ret$2);
260
265
  }
261
266
  var tmp = destination;
262
267
  var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda);
263
- var tmp_1 = this.g2b(endpoint.o24_1);
268
+ var tmp_1 = this.m2b(endpoint.r24_1);
264
269
  var tmp_2 = get_pathParams(endpoint);
265
270
  var tmp_3 = emitType(tmp_2, this, 'Path', TypeScriptEndpointDefinitionEmitter$emit$lambda_0(this));
266
- var tmp_4 = emitType(endpoint.r24_1, this, 'Queries', TypeScriptEndpointDefinitionEmitter$emit$lambda_1(this));
267
- var tmp_5 = emitType(endpoint.s24_1, this, 'Headers', TypeScriptEndpointDefinitionEmitter$emit$lambda_2(this));
268
- var tmp_6 = emitType_1(first(endpoint.t24_1), this, endpoint);
269
- var tmp_7 = distinctByStatus(endpoint.u24_1);
271
+ var tmp_4 = emitType(endpoint.u24_1, this, 'Queries', TypeScriptEndpointDefinitionEmitter$emit$lambda_1(this));
272
+ var tmp_5 = emitType(endpoint.v24_1, this, 'Headers', TypeScriptEndpointDefinitionEmitter$emit$lambda_2(this));
273
+ var tmp_6 = emitType_1(first(endpoint.w24_1), this, endpoint);
274
+ var tmp_7 = distinctByStatus(endpoint.x24_1);
270
275
  var tmp_8 = joinToString(tmp_7, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_3(this));
271
276
  var tmp_9 = Spacer_instance.toString();
272
- var tmp_10 = distinctByStatus(endpoint.u24_1);
277
+ var tmp_10 = distinctByStatus(endpoint.x24_1);
273
278
  var tmp_11 = joinToString(tmp_10, ' | ', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_4(this));
274
- var tmp_12 = emitFunction_0(first(endpoint.t24_1), this, endpoint);
275
- var tmp_13 = distinctByStatus(endpoint.u24_1);
279
+ var tmp_12 = emitFunction_0(first(endpoint.w24_1), this, endpoint);
280
+ var tmp_13 = distinctByStatus(endpoint.x24_1);
276
281
  var tmp_14 = joinToString(tmp_13, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_5(this));
277
282
  var tmp_15 = Spacer_instance.toString();
278
- var tmp_16 = Spacer_instance.x26(2);
283
+ var tmp_16 = Spacer_instance.a27(2);
279
284
  var tmp_17 = emitHandleFunction(this, endpoint);
280
285
  var tmp_18 = Spacer_instance.toString();
281
- var tmp_19 = prependIndent(emitClient_0(endpoint, this), Spacer_instance.x26(1));
282
- var tmp_20 = prependIndent(emitServer(endpoint, this), Spacer_instance.x26(1));
286
+ var tmp_19 = prependIndent(emitClient_0(endpoint, this), Spacer_instance.a27(1));
287
+ var tmp_20 = prependIndent(emitServer(endpoint, this), Spacer_instance.a27(1));
283
288
  var tmp_21 = Spacer_instance.toString();
284
- var tmp_22 = Spacer_instance.x26(2);
285
- var tmp_23 = Companion_instance_0.y25(this.g2b(endpoint.o24_1));
286
- var tmp_24 = Spacer_instance.x26(2);
287
- var tmp_25 = Spacer_instance.x26(2);
288
- return trimMargin('\n |' + tmp_0 + '\n |export namespace ' + tmp_1 + ' {\n |' + tmp_3 + '\n |' + tmp_4 + '\n |' + tmp_5 + '\n |' + tmp_6 + '\n |' + tmp_8 + '\n |' + tmp_9 + 'export type Response = ' + tmp_11 + '\n |' + tmp_12 + '\n |' + tmp_14 + '\n |' + tmp_15 + 'export type Handler = {\n |' + tmp_16 + tmp_17 + '\n |' + tmp_18 + '}\n |' + tmp_19 + '\n |' + tmp_20 + '\n |' + tmp_21 + 'export const api = {\n |' + tmp_22 + 'name: "' + tmp_23 + '",\n |' + tmp_24 + 'method: "' + endpoint.p24_1.q2_1 + '",\n |' + tmp_25 + 'path: "' + joinToString(endpoint.q24_1, '/', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_6(this)) + '",\n |' + Spacer_instance.x26(2) + 'server,\n |' + Spacer_instance.x26(2) + 'client\n |' + Spacer_instance.toString() + '} as const\n |}\n |\n ');
289
+ var tmp_22 = Spacer_instance.a27(2);
290
+ var tmp_23 = Companion_instance_0.b26(this.m2b(endpoint.r24_1));
291
+ var tmp_24 = Spacer_instance.a27(2);
292
+ var tmp_25 = Spacer_instance.a27(2);
293
+ return trimMargin('\n |' + tmp_0 + '\n |export namespace ' + tmp_1 + ' {\n |' + tmp_3 + '\n |' + tmp_4 + '\n |' + tmp_5 + '\n |' + tmp_6 + '\n |' + tmp_8 + '\n |' + tmp_9 + 'export type Response = ' + tmp_11 + '\n |' + tmp_12 + '\n |' + tmp_14 + '\n |' + tmp_15 + 'export type Handler = {\n |' + tmp_16 + tmp_17 + '\n |' + tmp_18 + '}\n |' + tmp_19 + '\n |' + tmp_20 + '\n |' + tmp_21 + 'export const api = {\n |' + tmp_22 + 'name: "' + tmp_23 + '",\n |' + tmp_24 + 'method: "' + endpoint.s24_1.q2_1 + '",\n |' + tmp_25 + 'path: "' + joinToString(endpoint.t24_1, '/', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_6(this)) + '",\n |' + Spacer_instance.a27(2) + 'server,\n |' + Spacer_instance.a27(2) + 'client\n |' + Spacer_instance.toString() + '} as const\n |}\n |\n ');
289
294
  }
290
295
  initMetadataForInterface(TypeScriptEndpointDefinitionEmitter, 'TypeScriptEndpointDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
291
- function emit_6(refined) {
292
- return trimMargin('\n |export type ' + this.g2b(refined.j26_1) + ' = string;\n |export const validate' + refined.j26_1.b1() + ' = (value: string): value is ' + this.g2b(refined.j26_1) + ' => \n |' + Spacer_instance.toString() + this.r26(refined) + ';\n |\n ');
296
+ function emit_7(refined) {
297
+ return trimMargin('\n |export type ' + this.m2b(refined.m26_1) + ' = string;\n |export const validate' + refined.m26_1.b1() + ' = (value: string): value is ' + this.m2b(refined.m26_1) + ' => \n |' + Spacer_instance.toString() + this.u26(refined) + ';\n |\n ');
293
298
  }
294
299
  function emitValidator(_this__u8e3s4) {
295
300
  var defaultReturn = 'true;';
296
- var type = _this__u8e3s4.k26_1.a29_1;
301
+ var type = _this__u8e3s4.n26_1.g29_1;
297
302
  var tmp;
298
303
  if (type instanceof Integer) {
299
- var tmp0_safe_receiver = type.g28_1;
300
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.h25(tmp0_safe_receiver);
304
+ var tmp0_safe_receiver = type.m28_1;
305
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.k25(tmp0_safe_receiver);
301
306
  tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
302
307
  } else {
303
308
  if (type instanceof Number_0) {
304
- var tmp2_safe_receiver = type.j28_1;
305
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.h25(tmp2_safe_receiver);
309
+ var tmp2_safe_receiver = type.p28_1;
310
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.k25(tmp2_safe_receiver);
306
311
  tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
307
312
  } else {
308
313
  if (type instanceof String_0) {
309
- var tmp4_safe_receiver = type.d28_1;
314
+ var tmp4_safe_receiver = type.j28_1;
310
315
  var tmp_0;
311
316
  var tmp_1 = tmp4_safe_receiver;
312
317
  if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
313
318
  tmp_0 = null;
314
319
  } else {
315
- tmp_0 = this.h25(new RegExp_0(tmp4_safe_receiver));
320
+ tmp_0 = this.k25(new RegExp_0(tmp4_safe_receiver));
316
321
  }
317
322
  var tmp5_elvis_lhs = tmp_0;
318
323
  tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
@@ -332,12 +337,7 @@ function emitValidator(_this__u8e3s4) {
332
337
  return tmp;
333
338
  }
334
339
  initMetadataForInterface(TypeScriptRefinedTypeDefinitionEmitter, 'TypeScriptRefinedTypeDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
335
- function emit_7(enum_0, module_0) {
336
- var tmp = this.g2b(enum_0.n26_1);
337
- return 'export type ' + tmp + ' = ' + joinToString(enum_0.o26_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEnumDefinitionEmitter$emit$lambda) + '\n';
338
- }
339
- initMetadataForInterface(TypeScriptEnumDefinitionEmitter, 'TypeScriptEnumDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
340
- initMetadataForClass(TypeScriptEmitter, 'TypeScriptEmitter', TypeScriptEmitter, LanguageEmitter, [LanguageEmitter, TypeScriptIdentifierEmitter, TypeScriptTypeDefinitionEmitter, TypeScriptEndpointDefinitionEmitter, TypeScriptRefinedTypeDefinitionEmitter, TypeScriptClientEmitter, TypeScriptEnumDefinitionEmitter]);
340
+ initMetadataForClass(TypeScriptEmitter, 'TypeScriptEmitter', TypeScriptEmitter, LanguageEmitter, [LanguageEmitter, TypeScriptEnumDefinitionEmitter, TypeScriptEndpointDefinitionEmitter, TypeScriptRefinedTypeDefinitionEmitter, TypeScriptIdentifierEmitter, TypeScriptClientEmitter, TypeScriptTypeDefinitionEmitter]);
341
341
  initMetadataForObject(TypeScriptShared, 'TypeScriptShared');
342
342
  //endregion
343
343
  function emitClientInterface(_this__u8e3s4, $this, endpoint) {
@@ -345,10 +345,10 @@ function emitClientInterface(_this__u8e3s4, $this, endpoint) {
345
345
  return joinToString(tmp, ', ', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClientInterface$lambda($this));
346
346
  }
347
347
  function emitFunction($this, endpoint, request) {
348
- var tmp = endpoint.o24_1.b1();
348
+ var tmp = endpoint.r24_1.b1();
349
349
  var tmp_0 = emitClientInterface(request, $this, endpoint);
350
350
  var tmp_1 = Spacer_instance.toString();
351
- var tmp_2 = endpoint.o24_1.b1();
351
+ var tmp_2 = endpoint.r24_1.b1();
352
352
  // Inline function 'kotlin.text.orEmpty' call
353
353
  // Inline function 'kotlin.takeIf' call
354
354
  var this_0 = paramList(request, endpoint);
@@ -372,14 +372,14 @@ function emitFunction($this, endpoint, request) {
372
372
  }
373
373
  var tmp0_elvis_lhs = tmp_4;
374
374
  var tmp$ret$5 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
375
- return trimMargin('\n |' + tmp + ': async (props: {' + tmp_0 + '}) => {\n |' + tmp_1 + 'const req = ' + tmp_2 + '.request(' + tmp$ret$5 + ')\n |' + Spacer_instance.toString() + 'const rawRequest = ' + endpoint.o24_1.b1() + '.client(serialization).to(req)\n |' + Spacer_instance.toString() + 'const rawResponse = await handler(rawRequest)\n |' + Spacer_instance.toString() + 'return ' + endpoint.o24_1.b1() + '.client(serialization).from(rawResponse)\n |},\n ');
375
+ return trimMargin('\n |' + tmp + ': async (props: {' + tmp_0 + '}) => {\n |' + tmp_1 + 'const req = ' + tmp_2 + '.request(' + tmp$ret$5 + ')\n |' + Spacer_instance.toString() + 'const rawRequest = ' + endpoint.r24_1.b1() + '.client(serialization).to(req)\n |' + Spacer_instance.toString() + 'const rawResponse = await handler(rawRequest)\n |' + Spacer_instance.toString() + 'return ' + endpoint.r24_1.b1() + '.client(serialization).from(rawResponse)\n |},\n ');
376
376
  }
377
377
  function TypeScriptClientEmitter$emitClient$lambda(_destruct__k2r9zo) {
378
378
  var endpoint = _destruct__k2r9zo.sd();
379
- return 'import {' + endpoint.o24_1.b1() + '} from "./endpoint/' + endpoint.o24_1.b1() + '"';
379
+ return 'import {' + endpoint.r24_1.b1() + '} from "./endpoint/' + endpoint.r24_1.b1() + '"';
380
380
  }
381
381
  function TypeScriptClientEmitter$emitClient$lambda_0(it) {
382
- return 'import {' + it.w28_1 + '} from "./model/' + it.w28_1 + '"';
382
+ return 'import {' + it.c29_1 + '} from "./model/' + it.c29_1 + '"';
383
383
  }
384
384
  function TypeScriptClientEmitter$emitClient$lambda_1(this$0) {
385
385
  return function (_destruct__k2r9zo) {
@@ -390,13 +390,13 @@ function TypeScriptClientEmitter$emitClient$lambda_1(this$0) {
390
390
  }
391
391
  function TypeScriptClientEmitter$emitClientInterface$lambda(this$0) {
392
392
  return function (it) {
393
- return it.s25_1.b1() + ': ' + this$0.g25(it.t25_1);
393
+ return it.v25_1.b1() + ': ' + this$0.j25(it.w25_1);
394
394
  };
395
395
  }
396
396
  function TypeScriptClientEmitter() {
397
397
  }
398
398
  function TypeScriptEmitter$emit$lambda(it) {
399
- return 'export {' + it.d26().b1() + "} from './" + it.d26().b1() + "'";
399
+ return 'export {' + it.g26().b1() + "} from './" + it.g26().b1() + "'";
400
400
  }
401
401
  function TypeScriptEmitter$emit$lambda_0(it) {
402
402
  // Inline function 'kotlin.text.trimStart' call
@@ -404,32 +404,32 @@ function TypeScriptEmitter$emit$lambda_0(it) {
404
404
  }
405
405
  function TypeScriptEmitter$emit$lambda_1(this$0) {
406
406
  return function (it) {
407
- return this$0.g25(it);
407
+ return this$0.j25(it);
408
408
  };
409
409
  }
410
410
  function TypeScriptEmitter() {
411
411
  LanguageEmitter.call(this);
412
- this.h2b_1 = FileExtension_TypeScript_getInstance();
413
- this.i2b_1 = TypeScriptShared_getInstance();
414
- this.j2b_1 = '//';
412
+ this.n2b_1 = FileExtension_TypeScript_getInstance();
413
+ this.o2b_1 = TypeScriptShared_getInstance();
414
+ this.p2b_1 = '//';
415
415
  }
416
- protoOf(TypeScriptEmitter).n25 = function () {
417
- return this.h2b_1;
416
+ protoOf(TypeScriptEmitter).q25 = function () {
417
+ return this.n2b_1;
418
418
  };
419
- protoOf(TypeScriptEmitter).l2a = function () {
420
- return this.i2b_1;
419
+ protoOf(TypeScriptEmitter).r2a = function () {
420
+ return this.o2b_1;
421
421
  };
422
- protoOf(TypeScriptEmitter).o25 = function () {
423
- return this.j2b_1;
422
+ protoOf(TypeScriptEmitter).r25 = function () {
423
+ return this.p2b_1;
424
424
  };
425
- protoOf(TypeScriptEmitter).d23 = function (ast, logger) {
425
+ protoOf(TypeScriptEmitter).g23 = function (ast, logger) {
426
426
  // Inline function 'kotlin.run' call
427
427
  // Inline function 'kotlin.contracts.contract' call
428
428
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEmitter.emit.<anonymous>' call
429
- var $this$run = protoOf(LanguageEmitter).d23.call(this, ast, logger);
429
+ var $this$run = protoOf(LanguageEmitter).g23.call(this, ast, logger);
430
430
  var tmp;
431
431
  if (hasEndpoints(ast)) {
432
- tmp = $this$run.pk(this.f2b(ast));
432
+ tmp = $this$run.vk(this.l2b(ast));
433
433
  } else {
434
434
  tmp = $this$run;
435
435
  }
@@ -437,22 +437,22 @@ protoOf(TypeScriptEmitter).d23 = function (ast, logger) {
437
437
  // Inline function 'kotlin.collections.map' call
438
438
  // Inline function 'kotlin.collections.groupBy' call
439
439
  // Inline function 'arrow.core.NonEmptyList.flatMap' call
440
- var this_0 = ast.k25_1;
440
+ var this_0 = ast.n25_1;
441
441
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEmitter.emit.<anonymous>' call
442
- var tmp_1 = this_0.jk_1.m25_1.hk();
442
+ var tmp_1 = this_0.pk_1.p25_1.nk();
443
443
  // Inline function 'kotlin.collections.flatMap' call
444
444
  // Inline function 'kotlin.collections.flatMapTo' call
445
- var this_1 = this_0.kk_1;
445
+ var this_1 = this_0.qk_1;
446
446
  var destination = ArrayList_init_$Create$();
447
447
  var tmp0_iterator = this_1.g();
448
448
  while (tmp0_iterator.h()) {
449
449
  var element = tmp0_iterator.i();
450
450
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEmitter.emit.<anonymous>' call
451
- var list = element.m25_1;
451
+ var list = element.p25_1;
452
452
  addAll(destination, list);
453
453
  }
454
454
  // Inline function 'kotlin.collections.groupByTo' call
455
- var this_2 = tmp_1.ok(destination);
455
+ var this_2 = tmp_1.uk(destination);
456
456
  var destination_0 = LinkedHashMap_init_$Create$();
457
457
  var tmp0_iterator_0 = this_2.g();
458
458
  while (tmp0_iterator_0.h()) {
@@ -484,27 +484,27 @@ protoOf(TypeScriptEmitter).d23 = function (ast, logger) {
484
484
  var ns = item.a1();
485
485
  // Inline function 'kotlin.collections.component2' call
486
486
  var defs = item.b1();
487
- var tmp_3 = ns + '/index.' + this.n25().w25_1;
487
+ var tmp_3 = ns + '/index.' + this.q25().z25_1;
488
488
  var tmp$ret$15 = new Emitted(tmp_3, joinToString(defs, '\n', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda));
489
489
  destination_1.e(tmp$ret$15);
490
490
  }
491
- return tmp_0.ok(destination_1);
491
+ return tmp_0.uk(destination_1);
492
492
  };
493
- protoOf(TypeScriptEmitter).b26 = function (module_0, logger) {
493
+ protoOf(TypeScriptEmitter).e26 = function (module_0, logger) {
494
494
  // Inline function 'kotlin.let' call
495
495
  // Inline function 'kotlin.contracts.contract' call
496
496
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEmitter.emit.<anonymous>' call
497
- return protoOf(LanguageEmitter).b26.call(this, module_0, logger).pk(new Emitted('Wirespec', this.l2a().l2b_1));
497
+ return protoOf(LanguageEmitter).e26.call(this, module_0, logger).vk(new Emitted('Wirespec', this.r2a().r2b_1));
498
498
  };
499
- protoOf(TypeScriptEmitter).c26 = function (definition, module_0, logger) {
499
+ protoOf(TypeScriptEmitter).f26 = function (definition, module_0, logger) {
500
500
  // Inline function 'kotlin.let' call
501
501
  // Inline function 'kotlin.contracts.contract' call
502
502
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEmitter.emit.<anonymous>' call
503
- var it = protoOf(LanguageEmitter).c26.call(this, definition, module_0, logger);
504
- var subPackageName = plus(Companion_instance.s26(''), definition);
505
- return new Emitted(subPackageName.v26() + this.d2b(it.x23_1), trimMargin("\n |import {Wirespec} from '../Wirespec'\n |\n |" + it.y23_1 + '\n '));
503
+ var it = protoOf(LanguageEmitter).f26.call(this, definition, module_0, logger);
504
+ var subPackageName = plus(Companion_instance.v26(''), definition);
505
+ return new Emitted(subPackageName.y26() + this.j2b(it.a24_1), trimMargin("\n |import {Wirespec} from '../Wirespec'\n |\n |" + it.b24_1 + '\n '));
506
506
  };
507
- protoOf(TypeScriptEmitter).h26 = function (union) {
507
+ protoOf(TypeScriptEmitter).k26 = function (union) {
508
508
  // Inline function 'kotlin.collections.map' call
509
509
  // Inline function 'kotlin.collections.distinctBy' call
510
510
  var this_0 = importReferences(union);
@@ -514,7 +514,7 @@ protoOf(TypeScriptEmitter).h26 = function (union) {
514
514
  while (tmp0_iterator.h()) {
515
515
  var e = tmp0_iterator.i();
516
516
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEmitter.emit.<anonymous>' call
517
- var key = e.w28_1;
517
+ var key = e.c29_1;
518
518
  if (set.e(key)) {
519
519
  list.e(e);
520
520
  }
@@ -525,24 +525,24 @@ protoOf(TypeScriptEmitter).h26 = function (union) {
525
525
  while (tmp0_iterator_0.h()) {
526
526
  var item = tmp0_iterator_0.i();
527
527
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEmitter.emit.<anonymous>' call
528
- var tmp$ret$2 = 'import {' + item.w28_1 + "} from '../model'";
528
+ var tmp$ret$2 = 'import {' + item.c29_1 + "} from '../model'";
529
529
  destination.e(tmp$ret$2);
530
530
  }
531
531
  var tmp = destination;
532
532
  var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda_0);
533
- var tmp_1 = this.g2b(union.d24_1);
534
- return trimMargin('\n |' + tmp_0 + '\n |export type ' + tmp_1 + ' = ' + joinToString(union.e24_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda_1(this)) + '\n |\n ');
533
+ var tmp_1 = this.m2b(union.g24_1);
534
+ return trimMargin('\n |' + tmp_0 + '\n |export type ' + tmp_1 + ' = ' + joinToString(union.h24_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda_1(this)) + '\n |\n ');
535
535
  };
536
- protoOf(TypeScriptEmitter).g26 = function (channel) {
537
- return this.p25();
536
+ protoOf(TypeScriptEmitter).j26 = function (channel) {
537
+ return this.s25();
538
538
  };
539
539
  function emit_8(_this__u8e3s4, $this) {
540
540
  var tmp;
541
541
  if (_this__u8e3s4 instanceof Literal) {
542
- tmp = _this__u8e3s4.q25_1;
542
+ tmp = _this__u8e3s4.t25_1;
543
543
  } else {
544
544
  if (_this__u8e3s4 instanceof Param) {
545
- tmp = ':' + _this__u8e3s4.v24_1.b1();
545
+ tmp = ':' + _this__u8e3s4.y24_1.b1();
546
546
  } else {
547
547
  noWhenBranchMatchedException();
548
548
  }
@@ -550,54 +550,54 @@ function emit_8(_this__u8e3s4, $this) {
550
550
  return tmp;
551
551
  }
552
552
  function emitClient_0(_this__u8e3s4, $this) {
553
- return trimMargin('\n |export const client: Wirespec.Client<Request, Response> = (serialization: Wirespec.Serialization) => ({\n |' + prependIndent(emitClientTo(_this__u8e3s4, $this), Spacer_instance.x26(1)) + ',\n |' + prependIndent(emitClientFrom(_this__u8e3s4, $this), Spacer_instance.x26(1)) + '\n |})\n ');
553
+ return trimMargin('\n |export const client: Wirespec.Client<Request, Response> = (serialization: Wirespec.Serialization) => ({\n |' + prependIndent(emitClientTo(_this__u8e3s4, $this), Spacer_instance.a27(1)) + ',\n |' + prependIndent(emitClientFrom(_this__u8e3s4, $this), Spacer_instance.a27(1)) + '\n |})\n ');
554
554
  }
555
555
  function emitClientTo(_this__u8e3s4, $this) {
556
- var tmp = Spacer_instance.x26(1);
556
+ var tmp = Spacer_instance.a27(1);
557
557
  // Inline function 'kotlin.text.uppercase' call
558
558
  // Inline function 'kotlin.js.asDynamic' call
559
- var tmp_0 = _this__u8e3s4.p24_1.q2_1.toUpperCase();
560
- var tmp_1 = Spacer_instance.x26(1);
559
+ var tmp_0 = _this__u8e3s4.s24_1.q2_1.toUpperCase();
560
+ var tmp_1 = Spacer_instance.a27(1);
561
561
  var tmp_2 = emitPathArray(_this__u8e3s4, $this);
562
- var tmp_3 = Spacer_instance.x26(1);
563
- var tmp_4 = joinToString(_this__u8e3s4.r24_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda($this));
564
- var tmp_5 = Spacer_instance.x26(1);
565
- return trimMargin('\n |to: (it) => ({\n |' + tmp + 'method: "' + tmp_0 + '",\n |' + tmp_1 + 'path: ' + tmp_2 + ',\n |' + tmp_3 + 'queries: {' + tmp_4 + '},\n |' + tmp_5 + 'headers: {' + joinToString(_this__u8e3s4.s24_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda_0($this)) + '},\n |' + Spacer_instance.x26(1) + 'body: serialization.serialize(it.body)\n |})\n ');
562
+ var tmp_3 = Spacer_instance.a27(1);
563
+ var tmp_4 = joinToString(_this__u8e3s4.u24_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda($this));
564
+ var tmp_5 = Spacer_instance.a27(1);
565
+ return trimMargin('\n |to: (it) => ({\n |' + tmp + 'method: "' + tmp_0 + '",\n |' + tmp_1 + 'path: ' + tmp_2 + ',\n |' + tmp_3 + 'queries: {' + tmp_4 + '},\n |' + tmp_5 + 'headers: {' + joinToString(_this__u8e3s4.v24_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientTo$lambda_0($this)) + '},\n |' + Spacer_instance.a27(1) + 'body: serialization.serialize(it.body)\n |})\n ');
566
566
  }
567
567
  function emitClientFrom(_this__u8e3s4, $this) {
568
- var tmp = Spacer_instance.x26(1);
569
- var tmp_0 = distinctByStatus(_this__u8e3s4.u24_1);
570
- return trimMargin('\n |from: (it) => {\n |' + tmp + 'switch (it.status) {\n |' + prependIndent(joinToString(tmp_0, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientFrom$lambda($this)), Spacer_instance.x26(2)) + '\n |' + Spacer_instance.x26(2) + 'default:\n |' + Spacer_instance.x26(3) + 'throw new Error(`Cannot internalize response with status: ${it.status}`);\n |' + Spacer_instance.x26(1) + '}\n |}\n ');
568
+ var tmp = Spacer_instance.a27(1);
569
+ var tmp_0 = distinctByStatus(_this__u8e3s4.x24_1);
570
+ return trimMargin('\n |from: (it) => {\n |' + tmp + 'switch (it.status) {\n |' + prependIndent(joinToString(tmp_0, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientFrom$lambda($this)), Spacer_instance.a27(2)) + '\n |' + Spacer_instance.a27(2) + 'default:\n |' + Spacer_instance.a27(3) + 'throw new Error(`Cannot internalize response with status: ${it.status}`);\n |' + Spacer_instance.a27(1) + '}\n |}\n ');
571
571
  }
572
572
  function emitClientFromResponse(_this__u8e3s4, $this) {
573
- var tmp = fixStatus(_this__u8e3s4.a25_1);
574
- var tmp_0 = Spacer_instance.x26(1);
575
- var tmp_1 = Spacer_instance.x26(2);
576
- var tmp_2 = fixStatus(_this__u8e3s4.a25_1);
577
- var tmp_3 = Spacer_instance.x26(2);
578
- return trimMargin('\n |case ' + tmp + ':\n |' + tmp_0 + 'return {\n |' + tmp_1 + 'status: ' + tmp_2 + ',\n |' + tmp_3 + 'headers: {' + joinToString(_this__u8e3s4.b25_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientFromResponse$lambda($this)) + '},\n |' + Spacer_instance.x26(2) + 'body: serialization.deserialize<' + emitReference(_this__u8e3s4, $this) + '>(it.body)\n |' + Spacer_instance.x26(1) + '};\n ');
573
+ var tmp = fixStatus(_this__u8e3s4.d25_1);
574
+ var tmp_0 = Spacer_instance.a27(1);
575
+ var tmp_1 = Spacer_instance.a27(2);
576
+ var tmp_2 = fixStatus(_this__u8e3s4.d25_1);
577
+ var tmp_3 = Spacer_instance.a27(2);
578
+ return trimMargin('\n |case ' + tmp + ':\n |' + tmp_0 + 'return {\n |' + tmp_1 + 'status: ' + tmp_2 + ',\n |' + tmp_3 + 'headers: {' + joinToString(_this__u8e3s4.e25_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitClientFromResponse$lambda($this)) + '},\n |' + Spacer_instance.a27(2) + 'body: serialization.deserialize<' + emitReference(_this__u8e3s4, $this) + '>(it.body)\n |' + Spacer_instance.a27(1) + '};\n ');
579
579
  }
580
580
  function emitServer(_this__u8e3s4, $this) {
581
- return trimMargin('\n |export const server:Wirespec.Server<Request, Response> = (serialization: Wirespec.Serialization) => ({\n |' + prependIndent(emitServerFrom(_this__u8e3s4, $this), Spacer_instance.x26(1)) + ',\n |' + prependIndent(emitServerTo($this), Spacer_instance.x26(1)) + '\n |})\n ');
581
+ return trimMargin('\n |export const server:Wirespec.Server<Request, Response> = (serialization: Wirespec.Serialization) => ({\n |' + prependIndent(emitServerFrom(_this__u8e3s4, $this), Spacer_instance.a27(1)) + ',\n |' + prependIndent(emitServerTo($this), Spacer_instance.a27(1)) + '\n |})\n ');
582
582
  }
583
583
  function emitServerFrom(_this__u8e3s4, $this) {
584
- var tmp = Spacer_instance.x26(1);
585
- var tmp_0 = Spacer_instance.x26(2);
584
+ var tmp = Spacer_instance.a27(1);
585
+ var tmp_0 = Spacer_instance.a27(2);
586
586
  // Inline function 'kotlin.text.uppercase' call
587
587
  // Inline function 'kotlin.js.asDynamic' call
588
- var tmp_1 = _this__u8e3s4.p24_1.q2_1.toUpperCase();
589
- var tmp_2 = Spacer_instance.x26(2);
588
+ var tmp_1 = _this__u8e3s4.s24_1.q2_1.toUpperCase();
589
+ var tmp_2 = Spacer_instance.a27(2);
590
590
  var tmp_3 = get_indexedPathParams(_this__u8e3s4);
591
- var tmp_4 = prependIndent(joinToString(tmp_3, ',', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda($this)), Spacer_instance.x26(3));
592
- var tmp_5 = Spacer_instance.x26(2);
593
- var tmp_6 = Spacer_instance.x26(2);
594
- var tmp_7 = joinToString(_this__u8e3s4.r24_1, ',', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_0($this));
595
- var tmp_8 = Spacer_instance.x26(2);
596
- var tmp_9 = Spacer_instance.x26(2);
597
- return trimMargin('\n |from: (it) => {\n |' + tmp + 'return {\n |' + tmp_0 + 'method: "' + tmp_1 + '",\n |' + tmp_2 + 'path: {\n |' + tmp_4 + '\n |' + tmp_5 + '},\n |' + tmp_6 + 'queries: {\n |' + tmp_7 + '\n |' + tmp_8 + '},\n |' + tmp_9 + 'headers: {\n |' + joinToString(_this__u8e3s4.s24_1, ',', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_1($this)) + '\n |' + Spacer_instance.x26(2) + '},\n |' + Spacer_instance.x26(2) + 'body: serialization.deserialize(it.body)\n |' + Spacer_instance.x26(1) + '}\n |}\n ');
591
+ var tmp_4 = prependIndent(joinToString(tmp_3, ',', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda($this)), Spacer_instance.a27(3));
592
+ var tmp_5 = Spacer_instance.a27(2);
593
+ var tmp_6 = Spacer_instance.a27(2);
594
+ var tmp_7 = joinToString(_this__u8e3s4.u24_1, ',', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_0($this));
595
+ var tmp_8 = Spacer_instance.a27(2);
596
+ var tmp_9 = Spacer_instance.a27(2);
597
+ return trimMargin('\n |from: (it) => {\n |' + tmp + 'return {\n |' + tmp_0 + 'method: "' + tmp_1 + '",\n |' + tmp_2 + 'path: {\n |' + tmp_4 + '\n |' + tmp_5 + '},\n |' + tmp_6 + 'queries: {\n |' + tmp_7 + '\n |' + tmp_8 + '},\n |' + tmp_9 + 'headers: {\n |' + joinToString(_this__u8e3s4.v24_1, ',', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_1($this)) + '\n |' + Spacer_instance.a27(2) + '},\n |' + Spacer_instance.a27(2) + 'body: serialization.deserialize(it.body)\n |' + Spacer_instance.a27(1) + '}\n |}\n ');
598
598
  }
599
599
  function emitServerTo($this) {
600
- return trimMargin('\n |to: (it) => ({\n |' + Spacer_instance.x26(1) + 'status: it.status,\n |' + Spacer_instance.x26(1) + 'headers: {},\n |' + Spacer_instance.x26(1) + 'body: serialization.serialize(it.body),\n |})\n ');
600
+ return trimMargin('\n |to: (it) => ({\n |' + Spacer_instance.a27(1) + 'status: it.status,\n |' + Spacer_instance.a27(1) + 'headers: {},\n |' + Spacer_instance.a27(1) + 'body: serialization.serialize(it.body),\n |})\n ');
601
601
  }
602
602
  function emitType(_this__u8e3s4, $this, name, block) {
603
603
  var tmp;
@@ -610,7 +610,7 @@ function emitType(_this__u8e3s4, $this, name, block) {
610
610
  return tmp;
611
611
  }
612
612
  function emitName(_this__u8e3s4, $this) {
613
- return 'Response' + Companion_instance_0.x25(_this__u8e3s4.a25_1);
613
+ return 'Response' + Companion_instance_0.a26(_this__u8e3s4.d25_1);
614
614
  }
615
615
  function emitFunction_0(_this__u8e3s4, $this, endpoint) {
616
616
  var tmp = Spacer_instance.toString();
@@ -640,18 +640,18 @@ function emitFunction_0(_this__u8e3s4, $this, endpoint) {
640
640
  }
641
641
  var tmp0_elvis_lhs = tmp_4;
642
642
  var tmp_5 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
643
- var tmp_6 = Spacer_instance.x26(2);
643
+ var tmp_6 = Spacer_instance.a27(2);
644
644
  var tmp_7 = get_pathParams(endpoint);
645
645
  var tmp_8 = joinToObject(tmp_7, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_0($this));
646
- var tmp_9 = Spacer_instance.x26(2);
647
- var tmp_10 = endpoint.p24_1.toString();
648
- var tmp_11 = Spacer_instance.x26(2);
649
- var tmp_12 = joinToObject(endpoint.r24_1, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_1($this));
650
- var tmp_13 = Spacer_instance.x26(2);
651
- var tmp_14 = joinToObject(endpoint.s24_1, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_2($this));
652
- var tmp_15 = Spacer_instance.x26(2);
646
+ var tmp_9 = Spacer_instance.a27(2);
647
+ var tmp_10 = endpoint.s24_1.toString();
648
+ var tmp_11 = Spacer_instance.a27(2);
649
+ var tmp_12 = joinToObject(endpoint.u24_1, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_1($this));
650
+ var tmp_13 = Spacer_instance.a27(2);
651
+ var tmp_14 = joinToObject(endpoint.v24_1, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_2($this));
652
+ var tmp_15 = Spacer_instance.a27(2);
653
653
  var tmp_16;
654
- if (_this__u8e3s4.x24_1 == null) {
654
+ if (_this__u8e3s4.a25_1 == null) {
655
655
  tmp_16 = null;
656
656
  } else {
657
657
  // Inline function 'kotlin.let' call
@@ -664,11 +664,11 @@ function emitFunction_0(_this__u8e3s4, $this, endpoint) {
664
664
  }
665
665
  function emitFunction_1(_this__u8e3s4, $this) {
666
666
  var tmp = Spacer_instance.toString();
667
- var tmp_0 = Companion_instance_0.x25(_this__u8e3s4.a25_1);
667
+ var tmp_0 = Companion_instance_0.a26(_this__u8e3s4.d25_1);
668
668
  var tmp_1 = paramList_0(_this__u8e3s4);
669
669
  var tmp_2 = joinToObject(tmp_1, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_3($this));
670
670
  var tmp_3 = Spacer_instance.toString();
671
- var tmp_4 = Companion_instance_0.x25(_this__u8e3s4.a25_1);
671
+ var tmp_4 = Companion_instance_0.a26(_this__u8e3s4.d25_1);
672
672
  // Inline function 'kotlin.text.orEmpty' call
673
673
  // Inline function 'kotlin.takeIf' call
674
674
  var this_0 = paramList_0(_this__u8e3s4);
@@ -688,18 +688,18 @@ function emitFunction_1(_this__u8e3s4, $this) {
688
688
  // Inline function 'kotlin.run' call
689
689
  // Inline function 'kotlin.contracts.contract' call
690
690
  // Inline function 'community.flock.wirespec.emitters.typescript.TypeScriptEndpointDefinitionEmitter.emitFunction.<anonymous>' call
691
- tmp_6 = 'params: Response' + Companion_instance_0.x25(_this__u8e3s4.a25_1) + 'Params';
691
+ tmp_6 = 'params: Response' + Companion_instance_0.a26(_this__u8e3s4.d25_1) + 'Params';
692
692
  }
693
693
  var tmp0_elvis_lhs = tmp_6;
694
694
  var tmp_7 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
695
- var tmp_8 = Companion_instance_0.x25(_this__u8e3s4.a25_1);
696
- var tmp_9 = Spacer_instance.x26(2);
697
- var tmp_10 = fixStatus(_this__u8e3s4.a25_1);
698
- var tmp_11 = Spacer_instance.x26(2);
699
- var tmp_12 = joinToObject(_this__u8e3s4.b25_1, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_4($this));
700
- var tmp_13 = Spacer_instance.x26(2);
695
+ var tmp_8 = Companion_instance_0.a26(_this__u8e3s4.d25_1);
696
+ var tmp_9 = Spacer_instance.a27(2);
697
+ var tmp_10 = fixStatus(_this__u8e3s4.d25_1);
698
+ var tmp_11 = Spacer_instance.a27(2);
699
+ var tmp_12 = joinToObject(_this__u8e3s4.e25_1, $this, TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_4($this));
700
+ var tmp_13 = Spacer_instance.a27(2);
701
701
  var tmp_14;
702
- if (_this__u8e3s4.c25_1 == null) {
702
+ if (_this__u8e3s4.f25_1 == null) {
703
703
  tmp_14 = null;
704
704
  } else {
705
705
  // Inline function 'kotlin.let' call
@@ -711,51 +711,51 @@ function emitFunction_1(_this__u8e3s4, $this) {
711
711
  return trimIndent('\n |' + tmp + 'export type Response' + tmp_0 + 'Params = ' + tmp_2 + '\n |' + tmp_3 + 'export const response' + tmp_4 + ' = (' + tmp_7 + '): Response' + tmp_8 + ' => ({\n |' + tmp_9 + 'status: ' + tmp_10 + ',\n |' + tmp_11 + 'headers: ' + tmp_12 + ',\n |' + tmp_13 + 'body: ' + (tmp2_elvis_lhs == null ? 'undefined' : tmp2_elvis_lhs) + ',\n |' + Spacer_instance.toString() + '})\n ');
712
712
  }
713
713
  function emitReference(_this__u8e3s4, $this) {
714
- var tmp0_safe_receiver = _this__u8e3s4.c25_1;
715
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z24_1;
716
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.g25(tmp1_safe_receiver);
714
+ var tmp0_safe_receiver = _this__u8e3s4.f25_1;
715
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c25_1;
716
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.j25(tmp1_safe_receiver);
717
717
  return tmp2_elvis_lhs == null ? 'undefined' : tmp2_elvis_lhs;
718
718
  }
719
719
  function emitPathArray(_this__u8e3s4, $this) {
720
- return joinToString(_this__u8e3s4.q24_1, ', ', '[', ']', VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitPathArray$lambda($this));
720
+ return joinToString(_this__u8e3s4.t24_1, ', ', '[', ']', VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitPathArray$lambda($this));
721
721
  }
722
722
  function emitType_0(_this__u8e3s4, $this) {
723
723
  var tmp = Spacer_instance.toString();
724
724
  var tmp_0 = emitName(_this__u8e3s4, $this);
725
- var tmp_1 = Spacer_instance.x26(2);
726
- var tmp_2 = fixStatus(_this__u8e3s4.a25_1);
727
- var tmp_3 = Spacer_instance.x26(2);
728
- return trimIndent('\n |' + tmp + 'export type ' + tmp_0 + ' = {\n |' + tmp_1 + 'status: ' + tmp_2 + '\n |' + tmp_3 + 'headers: {' + joinToString(_this__u8e3s4.b25_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitType$lambda_0($this)) + '}\n |' + Spacer_instance.x26(2) + 'body: ' + emitReference(_this__u8e3s4, $this) + '\n |' + Spacer_instance.toString() + '}\n ');
725
+ var tmp_1 = Spacer_instance.a27(2);
726
+ var tmp_2 = fixStatus(_this__u8e3s4.d25_1);
727
+ var tmp_3 = Spacer_instance.a27(2);
728
+ return trimIndent('\n |' + tmp + 'export type ' + tmp_0 + ' = {\n |' + tmp_1 + 'status: ' + tmp_2 + '\n |' + tmp_3 + 'headers: {' + joinToString(_this__u8e3s4.e25_1, VOID, VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emitType$lambda_0($this)) + '}\n |' + Spacer_instance.a27(2) + 'body: ' + emitReference(_this__u8e3s4, $this) + '\n |' + Spacer_instance.toString() + '}\n ');
729
729
  }
730
730
  function emitReference_0(_this__u8e3s4, $this) {
731
- var tmp0_safe_receiver = _this__u8e3s4.x24_1;
732
- var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z24_1;
733
- var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.g25(tmp1_safe_receiver);
731
+ var tmp0_safe_receiver = _this__u8e3s4.a25_1;
732
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c25_1;
733
+ var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : $this.j25(tmp1_safe_receiver);
734
734
  return tmp2_elvis_lhs == null ? 'undefined' : tmp2_elvis_lhs;
735
735
  }
736
736
  function emitType_1(_this__u8e3s4, $this, endpoint) {
737
- return trimIndent('\n |' + Spacer_instance.toString() + 'export type Request = {\n |' + Spacer_instance.x26(2) + 'path: Path\n |' + Spacer_instance.x26(2) + 'method: "' + endpoint.p24_1.toString() + '"\n |' + Spacer_instance.x26(2) + 'queries: Queries\n |' + Spacer_instance.x26(2) + 'headers: Headers\n |' + Spacer_instance.x26(2) + 'body: ' + emitReference_0(_this__u8e3s4, $this) + '\n |' + Spacer_instance.toString() + '}\n ');
737
+ return trimIndent('\n |' + Spacer_instance.toString() + 'export type Request = {\n |' + Spacer_instance.a27(2) + 'path: Path\n |' + Spacer_instance.a27(2) + 'method: "' + endpoint.s24_1.toString() + '"\n |' + Spacer_instance.a27(2) + 'queries: Queries\n |' + Spacer_instance.a27(2) + 'headers: Headers\n |' + Spacer_instance.a27(2) + 'body: ' + emitReference_0(_this__u8e3s4, $this) + '\n |' + Spacer_instance.toString() + '}\n ');
738
738
  }
739
739
  function emit_9(_this__u8e3s4, $this) {
740
- return Spacer_instance.toString() + $this.f26(_this__u8e3s4.v24_1) + ': ' + $this.g25(_this__u8e3s4.w24_1);
740
+ return Spacer_instance.toString() + $this.i26(_this__u8e3s4.y24_1) + ': ' + $this.j25(_this__u8e3s4.z24_1);
741
741
  }
742
742
  function emit_10(_this__u8e3s4, $this) {
743
- return $this.f26(_this__u8e3s4.s25_1) + (_this__u8e3s4.t25_1.hm() ? '?' : '') + ': ' + $this.g25(_this__u8e3s4.t25_1.q28(false));
743
+ return $this.i26(_this__u8e3s4.v25_1) + (_this__u8e3s4.w25_1.jm() ? '?' : '') + ': ' + $this.j25(_this__u8e3s4.w25_1.w28(false));
744
744
  }
745
745
  function emitDeserialize(_this__u8e3s4, $this) {
746
- return $this.f26(_this__u8e3s4.rd_1.v24_1) + ': serialization.deserialize(it.path[' + _this__u8e3s4.qd_1 + '])';
746
+ return $this.i26(_this__u8e3s4.rd_1.y24_1) + ': serialization.deserialize(it.path[' + _this__u8e3s4.qd_1 + '])';
747
747
  }
748
748
  function emitDeserialize_0(_this__u8e3s4, $this, fields) {
749
- return $this.f26(_this__u8e3s4.l24_1) + ': serialization.deserialize(it.' + fields + '[' + $this.f26(_this__u8e3s4.l24_1) + '])';
749
+ return $this.i26(_this__u8e3s4.o24_1) + ': serialization.deserialize(it.' + fields + '[' + $this.i26(_this__u8e3s4.o24_1) + '])';
750
750
  }
751
751
  function emitSerialize(_this__u8e3s4, $this, fields) {
752
- return $this.f26(_this__u8e3s4.l24_1) + ': serialization.serialize(it.' + fields + '[' + $this.f26(_this__u8e3s4.l24_1) + '])';
752
+ return $this.i26(_this__u8e3s4.o24_1) + ': serialization.serialize(it.' + fields + '[' + $this.i26(_this__u8e3s4.o24_1) + '])';
753
753
  }
754
754
  function joinToObject(_this__u8e3s4, $this, transform) {
755
755
  return joinToString(_this__u8e3s4, ', ', '{', '}', VOID, VOID, transform);
756
756
  }
757
757
  function emitHandleFunction($this, endpoint) {
758
- return Companion_instance_0.y25($this.g2b(endpoint.o24_1)) + ': (request:Request) => Promise<Response>';
758
+ return Companion_instance_0.b26($this.m2b(endpoint.r24_1)) + ': (request:Request) => Promise<Response>';
759
759
  }
760
760
  function TypeScriptEndpointDefinitionEmitter$emit$lambda(it) {
761
761
  // Inline function 'kotlin.text.trimStart' call
@@ -768,12 +768,12 @@ function TypeScriptEndpointDefinitionEmitter$emit$lambda_0(this$0) {
768
768
  }
769
769
  function TypeScriptEndpointDefinitionEmitter$emit$lambda_1(this$0) {
770
770
  return function (it) {
771
- return this$0.f25(it);
771
+ return this$0.i25(it);
772
772
  };
773
773
  }
774
774
  function TypeScriptEndpointDefinitionEmitter$emit$lambda_2(this$0) {
775
775
  return function (it) {
776
- return this$0.f25(it);
776
+ return this$0.i25(it);
777
777
  };
778
778
  }
779
779
  function TypeScriptEndpointDefinitionEmitter$emit$lambda_3(this$0) {
@@ -823,17 +823,17 @@ function TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda(this$0) {
823
823
  }
824
824
  function TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_0(this$0) {
825
825
  return function (it) {
826
- return prependIndent(emitDeserialize_0(it, this$0, 'queries'), Spacer_instance.x26(3));
826
+ return prependIndent(emitDeserialize_0(it, this$0, 'queries'), Spacer_instance.a27(3));
827
827
  };
828
828
  }
829
829
  function TypeScriptEndpointDefinitionEmitter$emitServerFrom$lambda_1(this$0) {
830
830
  return function (it) {
831
- return prependIndent(emitDeserialize_0(it, this$0, 'headers'), Spacer_instance.x26(3));
831
+ return prependIndent(emitDeserialize_0(it, this$0, 'headers'), Spacer_instance.a27(3));
832
832
  };
833
833
  }
834
834
  function TypeScriptEndpointDefinitionEmitter$emitType$lambda($block) {
835
835
  return function (it) {
836
- return Spacer_instance.x26(1) + $block(it);
836
+ return Spacer_instance.a27(1) + $block(it);
837
837
  };
838
838
  }
839
839
  function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda(this$0) {
@@ -843,17 +843,17 @@ function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda(this$0) {
843
843
  }
844
844
  function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_0(this$0) {
845
845
  return function (it) {
846
- return this$0.f26(it.v24_1) + ': params[' + this$0.f26(it.v24_1) + ']';
846
+ return this$0.i26(it.y24_1) + ': params[' + this$0.i26(it.y24_1) + ']';
847
847
  };
848
848
  }
849
849
  function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_1(this$0) {
850
850
  return function (it) {
851
- return this$0.f26(it.l24_1) + ': params[' + this$0.f26(it.l24_1) + ']';
851
+ return this$0.i26(it.o24_1) + ': params[' + this$0.i26(it.o24_1) + ']';
852
852
  };
853
853
  }
854
854
  function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_2(this$0) {
855
855
  return function (it) {
856
- return this$0.f26(it.l24_1) + ': params[' + this$0.f26(it.l24_1) + ']';
856
+ return this$0.i26(it.o24_1) + ': params[' + this$0.i26(it.o24_1) + ']';
857
857
  };
858
858
  }
859
859
  function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_3(this$0) {
@@ -863,17 +863,17 @@ function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_3(this$0) {
863
863
  }
864
864
  function TypeScriptEndpointDefinitionEmitter$emitFunction$lambda_4(this$0) {
865
865
  return function (it) {
866
- return this$0.f26(it.l24_1) + ': params[' + this$0.f26(it.l24_1) + ']';
866
+ return this$0.i26(it.o24_1) + ': params[' + this$0.i26(it.o24_1) + ']';
867
867
  };
868
868
  }
869
869
  function TypeScriptEndpointDefinitionEmitter$emitPathArray$lambda(this$0) {
870
870
  return function (it) {
871
871
  var tmp;
872
872
  if (it instanceof Literal) {
873
- tmp = '"' + it.q25_1 + '"';
873
+ tmp = '"' + it.t25_1 + '"';
874
874
  } else {
875
875
  if (it instanceof Param) {
876
- tmp = 'serialization.serialize(it.path[' + this$0.f26(it.v24_1) + '])';
876
+ tmp = 'serialization.serialize(it.path[' + this$0.i26(it.y24_1) + '])';
877
877
  } else {
878
878
  noWhenBranchMatchedException();
879
879
  }
@@ -883,7 +883,7 @@ function TypeScriptEndpointDefinitionEmitter$emitPathArray$lambda(this$0) {
883
883
  }
884
884
  function TypeScriptEndpointDefinitionEmitter$emitType$lambda_0(this$0) {
885
885
  return function (it) {
886
- return this$0.f26(it.l24_1) + ': ' + this$0.g25(it.m24_1);
886
+ return this$0.i26(it.o24_1) + ': ' + this$0.j25(it.p24_1);
887
887
  };
888
888
  }
889
889
  function TypeScriptEndpointDefinitionEmitter() {
@@ -899,8 +899,8 @@ function TypeScriptRefinedTypeDefinitionEmitter() {
899
899
  }
900
900
  function TypeScriptShared() {
901
901
  TypeScriptShared_instance = this;
902
- this.k2b_1 = 'community.flock.wirespec';
903
- this.l2b_1 = trimMargin('\n |export namespace Wirespec {\n |' + Spacer_instance.toString() + 'export type Method = "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH" | "TRACE"\n |' + Spacer_instance.toString() + 'export type RawRequest = { method: Method, path: string[], queries: Record<string, string>, headers: Record<string, string>, body?: string }\n |' + Spacer_instance.toString() + 'export type RawResponse = { status: number, headers: Record<string, string>, body?: string }\n |' + Spacer_instance.toString() + 'export type Request<T> = { path: Record<string, unknown>, method: Method, queries?: Record<string, unknown>, headers?: Record<string, unknown>, body?:T }\n |' + Spacer_instance.toString() + 'export type Response<T> = { status:number, headers?: Record<string, unknown>, body?:T }\n |' + Spacer_instance.toString() + 'export type Serialization = { serialize: <T>(type: T) => string; deserialize: <T>(raw: string | undefined) => T }\n |' + Spacer_instance.toString() + 'export type Client<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => { to: (request: REQ) => RawRequest; from: (response: RawResponse) => RES }\n |' + Spacer_instance.toString() + 'export type Server<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => { from: (request: RawRequest) => REQ; to: (response: RES) => RawResponse }\n |' + Spacer_instance.toString() + 'export type Api<REQ extends Request<unknown>, RES extends Response<unknown>> = { name: string; method: Method, path: string, client: Client<REQ, RES>; server: Server<REQ, RES> }\n |}\n ');
902
+ this.q2b_1 = 'community.flock.wirespec';
903
+ this.r2b_1 = trimMargin('\n |export namespace Wirespec {\n |' + Spacer_instance.toString() + 'export type Method = "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH" | "TRACE"\n |' + Spacer_instance.toString() + 'export type RawRequest = { method: Method, path: string[], queries: Record<string, string>, headers: Record<string, string>, body?: string }\n |' + Spacer_instance.toString() + 'export type RawResponse = { status: number, headers: Record<string, string>, body?: string }\n |' + Spacer_instance.toString() + 'export type Request<T> = { path: Record<string, unknown>, method: Method, queries?: Record<string, unknown>, headers?: Record<string, unknown>, body?:T }\n |' + Spacer_instance.toString() + 'export type Response<T> = { status:number, headers?: Record<string, unknown>, body?:T }\n |' + Spacer_instance.toString() + 'export type Serialization = { serialize: <T>(type: T) => string; deserialize: <T>(raw: string | undefined) => T }\n |' + Spacer_instance.toString() + 'export type Client<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => { to: (request: REQ) => RawRequest; from: (response: RawResponse) => RES }\n |' + Spacer_instance.toString() + 'export type Server<REQ extends Request<unknown>, RES extends Response<unknown>> = (serialization: Serialization) => { from: (request: RawRequest) => REQ; to: (response: RES) => RawResponse }\n |' + Spacer_instance.toString() + 'export type Api<REQ extends Request<unknown>, RES extends Response<unknown>> = { name: string; method: Method, path: string, client: Client<REQ, RES>; server: Server<REQ, RES> }\n |}\n ');
904
904
  }
905
905
  protoOf(TypeScriptShared).toString = function () {
906
906
  return 'TypeScriptShared';
@@ -931,26 +931,26 @@ function TypeScriptTypeDefinitionEmitter$emit$lambda(it) {
931
931
  }
932
932
  function TypeScriptTypeDefinitionEmitter$emit$lambda_0(this$0) {
933
933
  return function (it) {
934
- return this$0.f25(it);
934
+ return this$0.i25(it);
935
935
  };
936
936
  }
937
937
  function TypeScriptTypeDefinitionEmitter() {
938
938
  }
939
939
  //region block: post-declaration
940
- protoOf(TypeScriptEmitter).p26 = emit_7;
941
- protoOf(TypeScriptEmitter).d25 = emit_0;
942
- protoOf(TypeScriptEmitter).g25 = emit_1;
943
- protoOf(TypeScriptEmitter).h25 = emit_2;
944
- protoOf(TypeScriptEmitter).e25 = emit_3;
945
- protoOf(TypeScriptEmitter).f25 = emit_4;
946
- protoOf(TypeScriptEmitter).f26 = emit;
947
- protoOf(TypeScriptEmitter).q26 = emit_5;
948
- protoOf(TypeScriptEmitter).l26 = emit_6;
949
- protoOf(TypeScriptEmitter).r26 = emitValidator;
950
- protoOf(TypeScriptEmitter).g2b = sanitizeSymbol;
951
- protoOf(TypeScriptEmitter).d2b = sanitizeSymbol_0;
952
- protoOf(TypeScriptEmitter).f2b = emitClient;
953
- protoOf(TypeScriptEmitter).j25 = emitClientEndpointRequest;
940
+ protoOf(TypeScriptEmitter).s26 = emit_5;
941
+ protoOf(TypeScriptEmitter).g25 = emit_0;
942
+ protoOf(TypeScriptEmitter).j25 = emit_1;
943
+ protoOf(TypeScriptEmitter).k25 = emit_2;
944
+ protoOf(TypeScriptEmitter).h25 = emit_3;
945
+ protoOf(TypeScriptEmitter).i25 = emit_4;
946
+ protoOf(TypeScriptEmitter).i26 = emit;
947
+ protoOf(TypeScriptEmitter).t26 = emit_6;
948
+ protoOf(TypeScriptEmitter).o26 = emit_7;
949
+ protoOf(TypeScriptEmitter).u26 = emitValidator;
950
+ protoOf(TypeScriptEmitter).m2b = sanitizeSymbol;
951
+ protoOf(TypeScriptEmitter).j2b = sanitizeSymbol_0;
952
+ protoOf(TypeScriptEmitter).l2b = emitClient;
953
+ protoOf(TypeScriptEmitter).m25 = emitClientEndpointRequest;
954
954
  //endregion
955
955
  //region block: exports
956
956
  export {