[ci skip] add missing files

This commit is contained in:
Christien Rioux 2025-12-22 09:45:26 -05:00
parent cdfeb0da74
commit 75b690df6f
6 changed files with 627 additions and 178 deletions

178
.gitignore vendored
View file

@ -77,181 +77,3 @@ perf.data.old
# Earthly temporary build output
.tmp-earthly-out/
###############################################################################
### Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Ruff stuff:
.ruff_cache/
# PyPI configuration file
.pypirc

View file

@ -0,0 +1,271 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'veilid.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$TransactDHTRecordsOptions {
KeyPair? get defaultSigningKeyPair;
/// Create a copy of TransactDHTRecordsOptions
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$TransactDHTRecordsOptionsCopyWith<TransactDHTRecordsOptions> get copyWith => _$TransactDHTRecordsOptionsCopyWithImpl<TransactDHTRecordsOptions>(this as TransactDHTRecordsOptions, _$identity);
/// Serializes this TransactDHTRecordsOptions to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is TransactDHTRecordsOptions&&(identical(other.defaultSigningKeyPair, defaultSigningKeyPair) || other.defaultSigningKeyPair == defaultSigningKeyPair));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,defaultSigningKeyPair);
@override
String toString() {
return 'TransactDHTRecordsOptions(defaultSigningKeyPair: $defaultSigningKeyPair)';
}
}
/// @nodoc
abstract mixin class $TransactDHTRecordsOptionsCopyWith<$Res> {
factory $TransactDHTRecordsOptionsCopyWith(TransactDHTRecordsOptions value, $Res Function(TransactDHTRecordsOptions) _then) = _$TransactDHTRecordsOptionsCopyWithImpl;
@useResult
$Res call({
KeyPair? defaultSigningKeyPair
});
}
/// @nodoc
class _$TransactDHTRecordsOptionsCopyWithImpl<$Res>
implements $TransactDHTRecordsOptionsCopyWith<$Res> {
_$TransactDHTRecordsOptionsCopyWithImpl(this._self, this._then);
final TransactDHTRecordsOptions _self;
final $Res Function(TransactDHTRecordsOptions) _then;
/// Create a copy of TransactDHTRecordsOptions
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? defaultSigningKeyPair = freezed,}) {
return _then(_self.copyWith(
defaultSigningKeyPair: freezed == defaultSigningKeyPair ? _self.defaultSigningKeyPair : defaultSigningKeyPair // ignore: cast_nullable_to_non_nullable
as KeyPair?,
));
}
}
/// Adds pattern-matching-related methods to [TransactDHTRecordsOptions].
extension TransactDHTRecordsOptionsPatterns on TransactDHTRecordsOptions {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _TransactDHTRecordsOptions value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _TransactDHTRecordsOptions() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _TransactDHTRecordsOptions value) $default,){
final _that = this;
switch (_that) {
case _TransactDHTRecordsOptions():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _TransactDHTRecordsOptions value)? $default,){
final _that = this;
switch (_that) {
case _TransactDHTRecordsOptions() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( KeyPair? defaultSigningKeyPair)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _TransactDHTRecordsOptions() when $default != null:
return $default(_that.defaultSigningKeyPair);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( KeyPair? defaultSigningKeyPair) $default,) {final _that = this;
switch (_that) {
case _TransactDHTRecordsOptions():
return $default(_that.defaultSigningKeyPair);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( KeyPair? defaultSigningKeyPair)? $default,) {final _that = this;
switch (_that) {
case _TransactDHTRecordsOptions() when $default != null:
return $default(_that.defaultSigningKeyPair);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _TransactDHTRecordsOptions implements TransactDHTRecordsOptions {
const _TransactDHTRecordsOptions({this.defaultSigningKeyPair});
factory _TransactDHTRecordsOptions.fromJson(Map<String, dynamic> json) => _$TransactDHTRecordsOptionsFromJson(json);
@override final KeyPair? defaultSigningKeyPair;
/// Create a copy of TransactDHTRecordsOptions
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$TransactDHTRecordsOptionsCopyWith<_TransactDHTRecordsOptions> get copyWith => __$TransactDHTRecordsOptionsCopyWithImpl<_TransactDHTRecordsOptions>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$TransactDHTRecordsOptionsToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransactDHTRecordsOptions&&(identical(other.defaultSigningKeyPair, defaultSigningKeyPair) || other.defaultSigningKeyPair == defaultSigningKeyPair));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,defaultSigningKeyPair);
@override
String toString() {
return 'TransactDHTRecordsOptions(defaultSigningKeyPair: $defaultSigningKeyPair)';
}
}
/// @nodoc
abstract mixin class _$TransactDHTRecordsOptionsCopyWith<$Res> implements $TransactDHTRecordsOptionsCopyWith<$Res> {
factory _$TransactDHTRecordsOptionsCopyWith(_TransactDHTRecordsOptions value, $Res Function(_TransactDHTRecordsOptions) _then) = __$TransactDHTRecordsOptionsCopyWithImpl;
@override @useResult
$Res call({
KeyPair? defaultSigningKeyPair
});
}
/// @nodoc
class __$TransactDHTRecordsOptionsCopyWithImpl<$Res>
implements _$TransactDHTRecordsOptionsCopyWith<$Res> {
__$TransactDHTRecordsOptionsCopyWithImpl(this._self, this._then);
final _TransactDHTRecordsOptions _self;
final $Res Function(_TransactDHTRecordsOptions) _then;
/// Create a copy of TransactDHTRecordsOptions
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? defaultSigningKeyPair = freezed,}) {
return _then(_TransactDHTRecordsOptions(
defaultSigningKeyPair: freezed == defaultSigningKeyPair ? _self.defaultSigningKeyPair : defaultSigningKeyPair // ignore: cast_nullable_to_non_nullable
as KeyPair?,
));
}
}
// dart format on

