Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Update to newest contracts #45

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/src/v3/api/community.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CreateCommunity
String? icon,
String? banner,
bool? nsfw,
bool? postingRestrictedToMods,
required String auth,
}) = _CreateCommunity;

Expand Down Expand Up @@ -163,6 +164,7 @@ class EditCommunity
String? icon,
String? banner,
bool? nsfw,
bool? postingRestrictedToMods,
required String auth,
}) = _EditCommunity;

Expand Down
48 changes: 46 additions & 2 deletions lib/src/v3/api/community.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ mixin _$CreateCommunity {
String? get icon => throw _privateConstructorUsedError;
String? get banner => throw _privateConstructorUsedError;
bool? get nsfw => throw _privateConstructorUsedError;
bool? get postingRestrictedToMods => throw _privateConstructorUsedError;
String get auth => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Expand All @@ -219,6 +220,7 @@ abstract class $CreateCommunityCopyWith<$Res> {
String? icon,
String? banner,
bool? nsfw,
bool? postingRestrictedToMods,
String auth});
}

Expand All @@ -239,6 +241,7 @@ class _$CreateCommunityCopyWithImpl<$Res>
Object? icon = freezed,
Object? banner = freezed,
Object? nsfw = freezed,
Object? postingRestrictedToMods = freezed,
Object? auth = freezed,
}) {
return _then(_value.copyWith(
Expand Down Expand Up @@ -266,6 +269,10 @@ class _$CreateCommunityCopyWithImpl<$Res>
? _value.nsfw
: nsfw // ignore: cast_nullable_to_non_nullable
as bool?,
postingRestrictedToMods: postingRestrictedToMods == freezed
? _value.postingRestrictedToMods
: postingRestrictedToMods // ignore: cast_nullable_to_non_nullable
as bool?,
auth: auth == freezed
? _value.auth
: auth // ignore: cast_nullable_to_non_nullable
Expand All @@ -288,6 +295,7 @@ abstract class _$$_CreateCommunityCopyWith<$Res>
String? icon,
String? banner,
bool? nsfw,
bool? postingRestrictedToMods,
String auth});
}

Expand All @@ -310,6 +318,7 @@ class __$$_CreateCommunityCopyWithImpl<$Res>
Object? icon = freezed,
Object? banner = freezed,
Object? nsfw = freezed,
Object? postingRestrictedToMods = freezed,
Object? auth = freezed,
}) {
return _then(_$_CreateCommunity(
Expand Down Expand Up @@ -337,6 +346,10 @@ class __$$_CreateCommunityCopyWithImpl<$Res>
? _value.nsfw
: nsfw // ignore: cast_nullable_to_non_nullable
as bool?,
postingRestrictedToMods: postingRestrictedToMods == freezed
? _value.postingRestrictedToMods
: postingRestrictedToMods // ignore: cast_nullable_to_non_nullable
as bool?,
auth: auth == freezed
? _value.auth
: auth // ignore: cast_nullable_to_non_nullable
Expand All @@ -356,6 +369,7 @@ class _$_CreateCommunity extends _CreateCommunity {
this.icon,
this.banner,
this.nsfw,
this.postingRestrictedToMods,
required this.auth})
: super._();

Expand All @@ -375,11 +389,13 @@ class _$_CreateCommunity extends _CreateCommunity {
@override
final bool? nsfw;
@override
final bool? postingRestrictedToMods;
@override
final String auth;

@override
String toString() {
return 'CreateCommunity(name: $name, title: $title, description: $description, icon: $icon, banner: $banner, nsfw: $nsfw, auth: $auth)';
return 'CreateCommunity(name: $name, title: $title, description: $description, icon: $icon, banner: $banner, nsfw: $nsfw, postingRestrictedToMods: $postingRestrictedToMods, auth: $auth)';
}

@override
Expand All @@ -394,6 +410,8 @@ class _$_CreateCommunity extends _CreateCommunity {
const DeepCollectionEquality().equals(other.icon, icon) &&
const DeepCollectionEquality().equals(other.banner, banner) &&
const DeepCollectionEquality().equals(other.nsfw, nsfw) &&
const DeepCollectionEquality().equals(
other.postingRestrictedToMods, postingRestrictedToMods) &&
const DeepCollectionEquality().equals(other.auth, auth));
}

Expand All @@ -407,6 +425,7 @@ class _$_CreateCommunity extends _CreateCommunity {
const DeepCollectionEquality().hash(icon),
const DeepCollectionEquality().hash(banner),
const DeepCollectionEquality().hash(nsfw),
const DeepCollectionEquality().hash(postingRestrictedToMods),
const DeepCollectionEquality().hash(auth));

@JsonKey(ignore: true)
Expand All @@ -430,6 +449,7 @@ abstract class _CreateCommunity extends CreateCommunity {
final String? icon,
final String? banner,
final bool? nsfw,
final bool? postingRestrictedToMods,
required final String auth}) = _$_CreateCommunity;
const _CreateCommunity._() : super._();

Expand All @@ -449,6 +469,8 @@ abstract class _CreateCommunity extends CreateCommunity {
@override
bool? get nsfw;
@override
bool? get postingRestrictedToMods;
@override
String get auth;
@override
@JsonKey(ignore: true)
Expand Down Expand Up @@ -1166,6 +1188,7 @@ mixin _$EditCommunity {
String? get icon => throw _privateConstructorUsedError;
String? get banner => throw _privateConstructorUsedError;
bool? get nsfw => throw _privateConstructorUsedError;
bool? get postingRestrictedToMods => throw _privateConstructorUsedError;
String get auth => throw _privateConstructorUsedError;

Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
Expand All @@ -1186,6 +1209,7 @@ abstract class $EditCommunityCopyWith<$Res> {
String? icon,
String? banner,
bool? nsfw,
bool? postingRestrictedToMods,
String auth});
}

Expand All @@ -1206,6 +1230,7 @@ class _$EditCommunityCopyWithImpl<$Res>
Object? icon = freezed,
Object? banner = freezed,
Object? nsfw = freezed,
Object? postingRestrictedToMods = freezed,
Object? auth = freezed,
}) {
return _then(_value.copyWith(
Expand Down Expand Up @@ -1233,6 +1258,10 @@ class _$EditCommunityCopyWithImpl<$Res>
? _value.nsfw
: nsfw // ignore: cast_nullable_to_non_nullable
as bool?,
postingRestrictedToMods: postingRestrictedToMods == freezed
? _value.postingRestrictedToMods
: postingRestrictedToMods // ignore: cast_nullable_to_non_nullable
as bool?,
auth: auth == freezed
? _value.auth
: auth // ignore: cast_nullable_to_non_nullable
Expand All @@ -1255,6 +1284,7 @@ abstract class _$$_EditCommunityCopyWith<$Res>
String? icon,
String? banner,
bool? nsfw,
bool? postingRestrictedToMods,
String auth});
}

