start with subscription page

This commit is contained in:
otsmr 2025-05-07 23:39:39 +02:00
parent 60aa52d4da
commit b5a8e785ee
23 changed files with 2121 additions and 180 deletions

View file

@ -40,7 +40,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
// register global callbacks to the widget tree // register global callbacks to the widget tree
globalCallbackConnectionState = (update) { globalCallbackConnectionState = (update) {
context.read<ConnectionChangeProvider>().updateConnectionState(update); context.read<CustomChangeProvider>().updateConnectionState(update);
setupNotificationWithUsers(); setupNotificationWithUsers();
}; };
@ -49,6 +49,10 @@ class _AppState extends State<App> with WidgetsBindingObserver {
Future initAsync() async { Future initAsync() async {
apiProvider.connect(); apiProvider.connect();
final user = await getUser();
if (user != null && context.mounted) {
context.read<CustomChangeProvider>().updatePlan(user.subscriptionPlan);
}
} }
@override @override

View file

@ -43,7 +43,7 @@ void main() async {
MultiProvider( MultiProvider(
providers: [ providers: [
ChangeNotifierProvider(create: (_) => settingsController), ChangeNotifierProvider(create: (_) => settingsController),
ChangeNotifierProvider(create: (_) => ConnectionChangeProvider()), ChangeNotifierProvider(create: (_) => CustomChangeProvider()),
], ],
child: App(), child: App(),
), ),

View file

@ -38,6 +38,8 @@
"@shareImageSearchAllContacts": {}, "@shareImageSearchAllContacts": {},
"searchUsernameInput": "Benutzername", "searchUsernameInput": "Benutzername",
"searchUsernameTitle": "Benutzernamen suchen", "searchUsernameTitle": "Benutzernamen suchen",
"searchUserNamePreview": "Um dich und andere twonly Benutzer vor Spam und Missbrauch zu schützen, ist es nicht möglich, im Preview-Modus nach anderen Personen zu suchen. Andere Benutzer können dich finden und deren Anfragen werden dann hier angezeigt!",
"selectSubscription": "Abo auswählen",
"searchUsernameNotFound": "Benutzername nicht gefunden", "searchUsernameNotFound": "Benutzername nicht gefunden",
"searchUsernameNotFoundBody": "Es wurde kein Benutzer mit dem Benutzernamen \"{username}\" gefunden.", "searchUsernameNotFoundBody": "Es wurde kein Benutzer mit dem Benutzernamen \"{username}\" gefunden.",
"searchUsernameNewFollowerTitle": "Folgeanfragen", "searchUsernameNewFollowerTitle": "Folgeanfragen",

View file

@ -79,7 +79,11 @@
"searchUsernameInput": "Username", "searchUsernameInput": "Username",
"@searchUsernameInput": {}, "@searchUsernameInput": {},
"searchUsernameTitle": "Search username", "searchUsernameTitle": "Search username",
"searchUserNamePreview": "To protect you and other twonly users from spam and abuse, it is not possible to search for other people in preview mode. Other users can find you and their requests will be displayed here!",
"@searchUserNamePreview": {},
"@searchUsernameTitle": {}, "@searchUsernameTitle": {},
"selectSubscription": "Select subscription",
"@selectSubscription": {},
"searchUserNamePending": "Pending", "searchUserNamePending": "Pending",
"@searchUserNamePending": {}, "@searchUserNamePending": {},
"searchUserNameBlockUserTooltip": "Block the user without informing.", "searchUserNameBlockUserTooltip": "Block the user without informing.",

View file

@ -335,6 +335,18 @@ abstract class AppLocalizations {
/// **'Search username'** /// **'Search username'**
String get searchUsernameTitle; String get searchUsernameTitle;
/// No description provided for @searchUserNamePreview.
///
/// In en, this message translates to:
/// **'To protect you and other twonly users from spam and abuse, it is not possible to search for other people in preview mode. Other users can find you and their requests will be displayed here!'**
String get searchUserNamePreview;
/// No description provided for @selectSubscription.
///
/// In en, this message translates to:
/// **'Select subscription'**
String get selectSubscription;
/// No description provided for @searchUserNamePending. /// No description provided for @searchUserNamePending.
/// ///
/// In en, this message translates to: /// In en, this message translates to:

View file

@ -128,6 +128,12 @@ class AppLocalizationsDe extends AppLocalizations {
@override @override
String get searchUsernameTitle => 'Benutzernamen suchen'; String get searchUsernameTitle => 'Benutzernamen suchen';
@override
String get searchUserNamePreview => 'Um dich und andere twonly Benutzer vor Spam und Missbrauch zu schützen, ist es nicht möglich, im Preview-Modus nach anderen Personen zu suchen. Andere Benutzer können dich finden und deren Anfragen werden dann hier angezeigt!';
@override
String get selectSubscription => 'Abo auswählen';
@override @override
String get searchUserNamePending => 'Ausstehend'; String get searchUserNamePending => 'Ausstehend';

View file

@ -128,6 +128,12 @@ class AppLocalizationsEn extends AppLocalizations {
@override @override
String get searchUsernameTitle => 'Search username'; String get searchUsernameTitle => 'Search username';
@override
String get searchUserNamePreview => 'To protect you and other twonly users from spam and abuse, it is not possible to search for other people in preview mode. Other users can find you and their requests will be displayed here!';
@override
String get selectSubscription => 'Select subscription';
@override @override
String get searchUserNamePending => 'Pending'; String get searchUserNamePending => 'Pending';

View file

@ -4,11 +4,11 @@ part 'userdata.g.dart';
@JsonSerializable() @JsonSerializable()
class UserData { class UserData {
UserData({ UserData(
required this.userId, {required this.userId,
required this.username, required this.username,
required this.displayName, required this.displayName,
}); required this.subscriptionPlan});
String username; String username;
String displayName; String displayName;
@ -19,6 +19,8 @@ class UserData {
// settings // settings
int? defaultShowTime; int? defaultShowTime;
@JsonKey(defaultValue: "Preview")
String subscriptionPlan;
bool? useHighQuality; bool? useHighQuality;
List<String>? preSelectedEmojies; List<String>? preSelectedEmojies;
ThemeMode? themeMode; ThemeMode? themeMode;

View file

@ -10,6 +10,7 @@ UserData _$UserDataFromJson(Map<String, dynamic> json) => UserData(
userId: (json['userId'] as num).toInt(), userId: (json['userId'] as num).toInt(),
username: json['username'] as String, username: json['username'] as String,
displayName: json['displayName'] as String, displayName: json['displayName'] as String,
subscriptionPlan: json['subscriptionPlan'] as String? ?? 'Preview',
) )
..avatarSvg = json['avatarSvg'] as String? ..avatarSvg = json['avatarSvg'] as String?
..avatarJson = json['avatarJson'] as String? ..avatarJson = json['avatarJson'] as String?
@ -37,6 +38,7 @@ Map<String, dynamic> _$UserDataToJson(UserData instance) => <String, dynamic>{
'avatarJson': instance.avatarJson, 'avatarJson': instance.avatarJson,
'avatarCounter': instance.avatarCounter, 'avatarCounter': instance.avatarCounter,
'defaultShowTime': instance.defaultShowTime, 'defaultShowTime': instance.defaultShowTime,
'subscriptionPlan': instance.subscriptionPlan,
'useHighQuality': instance.useHighQuality, 'useHighQuality': instance.useHighQuality,
'preSelectedEmojies': instance.preSelectedEmojies, 'preSelectedEmojies': instance.preSelectedEmojies,
'themeMode': _$ThemeModeEnumMap[instance.themeMode], 'themeMode': _$ThemeModeEnumMap[instance.themeMode],

View file

@ -865,6 +865,170 @@ class ApplicationData_GetUserById extends $pb.GeneratedMessage {
void clearUserId() => clearField(1); void clearUserId() => clearField(1);
} }
class ApplicationData_RedeemVoucher extends $pb.GeneratedMessage {
factory ApplicationData_RedeemVoucher({
$core.String? voucher,
}) {
final $result = create();
if (voucher != null) {
$result.voucher = voucher;
}
return $result;
}
ApplicationData_RedeemVoucher._() : super();
factory ApplicationData_RedeemVoucher.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_RedeemVoucher.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.RedeemVoucher', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'voucher')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_RedeemVoucher clone() => ApplicationData_RedeemVoucher()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_RedeemVoucher copyWith(void Function(ApplicationData_RedeemVoucher) updates) => super.copyWith((message) => updates(message as ApplicationData_RedeemVoucher)) as ApplicationData_RedeemVoucher;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_RedeemVoucher create() => ApplicationData_RedeemVoucher._();
ApplicationData_RedeemVoucher createEmptyInstance() => create();
static $pb.PbList<ApplicationData_RedeemVoucher> createRepeated() => $pb.PbList<ApplicationData_RedeemVoucher>();
@$core.pragma('dart2js:noInline')
static ApplicationData_RedeemVoucher getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_RedeemVoucher>(create);
static ApplicationData_RedeemVoucher? _defaultInstance;
@$pb.TagNumber(1)
$core.String get voucher => $_getSZ(0);
@$pb.TagNumber(1)
set voucher($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasVoucher() => $_has(0);
@$pb.TagNumber(1)
void clearVoucher() => clearField(1);
}
class ApplicationData_SwitchToPayedPlan extends $pb.GeneratedMessage {
factory ApplicationData_SwitchToPayedPlan({
$core.String? planId,
$core.bool? payMonthly,
}) {
final $result = create();
if (planId != null) {
$result.planId = planId;
}
if (payMonthly != null) {
$result.payMonthly = payMonthly;
}
return $result;
}
ApplicationData_SwitchToPayedPlan._() : super();
factory ApplicationData_SwitchToPayedPlan.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_SwitchToPayedPlan.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.SwitchToPayedPlan', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'planId')
..aOB(2, _omitFieldNames ? '' : 'payMonthly')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_SwitchToPayedPlan clone() => ApplicationData_SwitchToPayedPlan()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_SwitchToPayedPlan copyWith(void Function(ApplicationData_SwitchToPayedPlan) updates) => super.copyWith((message) => updates(message as ApplicationData_SwitchToPayedPlan)) as ApplicationData_SwitchToPayedPlan;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_SwitchToPayedPlan create() => ApplicationData_SwitchToPayedPlan._();
ApplicationData_SwitchToPayedPlan createEmptyInstance() => create();
static $pb.PbList<ApplicationData_SwitchToPayedPlan> createRepeated() => $pb.PbList<ApplicationData_SwitchToPayedPlan>();
@$core.pragma('dart2js:noInline')
static ApplicationData_SwitchToPayedPlan getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_SwitchToPayedPlan>(create);
static ApplicationData_SwitchToPayedPlan? _defaultInstance;
@$pb.TagNumber(1)
$core.String get planId => $_getSZ(0);
@$pb.TagNumber(1)
set planId($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasPlanId() => $_has(0);
@$pb.TagNumber(1)
void clearPlanId() => clearField(1);
@$pb.TagNumber(2)
$core.bool get payMonthly => $_getBF(1);
@$pb.TagNumber(2)
set payMonthly($core.bool v) { $_setBool(1, v); }
@$pb.TagNumber(2)
$core.bool hasPayMonthly() => $_has(1);
@$pb.TagNumber(2)
void clearPayMonthly() => clearField(2);
}
class ApplicationData_CreateVoucher extends $pb.GeneratedMessage {
factory ApplicationData_CreateVoucher({
$core.int? valueCents,
}) {
final $result = create();
if (valueCents != null) {
$result.valueCents = valueCents;
}
return $result;
}
ApplicationData_CreateVoucher._() : super();
factory ApplicationData_CreateVoucher.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_CreateVoucher.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.CreateVoucher', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..a<$core.int>(1, _omitFieldNames ? '' : 'valueCents', $pb.PbFieldType.OU3)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_CreateVoucher clone() => ApplicationData_CreateVoucher()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_CreateVoucher copyWith(void Function(ApplicationData_CreateVoucher) updates) => super.copyWith((message) => updates(message as ApplicationData_CreateVoucher)) as ApplicationData_CreateVoucher;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_CreateVoucher create() => ApplicationData_CreateVoucher._();
ApplicationData_CreateVoucher createEmptyInstance() => create();
static $pb.PbList<ApplicationData_CreateVoucher> createRepeated() => $pb.PbList<ApplicationData_CreateVoucher>();
@$core.pragma('dart2js:noInline')
static ApplicationData_CreateVoucher getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_CreateVoucher>(create);
static ApplicationData_CreateVoucher? _defaultInstance;
@$pb.TagNumber(1)
$core.int get valueCents => $_getIZ(0);
@$pb.TagNumber(1)
set valueCents($core.int v) { $_setUnsignedInt32(0, v); }
@$pb.TagNumber(1)
$core.bool hasValueCents() => $_has(0);
@$pb.TagNumber(1)
void clearValueCents() => clearField(1);
}
class ApplicationData_GetLocation extends $pb.GeneratedMessage { class ApplicationData_GetLocation extends $pb.GeneratedMessage {
factory ApplicationData_GetLocation() => create(); factory ApplicationData_GetLocation() => create();
ApplicationData_GetLocation._() : super(); ApplicationData_GetLocation._() : super();
@ -897,6 +1061,184 @@ class ApplicationData_GetLocation extends $pb.GeneratedMessage {
static ApplicationData_GetLocation? _defaultInstance; static ApplicationData_GetLocation? _defaultInstance;
} }
class ApplicationData_GetVouchers extends $pb.GeneratedMessage {
factory ApplicationData_GetVouchers() => create();
ApplicationData_GetVouchers._() : super();
factory ApplicationData_GetVouchers.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_GetVouchers.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.GetVouchers', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_GetVouchers clone() => ApplicationData_GetVouchers()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_GetVouchers copyWith(void Function(ApplicationData_GetVouchers) updates) => super.copyWith((message) => updates(message as ApplicationData_GetVouchers)) as ApplicationData_GetVouchers;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_GetVouchers create() => ApplicationData_GetVouchers._();
ApplicationData_GetVouchers createEmptyInstance() => create();
static $pb.PbList<ApplicationData_GetVouchers> createRepeated() => $pb.PbList<ApplicationData_GetVouchers>();
@$core.pragma('dart2js:noInline')
static ApplicationData_GetVouchers getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_GetVouchers>(create);
static ApplicationData_GetVouchers? _defaultInstance;
}
class ApplicationData_GetAvailablePlans extends $pb.GeneratedMessage {
factory ApplicationData_GetAvailablePlans() => create();
ApplicationData_GetAvailablePlans._() : super();
factory ApplicationData_GetAvailablePlans.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_GetAvailablePlans.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.GetAvailablePlans', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_GetAvailablePlans clone() => ApplicationData_GetAvailablePlans()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_GetAvailablePlans copyWith(void Function(ApplicationData_GetAvailablePlans) updates) => super.copyWith((message) => updates(message as ApplicationData_GetAvailablePlans)) as ApplicationData_GetAvailablePlans;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_GetAvailablePlans create() => ApplicationData_GetAvailablePlans._();
ApplicationData_GetAvailablePlans createEmptyInstance() => create();
static $pb.PbList<ApplicationData_GetAvailablePlans> createRepeated() => $pb.PbList<ApplicationData_GetAvailablePlans>();
@$core.pragma('dart2js:noInline')
static ApplicationData_GetAvailablePlans getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_GetAvailablePlans>(create);
static ApplicationData_GetAvailablePlans? _defaultInstance;
}
class ApplicationData_GetAddAccountsInvites extends $pb.GeneratedMessage {
factory ApplicationData_GetAddAccountsInvites() => create();
ApplicationData_GetAddAccountsInvites._() : super();
factory ApplicationData_GetAddAccountsInvites.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_GetAddAccountsInvites.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.GetAddAccountsInvites', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_GetAddAccountsInvites clone() => ApplicationData_GetAddAccountsInvites()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_GetAddAccountsInvites copyWith(void Function(ApplicationData_GetAddAccountsInvites) updates) => super.copyWith((message) => updates(message as ApplicationData_GetAddAccountsInvites)) as ApplicationData_GetAddAccountsInvites;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_GetAddAccountsInvites create() => ApplicationData_GetAddAccountsInvites._();
ApplicationData_GetAddAccountsInvites createEmptyInstance() => create();
static $pb.PbList<ApplicationData_GetAddAccountsInvites> createRepeated() => $pb.PbList<ApplicationData_GetAddAccountsInvites>();
@$core.pragma('dart2js:noInline')
static ApplicationData_GetAddAccountsInvites getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_GetAddAccountsInvites>(create);
static ApplicationData_GetAddAccountsInvites? _defaultInstance;
}
class ApplicationData_GetCurrentPlanInfos extends $pb.GeneratedMessage {
factory ApplicationData_GetCurrentPlanInfos() => create();
ApplicationData_GetCurrentPlanInfos._() : super();
factory ApplicationData_GetCurrentPlanInfos.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_GetCurrentPlanInfos.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.GetCurrentPlanInfos', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_GetCurrentPlanInfos clone() => ApplicationData_GetCurrentPlanInfos()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_GetCurrentPlanInfos copyWith(void Function(ApplicationData_GetCurrentPlanInfos) updates) => super.copyWith((message) => updates(message as ApplicationData_GetCurrentPlanInfos)) as ApplicationData_GetCurrentPlanInfos;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_GetCurrentPlanInfos create() => ApplicationData_GetCurrentPlanInfos._();
ApplicationData_GetCurrentPlanInfos createEmptyInstance() => create();
static $pb.PbList<ApplicationData_GetCurrentPlanInfos> createRepeated() => $pb.PbList<ApplicationData_GetCurrentPlanInfos>();
@$core.pragma('dart2js:noInline')
static ApplicationData_GetCurrentPlanInfos getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_GetCurrentPlanInfos>(create);
static ApplicationData_GetCurrentPlanInfos? _defaultInstance;
}
class ApplicationData_RedeemAdditionalCode extends $pb.GeneratedMessage {
factory ApplicationData_RedeemAdditionalCode({
$core.String? inviteCode,
}) {
final $result = create();
if (inviteCode != null) {
$result.inviteCode = inviteCode;
}
return $result;
}
ApplicationData_RedeemAdditionalCode._() : super();
factory ApplicationData_RedeemAdditionalCode.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory ApplicationData_RedeemAdditionalCode.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData.RedeemAdditionalCode', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..aOS(2, _omitFieldNames ? '' : 'inviteCode')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
ApplicationData_RedeemAdditionalCode clone() => ApplicationData_RedeemAdditionalCode()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
ApplicationData_RedeemAdditionalCode copyWith(void Function(ApplicationData_RedeemAdditionalCode) updates) => super.copyWith((message) => updates(message as ApplicationData_RedeemAdditionalCode)) as ApplicationData_RedeemAdditionalCode;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static ApplicationData_RedeemAdditionalCode create() => ApplicationData_RedeemAdditionalCode._();
ApplicationData_RedeemAdditionalCode createEmptyInstance() => create();
static $pb.PbList<ApplicationData_RedeemAdditionalCode> createRepeated() => $pb.PbList<ApplicationData_RedeemAdditionalCode>();
@$core.pragma('dart2js:noInline')
static ApplicationData_RedeemAdditionalCode getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ApplicationData_RedeemAdditionalCode>(create);
static ApplicationData_RedeemAdditionalCode? _defaultInstance;
@$pb.TagNumber(2)
$core.String get inviteCode => $_getSZ(0);
@$pb.TagNumber(2)
set inviteCode($core.String v) { $_setString(0, v); }
@$pb.TagNumber(2)
$core.bool hasInviteCode() => $_has(0);
@$pb.TagNumber(2)
void clearInviteCode() => clearField(2);
}
class ApplicationData_GetPrekeysByUserId extends $pb.GeneratedMessage { class ApplicationData_GetPrekeysByUserId extends $pb.GeneratedMessage {
factory ApplicationData_GetPrekeysByUserId({ factory ApplicationData_GetPrekeysByUserId({
$fixnum.Int64? userId, $fixnum.Int64? userId,
@ -1163,6 +1505,14 @@ enum ApplicationData_ApplicationData {
downloaddata, downloaddata,
updategooglefcmtoken, updategooglefcmtoken,
getlocation, getlocation,
getcurrentplaninfos,
redeemvoucher,
getavailableplans,
createvoucher,
getvouchers,
switchtopayedplan,
getaddaccountsinvites,
redeemadditionalcode,
notSet notSet
} }
@ -1177,6 +1527,14 @@ class ApplicationData extends $pb.GeneratedMessage {
ApplicationData_DownloadData? downloaddata, ApplicationData_DownloadData? downloaddata,
ApplicationData_UpdateGoogleFcmToken? updategooglefcmtoken, ApplicationData_UpdateGoogleFcmToken? updategooglefcmtoken,
ApplicationData_GetLocation? getlocation, ApplicationData_GetLocation? getlocation,
ApplicationData_GetCurrentPlanInfos? getcurrentplaninfos,
ApplicationData_RedeemVoucher? redeemvoucher,
ApplicationData_GetAvailablePlans? getavailableplans,
ApplicationData_CreateVoucher? createvoucher,
ApplicationData_GetVouchers? getvouchers,
ApplicationData_SwitchToPayedPlan? switchtopayedplan,
ApplicationData_GetAddAccountsInvites? getaddaccountsinvites,
ApplicationData_RedeemAdditionalCode? redeemadditionalcode,
}) { }) {
final $result = create(); final $result = create();
if (textmessage != null) { if (textmessage != null) {
@ -1206,6 +1564,30 @@ class ApplicationData extends $pb.GeneratedMessage {
if (getlocation != null) { if (getlocation != null) {
$result.getlocation = getlocation; $result.getlocation = getlocation;
} }
if (getcurrentplaninfos != null) {
$result.getcurrentplaninfos = getcurrentplaninfos;
}
if (redeemvoucher != null) {
$result.redeemvoucher = redeemvoucher;
}
if (getavailableplans != null) {
$result.getavailableplans = getavailableplans;
}
if (createvoucher != null) {
$result.createvoucher = createvoucher;
}
if (getvouchers != null) {
$result.getvouchers = getvouchers;
}
if (switchtopayedplan != null) {
$result.switchtopayedplan = switchtopayedplan;
}
if (getaddaccountsinvites != null) {
$result.getaddaccountsinvites = getaddaccountsinvites;
}
if (redeemadditionalcode != null) {
$result.redeemadditionalcode = redeemadditionalcode;
}
return $result; return $result;
} }
ApplicationData._() : super(); ApplicationData._() : super();
@ -1222,10 +1604,18 @@ class ApplicationData extends $pb.GeneratedMessage {
7 : ApplicationData_ApplicationData.downloaddata, 7 : ApplicationData_ApplicationData.downloaddata,
8 : ApplicationData_ApplicationData.updategooglefcmtoken, 8 : ApplicationData_ApplicationData.updategooglefcmtoken,
9 : ApplicationData_ApplicationData.getlocation, 9 : ApplicationData_ApplicationData.getlocation,
10 : ApplicationData_ApplicationData.getcurrentplaninfos,
11 : ApplicationData_ApplicationData.redeemvoucher,
12 : ApplicationData_ApplicationData.getavailableplans,
13 : ApplicationData_ApplicationData.createvoucher,
14 : ApplicationData_ApplicationData.getvouchers,
15 : ApplicationData_ApplicationData.switchtopayedplan,
16 : ApplicationData_ApplicationData.getaddaccountsinvites,
17 : ApplicationData_ApplicationData.redeemadditionalcode,
0 : ApplicationData_ApplicationData.notSet 0 : ApplicationData_ApplicationData.notSet
}; };
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ApplicationData', package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create)
..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9]) ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])
..aOM<ApplicationData_TextMessage>(1, _omitFieldNames ? '' : 'textmessage', subBuilder: ApplicationData_TextMessage.create) ..aOM<ApplicationData_TextMessage>(1, _omitFieldNames ? '' : 'textmessage', subBuilder: ApplicationData_TextMessage.create)
..aOM<ApplicationData_GetUserByUsername>(2, _omitFieldNames ? '' : 'getuserbyusername', subBuilder: ApplicationData_GetUserByUsername.create) ..aOM<ApplicationData_GetUserByUsername>(2, _omitFieldNames ? '' : 'getuserbyusername', subBuilder: ApplicationData_GetUserByUsername.create)
..aOM<ApplicationData_GetPrekeysByUserId>(3, _omitFieldNames ? '' : 'getprekeysbyuserid', subBuilder: ApplicationData_GetPrekeysByUserId.create) ..aOM<ApplicationData_GetPrekeysByUserId>(3, _omitFieldNames ? '' : 'getprekeysbyuserid', subBuilder: ApplicationData_GetPrekeysByUserId.create)
@ -1235,6 +1625,14 @@ class ApplicationData extends $pb.GeneratedMessage {
..aOM<ApplicationData_DownloadData>(7, _omitFieldNames ? '' : 'downloaddata', subBuilder: ApplicationData_DownloadData.create) ..aOM<ApplicationData_DownloadData>(7, _omitFieldNames ? '' : 'downloaddata', subBuilder: ApplicationData_DownloadData.create)
..aOM<ApplicationData_UpdateGoogleFcmToken>(8, _omitFieldNames ? '' : 'updategooglefcmtoken', subBuilder: ApplicationData_UpdateGoogleFcmToken.create) ..aOM<ApplicationData_UpdateGoogleFcmToken>(8, _omitFieldNames ? '' : 'updategooglefcmtoken', subBuilder: ApplicationData_UpdateGoogleFcmToken.create)
..aOM<ApplicationData_GetLocation>(9, _omitFieldNames ? '' : 'getlocation', subBuilder: ApplicationData_GetLocation.create) ..aOM<ApplicationData_GetLocation>(9, _omitFieldNames ? '' : 'getlocation', subBuilder: ApplicationData_GetLocation.create)
..aOM<ApplicationData_GetCurrentPlanInfos>(10, _omitFieldNames ? '' : 'getcurrentplaninfos', subBuilder: ApplicationData_GetCurrentPlanInfos.create)
..aOM<ApplicationData_RedeemVoucher>(11, _omitFieldNames ? '' : 'redeemvoucher', subBuilder: ApplicationData_RedeemVoucher.create)
..aOM<ApplicationData_GetAvailablePlans>(12, _omitFieldNames ? '' : 'getavailableplans', subBuilder: ApplicationData_GetAvailablePlans.create)
..aOM<ApplicationData_CreateVoucher>(13, _omitFieldNames ? '' : 'createvoucher', subBuilder: ApplicationData_CreateVoucher.create)
..aOM<ApplicationData_GetVouchers>(14, _omitFieldNames ? '' : 'getvouchers', subBuilder: ApplicationData_GetVouchers.create)
..aOM<ApplicationData_SwitchToPayedPlan>(15, _omitFieldNames ? '' : 'Switchtopayedplan', protoName: 'Switchtopayedplan', subBuilder: ApplicationData_SwitchToPayedPlan.create)
..aOM<ApplicationData_GetAddAccountsInvites>(16, _omitFieldNames ? '' : 'getaddaccountsinvites', subBuilder: ApplicationData_GetAddAccountsInvites.create)
..aOM<ApplicationData_RedeemAdditionalCode>(17, _omitFieldNames ? '' : 'redeemadditionalcode', subBuilder: ApplicationData_RedeemAdditionalCode.create)
..hasRequiredFields = false ..hasRequiredFields = false
; ;
@ -1360,6 +1758,94 @@ class ApplicationData extends $pb.GeneratedMessage {
void clearGetlocation() => clearField(9); void clearGetlocation() => clearField(9);
@$pb.TagNumber(9) @$pb.TagNumber(9)
ApplicationData_GetLocation ensureGetlocation() => $_ensure(8); ApplicationData_GetLocation ensureGetlocation() => $_ensure(8);
@$pb.TagNumber(10)
ApplicationData_GetCurrentPlanInfos get getcurrentplaninfos => $_getN(9);
@$pb.TagNumber(10)
set getcurrentplaninfos(ApplicationData_GetCurrentPlanInfos v) { setField(10, v); }
@$pb.TagNumber(10)
$core.bool hasGetcurrentplaninfos() => $_has(9);
@$pb.TagNumber(10)
void clearGetcurrentplaninfos() => clearField(10);
@$pb.TagNumber(10)
ApplicationData_GetCurrentPlanInfos ensureGetcurrentplaninfos() => $_ensure(9);
@$pb.TagNumber(11)
ApplicationData_RedeemVoucher get redeemvoucher => $_getN(10);
@$pb.TagNumber(11)
set redeemvoucher(ApplicationData_RedeemVoucher v) { setField(11, v); }
@$pb.TagNumber(11)
$core.bool hasRedeemvoucher() => $_has(10);
@$pb.TagNumber(11)
void clearRedeemvoucher() => clearField(11);
@$pb.TagNumber(11)
ApplicationData_RedeemVoucher ensureRedeemvoucher() => $_ensure(10);
@$pb.TagNumber(12)
ApplicationData_GetAvailablePlans get getavailableplans => $_getN(11);
@$pb.TagNumber(12)
set getavailableplans(ApplicationData_GetAvailablePlans v) { setField(12, v); }
@$pb.TagNumber(12)
$core.bool hasGetavailableplans() => $_has(11);
@$pb.TagNumber(12)
void clearGetavailableplans() => clearField(12);
@$pb.TagNumber(12)
ApplicationData_GetAvailablePlans ensureGetavailableplans() => $_ensure(11);
@$pb.TagNumber(13)
ApplicationData_CreateVoucher get createvoucher => $_getN(12);
@$pb.TagNumber(13)
set createvoucher(ApplicationData_CreateVoucher v) { setField(13, v); }
@$pb.TagNumber(13)
$core.bool hasCreatevoucher() => $_has(12);
@$pb.TagNumber(13)
void clearCreatevoucher() => clearField(13);
@$pb.TagNumber(13)
ApplicationData_CreateVoucher ensureCreatevoucher() => $_ensure(12);
@$pb.TagNumber(14)
ApplicationData_GetVouchers get getvouchers => $_getN(13);
@$pb.TagNumber(14)
set getvouchers(ApplicationData_GetVouchers v) { setField(14, v); }
@$pb.TagNumber(14)
$core.bool hasGetvouchers() => $_has(13);
@$pb.TagNumber(14)
void clearGetvouchers() => clearField(14);
@$pb.TagNumber(14)
ApplicationData_GetVouchers ensureGetvouchers() => $_ensure(13);
@$pb.TagNumber(15)
ApplicationData_SwitchToPayedPlan get switchtopayedplan => $_getN(14);
@$pb.TagNumber(15)
set switchtopayedplan(ApplicationData_SwitchToPayedPlan v) { setField(15, v); }
@$pb.TagNumber(15)
$core.bool hasSwitchtopayedplan() => $_has(14);
@$pb.TagNumber(15)
void clearSwitchtopayedplan() => clearField(15);
@$pb.TagNumber(15)
ApplicationData_SwitchToPayedPlan ensureSwitchtopayedplan() => $_ensure(14);
@$pb.TagNumber(16)
ApplicationData_GetAddAccountsInvites get getaddaccountsinvites => $_getN(15);
@$pb.TagNumber(16)
set getaddaccountsinvites(ApplicationData_GetAddAccountsInvites v) { setField(16, v); }
@$pb.TagNumber(16)
$core.bool hasGetaddaccountsinvites() => $_has(15);
@$pb.TagNumber(16)
void clearGetaddaccountsinvites() => clearField(16);
@$pb.TagNumber(16)
ApplicationData_GetAddAccountsInvites ensureGetaddaccountsinvites() => $_ensure(15);
@$pb.TagNumber(17)
ApplicationData_RedeemAdditionalCode get redeemadditionalcode => $_getN(16);
@$pb.TagNumber(17)
set redeemadditionalcode(ApplicationData_RedeemAdditionalCode v) { setField(17, v); }
@$pb.TagNumber(17)
$core.bool hasRedeemadditionalcode() => $_has(16);
@$pb.TagNumber(17)
void clearRedeemadditionalcode() => clearField(17);
@$pb.TagNumber(17)
ApplicationData_RedeemAdditionalCode ensureRedeemadditionalcode() => $_ensure(16);
} }
class Response_PreKey extends $pb.GeneratedMessage { class Response_PreKey extends $pb.GeneratedMessage {

View file

@ -145,8 +145,16 @@ const ApplicationData$json = {
{'1': 'downloaddata', '3': 7, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.DownloadData', '9': 0, '10': 'downloaddata'}, {'1': 'downloaddata', '3': 7, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.DownloadData', '9': 0, '10': 'downloaddata'},
{'1': 'updategooglefcmtoken', '3': 8, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.UpdateGoogleFcmToken', '9': 0, '10': 'updategooglefcmtoken'}, {'1': 'updategooglefcmtoken', '3': 8, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.UpdateGoogleFcmToken', '9': 0, '10': 'updategooglefcmtoken'},
{'1': 'getlocation', '3': 9, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetLocation', '9': 0, '10': 'getlocation'}, {'1': 'getlocation', '3': 9, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetLocation', '9': 0, '10': 'getlocation'},
{'1': 'getcurrentplaninfos', '3': 10, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetCurrentPlanInfos', '9': 0, '10': 'getcurrentplaninfos'},
{'1': 'redeemvoucher', '3': 11, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.RedeemVoucher', '9': 0, '10': 'redeemvoucher'},
{'1': 'getavailableplans', '3': 12, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetAvailablePlans', '9': 0, '10': 'getavailableplans'},
{'1': 'createvoucher', '3': 13, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.CreateVoucher', '9': 0, '10': 'createvoucher'},
{'1': 'getvouchers', '3': 14, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetVouchers', '9': 0, '10': 'getvouchers'},
{'1': 'Switchtopayedplan', '3': 15, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.SwitchToPayedPlan', '9': 0, '10': 'Switchtopayedplan'},
{'1': 'getaddaccountsinvites', '3': 16, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.GetAddAccountsInvites', '9': 0, '10': 'getaddaccountsinvites'},
{'1': 'redeemadditionalcode', '3': 17, '4': 1, '5': 11, '6': '.client_to_server.ApplicationData.RedeemAdditionalCode', '9': 0, '10': 'redeemadditionalcode'},
], ],
'3': [ApplicationData_TextMessage$json, ApplicationData_GetUserByUsername$json, ApplicationData_UpdateGoogleFcmToken$json, ApplicationData_GetUserById$json, ApplicationData_GetLocation$json, ApplicationData_GetPrekeysByUserId$json, ApplicationData_GetUploadToken$json, ApplicationData_UploadData$json, ApplicationData_DownloadData$json], '3': [ApplicationData_TextMessage$json, ApplicationData_GetUserByUsername$json, ApplicationData_UpdateGoogleFcmToken$json, ApplicationData_GetUserById$json, ApplicationData_RedeemVoucher$json, ApplicationData_SwitchToPayedPlan$json, ApplicationData_CreateVoucher$json, ApplicationData_GetLocation$json, ApplicationData_GetVouchers$json, ApplicationData_GetAvailablePlans$json, ApplicationData_GetAddAccountsInvites$json, ApplicationData_GetCurrentPlanInfos$json, ApplicationData_RedeemAdditionalCode$json, ApplicationData_GetPrekeysByUserId$json, ApplicationData_GetUploadToken$json, ApplicationData_UploadData$json, ApplicationData_DownloadData$json],
'8': [ '8': [
{'1': 'ApplicationData'}, {'1': 'ApplicationData'},
], ],
@ -189,11 +197,64 @@ const ApplicationData_GetUserById$json = {
], ],
}; };
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_RedeemVoucher$json = {
'1': 'RedeemVoucher',
'2': [
{'1': 'voucher', '3': 1, '4': 1, '5': 9, '10': 'voucher'},
],
};
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_SwitchToPayedPlan$json = {
'1': 'SwitchToPayedPlan',
'2': [
{'1': 'plan_id', '3': 1, '4': 1, '5': 9, '10': 'planId'},
{'1': 'pay_monthly', '3': 2, '4': 1, '5': 8, '10': 'payMonthly'},
],
};
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_CreateVoucher$json = {
'1': 'CreateVoucher',
'2': [
{'1': 'value_cents', '3': 1, '4': 1, '5': 13, '10': 'valueCents'},
],
};
@$core.Deprecated('Use applicationDataDescriptor instead') @$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_GetLocation$json = { const ApplicationData_GetLocation$json = {
'1': 'GetLocation', '1': 'GetLocation',
}; };
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_GetVouchers$json = {
'1': 'GetVouchers',
};
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_GetAvailablePlans$json = {
'1': 'GetAvailablePlans',
};
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_GetAddAccountsInvites$json = {
'1': 'GetAddAccountsInvites',
};
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_GetCurrentPlanInfos$json = {
'1': 'GetCurrentPlanInfos',
};
@$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_RedeemAdditionalCode$json = {
'1': 'RedeemAdditionalCode',
'2': [
{'1': 'invite_code', '3': 2, '4': 1, '5': 9, '10': 'inviteCode'},
],
};
@$core.Deprecated('Use applicationDataDescriptor instead') @$core.Deprecated('Use applicationDataDescriptor instead')
const ApplicationData_GetPrekeysByUserId$json = { const ApplicationData_GetPrekeysByUserId$json = {
'1': 'GetPrekeysByUserId', '1': 'GetPrekeysByUserId',
@ -250,18 +311,38 @@ final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode(
'b2tlbhgIIAEoCzI2LmNsaWVudF90b19zZXJ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mVrZXlzQnlVc2VySWQSFwoHdXNlcl9pZBgBIAEoA1IGdXNlcklkGjsKDkdldFVwbG9hZFRva2'
'VuEikKEHJlY2lwaWVudHNfY291bnQYASABKA1SD3JlY2lwaWVudHNDb3VudBqJAQoKVXBsb2Fk'
'RGF0YRIhCgx1cGxvYWRfdG9rZW4YASABKAxSC3VwbG9hZFRva2VuEhYKBm9mZnNldBgCIAEoDV'
'IGb2Zmc2V0EhIKBGRhdGEYAyABKAxSBGRhdGESHwoIY2hlY2tzdW0YBCABKAxIAFIIY2hlY2tz'
'dW2IAQFCCwoJX2NoZWNrc3VtGk0KDERvd25sb2FkRGF0YRIlCg5kb3dubG9hZF90b2tlbhgBIA'
'EoDFINZG93bmxvYWRUb2tlbhIWCgZvZmZzZXQYAiABKA1SBm9mZnNldEIRCg9BcHBsaWNhdGlv'
'bkRhdGE=');
@$core.Deprecated('Use responseDescriptor instead') @$core.Deprecated('Use responseDescriptor instead')
const Response$json = { const Response$json = {

View file

@ -37,6 +37,11 @@ class ErrorCode extends $pb.ProtobufEnum {
static const ErrorCode ApiEndpointNotFound = ErrorCode._(1018, _omitEnumNames ? '' : 'ApiEndpointNotFound'); static const ErrorCode ApiEndpointNotFound = ErrorCode._(1018, _omitEnumNames ? '' : 'ApiEndpointNotFound');
static const ErrorCode AuthTokenNotValid = ErrorCode._(1019, _omitEnumNames ? '' : 'AuthTokenNotValid'); static const ErrorCode AuthTokenNotValid = ErrorCode._(1019, _omitEnumNames ? '' : 'AuthTokenNotValid');
static const ErrorCode InvalidPreKeys = ErrorCode._(1020, _omitEnumNames ? '' : 'InvalidPreKeys'); static const ErrorCode InvalidPreKeys = ErrorCode._(1020, _omitEnumNames ? '' : 'InvalidPreKeys');
static const ErrorCode VoucherInValid = ErrorCode._(1021, _omitEnumNames ? '' : 'VoucherInValid');
static const ErrorCode PlanNotAllowed = ErrorCode._(1022, _omitEnumNames ? '' : 'PlanNotAllowed');
static const ErrorCode PlanLimitReached = ErrorCode._(1023, _omitEnumNames ? '' : 'PlanLimitReached');
static const ErrorCode NotEnoughCredit = ErrorCode._(1024, _omitEnumNames ? '' : 'NotEnoughCredit');
static const ErrorCode PlanDowngrade = ErrorCode._(1025, _omitEnumNames ? '' : 'PlanDowngrade');
static const $core.List<ErrorCode> values = <ErrorCode> [ static const $core.List<ErrorCode> values = <ErrorCode> [
Unknown, Unknown,
@ -62,6 +67,11 @@ class ErrorCode extends $pb.ProtobufEnum {
ApiEndpointNotFound, ApiEndpointNotFound,
AuthTokenNotValid, AuthTokenNotValid,
InvalidPreKeys, InvalidPreKeys,
VoucherInValid,
PlanNotAllowed,
PlanLimitReached,
NotEnoughCredit,
PlanDowngrade,
]; ];
static final $core.Map<$core.int, ErrorCode> _byValue = $pb.ProtobufEnum.initByValue(values); static final $core.Map<$core.int, ErrorCode> _byValue = $pb.ProtobufEnum.initByValue(values);

View file

@ -40,6 +40,11 @@ const ErrorCode$json = {
{'1': 'ApiEndpointNotFound', '2': 1018}, {'1': 'ApiEndpointNotFound', '2': 1018},
{'1': 'AuthTokenNotValid', '2': 1019}, {'1': 'AuthTokenNotValid', '2': 1019},
{'1': 'InvalidPreKeys', '2': 1020}, {'1': 'InvalidPreKeys', '2': 1020},
{'1': 'VoucherInValid', '2': 1021},
{'1': 'PlanNotAllowed', '2': 1022},
{'1': 'PlanLimitReached', '2': 1023},
{'1': 'NotEnoughCredit', '2': 1024},
{'1': 'PlanDowngrade', '2': 1025},
], ],
}; };
@ -55,5 +60,7 @@ final $typed_data.Uint8List errorCodeDescriptor = $convert.base64Decode(
'V0EPUHEhoKFUludmFsaWRHb29nbGVGY21Ub2tlbhD2BxIZChRVcGxvYWRUb2tlbklzQmxvY2tl' 'V0EPUHEhoKFUludmFsaWRHb29nbGVGY21Ub2tlbhD2BxIZChRVcGxvYWRUb2tlbklzQmxvY2tl'
'ZBD3BxIaChVVcGxvYWRDaGVja3N1bUludmFsaWQQ+AcSGQoUSW52YWxpZERvd25sb2FkVG9rZW' 'ZBD3BxIaChVVcGxvYWRDaGVja3N1bUludmFsaWQQ+AcSGQoUSW52YWxpZERvd25sb2FkVG9rZW'
'4Q+QcSGAoTQXBpRW5kcG9pbnROb3RGb3VuZBD6BxIWChFBdXRoVG9rZW5Ob3RWYWxpZBD7BxIT' '4Q+QcSGAoTQXBpRW5kcG9pbnROb3RGb3VuZBD6BxIWChFBdXRoVG9rZW5Ob3RWYWxpZBD7BxIT'
'Cg5JbnZhbGlkUHJlS2V5cxD8Bw=='); 'Cg5JbnZhbGlkUHJlS2V5cxD8BxITCg5Wb3VjaGVySW5WYWxpZBD9BxITCg5QbGFuTm90QWxsb3'
'dlZBD+BxIVChBQbGFuTGltaXRSZWFjaGVkEP8HEhQKD05vdEVub3VnaENyZWRpdBCACBISCg1Q'
'bGFuRG93bmdyYWRlEIEI');

View file

@ -384,6 +384,787 @@ class DownloadData extends $pb.GeneratedMessage {
void clearFin() => clearField(4); void clearFin() => clearField(4);
} }
class Response_Authenticated extends $pb.GeneratedMessage {
factory Response_Authenticated({
$core.String? plan,
}) {
final $result = create();
if (plan != null) {
$result.plan = plan;
}
return $result;
}
Response_Authenticated._() : super();
factory Response_Authenticated.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_Authenticated.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Authenticated', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'plan')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_Authenticated clone() => Response_Authenticated()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_Authenticated copyWith(void Function(Response_Authenticated) updates) => super.copyWith((message) => updates(message as Response_Authenticated)) as Response_Authenticated;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_Authenticated create() => Response_Authenticated._();
Response_Authenticated createEmptyInstance() => create();
static $pb.PbList<Response_Authenticated> createRepeated() => $pb.PbList<Response_Authenticated>();
@$core.pragma('dart2js:noInline')
static Response_Authenticated getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_Authenticated>(create);
static Response_Authenticated? _defaultInstance;
@$pb.TagNumber(1)
$core.String get plan => $_getSZ(0);
@$pb.TagNumber(1)
set plan($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasPlan() => $_has(0);
@$pb.TagNumber(1)
void clearPlan() => clearField(1);
}
class Response_Plan extends $pb.GeneratedMessage {
factory Response_Plan({
$core.String? planId,
$fixnum.Int64? uploadSizeLimit,
$fixnum.Int64? dailyMediaUploadLimit,
$fixnum.Int64? maximalUploadSizeOfSingleMediaSize,
$fixnum.Int64? additionalPlusAccounts,
$fixnum.Int64? additionalFreeAccounts,
$fixnum.Int64? monthlyCostsCent,
$fixnum.Int64? yearlyCostsCent,
$core.bool? allowedToSendTextMessages,
$core.bool? isAdditionalAccount,
}) {
final $result = create();
if (planId != null) {
$result.planId = planId;
}
if (uploadSizeLimit != null) {
$result.uploadSizeLimit = uploadSizeLimit;
}
if (dailyMediaUploadLimit != null) {
$result.dailyMediaUploadLimit = dailyMediaUploadLimit;
}
if (maximalUploadSizeOfSingleMediaSize != null) {
$result.maximalUploadSizeOfSingleMediaSize = maximalUploadSizeOfSingleMediaSize;
}
if (additionalPlusAccounts != null) {
$result.additionalPlusAccounts = additionalPlusAccounts;
}
if (additionalFreeAccounts != null) {
$result.additionalFreeAccounts = additionalFreeAccounts;
}
if (monthlyCostsCent != null) {
$result.monthlyCostsCent = monthlyCostsCent;
}
if (yearlyCostsCent != null) {
$result.yearlyCostsCent = yearlyCostsCent;
}
if (allowedToSendTextMessages != null) {
$result.allowedToSendTextMessages = allowedToSendTextMessages;
}
if (isAdditionalAccount != null) {
$result.isAdditionalAccount = isAdditionalAccount;
}
return $result;
}
Response_Plan._() : super();
factory Response_Plan.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_Plan.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Plan', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'planId')
..aInt64(2, _omitFieldNames ? '' : 'uploadSizeLimit')
..aInt64(3, _omitFieldNames ? '' : 'dailyMediaUploadLimit')
..aInt64(4, _omitFieldNames ? '' : 'maximalUploadSizeOfSingleMediaSize')
..aInt64(5, _omitFieldNames ? '' : 'additionalPlusAccounts')
..aInt64(6, _omitFieldNames ? '' : 'additionalFreeAccounts')
..aInt64(7, _omitFieldNames ? '' : 'monthlyCostsCent')
..aInt64(8, _omitFieldNames ? '' : 'yearlyCostsCent')
..aOB(9, _omitFieldNames ? '' : 'allowedToSendTextMessages')
..aOB(10, _omitFieldNames ? '' : 'isAdditionalAccount')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_Plan clone() => Response_Plan()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_Plan copyWith(void Function(Response_Plan) updates) => super.copyWith((message) => updates(message as Response_Plan)) as Response_Plan;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_Plan create() => Response_Plan._();
Response_Plan createEmptyInstance() => create();
static $pb.PbList<Response_Plan> createRepeated() => $pb.PbList<Response_Plan>();
@$core.pragma('dart2js:noInline')
static Response_Plan getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_Plan>(create);
static Response_Plan? _defaultInstance;
@$pb.TagNumber(1)
$core.String get planId => $_getSZ(0);
@$pb.TagNumber(1)
set planId($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasPlanId() => $_has(0);
@$pb.TagNumber(1)
void clearPlanId() => clearField(1);
@$pb.TagNumber(2)
$fixnum.Int64 get uploadSizeLimit => $_getI64(1);
@$pb.TagNumber(2)
set uploadSizeLimit($fixnum.Int64 v) { $_setInt64(1, v); }
@$pb.TagNumber(2)
$core.bool hasUploadSizeLimit() => $_has(1);
@$pb.TagNumber(2)
void clearUploadSizeLimit() => clearField(2);
@$pb.TagNumber(3)
$fixnum.Int64 get dailyMediaUploadLimit => $_getI64(2);
@$pb.TagNumber(3)
set dailyMediaUploadLimit($fixnum.Int64 v) { $_setInt64(2, v); }
@$pb.TagNumber(3)
$core.bool hasDailyMediaUploadLimit() => $_has(2);
@$pb.TagNumber(3)
void clearDailyMediaUploadLimit() => clearField(3);
@$pb.TagNumber(4)
$fixnum.Int64 get maximalUploadSizeOfSingleMediaSize => $_getI64(3);
@$pb.TagNumber(4)
set maximalUploadSizeOfSingleMediaSize($fixnum.Int64 v) { $_setInt64(3, v); }
@$pb.TagNumber(4)
$core.bool hasMaximalUploadSizeOfSingleMediaSize() => $_has(3);
@$pb.TagNumber(4)
void clearMaximalUploadSizeOfSingleMediaSize() => clearField(4);
@$pb.TagNumber(5)
$fixnum.Int64 get additionalPlusAccounts => $_getI64(4);
@$pb.TagNumber(5)
set additionalPlusAccounts($fixnum.Int64 v) { $_setInt64(4, v); }
@$pb.TagNumber(5)
$core.bool hasAdditionalPlusAccounts() => $_has(4);
@$pb.TagNumber(5)
void clearAdditionalPlusAccounts() => clearField(5);
@$pb.TagNumber(6)
$fixnum.Int64 get additionalFreeAccounts => $_getI64(5);
@$pb.TagNumber(6)
set additionalFreeAccounts($fixnum.Int64 v) { $_setInt64(5, v); }
@$pb.TagNumber(6)
$core.bool hasAdditionalFreeAccounts() => $_has(5);
@$pb.TagNumber(6)
void clearAdditionalFreeAccounts() => clearField(6);
@$pb.TagNumber(7)
$fixnum.Int64 get monthlyCostsCent => $_getI64(6);
@$pb.TagNumber(7)
set monthlyCostsCent($fixnum.Int64 v) { $_setInt64(6, v); }
@$pb.TagNumber(7)
$core.bool hasMonthlyCostsCent() => $_has(6);
@$pb.TagNumber(7)
void clearMonthlyCostsCent() => clearField(7);
@$pb.TagNumber(8)
$fixnum.Int64 get yearlyCostsCent => $_getI64(7);
@$pb.TagNumber(8)
set yearlyCostsCent($fixnum.Int64 v) { $_setInt64(7, v); }
@$pb.TagNumber(8)
$core.bool hasYearlyCostsCent() => $_has(7);
@$pb.TagNumber(8)
void clearYearlyCostsCent() => clearField(8);
@$pb.TagNumber(9)
$core.bool get allowedToSendTextMessages => $_getBF(8);
@$pb.TagNumber(9)
set allowedToSendTextMessages($core.bool v) { $_setBool(8, v); }
@$pb.TagNumber(9)
$core.bool hasAllowedToSendTextMessages() => $_has(8);
@$pb.TagNumber(9)
void clearAllowedToSendTextMessages() => clearField(9);
@$pb.TagNumber(10)
$core.bool get isAdditionalAccount => $_getBF(9);
@$pb.TagNumber(10)
set isAdditionalAccount($core.bool v) { $_setBool(9, v); }
@$pb.TagNumber(10)
$core.bool hasIsAdditionalAccount() => $_has(9);
@$pb.TagNumber(10)
void clearIsAdditionalAccount() => clearField(10);
}
class Response_Plans extends $pb.GeneratedMessage {
factory Response_Plans({
$core.Iterable<Response_Plan>? plans,
}) {
final $result = create();
if (plans != null) {
$result.plans.addAll(plans);
}
return $result;
}
Response_Plans._() : super();
factory Response_Plans.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_Plans.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Plans', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..pc<Response_Plan>(1, _omitFieldNames ? '' : 'plans', $pb.PbFieldType.PM, subBuilder: Response_Plan.create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_Plans clone() => Response_Plans()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_Plans copyWith(void Function(Response_Plans) updates) => super.copyWith((message) => updates(message as Response_Plans)) as Response_Plans;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_Plans create() => Response_Plans._();
Response_Plans createEmptyInstance() => create();
static $pb.PbList<Response_Plans> createRepeated() => $pb.PbList<Response_Plans>();
@$core.pragma('dart2js:noInline')
static Response_Plans getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_Plans>(create);
static Response_Plans? _defaultInstance;
@$pb.TagNumber(1)
$core.List<Response_Plan> get plans => $_getList(0);
}
class Response_AddAccountsInvite extends $pb.GeneratedMessage {
factory Response_AddAccountsInvite({
$core.String? planId,
$core.String? inviteCode,
}) {
final $result = create();
if (planId != null) {
$result.planId = planId;
}
if (inviteCode != null) {
$result.inviteCode = inviteCode;
}
return $result;
}
Response_AddAccountsInvite._() : super();
factory Response_AddAccountsInvite.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_AddAccountsInvite.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.AddAccountsInvite', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'planId')
..aOS(2, _omitFieldNames ? '' : 'inviteCode')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_AddAccountsInvite clone() => Response_AddAccountsInvite()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_AddAccountsInvite copyWith(void Function(Response_AddAccountsInvite) updates) => super.copyWith((message) => updates(message as Response_AddAccountsInvite)) as Response_AddAccountsInvite;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_AddAccountsInvite create() => Response_AddAccountsInvite._();
Response_AddAccountsInvite createEmptyInstance() => create();
static $pb.PbList<Response_AddAccountsInvite> createRepeated() => $pb.PbList<Response_AddAccountsInvite>();
@$core.pragma('dart2js:noInline')
static Response_AddAccountsInvite getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_AddAccountsInvite>(create);
static Response_AddAccountsInvite? _defaultInstance;
@$pb.TagNumber(1)
$core.String get planId => $_getSZ(0);
@$pb.TagNumber(1)
set planId($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasPlanId() => $_has(0);
@$pb.TagNumber(1)
void clearPlanId() => clearField(1);
@$pb.TagNumber(2)
$core.String get inviteCode => $_getSZ(1);
@$pb.TagNumber(2)
set inviteCode($core.String v) { $_setString(1, v); }
@$pb.TagNumber(2)
$core.bool hasInviteCode() => $_has(1);
@$pb.TagNumber(2)
void clearInviteCode() => clearField(2);
}
class Response_AddAccountsInvites extends $pb.GeneratedMessage {
factory Response_AddAccountsInvites({
$core.Iterable<Response_AddAccountsInvite>? invites,
}) {
final $result = create();
if (invites != null) {
$result.invites.addAll(invites);
}
return $result;
}
Response_AddAccountsInvites._() : super();
factory Response_AddAccountsInvites.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_AddAccountsInvites.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.AddAccountsInvites', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..pc<Response_AddAccountsInvite>(1, _omitFieldNames ? '' : 'invites', $pb.PbFieldType.PM, subBuilder: Response_AddAccountsInvite.create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_AddAccountsInvites clone() => Response_AddAccountsInvites()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_AddAccountsInvites copyWith(void Function(Response_AddAccountsInvites) updates) => super.copyWith((message) => updates(message as Response_AddAccountsInvites)) as Response_AddAccountsInvites;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_AddAccountsInvites create() => Response_AddAccountsInvites._();
Response_AddAccountsInvites createEmptyInstance() => create();
static $pb.PbList<Response_AddAccountsInvites> createRepeated() => $pb.PbList<Response_AddAccountsInvites>();
@$core.pragma('dart2js:noInline')
static Response_AddAccountsInvites getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_AddAccountsInvites>(create);
static Response_AddAccountsInvites? _defaultInstance;
@$pb.TagNumber(1)
$core.List<Response_AddAccountsInvite> get invites => $_getList(0);
}
class Response_Transaction extends $pb.GeneratedMessage {
factory Response_Transaction({
$fixnum.Int64? depositCents,
$core.String? transactionType,
$fixnum.Int64? createdAtUnixTimestamp,
}) {
final $result = create();
if (depositCents != null) {
$result.depositCents = depositCents;
}
if (transactionType != null) {
$result.transactionType = transactionType;
}
if (createdAtUnixTimestamp != null) {
$result.createdAtUnixTimestamp = createdAtUnixTimestamp;
}
return $result;
}
Response_Transaction._() : super();
factory Response_Transaction.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_Transaction.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Transaction', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..aInt64(1, _omitFieldNames ? '' : 'depositCents')
..aOS(2, _omitFieldNames ? '' : 'transactionType')
..aInt64(3, _omitFieldNames ? '' : 'createdAtUnixTimestamp')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_Transaction clone() => Response_Transaction()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_Transaction copyWith(void Function(Response_Transaction) updates) => super.copyWith((message) => updates(message as Response_Transaction)) as Response_Transaction;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_Transaction create() => Response_Transaction._();
Response_Transaction createEmptyInstance() => create();
static $pb.PbList<Response_Transaction> createRepeated() => $pb.PbList<Response_Transaction>();
@$core.pragma('dart2js:noInline')
static Response_Transaction getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_Transaction>(create);
static Response_Transaction? _defaultInstance;
@$pb.TagNumber(1)
$fixnum.Int64 get depositCents => $_getI64(0);
@$pb.TagNumber(1)
set depositCents($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1)
$core.bool hasDepositCents() => $_has(0);
@$pb.TagNumber(1)
void clearDepositCents() => clearField(1);
@$pb.TagNumber(2)
$core.String get transactionType => $_getSZ(1);
@$pb.TagNumber(2)
set transactionType($core.String v) { $_setString(1, v); }
@$pb.TagNumber(2)
$core.bool hasTransactionType() => $_has(1);
@$pb.TagNumber(2)
void clearTransactionType() => clearField(2);
/// Represents seconds of UTC time since Unix epoch
/// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
/// 9999-12-31T23:59:59Z inclusive.
@$pb.TagNumber(3)
$fixnum.Int64 get createdAtUnixTimestamp => $_getI64(2);
@$pb.TagNumber(3)
set createdAtUnixTimestamp($fixnum.Int64 v) { $_setInt64(2, v); }
@$pb.TagNumber(3)
$core.bool hasCreatedAtUnixTimestamp() => $_has(2);
@$pb.TagNumber(3)
void clearCreatedAtUnixTimestamp() => clearField(3);
}
class Response_AdditionalAccount extends $pb.GeneratedMessage {
factory Response_AdditionalAccount({
$fixnum.Int64? userId,
$core.String? planId,
}) {
final $result = create();
if (userId != null) {
$result.userId = userId;
}
if (planId != null) {
$result.planId = planId;
}
return $result;
}
Response_AdditionalAccount._() : super();
factory Response_AdditionalAccount.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_AdditionalAccount.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.AdditionalAccount', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..aInt64(1, _omitFieldNames ? '' : 'userId')
..aOS(3, _omitFieldNames ? '' : 'planId')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_AdditionalAccount clone() => Response_AdditionalAccount()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_AdditionalAccount copyWith(void Function(Response_AdditionalAccount) updates) => super.copyWith((message) => updates(message as Response_AdditionalAccount)) as Response_AdditionalAccount;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_AdditionalAccount create() => Response_AdditionalAccount._();
Response_AdditionalAccount createEmptyInstance() => create();
static $pb.PbList<Response_AdditionalAccount> createRepeated() => $pb.PbList<Response_AdditionalAccount>();
@$core.pragma('dart2js:noInline')
static Response_AdditionalAccount getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_AdditionalAccount>(create);
static Response_AdditionalAccount? _defaultInstance;
@$pb.TagNumber(1)
$fixnum.Int64 get userId => $_getI64(0);
@$pb.TagNumber(1)
set userId($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1)
$core.bool hasUserId() => $_has(0);
@$pb.TagNumber(1)
void clearUserId() => clearField(1);
@$pb.TagNumber(3)
$core.String get planId => $_getSZ(1);
@$pb.TagNumber(3)
set planId($core.String v) { $_setString(1, v); }
@$pb.TagNumber(3)
$core.bool hasPlanId() => $_has(1);
@$pb.TagNumber(3)
void clearPlanId() => clearField(3);
}
class Response_Voucher extends $pb.GeneratedMessage {
factory Response_Voucher({
$core.String? voucherId,
$fixnum.Int64? valueCents,
$core.bool? redeemed,
$core.bool? requested,
$fixnum.Int64? createdAtUnixTimestamp,
}) {
final $result = create();
if (voucherId != null) {
$result.voucherId = voucherId;
}
if (valueCents != null) {
$result.valueCents = valueCents;
}
if (redeemed != null) {
$result.redeemed = redeemed;
}
if (requested != null) {
$result.requested = requested;
}
if (createdAtUnixTimestamp != null) {
$result.createdAtUnixTimestamp = createdAtUnixTimestamp;
}
return $result;
}
Response_Voucher._() : super();
factory Response_Voucher.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_Voucher.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Voucher', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..aOS(1, _omitFieldNames ? '' : 'voucherId')
..aInt64(2, _omitFieldNames ? '' : 'valueCents')
..aOB(3, _omitFieldNames ? '' : 'redeemed')
..aOB(4, _omitFieldNames ? '' : 'requested')
..aInt64(5, _omitFieldNames ? '' : 'createdAtUnixTimestamp')
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_Voucher clone() => Response_Voucher()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_Voucher copyWith(void Function(Response_Voucher) updates) => super.copyWith((message) => updates(message as Response_Voucher)) as Response_Voucher;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_Voucher create() => Response_Voucher._();
Response_Voucher createEmptyInstance() => create();
static $pb.PbList<Response_Voucher> createRepeated() => $pb.PbList<Response_Voucher>();
@$core.pragma('dart2js:noInline')
static Response_Voucher getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_Voucher>(create);
static Response_Voucher? _defaultInstance;
@$pb.TagNumber(1)
$core.String get voucherId => $_getSZ(0);
@$pb.TagNumber(1)
set voucherId($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasVoucherId() => $_has(0);
@$pb.TagNumber(1)
void clearVoucherId() => clearField(1);
@$pb.TagNumber(2)
$fixnum.Int64 get valueCents => $_getI64(1);
@$pb.TagNumber(2)
set valueCents($fixnum.Int64 v) { $_setInt64(1, v); }
@$pb.TagNumber(2)
$core.bool hasValueCents() => $_has(1);
@$pb.TagNumber(2)
void clearValueCents() => clearField(2);
@$pb.TagNumber(3)
$core.bool get redeemed => $_getBF(2);
@$pb.TagNumber(3)
set redeemed($core.bool v) { $_setBool(2, v); }
@$pb.TagNumber(3)
$core.bool hasRedeemed() => $_has(2);
@$pb.TagNumber(3)
void clearRedeemed() => clearField(3);
@$pb.TagNumber(4)
$core.bool get requested => $_getBF(3);
@$pb.TagNumber(4)
set requested($core.bool v) { $_setBool(3, v); }
@$pb.TagNumber(4)
$core.bool hasRequested() => $_has(3);
@$pb.TagNumber(4)
void clearRequested() => clearField(4);
@$pb.TagNumber(5)
$fixnum.Int64 get createdAtUnixTimestamp => $_getI64(4);
@$pb.TagNumber(5)
set createdAtUnixTimestamp($fixnum.Int64 v) { $_setInt64(4, v); }
@$pb.TagNumber(5)
$core.bool hasCreatedAtUnixTimestamp() => $_has(4);
@$pb.TagNumber(5)
void clearCreatedAtUnixTimestamp() => clearField(5);
}
class Response_Vouchers extends $pb.GeneratedMessage {
factory Response_Vouchers({
$core.Iterable<Response_Voucher>? vouchers,
}) {
final $result = create();
if (vouchers != null) {
$result.vouchers.addAll(vouchers);
}
return $result;
}
Response_Vouchers._() : super();
factory Response_Vouchers.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_Vouchers.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Vouchers', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..pc<Response_Voucher>(1, _omitFieldNames ? '' : 'vouchers', $pb.PbFieldType.PM, subBuilder: Response_Voucher.create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_Vouchers clone() => Response_Vouchers()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_Vouchers copyWith(void Function(Response_Vouchers) updates) => super.copyWith((message) => updates(message as Response_Vouchers)) as Response_Vouchers;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_Vouchers create() => Response_Vouchers._();
Response_Vouchers createEmptyInstance() => create();
static $pb.PbList<Response_Vouchers> createRepeated() => $pb.PbList<Response_Vouchers>();
@$core.pragma('dart2js:noInline')
static Response_Vouchers getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_Vouchers>(create);
static Response_Vouchers? _defaultInstance;
@$pb.TagNumber(1)
$core.List<Response_Voucher> get vouchers => $_getList(0);
}
class Response_PlanBallance extends $pb.GeneratedMessage {
factory Response_PlanBallance({
$fixnum.Int64? usedDailyMediaUploadLimit,
$fixnum.Int64? usedUploadMediaSizeLimit,
$fixnum.Int64? paymentPeriodDays,
$fixnum.Int64? lastPaymentDoneUnixTimestamp,
$core.Iterable<Response_Transaction>? transactions,
$core.Iterable<Response_AdditionalAccount>? additionalAccounts,
}) {
final $result = create();
if (usedDailyMediaUploadLimit != null) {
$result.usedDailyMediaUploadLimit = usedDailyMediaUploadLimit;
}
if (usedUploadMediaSizeLimit != null) {
$result.usedUploadMediaSizeLimit = usedUploadMediaSizeLimit;
}
if (paymentPeriodDays != null) {
$result.paymentPeriodDays = paymentPeriodDays;
}
if (lastPaymentDoneUnixTimestamp != null) {
$result.lastPaymentDoneUnixTimestamp = lastPaymentDoneUnixTimestamp;
}
if (transactions != null) {
$result.transactions.addAll(transactions);
}
if (additionalAccounts != null) {
$result.additionalAccounts.addAll(additionalAccounts);
}
return $result;
}
Response_PlanBallance._() : super();
factory Response_PlanBallance.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Response_PlanBallance.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.PlanBallance', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..aInt64(1, _omitFieldNames ? '' : 'usedDailyMediaUploadLimit')
..aInt64(2, _omitFieldNames ? '' : 'usedUploadMediaSizeLimit')
..aInt64(3, _omitFieldNames ? '' : 'paymentPeriodDays')
..aInt64(4, _omitFieldNames ? '' : 'lastPaymentDoneUnixTimestamp')
..pc<Response_Transaction>(5, _omitFieldNames ? '' : 'transactions', $pb.PbFieldType.PM, subBuilder: Response_Transaction.create)
..pc<Response_AdditionalAccount>(6, _omitFieldNames ? '' : 'additionalAccounts', $pb.PbFieldType.PM, subBuilder: Response_AdditionalAccount.create)
..hasRequiredFields = false
;
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
Response_PlanBallance clone() => Response_PlanBallance()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
Response_PlanBallance copyWith(void Function(Response_PlanBallance) updates) => super.copyWith((message) => updates(message as Response_PlanBallance)) as Response_PlanBallance;
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static Response_PlanBallance create() => Response_PlanBallance._();
Response_PlanBallance createEmptyInstance() => create();
static $pb.PbList<Response_PlanBallance> createRepeated() => $pb.PbList<Response_PlanBallance>();
@$core.pragma('dart2js:noInline')
static Response_PlanBallance getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<Response_PlanBallance>(create);
static Response_PlanBallance? _defaultInstance;
@$pb.TagNumber(1)
$fixnum.Int64 get usedDailyMediaUploadLimit => $_getI64(0);
@$pb.TagNumber(1)
set usedDailyMediaUploadLimit($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1)
$core.bool hasUsedDailyMediaUploadLimit() => $_has(0);
@$pb.TagNumber(1)
void clearUsedDailyMediaUploadLimit() => clearField(1);
@$pb.TagNumber(2)
$fixnum.Int64 get usedUploadMediaSizeLimit => $_getI64(1);
@$pb.TagNumber(2)
set usedUploadMediaSizeLimit($fixnum.Int64 v) { $_setInt64(1, v); }
@$pb.TagNumber(2)
$core.bool hasUsedUploadMediaSizeLimit() => $_has(1);
@$pb.TagNumber(2)
void clearUsedUploadMediaSizeLimit() => clearField(2);
@$pb.TagNumber(3)
$fixnum.Int64 get paymentPeriodDays => $_getI64(2);
@$pb.TagNumber(3)
set paymentPeriodDays($fixnum.Int64 v) { $_setInt64(2, v); }
@$pb.TagNumber(3)
$core.bool hasPaymentPeriodDays() => $_has(2);
@$pb.TagNumber(3)
void clearPaymentPeriodDays() => clearField(3);
@$pb.TagNumber(4)
$fixnum.Int64 get lastPaymentDoneUnixTimestamp => $_getI64(3);
@$pb.TagNumber(4)
set lastPaymentDoneUnixTimestamp($fixnum.Int64 v) { $_setInt64(3, v); }
@$pb.TagNumber(4)
$core.bool hasLastPaymentDoneUnixTimestamp() => $_has(3);
@$pb.TagNumber(4)
void clearLastPaymentDoneUnixTimestamp() => clearField(4);
@$pb.TagNumber(5)
$core.List<Response_Transaction> get transactions => $_getList(4);
@$pb.TagNumber(6)
$core.List<Response_AdditionalAccount> get additionalAccounts => $_getList(5);
}
class Response_Location extends $pb.GeneratedMessage { class Response_Location extends $pb.GeneratedMessage {
factory Response_Location({ factory Response_Location({
$core.String? county, $core.String? county,
@ -720,6 +1501,11 @@ enum Response_Ok_Ok {
userdata, userdata,
authtoken, authtoken,
location, location,
authenticated,
plans,
planballance,
vouchers,
addaccountsinvites,
notSet notSet
} }
@ -732,6 +1518,11 @@ class Response_Ok extends $pb.GeneratedMessage {
Response_UserData? userdata, Response_UserData? userdata,
$core.List<$core.int>? authtoken, $core.List<$core.int>? authtoken,
Response_Location? location, Response_Location? location,
Response_Authenticated? authenticated,
Response_Plans? plans,
Response_PlanBallance? planballance,
Response_Vouchers? vouchers,
Response_AddAccountsInvites? addaccountsinvites,
}) { }) {
final $result = create(); final $result = create();
if (none != null) { if (none != null) {
@ -755,6 +1546,21 @@ class Response_Ok extends $pb.GeneratedMessage {
if (location != null) { if (location != null) {
$result.location = location; $result.location = location;
} }
if (authenticated != null) {
$result.authenticated = authenticated;
}
if (plans != null) {
$result.plans = plans;
}
if (planballance != null) {
$result.planballance = planballance;
}
if (vouchers != null) {
$result.vouchers = vouchers;
}
if (addaccountsinvites != null) {
$result.addaccountsinvites = addaccountsinvites;
}
return $result; return $result;
} }
Response_Ok._() : super(); Response_Ok._() : super();
@ -769,10 +1575,15 @@ class Response_Ok extends $pb.GeneratedMessage {
5 : Response_Ok_Ok.userdata, 5 : Response_Ok_Ok.userdata,
6 : Response_Ok_Ok.authtoken, 6 : Response_Ok_Ok.authtoken,
7 : Response_Ok_Ok.location, 7 : Response_Ok_Ok.location,
8 : Response_Ok_Ok.authenticated,
9 : Response_Ok_Ok.plans,
10 : Response_Ok_Ok.planballance,
11 : Response_Ok_Ok.vouchers,
12 : Response_Ok_Ok.addaccountsinvites,
0 : Response_Ok_Ok.notSet 0 : Response_Ok_Ok.notSet
}; };
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Ok', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Response.Ok', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create)
..oo(0, [1, 2, 3, 4, 5, 6, 7]) ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None') ..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None')
..aInt64(2, _omitFieldNames ? '' : 'userid') ..aInt64(2, _omitFieldNames ? '' : 'userid')
..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'authchallenge', $pb.PbFieldType.OY) ..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'authchallenge', $pb.PbFieldType.OY)
@ -780,6 +1591,11 @@ class Response_Ok extends $pb.GeneratedMessage {
..aOM<Response_UserData>(5, _omitFieldNames ? '' : 'userdata', subBuilder: Response_UserData.create) ..aOM<Response_UserData>(5, _omitFieldNames ? '' : 'userdata', subBuilder: Response_UserData.create)
..a<$core.List<$core.int>>(6, _omitFieldNames ? '' : 'authtoken', $pb.PbFieldType.OY) ..a<$core.List<$core.int>>(6, _omitFieldNames ? '' : 'authtoken', $pb.PbFieldType.OY)
..aOM<Response_Location>(7, _omitFieldNames ? '' : 'location', subBuilder: Response_Location.create) ..aOM<Response_Location>(7, _omitFieldNames ? '' : 'location', subBuilder: Response_Location.create)
..aOM<Response_Authenticated>(8, _omitFieldNames ? '' : 'authenticated', subBuilder: Response_Authenticated.create)
..aOM<Response_Plans>(9, _omitFieldNames ? '' : 'plans', subBuilder: Response_Plans.create)
..aOM<Response_PlanBallance>(10, _omitFieldNames ? '' : 'planballance', subBuilder: Response_PlanBallance.create)
..aOM<Response_Vouchers>(11, _omitFieldNames ? '' : 'vouchers', subBuilder: Response_Vouchers.create)
..aOM<Response_AddAccountsInvites>(12, _omitFieldNames ? '' : 'addaccountsinvites', subBuilder: Response_AddAccountsInvites.create)
..hasRequiredFields = false ..hasRequiredFields = false
; ;
@ -875,6 +1691,61 @@ class Response_Ok extends $pb.GeneratedMessage {
void clearLocation() => clearField(7); void clearLocation() => clearField(7);
@$pb.TagNumber(7) @$pb.TagNumber(7)
Response_Location ensureLocation() => $_ensure(6); Response_Location ensureLocation() => $_ensure(6);
@$pb.TagNumber(8)
Response_Authenticated get authenticated => $_getN(7);
@$pb.TagNumber(8)
set authenticated(Response_Authenticated v) { setField(8, v); }
@$pb.TagNumber(8)
$core.bool hasAuthenticated() => $_has(7);
@$pb.TagNumber(8)
void clearAuthenticated() => clearField(8);
@$pb.TagNumber(8)
Response_Authenticated ensureAuthenticated() => $_ensure(7);
@$pb.TagNumber(9)
Response_Plans get plans => $_getN(8);
@$pb.TagNumber(9)
set plans(Response_Plans v) { setField(9, v); }
@$pb.TagNumber(9)
$core.bool hasPlans() => $_has(8);
@$pb.TagNumber(9)
void clearPlans() => clearField(9);
@$pb.TagNumber(9)
Response_Plans ensurePlans() => $_ensure(8);
@$pb.TagNumber(10)
Response_PlanBallance get planballance => $_getN(9);
@$pb.TagNumber(10)
set planballance(Response_PlanBallance v) { setField(10, v); }
@$pb.TagNumber(10)
$core.bool hasPlanballance() => $_has(9);
@$pb.TagNumber(10)
void clearPlanballance() => clearField(10);
@$pb.TagNumber(10)
Response_PlanBallance ensurePlanballance() => $_ensure(9);
@$pb.TagNumber(11)
Response_Vouchers get vouchers => $_getN(10);
@$pb.TagNumber(11)
set vouchers(Response_Vouchers v) { setField(11, v); }
@$pb.TagNumber(11)
$core.bool hasVouchers() => $_has(10);
@$pb.TagNumber(11)
void clearVouchers() => clearField(11);
@$pb.TagNumber(11)
Response_Vouchers ensureVouchers() => $_ensure(10);
@$pb.TagNumber(12)
Response_AddAccountsInvites get addaccountsinvites => $_getN(11);
@$pb.TagNumber(12)
set addaccountsinvites(Response_AddAccountsInvites v) { setField(12, v); }
@$pb.TagNumber(12)
$core.bool hasAddaccountsinvites() => $_has(11);
@$pb.TagNumber(12)
void clearAddaccountsinvites() => clearField(12);
@$pb.TagNumber(12)
Response_AddAccountsInvites ensureAddaccountsinvites() => $_ensure(11);
} }
enum Response_Response { enum Response_Response {

View file

@ -92,12 +92,118 @@ const Response$json = {
{'1': 'ok', '3': 1, '4': 1, '5': 11, '6': '.server_to_client.Response.Ok', '9': 0, '10': 'ok'}, {'1': 'ok', '3': 1, '4': 1, '5': 11, '6': '.server_to_client.Response.Ok', '9': 0, '10': 'ok'},
{'1': 'error', '3': 2, '4': 1, '5': 14, '6': '.error.ErrorCode', '9': 0, '10': 'error'}, {'1': 'error', '3': 2, '4': 1, '5': 14, '6': '.error.ErrorCode', '9': 0, '10': 'error'},
], ],
'3': [Response_Location$json, Response_PreKey$json, Response_UserData$json, Response_UploadToken$json, Response_Ok$json], '3': [Response_Authenticated$json, Response_Plan$json, Response_Plans$json, Response_AddAccountsInvite$json, Response_AddAccountsInvites$json, Response_Transaction$json, Response_AdditionalAccount$json, Response_Voucher$json, Response_Vouchers$json, Response_PlanBallance$json, Response_Location$json, Response_PreKey$json, Response_UserData$json, Response_UploadToken$json, Response_Ok$json],
'8': [ '8': [
{'1': 'Response'}, {'1': 'Response'},
], ],
}; };
@$core.Deprecated('Use responseDescriptor instead')
const Response_Authenticated$json = {
'1': 'Authenticated',
'2': [
{'1': 'plan', '3': 1, '4': 1, '5': 9, '10': 'plan'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_Plan$json = {
'1': 'Plan',
'2': [
{'1': 'plan_id', '3': 1, '4': 1, '5': 9, '10': 'planId'},
{'1': 'upload_size_limit', '3': 2, '4': 1, '5': 3, '10': 'uploadSizeLimit'},
{'1': 'daily_media_upload_limit', '3': 3, '4': 1, '5': 3, '10': 'dailyMediaUploadLimit'},
{'1': 'maximal_upload_size_of_single_media_size', '3': 4, '4': 1, '5': 3, '10': 'maximalUploadSizeOfSingleMediaSize'},
{'1': 'additional_plus_accounts', '3': 5, '4': 1, '5': 3, '10': 'additionalPlusAccounts'},
{'1': 'additional_free_accounts', '3': 6, '4': 1, '5': 3, '10': 'additionalFreeAccounts'},
{'1': 'monthly_costs_cent', '3': 7, '4': 1, '5': 3, '10': 'monthlyCostsCent'},
{'1': 'yearly_costs_cent', '3': 8, '4': 1, '5': 3, '10': 'yearlyCostsCent'},
{'1': 'allowed_to_send_text_messages', '3': 9, '4': 1, '5': 8, '10': 'allowedToSendTextMessages'},
{'1': 'is_additional_account', '3': 10, '4': 1, '5': 8, '10': 'isAdditionalAccount'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_Plans$json = {
'1': 'Plans',
'2': [
{'1': 'plans', '3': 1, '4': 3, '5': 11, '6': '.server_to_client.Response.Plan', '10': 'plans'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_AddAccountsInvite$json = {
'1': 'AddAccountsInvite',
'2': [
{'1': 'plan_id', '3': 1, '4': 1, '5': 9, '10': 'planId'},
{'1': 'invite_code', '3': 2, '4': 1, '5': 9, '10': 'inviteCode'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_AddAccountsInvites$json = {
'1': 'AddAccountsInvites',
'2': [
{'1': 'invites', '3': 1, '4': 3, '5': 11, '6': '.server_to_client.Response.AddAccountsInvite', '10': 'invites'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_Transaction$json = {
'1': 'Transaction',
'2': [
{'1': 'deposit_cents', '3': 1, '4': 1, '5': 3, '10': 'depositCents'},
{'1': 'transaction_type', '3': 2, '4': 1, '5': 9, '10': 'transactionType'},
{'1': 'created_at_unix_timestamp', '3': 3, '4': 1, '5': 3, '10': 'createdAtUnixTimestamp'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_AdditionalAccount$json = {
'1': 'AdditionalAccount',
'2': [
{'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'},
{'1': 'plan_id', '3': 3, '4': 1, '5': 9, '10': 'planId'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_Voucher$json = {
'1': 'Voucher',
'2': [
{'1': 'voucher_id', '3': 1, '4': 1, '5': 9, '10': 'voucherId'},
{'1': 'value_cents', '3': 2, '4': 1, '5': 3, '10': 'valueCents'},
{'1': 'redeemed', '3': 3, '4': 1, '5': 8, '10': 'redeemed'},
{'1': 'requested', '3': 4, '4': 1, '5': 8, '10': 'requested'},
{'1': 'created_at_unix_timestamp', '3': 5, '4': 1, '5': 3, '10': 'createdAtUnixTimestamp'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_Vouchers$json = {
'1': 'Vouchers',
'2': [
{'1': 'vouchers', '3': 1, '4': 3, '5': 11, '6': '.server_to_client.Response.Voucher', '10': 'vouchers'},
],
};
@$core.Deprecated('Use responseDescriptor instead')
const Response_PlanBallance$json = {
'1': 'PlanBallance',
'2': [
{'1': 'used_daily_media_upload_limit', '3': 1, '4': 1, '5': 3, '10': 'usedDailyMediaUploadLimit'},
{'1': 'used_upload_media_size_limit', '3': 2, '4': 1, '5': 3, '10': 'usedUploadMediaSizeLimit'},
{'1': 'payment_period_days', '3': 3, '4': 1, '5': 3, '9': 0, '10': 'paymentPeriodDays', '17': true},
{'1': 'last_payment_done_unix_timestamp', '3': 4, '4': 1, '5': 3, '9': 1, '10': 'lastPaymentDoneUnixTimestamp', '17': true},
{'1': 'transactions', '3': 5, '4': 3, '5': 11, '6': '.server_to_client.Response.Transaction', '10': 'transactions'},
{'1': 'additional_accounts', '3': 6, '4': 3, '5': 11, '6': '.server_to_client.Response.AdditionalAccount', '10': 'additionalAccounts'},
],
'8': [
{'1': '_payment_period_days'},
{'1': '_last_payment_done_unix_timestamp'},
],
};
@$core.Deprecated('Use responseDescriptor instead') @$core.Deprecated('Use responseDescriptor instead')
const Response_Location$json = { const Response_Location$json = {
'1': 'Location', '1': 'Location',
@ -158,6 +264,11 @@ const Response_Ok$json = {
{'1': 'userdata', '3': 5, '4': 1, '5': 11, '6': '.server_to_client.Response.UserData', '9': 0, '10': 'userdata'}, {'1': 'userdata', '3': 5, '4': 1, '5': 11, '6': '.server_to_client.Response.UserData', '9': 0, '10': 'userdata'},
{'1': 'authtoken', '3': 6, '4': 1, '5': 12, '9': 0, '10': 'authtoken'}, {'1': 'authtoken', '3': 6, '4': 1, '5': 12, '9': 0, '10': 'authtoken'},
{'1': 'location', '3': 7, '4': 1, '5': 11, '6': '.server_to_client.Response.Location', '9': 0, '10': 'location'}, {'1': 'location', '3': 7, '4': 1, '5': 11, '6': '.server_to_client.Response.Location', '9': 0, '10': 'location'},
{'1': 'authenticated', '3': 8, '4': 1, '5': 11, '6': '.server_to_client.Response.Authenticated', '9': 0, '10': 'authenticated'},
{'1': 'plans', '3': 9, '4': 1, '5': 11, '6': '.server_to_client.Response.Plans', '9': 0, '10': 'plans'},
{'1': 'planballance', '3': 10, '4': 1, '5': 11, '6': '.server_to_client.Response.PlanBallance', '9': 0, '10': 'planballance'},
{'1': 'vouchers', '3': 11, '4': 1, '5': 11, '6': '.server_to_client.Response.Vouchers', '9': 0, '10': 'vouchers'},
{'1': 'addaccountsinvites', '3': 12, '4': 1, '5': 11, '6': '.server_to_client.Response.AddAccountsInvites', '9': 0, '10': 'addaccountsinvites'},
], ],
'8': [ '8': [
{'1': 'Ok'}, {'1': 'Ok'},
@ -167,24 +278,63 @@ const Response_Ok$json = {
/// Descriptor for `Response`. Decode as a `google.protobuf.DescriptorProto`. /// Descriptor for `Response`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List responseDescriptor = $convert.base64Decode( final $typed_data.Uint8List responseDescriptor = $convert.base64Decode(
'CghSZXNwb25zZRIvCgJvaxgBIAEoCzIdLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuT2tIAF' 'CghSZXNwb25zZRIvCgJvaxgBIAEoCzIdLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuT2tIAF'
'ICb2sSKAoFZXJyb3IYAiABKA4yEC5lcnJvci5FcnJvckNvZGVIAFIFZXJyb3IaTgoITG9jYXRp' 'ICb2sSKAoFZXJyb3IYAiABKA4yEC5lcnJvci5FcnJvckNvZGVIAFIFZXJyb3IaIwoNQX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g1hdXRoZW50'
'aWNhdGVkEjgKBXBsYW5zGAkgASgLMiAuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5QbGFuc0'
'gAUgVwbGFucxJNCgxwbGFuYmFsbGFuY2UYCiABKAsyJy5zZXJ2ZXJfdG9fY2xpZW50LlJlc3Bv'
'bnNlLlBsYW5CYWxsYW5jZUgAUgxwbGFuYmFsbGFuY2USQQoIdm91Y2hlcnMYCyABKAsyIy5zZX'
'J2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLlZvdWNoZXJzSABSCHZvdWNoZXJzEl8KEmFkZGFjY291'
'bnRzaW52aXRlcxgMIAEoCzItLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuQWRkQWNjb3VudH'
'NJbnZpdGVzSABSEmFkZGFjY291bnRzaW52aXRlc0IECgJPa0IKCghSZXNwb25zZQ==');

View file

@ -11,10 +11,12 @@ import 'package:mutex/mutex.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:twonly/globals.dart'; import 'package:twonly/globals.dart';
import 'package:twonly/app.dart'; import 'package:twonly/app.dart';
import 'package:twonly/src/model/json/userdata.dart';
import 'package:twonly/src/model/protobuf/api/client_to_server.pbserver.dart'; import 'package:twonly/src/model/protobuf/api/client_to_server.pbserver.dart';
import 'package:twonly/src/model/protobuf/api/error.pb.dart'; import 'package:twonly/src/model/protobuf/api/error.pb.dart';
import 'package:twonly/src/model/protobuf/api/server_to_client.pb.dart' import 'package:twonly/src/model/protobuf/api/server_to_client.pb.dart'
as server; as server;
import 'package:twonly/src/model/protobuf/api/server_to_client.pbserver.dart';
import 'package:twonly/src/providers/api/api.dart'; import 'package:twonly/src/providers/api/api.dart';
import 'package:twonly/src/providers/api/api_utils.dart'; import 'package:twonly/src/providers/api/api_utils.dart';
import 'package:twonly/src/providers/api/media_received.dart'; import 'package:twonly/src/providers/api/media_received.dart';
@ -242,6 +244,15 @@ class ApiProvider {
final result = await sendRequestSync(req, authenticated: false); final result = await sendRequestSync(req, authenticated: false);
if (result.isSuccess) { if (result.isSuccess) {
server.Response_Ok ok = result.value;
if (ok.hasAuthenticated()) {
server.Response_Authenticated authenticated = ok.authenticated;
UserData? user = await getUser();
if (user != null) {
user.subscriptionPlan = authenticated.plan;
await updateUser(user);
}
}
log.info("Authenticated using api_auth_token"); log.info("Authenticated using api_auth_token");
onAuthenticated(); onAuthenticated();
return true; return true;
@ -394,6 +405,20 @@ class ApiProvider {
return await sendRequestSync(req); return await sendRequestSync(req);
} }
Future<Response_PlanBallance?> getPlanBallance() async {
var get = ApplicationData_GetCurrentPlanInfos();
var appData = ApplicationData()..getcurrentplaninfos = get;
var req = createClientToServerFromApplicationData(appData);
Result res = await sendRequestSync(req);
if (res.isSuccess) {
server.Response_Ok ok = res.value;
if (ok.hasPlanballance()) {
return ok.planballance;
}
}
return null;
}
Future<Result> updateFCMToken(String googleFcm) async { Future<Result> updateFCMToken(String googleFcm) async {
var get = ApplicationData_UpdateGoogleFcmToken()..googleFcm = googleFcm; var get = ApplicationData_UpdateGoogleFcmToken()..googleFcm = googleFcm;
var appData = ApplicationData()..updategooglefcmtoken = get; var appData = ApplicationData()..updategooglefcmtoken = get;

View file

@ -1,10 +1,16 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
class ConnectionChangeProvider with ChangeNotifier, DiagnosticableTreeMixin { class CustomChangeProvider with ChangeNotifier, DiagnosticableTreeMixin {
bool _isConnected = false; bool _isConnected = false;
bool get isConnected => _isConnected; bool get isConnected => _isConnected;
String plan = "";
Future<void> updateConnectionState(bool update) async { Future<void> updateConnectionState(bool update) async {
_isConnected = update; _isConnected = update;
notifyListeners(); notifyListeners();
} }
Future<void> updatePlan(String newPlan) async {
plan = newPlan;
notifyListeners();
}
} }

View file

@ -21,6 +21,7 @@ import 'package:twonly/src/views/chats/start_new_chat.dart';
import 'package:twonly/src/views/settings/settings_main_view.dart'; import 'package:twonly/src/views/settings/settings_main_view.dart';
import 'package:twonly/src/views/chats/search_username_view.dart'; import 'package:twonly/src/views/chats/search_username_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
class ChatListView extends StatefulWidget { class ChatListView extends StatefulWidget {
const ChatListView({super.key}); const ChatListView({super.key});
@ -31,10 +32,34 @@ class ChatListView extends StatefulWidget {
class _ChatListViewState extends State<ChatListView> { class _ChatListViewState extends State<ChatListView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
bool isConnected = context.watch<ConnectionChangeProvider>().isConnected; bool isConnected = context.watch<CustomChangeProvider>().isConnected;
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text("twonly"), title: Row(children: [
Text("twonly "),
GestureDetector(
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return SubscriptionView();
}));
},
child: Container(
decoration: BoxDecoration(
color: context.color.primary,
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 3),
child: Text(
context.watch<CustomChangeProvider>().plan,
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
),
]),
actions: [ actions: [
StreamBuilder( StreamBuilder(
stream: twonlyDatabase.contactsDao.watchContactsRequested(), stream: twonlyDatabase.contactsDao.watchContactsRequested(),

View file

@ -3,6 +3,8 @@ import 'package:drift/drift.dart' hide Column;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'package:twonly/src/providers/connection_provider.dart';
import 'package:twonly/src/views/components/alert_dialog.dart'; import 'package:twonly/src/views/components/alert_dialog.dart';
import 'package:twonly/src/database/daos/contacts_dao.dart'; import 'package:twonly/src/database/daos/contacts_dao.dart';
import 'package:twonly/src/database/tables/messages_table.dart'; import 'package:twonly/src/database/tables/messages_table.dart';
@ -17,6 +19,7 @@ import 'package:twonly/src/providers/api/api.dart';
// ignore: library_prefixes // ignore: library_prefixes
import 'package:twonly/src/utils/signal.dart' as SignalHelper; import 'package:twonly/src/utils/signal.dart' as SignalHelper;
import 'package:twonly/src/utils/storage.dart'; import 'package:twonly/src/utils/storage.dart';
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
class SearchUsernameView extends StatefulWidget { class SearchUsernameView extends StatefulWidget {
const SearchUsernameView({super.key}); const SearchUsernameView({super.key});
@ -113,26 +116,27 @@ class _SearchUsernameView extends State<SearchUsernameView> {
}); });
} }
InputDecoration getInputDecoration(hintText) {
final primaryColor =
Theme.of(context).colorScheme.primary; // Get the primary color
return InputDecoration(
hintText: hintText,
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(9.0),
borderSide: BorderSide(color: primaryColor, width: 1.0),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide(
color: Theme.of(context).colorScheme.outline, width: 1.0),
),
contentPadding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 20.0),
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
InputDecoration getInputDecoration(hintText) { bool isPreview = context.read<CustomChangeProvider>().plan == "Preview";
final primaryColor =
Theme.of(context).colorScheme.primary; // Get the primary color
return InputDecoration(
hintText: hintText,
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(9.0),
borderSide: BorderSide(color: primaryColor, width: 1.0),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0),
borderSide: BorderSide(
color: Theme.of(context).colorScheme.outline, width: 1.0),
),
contentPadding: EdgeInsets.symmetric(vertical: 15.0, horizontal: 20.0),
);
}
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(context.lang.searchUsernameTitle), title: Text(context.lang.searchUsernameTitle),
@ -142,37 +146,50 @@ class _SearchUsernameView extends State<SearchUsernameView> {
padding: EdgeInsets.only(bottom: 20, left: 10, top: 20, right: 10), padding: EdgeInsets.only(bottom: 20, left: 10, top: 20, right: 10),
child: Column( child: Column(
children: [ children: [
Padding( if (isPreview) ...[
padding: EdgeInsets.symmetric(horizontal: 10), Padding(
child: TextField( padding: EdgeInsets.all(20),
onSubmitted: (_) { child: Text(
_addNewUser(context); context.lang.searchUserNamePreview,
}, textAlign: TextAlign.center,
onChanged: (value) { ),
searchUserName.text = value.toLowerCase();
searchUserName.selection = TextSelection.fromPosition(
TextPosition(offset: searchUserName.text.length),
);
},
inputFormatters: [
LengthLimitingTextInputFormatter(12),
FilteringTextInputFormatter.allow(RegExp(r'[a-z0-9A-Z]')),
],
controller: searchUserName,
decoration:
getInputDecoration(context.lang.searchUsernameInput),
), ),
), FilledButton.icon(
icon: FaIcon(FontAwesomeIcons.shieldHeart),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return SubscriptionView();
}));
},
label: Text(context.lang.selectSubscription),
),
SizedBox(height: 30),
],
if (!isPreview) ...[
Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: TextField(
onSubmitted: (_) {
_addNewUser(context);
},
onChanged: (value) {
searchUserName.text = value.toLowerCase();
searchUserName.selection = TextSelection.fromPosition(
TextPosition(offset: searchUserName.text.length),
);
},
inputFormatters: [
LengthLimitingTextInputFormatter(12),
FilteringTextInputFormatter.allow(RegExp(r'[a-z0-9A-Z]')),
],
controller: searchUserName,
decoration:
getInputDecoration(context.lang.searchUsernameInput),
),
),
],
const SizedBox(height: 20), const SizedBox(height: 20),
OutlinedButton.icon(
icon: Icon(Icons.qr_code),
onPressed: () {
showAlertDialog(context, "Coming soon",
"This feature is not yet implemented!");
},
label: Text(context.lang.searchUsernameQrCodeBtn),
),
SizedBox(height: 30),
if (contacts.isNotEmpty) if (contacts.isNotEmpty)
HeadLineComponent( HeadLineComponent(
context.lang.searchUsernameNewFollowerTitle, context.lang.searchUsernameNewFollowerTitle,
@ -184,18 +201,20 @@ class _SearchUsernameView extends State<SearchUsernameView> {
), ),
), ),
), ),
floatingActionButton: Padding( floatingActionButton: (isPreview)
padding: const EdgeInsets.only(bottom: 30.0), ? null
child: FloatingActionButton( : Padding(
foregroundColor: Colors.white, padding: const EdgeInsets.only(bottom: 30.0),
onPressed: () { child: FloatingActionButton(
if (!_isLoading) _addNewUser(context); foregroundColor: Colors.white,
}, onPressed: () {
child: (_isLoading) if (!_isLoading) _addNewUser(context);
? const Center(child: CircularProgressIndicator()) },
: FaIcon(FontAwesomeIcons.magnifyingGlassPlus), child: (_isLoading)
), ? const Center(child: CircularProgressIndicator())
), : FaIcon(FontAwesomeIcons.magnifyingGlassPlus),
),
),
); );
} }
} }

View file

@ -43,6 +43,7 @@ class _RegisterViewState extends State<RegisterView> {
userId: res.value.userid.toInt(), userId: res.value.userid.toInt(),
username: username, username: username,
displayName: username, displayName: username,
subscriptionPlan: "Preview",
); );
storage.write(key: "userData", value: jsonEncode(userData)); storage.write(key: "userData", value: jsonEncode(userData));
} }

View file

@ -12,79 +12,78 @@ class HelpView extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(context.lang.settingsHelp), title: Text(context.lang.settingsHelp),
), ),
body: ListView( body: ListView(
children: [ children: [
ListTile( ListTile(
title: Text(context.lang.settingsHelpSupport), title: Text(context.lang.settingsHelpSupport),
onTap: () { onTap: () {
launchUrl(Uri.parse("https://twonly.eu/support")); launchUrl(Uri.parse("https://twonly.eu/support"));
}, },
trailing: trailing: FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15),
FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15), ),
ListTile(
title: Text(context.lang.settingsHelpContactUs),
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return ContactUsView();
}));
},
),
Divider(),
FutureBuilder(
future: PackageInfo.fromPlatform(),
builder: (context, snap) {
if (snap.hasData) {
return ListTile(
title: Text(context.lang.settingsHelpVersion),
subtitle: Text(snap.data!.version),
);
} else {
return Container();
}
},
),
ListTile(
title: Text(context.lang.settingsHelpLicenses),
onTap: () {
showLicensePage(context: context);
},
),
ListTile(
title: Text(context.lang.settingsHelpCredits),
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return CreditsView();
}));
},
),
ListTile(
title: Text(context.lang.settingsHelpDiagnostics),
onTap: () async {
await Navigator.push(context,
MaterialPageRoute(builder: (context) {
return DiagnosticsView();
}));
},
),
ListTile(
title: Text(context.lang.settingsHelpLegal),
onTap: () {
launchUrl(Uri.parse("https://twonly.eu/legal"));
},
trailing: FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15),
),
ListTile(
title: Text(
"Copyright twonly",
style: TextStyle(color: Colors.grey, fontSize: 13),
), ),
ListTile( ),
title: Text(context.lang.settingsHelpContactUs), ],
onTap: () { ),
Navigator.push(context, MaterialPageRoute(builder: (context) { );
return ContactUsView();
}));
},
),
Divider(),
FutureBuilder(
future: PackageInfo.fromPlatform(),
builder: (context, snap) {
if (snap.hasData) {
return ListTile(
title: Text(context.lang.settingsHelpVersion),
subtitle: Text(snap.data!.version),
);
} else {
return Container();
}
},
),
ListTile(
title: Text(context.lang.settingsHelpLicenses),
onTap: () {
showLicensePage(context: context);
},
),
ListTile(
title: Text(context.lang.settingsHelpCredits),
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return CreditsView();
}));
},
),
ListTile(
title: Text(context.lang.settingsHelpDiagnostics),
onTap: () async {
await Navigator.push(context,
MaterialPageRoute(builder: (context) {
return DiagnosticsView();
}));
},
),
ListTile(
title: Text(context.lang.settingsHelpLegal),
onTap: () {
launchUrl(Uri.parse("https://twonly.eu/legal"));
},
trailing:
FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15),
),
ListTile(
title: Text(
"Copyright twonly",
style: TextStyle(color: Colors.grey, fontSize: 13),
),
),
],
));
} }
} }

View file

@ -13,6 +13,7 @@ import 'package:twonly/src/views/settings/notification_view.dart';
import 'package:twonly/src/views/settings/profile/profile_view.dart'; import 'package:twonly/src/views/settings/profile/profile_view.dart';
import 'package:twonly/src/views/settings/help/help_view.dart'; import 'package:twonly/src/views/settings/help/help_view.dart';
import 'package:twonly/src/views/settings/privacy_view.dart'; import 'package:twonly/src/views/settings/privacy_view.dart';
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
class SettingsMainView extends StatefulWidget { class SettingsMainView extends StatefulWidget {
const SettingsMainView({super.key}); const SettingsMainView({super.key});
@ -109,7 +110,12 @@ class _SettingsMainViewState extends State<SettingsMainView> {
BetterListTile( BetterListTile(
icon: FontAwesomeIcons.shieldHeart, icon: FontAwesomeIcons.shieldHeart,
text: context.lang.settingsSubscription, text: context.lang.settingsSubscription,
onTap: () {}, onTap: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) {
return SubscriptionView();
}));
},
), ),
const Divider(), const Divider(),
BetterListTile( BetterListTile(

View file

@ -0,0 +1,217 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:twonly/globals.dart';
import 'package:twonly/src/model/protobuf/api/server_to_client.pb.dart';
import 'package:twonly/src/providers/connection_provider.dart';
import 'package:twonly/src/utils/misc.dart';
import 'package:twonly/src/views/components/better_list_title.dart';
class SubscriptionView extends StatefulWidget {
const SubscriptionView({super.key});
@override
State<SubscriptionView> createState() => _SubscriptionViewState();
}
class _SubscriptionViewState extends State<SubscriptionView> {
bool hasInternet = true;
int ballanceInCents = 0;
@override
void initState() {
super.initState();
initAsync();
}
Future initAsync() async {
// userData = await getUser();
// setState(() {});
Response_PlanBallance? ballance = await apiProvider.getPlanBallance();
if (ballance == null) {
setState(() {
hasInternet = false;
});
return;
}
}
@override
Widget build(BuildContext context) {
String formattedBalance = NumberFormat.currency(
locale: 'de_DE', // Locale for Euro formatting
symbol: '',
decimalDigits: 2,
).format(ballanceInCents / 100);
return Scaffold(
appBar: AppBar(
title: Text(context.lang.settingsSubscription),
),
body: Column(
children: [
Padding(
padding: const EdgeInsets.all(32.0),
child: Center(
child: Container(
decoration: BoxDecoration(
color: context.color.primary,
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 3),
child: Text(
context.watch<CustomChangeProvider>().plan,
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
),
),
Expanded(
child: ListView(
children: [
Center(
child: Text("Upgrade your current plan."),
),
SizedBox(height: 10),
PlanCard(
title: 'Pro',
yearlyPrice: '10€/year',
monthlyPrice: '1€/month',
features: [
'✓ Unlimited media files',
'1 additional Plus user',
'3 additional Free users',
],
),
SizedBox(height: 10),
PlanCard(
title: 'Family',
yearlyPrice: '20€/year',
monthlyPrice: '2€/month',
features: [
'✓ All from Pro',
'4 additional Plus users',
'5 additional Free users',
],
),
SizedBox(height: 10),
Divider(),
BetterListTile(
icon: FontAwesomeIcons.ticket,
text: "Redeem code for additional user",
onTap: () {},
),
BetterListTile(
icon: FontAwesomeIcons.moneyBillTransfer,
text: "Your transaction history",
subtitle: Text("Current ballance: $formattedBalance"),
onTap: () {},
),
BetterListTile(
icon: FontAwesomeIcons.userPlus,
text: "Manage your additional users",
subtitle: Text("Open: 3"),
onTap: () {},
),
BetterListTile(
icon: FontAwesomeIcons.gift,
text: "Create or redeem voucher",
onTap: () {},
),
SizedBox(height: 30)
],
// tranaction
),
)
],
),
);
}
}
class PlanCard extends StatelessWidget {
final String title;
final String yearlyPrice;
final String monthlyPrice;
final List<String> features;
const PlanCard({
super.key,
required this.title,
required this.yearlyPrice,
required this.monthlyPrice,
required this.features,
});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(left: 16, right: 16),
child: Card(
elevation: 4,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
title,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 10),
Column(
children: [
Text(
yearlyPrice,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
monthlyPrice,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16,
color: Colors.grey,
),
),
],
)
],
),
SizedBox(height: 10),
...features.map(
(feature) => Padding(
padding: const EdgeInsets.symmetric(vertical: 2.0),
child: Text(
feature,
textAlign: TextAlign.center,
),
),
),
],
),
),
),
);
}
}