View file

@ -0,0 +1,21 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'veilid.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_TransactDHTRecordsOptions _$TransactDHTRecordsOptionsFromJson(
Map<String, dynamic> json,
) => _TransactDHTRecordsOptions(
defaultSigningKeyPair: json['defaultSigningKeyPair'] == null
? null
: KeyPair.fromJson(json['defaultSigningKeyPair']),
);
Map<String, dynamic> _$TransactDHTRecordsOptionsToJson(
_TransactDHTRecordsOptions instance,
) => <String, dynamic>{
'defaultSigningKeyPair': instance.defaultSigningKeyPair?.toJson(),
};

View file

@ -0,0 +1,47 @@
import 'dart:async';
import 'dart:typed_data';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'veilid.dart';
part 'veilid_dht_transaction.freezed.dart';
part 'veilid_dht_transaction.g.dart';
//////////////////////////////////////
/// DHTTransactionSetValueOptions
@freezed
sealed class DHTTransactionSetValueOptions
with _$DHTTransactionSetValueOptions {
const factory DHTTransactionSetValueOptions({KeyPair? writer}) =
_DHTTransactionSetValueOptions;
factory DHTTransactionSetValueOptions.fromJson(dynamic json) =>
_$DHTTransactionSetValueOptionsFromJson(json as Map<String, dynamic>);
@override
Map<String, dynamic> toJson() => {'writer': writer};
}
//////////////////////////////////////
/// VeilidDHTTransaction
abstract class VeilidDHTTransaction {
bool get isDone;
Future<void> commit();
Future<void> rollback();
Future<ValueData?> get(RecordKey key, int subkey);
Future<ValueData?> set(
RecordKey key,
int subkey,
Uint8List data, {
DHTTransactionSetValueOptions? options,
});
Future<DHTRecordReport> inspect(
RecordKey key, {
List<ValueSubkeyRange>? subkeys,
DHTReportScope scope = DHTReportScope.local,
});
}

View file

