@flock/wirespec 0.18.13 → 0.18.15

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 (34) hide show
  1. package/clikt-clikt-mordant.mjs +39 -39
  2. package/colormath-root-colormath.mjs +432 -432
  3. package/kotlin-kotlin-stdlib.mjs +25 -15
  4. package/kotlin-kotlin-stdlib.mjs.map +1 -1
  5. package/kotlin-openapi-bindings.mjs +9842 -9842
  6. package/kotlin-rgxgen.mjs +1758 -1758
  7. package/kotlinx-io-kotlinx-io-core.mjs +404 -404
  8. package/kotlinx-serialization-kotlinx-serialization-core.mjs +1775 -1775
  9. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1466 -1466
  10. package/mordant-mordant.mjs +1190 -1190
  11. package/package.json +13 -2
  12. package/wirespec-msw.d.ts +53 -0
  13. package/wirespec-msw.mjs +83 -0
  14. package/wirespec-src-compiler-emitters-java.mjs +79 -79
  15. package/wirespec-src-compiler-emitters-kotlin.mjs +192 -128
  16. package/wirespec-src-compiler-emitters-kotlin.mjs.map +1 -1
  17. package/wirespec-src-compiler-emitters-python.mjs +129 -129
  18. package/wirespec-src-compiler-emitters-python.mjs.map +1 -1
  19. package/wirespec-src-compiler-emitters-rust.mjs +68 -54
  20. package/wirespec-src-compiler-emitters-rust.mjs.map +1 -1
  21. package/wirespec-src-compiler-emitters-scala.mjs +29 -29
  22. package/wirespec-src-compiler-emitters-typescript.mjs +125 -98
  23. package/wirespec-src-compiler-emitters-typescript.mjs.map +1 -1
  24. package/wirespec-src-compiler-emitters-wirespec.mjs +31 -31
  25. package/wirespec-src-compiler-emitters-wirespec.mjs.map +1 -1
  26. package/wirespec-src-compiler-ir.mjs +144 -134
  27. package/wirespec-src-compiler-ir.mjs.map +1 -1
  28. package/wirespec-src-converter-avro.mjs +479 -479
  29. package/wirespec-src-converter-openapi.mjs +320 -320
  30. package/wirespec-src-ide-lsp.mjs +1348 -1348
  31. package/wirespec-src-plugin-arguments.mjs +136 -136
  32. package/wirespec-src-plugin-cli.mjs +84 -84
  33. package/wirespec-src-plugin-npm.mjs +10 -10
  34. package/wirespec-src-tools-generator.mjs +2 -2
@@ -169,7 +169,7 @@ function emit_2(identifier) {
169
169
  }
170
170
  initMetadataForInterface(TypeScriptIdentifierEmitter, 'TypeScriptIdentifierEmitter');
171
171
  function sanitizeSymbol(_this__u8e3s4) {
172
- return this.u1v(_this__u8e3s4.l1());
172
+ return this.w1v(_this__u8e3s4.l1());
173
173
  }
174
174
  function sanitizeSymbol_0(_this__u8e3s4) {
175
175
  var tmp = asSequence(_this__u8e3s4);
@@ -198,7 +198,7 @@ function emit_3(type, module_0) {
198
198
  destination.x(tmp$ret$2);
199
199
  }
200
200
  var tmp = destination;
201
- return trimMargin('\n |' + joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda) + '\n |export type ' + this.c1z(type.zo_1) + ' = {\n |' + this.zp(type.ap_1) + '\n |}\n |\n ');
201
+ return trimMargin('\n |' + joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptTypeDefinitionEmitter$emit$lambda) + '\n |export type ' + this.f1z(type.zo_1) + ' = {\n |' + this.zp(type.ap_1) + '\n |}\n |\n ');
202
202
  }
