refactor!: migrate class-validator to zod (#26597)

This commit is contained in:
Timon
2026-04-14 23:39:03 +02:00
committed by GitHub
parent 3753b7a4d1
commit 7d8f843be6
318 changed files with 7830 additions and 8316 deletions
+4 -5
View File
@@ -15,23 +15,22 @@ class SyncUserMetadataV1 {
SyncUserMetadataV1({
required this.key,
required this.userId,
required this.value,
this.value = const {},
});
/// User metadata key
UserMetadataKey key;
/// User ID
String userId;
/// User metadata value
Object value;
Map<String, Object> value;
@override
bool operator ==(Object other) => identical(this, other) || other is SyncUserMetadataV1 &&
other.key == key &&
other.userId == userId &&
other.value == value;
_deepEquality.equals(other.value, value);
@override
int get hashCode =>
@@ -62,7 +61,7 @@ class SyncUserMetadataV1 {
return SyncUserMetadataV1(
key: UserMetadataKey.fromJson(json[r'key'])!,
userId: mapValueOfType<String>(json, r'userId')!,
value: mapValueOfType<Object>(json, r'value')!,
value: mapCastOfType<String, Object>(json, r'value')!,
);
}
return null;