@ -0,0 +1,271 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'veilid_dht_transaction.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$DHTTransactionSetValueOptions {
KeyPair? get writer;
/// Create a copy of DHTTransactionSetValueOptions
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$DHTTransactionSetValueOptionsCopyWith<DHTTransactionSetValueOptions> get copyWith => _$DHTTransactionSetValueOptionsCopyWithImpl<DHTTransactionSetValueOptions>(this as DHTTransactionSetValueOptions, _$identity);
/// Serializes this DHTTransactionSetValueOptions to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is DHTTransactionSetValueOptions&&(identical(other.writer, writer) || other.writer == writer));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,writer);
@override
String toString() {
return 'DHTTransactionSetValueOptions(writer: $writer)';
}
}
/// @nodoc
abstract mixin class $DHTTransactionSetValueOptionsCopyWith<$Res> {
factory $DHTTransactionSetValueOptionsCopyWith(DHTTransactionSetValueOptions value, $Res Function(DHTTransactionSetValueOptions) _then) = _$DHTTransactionSetValueOptionsCopyWithImpl;
@useResult
$Res call({
KeyPair? writer
});
}
/// @nodoc
class _$DHTTransactionSetValueOptionsCopyWithImpl<$Res>
implements $DHTTransactionSetValueOptionsCopyWith<$Res> {
_$DHTTransactionSetValueOptionsCopyWithImpl(this._self, this._then);
final DHTTransactionSetValueOptions _self;
final $Res Function(DHTTransactionSetValueOptions) _then;
/// Create a copy of DHTTransactionSetValueOptions
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? writer = freezed,}) {
return _then(_self.copyWith(
writer: freezed == writer ? _self.writer : writer // ignore: cast_nullable_to_non_nullable
as KeyPair?,
));
}
}
/// Adds pattern-matching-related methods to [DHTTransactionSetValueOptions].
extension DHTTransactionSetValueOptionsPatterns on DHTTransactionSetValueOptions {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _DHTTransactionSetValueOptions value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _DHTTransactionSetValueOptions() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _DHTTransactionSetValueOptions value) $default,){
final _that = this;
switch (_that) {
case _DHTTransactionSetValueOptions():
return $default(_that);}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _DHTTransactionSetValueOptions value)? $default,){
final _that = this;
switch (_that) {
case _DHTTransactionSetValueOptions() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( KeyPair? writer)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _DHTTransactionSetValueOptions() when $default != null:
return $default(_that.writer);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( KeyPair? writer) $default,) {final _that = this;
switch (_that) {
case _DHTTransactionSetValueOptions():
return $default(_that.writer);}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( KeyPair? writer)? $default,) {final _that = this;
switch (_that) {
case _DHTTransactionSetValueOptions() when $default != null:
return $default(_that.writer);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _DHTTransactionSetValueOptions implements DHTTransactionSetValueOptions {
const _DHTTransactionSetValueOptions({this.writer});
factory _DHTTransactionSetValueOptions.fromJson(Map<String, dynamic> json) => _$DHTTransactionSetValueOptionsFromJson(json);
@override final KeyPair? writer;
/// Create a copy of DHTTransactionSetValueOptions
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$DHTTransactionSetValueOptionsCopyWith<_DHTTransactionSetValueOptions> get copyWith => __$DHTTransactionSetValueOptionsCopyWithImpl<_DHTTransactionSetValueOptions>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$DHTTransactionSetValueOptionsToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _DHTTransactionSetValueOptions&&(identical(other.writer, writer) || other.writer == writer));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,writer);
@override
String toString() {
return 'DHTTransactionSetValueOptions(writer: $writer)';
}
}
/// @nodoc
abstract mixin class _$DHTTransactionSetValueOptionsCopyWith<$Res> implements $DHTTransactionSetValueOptionsCopyWith<$Res> {
factory _$DHTTransactionSetValueOptionsCopyWith(_DHTTransactionSetValueOptions value, $Res Function(_DHTTransactionSetValueOptions) _then) = __$DHTTransactionSetValueOptionsCopyWithImpl;
@override @useResult
$Res call({
KeyPair? writer
});
}
/// @nodoc
class __$DHTTransactionSetValueOptionsCopyWithImpl<$Res>
implements _$DHTTransactionSetValueOptionsCopyWith<$Res> {
__$DHTTransactionSetValueOptionsCopyWithImpl(this._self, this._then);
final _DHTTransactionSetValueOptions _self;
final $Res Function(_DHTTransactionSetValueOptions) _then;
/// Create a copy of DHTTransactionSetValueOptions
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? writer = freezed,}) {
return _then(_DHTTransactionSetValueOptions(
writer: freezed == writer ? _self.writer : writer // ignore: cast_nullable_to_non_nullable
as KeyPair?,
));
}
}
// dart format on

View file

@ -0,0 +1,17 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'veilid_dht_transaction.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_DHTTransactionSetValueOptions _$DHTTransactionSetValueOptionsFromJson(
Map<String, dynamic> json,
) => _DHTTransactionSetValueOptions(
writer: json['writer'] == null ? null : KeyPair.fromJson(json['writer']),
);
Map<String, dynamic> _$DHTTransactionSetValueOptionsToJson(
_DHTTransactionSetValueOptions instance,
) => <String, dynamic>{'writer': instance.writer?.toJson()};