203
203
  function emit_4(_this__u8e3s4) {
204
204
  var tmp;
@@ -215,10 +215,10 @@ function emit_4(_this__u8e3s4) {
215
215
  tmp = 'any';
216
216
  } else {
217
217
  if (_this__u8e3s4 instanceof Custom) {
218
- tmp = this.u1v(_this__u8e3s4.pu_1);
218
+ tmp = this.w1v(_this__u8e3s4.pu_1);
219
219
  } else {
220
220
  if (_this__u8e3s4 instanceof Primitive) {
221
- tmp = this.d1z(_this__u8e3s4);
221
+ tmp = this.g1z(_this__u8e3s4);
222
222
  } else {
223
223
  noWhenBranchMatchedException();
224
224
  }
@@ -349,7 +349,56 @@ function emitClient(ast) {
349
349
  return new Emitted(tmp, trimMargin('\n |import {Wirespec} from "./Wirespec"\n |\n |' + tmp_1 + '\n |\n |' + tmp_3 + '\n |\n |type RawHandler = (req: Wirespec.RawRequest) => Promise<Wirespec.RawResponse>\n |\n |export const client = (serialization: Wirespec.Serialization, handler: RawHandler) => ({\n |' + spacer(joinToString(tmp_4, '\n', VOID, VOID, VOID, VOID, TypeScriptClientEmitter$emitClient$lambda_1(this)), 1) + '\n |})\n |\n '));
350
350
  }
351
351
  initMetadataForInterface(TypeScriptClientEmitter, 'TypeScriptClientEmitter', VOID, VOID, [ClientEmitter, TypeScriptTypeDefinitionEmitter]);
352
- function emit_8(endpoint) {
352
+ function emit_8(refined) {
353
+ return trimMargin('\n |export type ' + this.f1z(refined.gr_1) + ' = ' + this.bq(refined.hr_1) + ';\n |export const validate' + refined.gr_1.l1() + ' = (value: ' + this.bq(refined.hr_1) + '): value is ' + this.f1z(refined.gr_1) + ' => {\n |' + this.pr(refined) + '\n |}\n |\n ');
354
+ }
355
+ function emitValidator(_this__u8e3s4) {
356
+ var defaultReturn = Spacer_instance.toString() + 'return true;';
357
+ var type = _this__u8e3s4.hr_1.tu_1;
358
+ var tmp;
359
+ if (type instanceof Integer) {
360
+ var tmp0_safe_receiver = type.yt_1;
361
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.cq(tmp0_safe_receiver);
362
+ tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
363
+ } else {
364
+ if (type instanceof Number_0) {
365
+ var tmp2_safe_receiver = type.bu_1;
366
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.cq(tmp2_safe_receiver);
367
+ tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
368
+ } else {
369
+ if (type instanceof String_0) {
370
+ var tmp4_safe_receiver = type.vt_1;
371
+ var tmp_0;
372
+ var tmp_1 = tmp4_safe_receiver;
373
+ if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
374
+ tmp_0 = null;
375
+ } else {
376
+ tmp_0 = this.cq(new RegExp_0(tmp4_safe_receiver));
377
+ }
378
+ var tmp5_elvis_lhs = tmp_0;
379
+ tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
380
+ } else {
381
+ if (equals(type, Boolean_instance)) {
382
+ tmp = defaultReturn;
383
+ } else {
384
+ if (equals(type, Bytes_instance)) {
385
+ tmp = defaultReturn;
386
+ } else {
387
+ noWhenBranchMatchedException();
388
+ }
389
+ }
390
+ }
391
+ }
392
+ }
393
+ return tmp;
394
+ }
395
+ initMetadataForInterface(TypeScriptRefinedTypeDefinitionEmitter, 'TypeScriptRefinedTypeDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
396
+ function emit_9(enum_0, module_0) {
397
+ var tmp = this.f1z(enum_0.lr_1);
398
+ return 'export type ' + tmp + ' = ' + joinToString(enum_0.mr_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEnumDefinitionEmitter$emit$lambda) + '\n';
399
+ }
400
+ initMetadataForInterface(TypeScriptEnumDefinitionEmitter, 'TypeScriptEnumDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
401
+ function emit_10(endpoint) {
353
402
  // Inline function 'kotlin.collections.distinctBy' call
354
403
  var this_0 = importReferences(endpoint);
355
404
  var set = HashSet_init_$Create$();
@@ -373,7 +422,7 @@ function emit_8(endpoint) {
373
422
  }
374
423
  var tmp = destination;
375
424
  var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda);
376
- var tmp_1 = this.c1z(endpoint.ip_1);
425
+ var tmp_1 = this.f1z(endpoint.ip_1);
377
426
  var tmp_2 = get_pathParams(endpoint);
378
427
  var tmp_3 = emitType(this, tmp_2, 'Path', TypeScriptEndpointDefinitionEmitter$emit$lambda_0(this));
379
428
  var tmp_4 = emitType(this, endpoint.lp_1, 'Queries', TypeScriptEndpointDefinitionEmitter$emit$lambda_1(this));
@@ -395,62 +444,13 @@ function emit_8(endpoint) {
395
444
  var tmp_20 = prependIndent(emitServer(this, endpoint), Spacer_instance.vr(1));
396
445
  var tmp_21 = Spacer_instance.toString();
397
446
  var tmp_22 = Spacer_instance.vr(2);
398
- var tmp_23 = Companion_instance_0.tq(this.c1z(endpoint.ip_1));
447
+ var tmp_23 = Companion_instance_0.tq(this.f1z(endpoint.ip_1));
399
448
  var tmp_24 = Spacer_instance.vr(2);
400
449
  var tmp_25 = Spacer_instance.vr(2);
401
450
  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.jp_1.a3_1 + '",\n |' + tmp_25 + 'path: "' + joinToString(endpoint.kp_1, '/', VOID, VOID, VOID, VOID, TypeScriptEndpointDefinitionEmitter$emit$lambda_6(this)) + '",\n |' + Spacer_instance.vr(2) + 'server,\n |' + Spacer_instance.vr(2) + 'client\n |' + Spacer_instance.toString() + '} as const\n |}\n |\n ');
402
451
  }
403
452
  initMetadataForInterface(TypeScriptEndpointDefinitionEmitter, 'TypeScriptEndpointDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
404
- function emit_9(refined) {
405
- return trimMargin('\n |export type ' + this.c1z(refined.gr_1) + ' = ' + this.bq(refined.hr_1) + ';\n |export const validate' + refined.gr_1.l1() + ' = (value: ' + this.bq(refined.hr_1) + '): value is ' + this.c1z(refined.gr_1) + ' => {\n |' + this.pr(refined) + '\n |}\n |\n ');
406
- }
407
- function emitValidator(_this__u8e3s4) {
408
- var defaultReturn = Spacer_instance.toString() + 'return true;';
409
- var type = _this__u8e3s4.hr_1.tu_1;
410
- var tmp;
411
- if (type instanceof Integer) {
412
- var tmp0_safe_receiver = type.yt_1;
413
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.cq(tmp0_safe_receiver);
414
- tmp = tmp1_elvis_lhs == null ? defaultReturn : tmp1_elvis_lhs;
415
- } else {
416
- if (type instanceof Number_0) {
417
- var tmp2_safe_receiver = type.bu_1;
418
- var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : this.cq(tmp2_safe_receiver);
419
- tmp = tmp3_elvis_lhs == null ? defaultReturn : tmp3_elvis_lhs;
420
- } else {
421
- if (type instanceof String_0) {
422
- var tmp4_safe_receiver = type.vt_1;
423
- var tmp_0;
424
- var tmp_1 = tmp4_safe_receiver;
425
- if ((tmp_1 == null ? null : new RegExp_0(tmp_1)) == null) {
426
- tmp_0 = null;
427
- } else {
428
- tmp_0 = this.cq(new RegExp_0(tmp4_safe_receiver));
429
- }
430
- var tmp5_elvis_lhs = tmp_0;
431
- tmp = tmp5_elvis_lhs == null ? defaultReturn : tmp5_elvis_lhs;
432
- } else {
433
- if (equals(type, Boolean_instance)) {
434
- tmp = defaultReturn;
435
- } else {
436
- if (equals(type, Bytes_instance)) {
437
- tmp = defaultReturn;
438
- } else {
439
- noWhenBranchMatchedException();
440
- }
441
- }
442
- }
443
- }
444
- }
445
- return tmp;
446
- }
447
- initMetadataForInterface(TypeScriptRefinedTypeDefinitionEmitter, 'TypeScriptRefinedTypeDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
448
- function emit_10(enum_0, module_0) {
449
- var tmp = this.c1z(enum_0.lr_1);
450
- return 'export type ' + tmp + ' = ' + joinToString(enum_0.mr_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEnumDefinitionEmitter$emit$lambda) + '\n';
451
- }
452
- initMetadataForInterface(TypeScriptEnumDefinitionEmitter, 'TypeScriptEnumDefinitionEmitter', VOID, VOID, [TypeScriptTypeDefinitionEmitter]);
453
- initMetadataForClass(TypeScriptEmitter, 'TypeScriptEmitter', TypeScriptEmitter, LanguageEmitter, [LanguageEmitter, TypeScriptTypeDefinitionEmitter, TypeScriptEndpointDefinitionEmitter, TypeScriptRefinedTypeDefinitionEmitter, TypeScriptEnumDefinitionEmitter, TypeScriptClientEmitter, TypeScriptIdentifierEmitter]);
453
+ initMetadataForClass(TypeScriptEmitter, 'TypeScriptEmitter', TypeScriptEmitter, LanguageEmitter, [LanguageEmitter, TypeScriptRefinedTypeDefinitionEmitter, TypeScriptIdentifierEmitter, TypeScriptClientEmitter, TypeScriptEnumDefinitionEmitter, TypeScriptTypeDefinitionEmitter, TypeScriptEndpointDefinitionEmitter]);
454
454
  initMetadataForClass(EndpointParam, 'EndpointParam');
455
455
  initMetadataForCompanion(Companion);
456
456
  initMetadataForClass(TypeScriptIrEmitter, 'TypeScriptIrEmitter', TypeScriptIrEmitter, VOID, [IrEmitter]);
@@ -546,25 +546,25 @@ function TypeScriptEmitter$emit$lambda_1(this$0) {
546
546
  }
547
547
  function TypeScriptEmitter() {
548
548
  LanguageEmitter.call(this);
549
- this.e1z_1 = FileExtension_TypeScript_getInstance();
550
- this.f1z_1 = TypeScriptShared_getInstance();
551
- this.g1z_1 = '//';
549
+ this.h1z_1 = FileExtension_TypeScript_getInstance();
550
+ this.i1z_1 = TypeScriptShared_getInstance();
551
+ this.j1z_1 = '//';
552
552
  }
553
553
  protoOf(TypeScriptEmitter).iq = function () {
554
- return this.e1z_1;
554
+ return this.h1z_1;
555
555
  };
556
- protoOf(TypeScriptEmitter).r1v = function () {
557
- return this.f1z_1;
556
+ protoOf(TypeScriptEmitter).t1v = function () {
557
+ return this.i1z_1;
558
558
  };
559
559
  protoOf(TypeScriptEmitter).jq = function () {
560
- return this.g1z_1;
560
+ return this.j1z_1;
561
561
  };
562
562
  protoOf(TypeScriptEmitter).sn = function (ast, logger) {
563
563
  // Inline function 'kotlin.run' call
564
564
  var $this$run = protoOf(LanguageEmitter).sn.call(this, ast, logger);
565
565
  var tmp;
566
566
  if (hasEndpoints(ast)) {
567
- tmp = NonEmptyList__plus_impl_xqmb9($this$run, this.b1z(ast));
567
+ tmp = NonEmptyList__plus_impl_xqmb9($this$run, this.e1z(ast));
568
568
  } else {
569
569
  tmp = $this$run;
570
570
  }
@@ -623,13 +623,13 @@ protoOf(TypeScriptEmitter).sn = function (ast, logger) {
623
623
  protoOf(TypeScriptEmitter).yq = function (module_0, logger) {
624
624
  // Inline function 'kotlin.let' call
625
625
  var it = protoOf(LanguageEmitter).yq.call(this, module_0, logger);
626
- return NonEmptyList__plus_impl_xqmb9(it, new Emitted('Wirespec', this.r1v().i1z_1));
626
+ return NonEmptyList__plus_impl_xqmb9(it, new Emitted('Wirespec', this.t1v().l1z_1));
627
627
  };
628
628
  protoOf(TypeScriptEmitter).zq = function (definition, module_0, logger) {
629
629
  // Inline function 'kotlin.let' call
630
630
  var it = protoOf(LanguageEmitter).zq.call(this, definition, module_0, logger);
631
631
  var subPackageName = plus(Companion_instance.qr(''), definition);
632
- return new Emitted(subPackageName.tr() + this.u1v(it.mo_1), trimMargin("\n |import {Wirespec} from '../Wirespec'\n |\n |" + it.no_1 + '\n '));
632
+ return new Emitted(subPackageName.tr() + this.w1v(it.mo_1), trimMargin("\n |import {Wirespec} from '../Wirespec'\n |\n |" + it.no_1 + '\n '));
633
633
  };
634
634
  protoOf(TypeScriptEmitter).dr = function (union) {
635
635
  // Inline function 'kotlin.collections.distinctBy' call
@@ -655,7 +655,7 @@ protoOf(TypeScriptEmitter).dr = function (union) {
655
655
  }
656
656
  var tmp = destination;
657
657
  var tmp_0 = joinToString(tmp, '\n', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda_0);
658
- var tmp_1 = this.c1z(union.uo_1);
658
+ var tmp_1 = this.f1z(union.uo_1);
659
659
  return trimMargin('\n |' + tmp_0 + '\n |export type ' + tmp_1 + ' = ' + joinToString(union.vo_1, ' | ', VOID, VOID, VOID, VOID, TypeScriptEmitter$emit$lambda_1(this)) + '\n |\n ');
660
660
  };
661
661
  protoOf(TypeScriptEmitter).cr = function (channel) {
@@ -882,7 +882,7 @@ function joinToObject($this, _this__u8e3s4, transform) {
882
882
  return joinToString(_this__u8e3s4, ', ', '{', '}', VOID, VOID, transform);
883
883
  }
884
884
  function emitHandleFunction($this, endpoint) {
885
- return Companion_instance_0.tq($this.c1z(endpoint.ip_1)) + ': (request:Request) => Promise<Response>';
885
+ return Companion_instance_0.tq($this.f1z(endpoint.ip_1)) + ': (request:Request) => Promise<Response>';
886
886
  }
887
887
  function lowercase($this, _this__u8e3s4) {
888
888
  // Inline function 'kotlin.text.lowercase' call
@@ -1039,12 +1039,19 @@ function TypeScriptEnumDefinitionEmitter() {
1039
1039
  function TypeScriptIdentifierEmitter() {
1040
1040
  }
1041
1041
  function _get_sanitizationConfig__sns434($this) {
1042
- var tmp0 = $this.l1z_1;
1042
+ var tmp0 = $this.o1z_1;
1043
1043
  var tmp = KProperty1;
1044
1044
  // Inline function 'kotlin.getValue' call
1045
1045
  getPropertyCallableRef('sanitizationConfig', 1, tmp, TypeScriptIrEmitter$_get_sanitizationConfig_$ref_f6f0bh(), null);
1046
1046
  return tmp0.l1();
1047
1047
  }
1048
+ function _get_modelSanitizationConfig__vgg831($this) {
1049
+ var tmp0 = $this.p1z_1;
1050
+ var tmp = KProperty1;
1051
+ // Inline function 'kotlin.getValue' call
1052
+ getPropertyCallableRef('modelSanitizationConfig', 1, tmp, TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88(), null);
1053
+ return tmp0.l1();
1054
+ }
1048
1055
  function sanitize($this, _this__u8e3s4) {
1049
1056
  return '"' + _this__u8e3s4.l1() + '"';
1050
1057
  }
@@ -1067,7 +1074,7 @@ function sanitizeSymbol_1($this, _this__u8e3s4) {
1067
1074
  return destination.toString();
1068
1075
  }
1069
1076
  function sanitizeKeywords($this, _this__u8e3s4) {
1070
- return Companion_getInstance_0().m1z_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
1077
+ return Companion_getInstance_0().q1z_1.u1(_this__u8e3s4) ? '_' + _this__u8e3s4 : _this__u8e3s4;
1071
1078
  }
1072
1079
  function firstToLower($this, _this__u8e3s4) {
1073
1080
  // Inline function 'kotlin.text.replaceFirstChar' call
@@ -1201,17 +1208,17 @@ function emitTypeScriptReference($this, ref) {
1201
1208
  return tmp + (ref.hu() ? ' | undefined' : '');
1202
1209
  }
1203
1210
  function EndpointParam(name, type, nullable) {
1204
- this.n1z_1 = name;
1205
- this.o1z_1 = type;
1206
- this.p1z_1 = nullable;
1211
+ this.r1z_1 = name;
1212
+ this.s1z_1 = type;
1213
+ this.t1z_1 = nullable;
1207
1214
  }
1208
1215
  protoOf(EndpointParam).toString = function () {
1209
- return 'EndpointParam(name=' + this.n1z_1 + ', type=' + this.o1z_1 + ', nullable=' + this.p1z_1 + ')';
1216
+ return 'EndpointParam(name=' + this.r1z_1 + ', type=' + this.s1z_1 + ', nullable=' + this.t1z_1 + ')';
1210
1217
  };
1211
1218
  protoOf(EndpointParam).hashCode = function () {
1212
- var result = getStringHashCode(this.n1z_1);
1213
- result = imul(result, 31) + getStringHashCode(this.o1z_1) | 0;
1214
- result = imul(result, 31) + getBooleanHashCode(this.p1z_1) | 0;
1219
+ var result = getStringHashCode(this.r1z_1);
1220
+ result = imul(result, 31) + getStringHashCode(this.s1z_1) | 0;
1221
+ result = imul(result, 31) + getBooleanHashCode(this.t1z_1) | 0;
1215
1222
  return result;
1216
1223
  };
1217
1224
  protoOf(EndpointParam).equals = function (other) {
@@ -1219,17 +1226,17 @@ protoOf(EndpointParam).equals = function (other) {
1219
1226
  return true;
1220
1227
  if (!(other instanceof EndpointParam))
1221
1228
  return false;
1222
- if (!(this.n1z_1 === other.n1z_1))
1229
+ if (!(this.r1z_1 === other.r1z_1))
1223
1230
  return false;
1224
- if (!(this.o1z_1 === other.o1z_1))
1231
+ if (!(this.s1z_1 === other.s1z_1))
1225
1232
  return false;
1226
- if (!(this.p1z_1 === other.p1z_1))
1233
+ if (!(this.t1z_1 === other.t1z_1))
1227
1234
  return false;
1228
1235
  return true;
1229
1236
  };
1230
1237
  function Companion() {
1231
1238
  Companion_instance_1 = this;
1232
- this.m1z_1 = setOf(['break', 'case', 'catch', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'class', 'const', 'enum', 'export', 'extends', 'import', 'super', 'implements', 'interface', 'let', 'package', 'private', 'protected', 'public', 'static', 'yield', 'type', 'async', 'await']);
1239
+ this.q1z_1 = setOf(['break', 'case', 'catch', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'class', 'const', 'enum', 'export', 'extends', 'import', 'super', 'implements', 'interface', 'let', 'package', 'private', 'protected', 'public', 'static', 'yield', 'type', 'async', 'await']);
1233
1240
  }
1234
1241
  var Companion_instance_1;
1235
1242
  function Companion_getInstance_0() {
@@ -1307,7 +1314,7 @@ function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_3(this$0)
1307
1314
  }
1308
1315
  function TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this$0) {
1309
1316
  return function () {
1310
- var tmp0_reservedKeywords = Companion_getInstance_0().m1z_1;
1317
+ var tmp0_reservedKeywords = Companion_getInstance_0().q1z_1;
1311
1318
  var tmp = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda;
1312
1319
  var tmp_0 = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_0(this$0);
1313
1320
  var tmp_1 = TypeScriptIrEmitter$sanitizationConfig$delegate$lambda$lambda_1(this$0);
@@ -1320,6 +1327,24 @@ function TypeScriptIrEmitter$_get_sanitizationConfig_$ref_f6f0bh() {
1320
1327
  return _get_sanitizationConfig__sns434(p0);
1321
1328
  };
1322
1329
  }
1330
+ function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda(name) {
1331
+ return new Name(listOf(name.x1h()));
1332
+ }
1333
+ function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0(it) {
1334
+ return it;
1335
+ }
1336
+ function TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this$0) {
1337
+ return function () {
1338
+ var tmp = _get_sanitizationConfig__sns434(this$0);
1339
+ var tmp_0 = TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda;
1340
+ return tmp.j1v(VOID, VOID, tmp_0, VOID, TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda$lambda_0);
1341
+ };
1342
+ }
1343
+ function TypeScriptIrEmitter$_get_modelSanitizationConfig_$ref_ar2t88() {
1344
+ return function (p0) {
1345
+ return _get_modelSanitizationConfig__vgg831(p0);
1346
+ };
1347
+ }
1323
1348
  function TypeScriptIrEmitter$emitShared$lambda(element, transformer) {
1324
1349
  var tmp;
1325
1350
  if (element instanceof Namespace) {
@@ -1409,16 +1434,18 @@ function TypeScriptIrEmitter$emitClient$lambda(this$0) {
1409
1434
  }
1410
1435
  function TypeScriptIrEmitter() {
1411
1436
  Companion_getInstance_0();
1412
- this.j1z_1 = TypeScriptGenerator_getInstance();
1413
- this.k1z_1 = FileExtension_TypeScript_getInstance();
1437
+ this.m1z_1 = TypeScriptGenerator_getInstance();
1438
+ this.n1z_1 = FileExtension_TypeScript_getInstance();
1414
1439
  var tmp = this;
1415
- tmp.l1z_1 = lazy(TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this));
1440
+ tmp.o1z_1 = lazy(TypeScriptIrEmitter$sanitizationConfig$delegate$lambda(this));
1441
+ var tmp_0 = this;
1442
+ tmp_0.p1z_1 = lazy(TypeScriptIrEmitter$modelSanitizationConfig$delegate$lambda(this));
1416
1443
  }
1417
1444
  protoOf(TypeScriptIrEmitter).p1u = function () {
1418
- return this.j1z_1;
1445
+ return this.m1z_1;
1419
1446
  };
1420
1447
  protoOf(TypeScriptIrEmitter).iq = function () {
1421
- return this.k1z_1;
1448
+ return this.n1z_1;
1422
1449
  };
1423
1450
  protoOf(TypeScriptIrEmitter).s1u = function () {
1424
1451
  var packageName = Companion_instance.qr('community.flock.wirespec');
@@ -1575,7 +1602,7 @@ protoOf(TypeScriptIrEmitter).yp = function (type, module_0) {
1575
1602
  destination_3.x(tmp$ret$14);
1576
1603
  }
1577
1604
  var fieldNames = toSet(destination_3);
1578
- var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_sanitizationConfig__sns434(this)), type.zo_1.l1(), fieldNames);
1605
+ var file = renameValidateAndBindObjReceiver(sanitizeNames(convertWithValidation(type, module_0), _get_modelSanitizationConfig__vgg831(this)), type.zo_1.l1(), fieldNames);
1579
1606
  var tmp;
1580
1607
  // Inline function 'kotlin.collections.isNotEmpty' call
1581
1608
  if (!allImports.r()) {
@@ -2103,8 +2130,8 @@ function TypeScriptRefinedTypeDefinitionEmitter() {
2103
2130
  }
2104
2131
  function TypeScriptShared() {
2105
2132
  TypeScriptShared_instance = this;
2106
- this.h1z_1 = 'community.flock.wirespec';
2107
- this.i1z_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 ');
2133
+ this.k1z_1 = 'community.flock.wirespec';
2134
+ this.l1z_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 ');
2108
2135
  }
2109
2136
  protoOf(TypeScriptShared).toString = function () {
2110
2137
  return 'TypeScriptShared';
@@ -2145,15 +2172,15 @@ protoOf(TypeScriptEmitter).zp = emit_6;
2145
2172
  protoOf(TypeScriptEmitter).aq = emit_7;
2146
2173
  protoOf(TypeScriptEmitter).bq = emit_4;
2147
2174
  protoOf(TypeScriptEmitter).cq = emit_5;
2148
- protoOf(TypeScriptEmitter).nr = emit_10;
2149
- protoOf(TypeScriptEmitter).ir = emit_9;
2150
- protoOf(TypeScriptEmitter).or = emit_8;
2175
+ protoOf(TypeScriptEmitter).nr = emit_9;
2176
+ protoOf(TypeScriptEmitter).ir = emit_8;
2177
+ protoOf(TypeScriptEmitter).or = emit_10;
2151
2178
  protoOf(TypeScriptEmitter).br = emit_2;
2152
2179
  protoOf(TypeScriptEmitter).pr = emitValidator;
2153
- protoOf(TypeScriptEmitter).c1z = sanitizeSymbol;
2154
- protoOf(TypeScriptEmitter).u1v = sanitizeSymbol_0;
2155
- protoOf(TypeScriptEmitter).d1z = emitPrimitive;
2156
- protoOf(TypeScriptEmitter).b1z = emitClient;
2180
+ protoOf(TypeScriptEmitter).f1z = sanitizeSymbol;
2181
+ protoOf(TypeScriptEmitter).w1v = sanitizeSymbol_0;
2182
+ protoOf(TypeScriptEmitter).g1z = emitPrimitive;
2183
+ protoOf(TypeScriptEmitter).e1z = emitClient;
2157
2184
  protoOf(TypeScriptEmitter).eq = emitClientEndpointRequest;
2158
2185
  protoOf(TypeScriptIrEmitter).r1u = emit_1;
2159
2186
  //endregion