Expand All @@ -1277,6 +1307,7 @@ class __$$_EditCommunityCopyWithImpl<$Res>
Object? icon = freezed,
Object? banner = freezed,
Object? nsfw = freezed,
Object? postingRestrictedToMods = freezed,
Object? auth = freezed,
}) {
return _then(_$_EditCommunity(
Expand Down Expand Up @@ -1304,6 +1335,10 @@ class __$$_EditCommunityCopyWithImpl<$Res>
? _value.nsfw
: nsfw // ignore: cast_nullable_to_non_nullable
as bool?,
postingRestrictedToMods: postingRestrictedToMods == freezed
? _value.postingRestrictedToMods
: postingRestrictedToMods // ignore: cast_nullable_to_non_nullable
as bool?,
auth: auth == freezed
? _value.auth
: auth // ignore: cast_nullable_to_non_nullable
Expand All @@ -1323,6 +1358,7 @@ class _$_EditCommunity extends _EditCommunity {
this.icon,
this.banner,
this.nsfw,
this.postingRestrictedToMods,
required this.auth})
: super._();

Expand All @@ -1342,11 +1378,13 @@ class _$_EditCommunity extends _EditCommunity {
@override
final bool? nsfw;
@override
final bool? postingRestrictedToMods;
@override
final String auth;

@override
String toString() {
return 'EditCommunity(communityId: $communityId, title: $title, description: $description, icon: $icon, banner: $banner, nsfw: $nsfw, auth: $auth)';
return 'EditCommunity(communityId: $communityId, title: $title, description: $description, icon: $icon, banner: $banner, nsfw: $nsfw, postingRestrictedToMods: $postingRestrictedToMods, auth: $auth)';
}

@override
Expand All @@ -1362,6 +1400,8 @@ class _$_EditCommunity extends _EditCommunity {
const DeepCollectionEquality().equals(other.icon, icon) &&
const DeepCollectionEquality().equals(other.banner, banner) &&
const DeepCollectionEquality().equals(other.nsfw, nsfw) &&
const DeepCollectionEquality().equals(
other.postingRestrictedToMods, postingRestrictedToMods) &&
const DeepCollectionEquality().equals(other.auth, auth));
}

Expand All @@ -1375,6 +1415,7 @@ class _$_EditCommunity extends _EditCommunity {
const DeepCollectionEquality().hash(icon),
const DeepCollectionEquality().hash(banner),
const DeepCollectionEquality().hash(nsfw),
const DeepCollectionEquality().hash(postingRestrictedToMods),
const DeepCollectionEquality().hash(auth));

@JsonKey(ignore: true)
Expand All @@ -1398,6 +1439,7 @@ abstract class _EditCommunity extends EditCommunity {
final String? icon,
final String? banner,
final bool? nsfw,
final bool? postingRestrictedToMods,
required final String auth}) = _$_EditCommunity;
const _EditCommunity._() : super._();

Expand All @@ -1417,6 +1459,8 @@ abstract class _EditCommunity extends EditCommunity {
@override
bool? get nsfw;
@override
bool? get postingRestrictedToMods;
@override
String get auth;
@override
@JsonKey(ignore: true)
Expand Down
4 changes: 4 additions & 0 deletions lib/src/v3/api/community.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/v3/models/source.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:freezed_annotation/freezed_annotation.dart';

import '../../enums.dart';
import '../../utils/force_utc_datetime.dart';
import '../../utils/serde.dart';
import '../../utils/workaround_settings_index.dart';

Expand Down Expand Up @@ -387,6 +386,7 @@ class CommunitySafe with _$CommunitySafe {
required bool local,
String? icon,
String? banner,
required bool postingRestrictedToMods,
required String instanceHost,
}) = _CommunitySafe;

Expand Down
Loading