From 64b304d99e0d102969bdc02044b28f6a3cc1e194 Mon Sep 17 00:00:00 2001 From: otsmr Date: Sat, 9 May 2026 15:33:58 +0200 Subject: [PATCH] remove dead code --- .../api/websocket/client_to_server.pb.dart | 798 ++++++++---------- .../websocket/client_to_server.pbjson.dart | 307 +++---- .../api/websocket/server_to_client.pb.dart | 346 ++------ .../websocket/server_to_client.pbenum.dart | 45 - .../websocket/server_to_client.pbjson.dart | 209 ++--- lib/src/services/api.service.dart | 56 -- .../layers/filter.layer.dart | 3 +- .../layers/filters/location_filter.dart | 164 ---- .../layers/filters/stickers.dart | 57 ++ .../views/settings/help/credits.view.dart | 2 +- 10 files changed, 688 insertions(+), 1299 deletions(-) delete mode 100644 lib/src/visual/views/camera/share_image_editor_components/layers/filters/location_filter.dart create mode 100644 lib/src/visual/views/camera/share_image_editor_components/layers/filters/stickers.dart diff --git a/lib/src/model/protobuf/api/websocket/client_to_server.pb.dart b/lib/src/model/protobuf/api/websocket/client_to_server.pb.dart index f5547c51..02743418 100644 --- a/lib/src/model/protobuf/api/websocket/client_to_server.pb.dart +++ b/lib/src/model/protobuf/api/websocket/client_to_server.pb.dart @@ -258,6 +258,7 @@ class Handshake_Register extends $pb.GeneratedMessage { $core.bool? isIos, $core.String? langCode, $fixnum.Int64? proofOfWork, + $core.List<$core.int>? loginToken, }) { final result = create(); if (username != null) result.username = username; @@ -271,6 +272,7 @@ class Handshake_Register extends $pb.GeneratedMessage { if (isIos != null) result.isIos = isIos; if (langCode != null) result.langCode = langCode; if (proofOfWork != null) result.proofOfWork = proofOfWork; + if (loginToken != null) result.loginToken = loginToken; return result; } @@ -301,6 +303,8 @@ class Handshake_Register extends $pb.GeneratedMessage { ..aOB(8, _omitFieldNames ? '' : 'isIos') ..aOS(9, _omitFieldNames ? '' : 'langCode') ..aInt64(10, _omitFieldNames ? '' : 'proofOfWork') + ..a<$core.List<$core.int>>( + 11, _omitFieldNames ? '' : 'loginToken', $pb.PbFieldType.OY) ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -412,6 +416,15 @@ class Handshake_Register extends $pb.GeneratedMessage { $core.bool hasProofOfWork() => $_has(9); @$pb.TagNumber(10) void clearProofOfWork() => $_clearField(10); + + @$pb.TagNumber(11) + $core.List<$core.int> get loginToken => $_getN(10); + @$pb.TagNumber(11) + set loginToken($core.List<$core.int> value) => $_setBytes(10, value); + @$pb.TagNumber(11) + $core.bool hasLoginToken() => $_has(10); + @$pb.TagNumber(11) + void clearLoginToken() => $_clearField(11); } class Handshake_GetAuthChallenge extends $pb.GeneratedMessage { @@ -629,12 +642,122 @@ class Handshake_Authenticate extends $pb.GeneratedMessage { void clearInBackground() => $_clearField(5); } +class Handshake_AuthenticateWithLoginToken extends $pb.GeneratedMessage { + factory Handshake_AuthenticateWithLoginToken({ + $fixnum.Int64? userId, + $core.List<$core.int>? secretLoginToken, + $core.String? appVersion, + $fixnum.Int64? deviceId, + $core.bool? inBackground, + }) { + final result = create(); + if (userId != null) result.userId = userId; + if (secretLoginToken != null) result.secretLoginToken = secretLoginToken; + if (appVersion != null) result.appVersion = appVersion; + if (deviceId != null) result.deviceId = deviceId; + if (inBackground != null) result.inBackground = inBackground; + return result; + } + + Handshake_AuthenticateWithLoginToken._(); + + factory Handshake_AuthenticateWithLoginToken.fromBuffer( + $core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory Handshake_AuthenticateWithLoginToken.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'Handshake.AuthenticateWithLoginToken', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), + createEmptyInstance: create) + ..aInt64(1, _omitFieldNames ? '' : 'userId') + ..a<$core.List<$core.int>>( + 2, _omitFieldNames ? '' : 'secretLoginToken', $pb.PbFieldType.OY) + ..aOS(3, _omitFieldNames ? '' : 'appVersion') + ..aInt64(4, _omitFieldNames ? '' : 'deviceId') + ..aOB(5, _omitFieldNames ? '' : 'inBackground') + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Handshake_AuthenticateWithLoginToken clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + Handshake_AuthenticateWithLoginToken copyWith( + void Function(Handshake_AuthenticateWithLoginToken) updates) => + super.copyWith((message) => + updates(message as Handshake_AuthenticateWithLoginToken)) + as Handshake_AuthenticateWithLoginToken; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static Handshake_AuthenticateWithLoginToken create() => + Handshake_AuthenticateWithLoginToken._(); + @$core.override + Handshake_AuthenticateWithLoginToken createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static Handshake_AuthenticateWithLoginToken getDefault() => + _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< + Handshake_AuthenticateWithLoginToken>(create); + static Handshake_AuthenticateWithLoginToken? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get userId => $_getI64(0); + @$pb.TagNumber(1) + set userId($fixnum.Int64 value) => $_setInt64(0, value); + @$pb.TagNumber(1) + $core.bool hasUserId() => $_has(0); + @$pb.TagNumber(1) + void clearUserId() => $_clearField(1); + + @$pb.TagNumber(2) + $core.List<$core.int> get secretLoginToken => $_getN(1); + @$pb.TagNumber(2) + set secretLoginToken($core.List<$core.int> value) => $_setBytes(1, value); + @$pb.TagNumber(2) + $core.bool hasSecretLoginToken() => $_has(1); + @$pb.TagNumber(2) + void clearSecretLoginToken() => $_clearField(2); + + @$pb.TagNumber(3) + $core.String get appVersion => $_getSZ(2); + @$pb.TagNumber(3) + set appVersion($core.String value) => $_setString(2, value); + @$pb.TagNumber(3) + $core.bool hasAppVersion() => $_has(2); + @$pb.TagNumber(3) + void clearAppVersion() => $_clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get deviceId => $_getI64(3); + @$pb.TagNumber(4) + set deviceId($fixnum.Int64 value) => $_setInt64(3, value); + @$pb.TagNumber(4) + $core.bool hasDeviceId() => $_has(3); + @$pb.TagNumber(4) + void clearDeviceId() => $_clearField(4); + + @$pb.TagNumber(5) + $core.bool get inBackground => $_getBF(4); + @$pb.TagNumber(5) + set inBackground($core.bool value) => $_setBool(4, value); + @$pb.TagNumber(5) + $core.bool hasInBackground() => $_has(4); + @$pb.TagNumber(5) + void clearInBackground() => $_clearField(5); +} + enum Handshake_Handshake { register, getAuthChallenge, getAuthToken, authenticate, requestPOW, + authenticateWithLoginToken, notSet } @@ -645,6 +768,7 @@ class Handshake extends $pb.GeneratedMessage { Handshake_GetAuthToken? getAuthToken, Handshake_Authenticate? authenticate, Handshake_RequestPOW? requestPOW, + Handshake_AuthenticateWithLoginToken? authenticateWithLoginToken, }) { final result = create(); if (register != null) result.register = register; @@ -652,6 +776,8 @@ class Handshake extends $pb.GeneratedMessage { if (getAuthToken != null) result.getAuthToken = getAuthToken; if (authenticate != null) result.authenticate = authenticate; if (requestPOW != null) result.requestPOW = requestPOW; + if (authenticateWithLoginToken != null) + result.authenticateWithLoginToken = authenticateWithLoginToken; return result; } @@ -671,6 +797,7 @@ class Handshake extends $pb.GeneratedMessage { 3: Handshake_Handshake.getAuthToken, 4: Handshake_Handshake.authenticate, 5: Handshake_Handshake.requestPOW, + 6: Handshake_Handshake.authenticateWithLoginToken, 0: Handshake_Handshake.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo( @@ -678,7 +805,7 @@ class Handshake extends $pb.GeneratedMessage { package: const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), createEmptyInstance: create) - ..oo(0, [1, 2, 3, 4, 5]) + ..oo(0, [1, 2, 3, 4, 5, 6]) ..aOM(1, _omitFieldNames ? '' : 'register', subBuilder: Handshake_Register.create) ..aOM( @@ -691,6 +818,9 @@ class Handshake extends $pb.GeneratedMessage { subBuilder: Handshake_Authenticate.create) ..aOM(5, _omitFieldNames ? '' : 'requestPOW', protoName: 'requestPOW', subBuilder: Handshake_RequestPOW.create) + ..aOM( + 6, _omitFieldNames ? '' : 'authenticateWithLoginToken', + subBuilder: Handshake_AuthenticateWithLoginToken.create) ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -716,6 +846,7 @@ class Handshake extends $pb.GeneratedMessage { @$pb.TagNumber(3) @$pb.TagNumber(4) @$pb.TagNumber(5) + @$pb.TagNumber(6) Handshake_Handshake whichHandshake() => _Handshake_HandshakeByTag[$_whichOneof(0)]!; @$pb.TagNumber(1) @@ -723,6 +854,7 @@ class Handshake extends $pb.GeneratedMessage { @$pb.TagNumber(3) @$pb.TagNumber(4) @$pb.TagNumber(5) + @$pb.TagNumber(6) void clearHandshake() => $_clearField($_whichOneof(0)); @$pb.TagNumber(1) @@ -780,6 +912,20 @@ class Handshake extends $pb.GeneratedMessage { void clearRequestPOW() => $_clearField(5); @$pb.TagNumber(5) Handshake_RequestPOW ensureRequestPOW() => $_ensure(4); + + @$pb.TagNumber(6) + Handshake_AuthenticateWithLoginToken get authenticateWithLoginToken => + $_getN(5); + @$pb.TagNumber(6) + set authenticateWithLoginToken(Handshake_AuthenticateWithLoginToken value) => + $_setField(6, value); + @$pb.TagNumber(6) + $core.bool hasAuthenticateWithLoginToken() => $_has(5); + @$pb.TagNumber(6) + void clearAuthenticateWithLoginToken() => $_clearField(6); + @$pb.TagNumber(6) + Handshake_AuthenticateWithLoginToken ensureAuthenticateWithLoginToken() => + $_ensure(5); } class ApplicationData_TextMessage extends $pb.GeneratedMessage { @@ -1102,148 +1248,6 @@ class ApplicationData_GetUserById extends $pb.GeneratedMessage { 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._(); - - factory ApplicationData_RedeemVoucher.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_RedeemVoucher.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - 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('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RedeemVoucher clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RedeemVoucher copyWith( - void Function(ApplicationData_RedeemVoucher) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_RedeemVoucher)) - as ApplicationData_RedeemVoucher; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_RedeemVoucher create() => - ApplicationData_RedeemVoucher._(); - @$core.override - ApplicationData_RedeemVoucher createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_RedeemVoucher getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_RedeemVoucher? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get voucher => $_getSZ(0); - @$pb.TagNumber(1) - set voucher($core.String value) => $_setString(0, value); - @$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, - $core.bool? autoRenewal, - }) { - final result = create(); - if (planId != null) result.planId = planId; - if (payMonthly != null) result.payMonthly = payMonthly; - if (autoRenewal != null) result.autoRenewal = autoRenewal; - return result; - } - - ApplicationData_SwitchToPayedPlan._(); - - factory ApplicationData_SwitchToPayedPlan.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_SwitchToPayedPlan.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - 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') - ..aOB(3, _omitFieldNames ? '' : 'autoRenewal') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_SwitchToPayedPlan clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_SwitchToPayedPlan copyWith( - void Function(ApplicationData_SwitchToPayedPlan) updates) => - super.copyWith((message) => - updates(message as ApplicationData_SwitchToPayedPlan)) - as ApplicationData_SwitchToPayedPlan; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_SwitchToPayedPlan create() => - ApplicationData_SwitchToPayedPlan._(); - @$core.override - ApplicationData_SwitchToPayedPlan createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_SwitchToPayedPlan getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_SwitchToPayedPlan? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get planId => $_getSZ(0); - @$pb.TagNumber(1) - set planId($core.String value) => $_setString(0, value); - @$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 value) => $_setBool(1, value); - @$pb.TagNumber(2) - $core.bool hasPayMonthly() => $_has(1); - @$pb.TagNumber(2) - void clearPayMonthly() => $_clearField(2); - - @$pb.TagNumber(3) - $core.bool get autoRenewal => $_getBF(2); - @$pb.TagNumber(3) - set autoRenewal($core.bool value) => $_setBool(2, value); - @$pb.TagNumber(3) - $core.bool hasAutoRenewal() => $_has(2); - @$pb.TagNumber(3) - void clearAutoRenewal() => $_clearField(3); -} - class ApplicationData_UpdatePlanOptions extends $pb.GeneratedMessage { factory ApplicationData_UpdatePlanOptions({ $core.bool? autoRenewal, @@ -1304,148 +1308,6 @@ class ApplicationData_UpdatePlanOptions extends $pb.GeneratedMessage { void clearAutoRenewal() => $_clearField(1); } -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._(); - - factory ApplicationData_CreateVoucher.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_CreateVoucher.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.CreateVoucher', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aI(1, _omitFieldNames ? '' : 'valueCents', fieldType: $pb.PbFieldType.OU3) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_CreateVoucher clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_CreateVoucher copyWith( - void Function(ApplicationData_CreateVoucher) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_CreateVoucher)) - as ApplicationData_CreateVoucher; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_CreateVoucher create() => - ApplicationData_CreateVoucher._(); - @$core.override - ApplicationData_CreateVoucher createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_CreateVoucher getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_CreateVoucher? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get valueCents => $_getIZ(0); - @$pb.TagNumber(1) - set valueCents($core.int value) => $_setUnsignedInt32(0, value); - @$pb.TagNumber(1) - $core.bool hasValueCents() => $_has(0); - @$pb.TagNumber(1) - void clearValueCents() => $_clearField(1); -} - -class ApplicationData_GetLocation extends $pb.GeneratedMessage { - factory ApplicationData_GetLocation() => create(); - - ApplicationData_GetLocation._(); - - factory ApplicationData_GetLocation.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetLocation.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetLocation', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetLocation clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetLocation copyWith( - void Function(ApplicationData_GetLocation) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_GetLocation)) - as ApplicationData_GetLocation; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetLocation create() => - ApplicationData_GetLocation._(); - @$core.override - ApplicationData_GetLocation createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetLocation getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_GetLocation? _defaultInstance; -} - -class ApplicationData_GetVouchers extends $pb.GeneratedMessage { - factory ApplicationData_GetVouchers() => create(); - - ApplicationData_GetVouchers._(); - - factory ApplicationData_GetVouchers.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetVouchers.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetVouchers', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetVouchers clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetVouchers copyWith( - void Function(ApplicationData_GetVouchers) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_GetVouchers)) - as ApplicationData_GetVouchers; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetVouchers create() => - ApplicationData_GetVouchers._(); - @$core.override - ApplicationData_GetVouchers createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetVouchers getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_GetVouchers? _defaultInstance; -} - class ApplicationData_GetAvailablePlans extends $pb.GeneratedMessage { factory ApplicationData_GetAvailablePlans() => create(); @@ -1578,66 +1440,6 @@ class ApplicationData_GetCurrentPlanInfos extends $pb.GeneratedMessage { 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._(); - - factory ApplicationData_RedeemAdditionalCode.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_RedeemAdditionalCode.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - 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('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RedeemAdditionalCode clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RedeemAdditionalCode copyWith( - void Function(ApplicationData_RedeemAdditionalCode) updates) => - super.copyWith((message) => - updates(message as ApplicationData_RedeemAdditionalCode)) - as ApplicationData_RedeemAdditionalCode; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_RedeemAdditionalCode create() => - ApplicationData_RedeemAdditionalCode._(); - @$core.override - ApplicationData_RedeemAdditionalCode createEmptyInstance() => create(); - @$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 value) => $_setString(0, value); - @$pb.TagNumber(2) - $core.bool hasInviteCode() => $_has(0); - @$pb.TagNumber(2) - void clearInviteCode() => $_clearField(2); -} - class ApplicationData_RemoveAdditionalUser extends $pb.GeneratedMessage { factory ApplicationData_RemoveAdditionalUser({ $fixnum.Int64? userId, @@ -2260,21 +2062,121 @@ class ApplicationData_AddAdditionalUser extends $pb.GeneratedMessage { void clearUserId() => $_clearField(1); } +class ApplicationData_SetLoginToken extends $pb.GeneratedMessage { + factory ApplicationData_SetLoginToken({ + $core.List<$core.int>? loginToken, + }) { + final result = create(); + if (loginToken != null) result.loginToken = loginToken; + return result; + } + + ApplicationData_SetLoginToken._(); + + factory ApplicationData_SetLoginToken.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ApplicationData_SetLoginToken.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ApplicationData.SetLoginToken', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), + createEmptyInstance: create) + ..a<$core.List<$core.int>>( + 1, _omitFieldNames ? '' : 'loginToken', $pb.PbFieldType.OY) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ApplicationData_SetLoginToken clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ApplicationData_SetLoginToken copyWith( + void Function(ApplicationData_SetLoginToken) updates) => + super.copyWith( + (message) => updates(message as ApplicationData_SetLoginToken)) + as ApplicationData_SetLoginToken; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ApplicationData_SetLoginToken create() => + ApplicationData_SetLoginToken._(); + @$core.override + ApplicationData_SetLoginToken createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ApplicationData_SetLoginToken getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ApplicationData_SetLoginToken? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.int> get loginToken => $_getN(0); + @$pb.TagNumber(1) + set loginToken($core.List<$core.int> value) => $_setBytes(0, value); + @$pb.TagNumber(1) + $core.bool hasLoginToken() => $_has(0); + @$pb.TagNumber(1) + void clearLoginToken() => $_clearField(1); +} + +class ApplicationData_Deprecated extends $pb.GeneratedMessage { + factory ApplicationData_Deprecated() => create(); + + ApplicationData_Deprecated._(); + + factory ApplicationData_Deprecated.fromBuffer($core.List<$core.int> data, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromBuffer(data, registry); + factory ApplicationData_Deprecated.fromJson($core.String json, + [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => + create()..mergeFromJson(json, registry); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo( + _omitMessageNames ? '' : 'ApplicationData.Deprecated', + package: + const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), + createEmptyInstance: create) + ..hasRequiredFields = false; + + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ApplicationData_Deprecated clone() => deepCopy(); + @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') + ApplicationData_Deprecated copyWith( + void Function(ApplicationData_Deprecated) updates) => + super.copyWith( + (message) => updates(message as ApplicationData_Deprecated)) + as ApplicationData_Deprecated; + + @$core.override + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static ApplicationData_Deprecated create() => ApplicationData_Deprecated._(); + @$core.override + ApplicationData_Deprecated createEmptyInstance() => create(); + @$core.pragma('dart2js:noInline') + static ApplicationData_Deprecated getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static ApplicationData_Deprecated? _defaultInstance; +} + enum ApplicationData_ApplicationData { textMessage, getUserByUsername, getPrekeysByUserId, getUserById, updateGoogleFcmToken, - getLocation, + deprecated9, getCurrentPlanInfos, - redeemVoucher, + deprecated11, getAvailablePlans, - createVoucher, - getVouchers, - switchtoPayedPlan, - getAddaccountsInvites, - redeemAdditionalCode, + deprecated13, + deprecated14, + deprecated15, + deprecated16, + deprecated17, removeAdditionalUser, updatePlanOptions, downloadDone, @@ -2286,6 +2188,7 @@ enum ApplicationData_ApplicationData { ipaPurchase, ipaForceCheck, addAdditionalUser, + setLoginToken, notSet } @@ -2296,15 +2199,15 @@ class ApplicationData extends $pb.GeneratedMessage { ApplicationData_GetPrekeysByUserId? getPrekeysByUserId, ApplicationData_GetUserById? getUserById, ApplicationData_UpdateGoogleFcmToken? updateGoogleFcmToken, - ApplicationData_GetLocation? getLocation, + ApplicationData_Deprecated? deprecated9, ApplicationData_GetCurrentPlanInfos? getCurrentPlanInfos, - ApplicationData_RedeemVoucher? redeemVoucher, + ApplicationData_Deprecated? deprecated11, ApplicationData_GetAvailablePlans? getAvailablePlans, - ApplicationData_CreateVoucher? createVoucher, - ApplicationData_GetVouchers? getVouchers, - ApplicationData_SwitchToPayedPlan? switchtoPayedPlan, - ApplicationData_GetAddAccountsInvites? getAddaccountsInvites, - ApplicationData_RedeemAdditionalCode? redeemAdditionalCode, + ApplicationData_Deprecated? deprecated13, + ApplicationData_Deprecated? deprecated14, + ApplicationData_Deprecated? deprecated15, + ApplicationData_Deprecated? deprecated16, + ApplicationData_Deprecated? deprecated17, ApplicationData_RemoveAdditionalUser? removeAdditionalUser, ApplicationData_UpdatePlanOptions? updatePlanOptions, ApplicationData_DownloadDone? downloadDone, @@ -2316,6 +2219,7 @@ class ApplicationData extends $pb.GeneratedMessage { ApplicationData_IPAPurchase? ipaPurchase, ApplicationData_IPAForceCheck? ipaForceCheck, ApplicationData_AddAdditionalUser? addAdditionalUser, + ApplicationData_SetLoginToken? setLoginToken, }) { final result = create(); if (textMessage != null) result.textMessage = textMessage; @@ -2325,18 +2229,16 @@ class ApplicationData extends $pb.GeneratedMessage { if (getUserById != null) result.getUserById = getUserById; if (updateGoogleFcmToken != null) result.updateGoogleFcmToken = updateGoogleFcmToken; - if (getLocation != null) result.getLocation = getLocation; + if (deprecated9 != null) result.deprecated9 = deprecated9; if (getCurrentPlanInfos != null) result.getCurrentPlanInfos = getCurrentPlanInfos; - if (redeemVoucher != null) result.redeemVoucher = redeemVoucher; + if (deprecated11 != null) result.deprecated11 = deprecated11; 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; + if (deprecated13 != null) result.deprecated13 = deprecated13; + if (deprecated14 != null) result.deprecated14 = deprecated14; + if (deprecated15 != null) result.deprecated15 = deprecated15; + if (deprecated16 != null) result.deprecated16 = deprecated16; + if (deprecated17 != null) result.deprecated17 = deprecated17; if (removeAdditionalUser != null) result.removeAdditionalUser = removeAdditionalUser; if (updatePlanOptions != null) result.updatePlanOptions = updatePlanOptions; @@ -2351,6 +2253,7 @@ class ApplicationData extends $pb.GeneratedMessage { if (ipaPurchase != null) result.ipaPurchase = ipaPurchase; if (ipaForceCheck != null) result.ipaForceCheck = ipaForceCheck; if (addAdditionalUser != null) result.addAdditionalUser = addAdditionalUser; + if (setLoginToken != null) result.setLoginToken = setLoginToken; return result; } @@ -2370,15 +2273,15 @@ class ApplicationData extends $pb.GeneratedMessage { 3: ApplicationData_ApplicationData.getPrekeysByUserId, 6: ApplicationData_ApplicationData.getUserById, 8: ApplicationData_ApplicationData.updateGoogleFcmToken, - 9: ApplicationData_ApplicationData.getLocation, + 9: ApplicationData_ApplicationData.deprecated9, 10: ApplicationData_ApplicationData.getCurrentPlanInfos, - 11: ApplicationData_ApplicationData.redeemVoucher, + 11: ApplicationData_ApplicationData.deprecated11, 12: ApplicationData_ApplicationData.getAvailablePlans, - 13: ApplicationData_ApplicationData.createVoucher, - 14: ApplicationData_ApplicationData.getVouchers, - 15: ApplicationData_ApplicationData.switchtoPayedPlan, - 16: ApplicationData_ApplicationData.getAddaccountsInvites, - 17: ApplicationData_ApplicationData.redeemAdditionalCode, + 13: ApplicationData_ApplicationData.deprecated13, + 14: ApplicationData_ApplicationData.deprecated14, + 15: ApplicationData_ApplicationData.deprecated15, + 16: ApplicationData_ApplicationData.deprecated16, + 17: ApplicationData_ApplicationData.deprecated17, 18: ApplicationData_ApplicationData.removeAdditionalUser, 19: ApplicationData_ApplicationData.updatePlanOptions, 20: ApplicationData_ApplicationData.downloadDone, @@ -2390,6 +2293,7 @@ class ApplicationData extends $pb.GeneratedMessage { 27: ApplicationData_ApplicationData.ipaPurchase, 28: ApplicationData_ApplicationData.ipaForceCheck, 29: ApplicationData_ApplicationData.addAdditionalUser, + 30: ApplicationData_ApplicationData.setLoginToken, 0: ApplicationData_ApplicationData.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo( @@ -2422,7 +2326,8 @@ class ApplicationData extends $pb.GeneratedMessage { 26, 27, 28, - 29 + 29, + 30 ]) ..aOM(1, _omitFieldNames ? '' : 'textMessage', protoName: 'textMessage', @@ -2442,40 +2347,35 @@ class ApplicationData extends $pb.GeneratedMessage { 8, _omitFieldNames ? '' : 'updateGoogleFcmToken', protoName: 'updateGoogleFcmToken', subBuilder: ApplicationData_UpdateGoogleFcmToken.create) - ..aOM(9, _omitFieldNames ? '' : 'getLocation', - protoName: 'getLocation', - subBuilder: ApplicationData_GetLocation.create) + ..aOM(9, _omitFieldNames ? '' : 'deprecated9', + protoName: 'deprecated_9', + subBuilder: ApplicationData_Deprecated.create) ..aOM( 10, _omitFieldNames ? '' : 'getCurrentPlanInfos', protoName: 'getCurrentPlanInfos', subBuilder: ApplicationData_GetCurrentPlanInfos.create) - ..aOM( - 11, _omitFieldNames ? '' : 'redeemVoucher', - protoName: 'redeemVoucher', - subBuilder: ApplicationData_RedeemVoucher.create) + ..aOM(11, _omitFieldNames ? '' : 'deprecated11', + protoName: 'deprecated_11', + subBuilder: ApplicationData_Deprecated.create) ..aOM( 12, _omitFieldNames ? '' : 'getAvailablePlans', protoName: 'getAvailablePlans', subBuilder: ApplicationData_GetAvailablePlans.create) - ..aOM( - 13, _omitFieldNames ? '' : 'createVoucher', - protoName: 'createVoucher', - subBuilder: ApplicationData_CreateVoucher.create) - ..aOM(14, _omitFieldNames ? '' : 'getVouchers', - protoName: 'getVouchers', - subBuilder: ApplicationData_GetVouchers.create) - ..aOM( - 15, _omitFieldNames ? '' : 'switchtoPayedPlan', - protoName: 'switchtoPayedPlan', - subBuilder: ApplicationData_SwitchToPayedPlan.create) - ..aOM( - 16, _omitFieldNames ? '' : 'getAddaccountsInvites', - protoName: 'getAddaccountsInvites', - subBuilder: ApplicationData_GetAddAccountsInvites.create) - ..aOM( - 17, _omitFieldNames ? '' : 'redeemAdditionalCode', - protoName: 'redeemAdditionalCode', - subBuilder: ApplicationData_RedeemAdditionalCode.create) + ..aOM(13, _omitFieldNames ? '' : 'deprecated13', + protoName: 'deprecated_13', + subBuilder: ApplicationData_Deprecated.create) + ..aOM(14, _omitFieldNames ? '' : 'deprecated14', + protoName: 'deprecated_14', + subBuilder: ApplicationData_Deprecated.create) + ..aOM(15, _omitFieldNames ? '' : 'deprecated15', + protoName: 'deprecated_15', + subBuilder: ApplicationData_Deprecated.create) + ..aOM(16, _omitFieldNames ? '' : 'deprecated16', + protoName: 'deprecated_16', + subBuilder: ApplicationData_Deprecated.create) + ..aOM(17, _omitFieldNames ? '' : 'deprecated17', + protoName: 'deprecated_17', + subBuilder: ApplicationData_Deprecated.create) ..aOM( 18, _omitFieldNames ? '' : 'removeAdditionalUser', protoName: 'removeAdditionalUser', @@ -2517,6 +2417,9 @@ class ApplicationData extends $pb.GeneratedMessage { 29, _omitFieldNames ? '' : 'addAdditionalUser', protoName: 'addAdditionalUser', subBuilder: ApplicationData_AddAdditionalUser.create) + ..aOM( + 30, _omitFieldNames ? '' : 'setLoginToken', + subBuilder: ApplicationData_SetLoginToken.create) ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') @@ -2563,6 +2466,7 @@ class ApplicationData extends $pb.GeneratedMessage { @$pb.TagNumber(27) @$pb.TagNumber(28) @$pb.TagNumber(29) + @$pb.TagNumber(30) ApplicationData_ApplicationData whichApplicationData() => _ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!; @$pb.TagNumber(1) @@ -2590,6 +2494,7 @@ class ApplicationData extends $pb.GeneratedMessage { @$pb.TagNumber(27) @$pb.TagNumber(28) @$pb.TagNumber(29) + @$pb.TagNumber(30) void clearApplicationData() => $_clearField($_whichOneof(0)); @$pb.TagNumber(1) @@ -2652,15 +2557,15 @@ class ApplicationData extends $pb.GeneratedMessage { $_ensure(4); @$pb.TagNumber(9) - ApplicationData_GetLocation get getLocation => $_getN(5); + ApplicationData_Deprecated get deprecated9 => $_getN(5); @$pb.TagNumber(9) - set getLocation(ApplicationData_GetLocation value) => $_setField(9, value); + set deprecated9(ApplicationData_Deprecated value) => $_setField(9, value); @$pb.TagNumber(9) - $core.bool hasGetLocation() => $_has(5); + $core.bool hasDeprecated9() => $_has(5); @$pb.TagNumber(9) - void clearGetLocation() => $_clearField(9); + void clearDeprecated9() => $_clearField(9); @$pb.TagNumber(9) - ApplicationData_GetLocation ensureGetLocation() => $_ensure(5); + ApplicationData_Deprecated ensureDeprecated9() => $_ensure(5); @$pb.TagNumber(10) ApplicationData_GetCurrentPlanInfos get getCurrentPlanInfos => $_getN(6); @@ -2676,16 +2581,15 @@ class ApplicationData extends $pb.GeneratedMessage { $_ensure(6); @$pb.TagNumber(11) - ApplicationData_RedeemVoucher get redeemVoucher => $_getN(7); + ApplicationData_Deprecated get deprecated11 => $_getN(7); @$pb.TagNumber(11) - set redeemVoucher(ApplicationData_RedeemVoucher value) => - $_setField(11, value); + set deprecated11(ApplicationData_Deprecated value) => $_setField(11, value); @$pb.TagNumber(11) - $core.bool hasRedeemVoucher() => $_has(7); + $core.bool hasDeprecated11() => $_has(7); @$pb.TagNumber(11) - void clearRedeemVoucher() => $_clearField(11); + void clearDeprecated11() => $_clearField(11); @$pb.TagNumber(11) - ApplicationData_RedeemVoucher ensureRedeemVoucher() => $_ensure(7); + ApplicationData_Deprecated ensureDeprecated11() => $_ensure(7); @$pb.TagNumber(12) ApplicationData_GetAvailablePlans get getAvailablePlans => $_getN(8); @@ -2700,65 +2604,59 @@ class ApplicationData extends $pb.GeneratedMessage { ApplicationData_GetAvailablePlans ensureGetAvailablePlans() => $_ensure(8); @$pb.TagNumber(13) - ApplicationData_CreateVoucher get createVoucher => $_getN(9); + ApplicationData_Deprecated get deprecated13 => $_getN(9); @$pb.TagNumber(13) - set createVoucher(ApplicationData_CreateVoucher value) => - $_setField(13, value); + set deprecated13(ApplicationData_Deprecated value) => $_setField(13, value); @$pb.TagNumber(13) - $core.bool hasCreateVoucher() => $_has(9); + $core.bool hasDeprecated13() => $_has(9); @$pb.TagNumber(13) - void clearCreateVoucher() => $_clearField(13); + void clearDeprecated13() => $_clearField(13); @$pb.TagNumber(13) - ApplicationData_CreateVoucher ensureCreateVoucher() => $_ensure(9); + ApplicationData_Deprecated ensureDeprecated13() => $_ensure(9); @$pb.TagNumber(14) - ApplicationData_GetVouchers get getVouchers => $_getN(10); + ApplicationData_Deprecated get deprecated14 => $_getN(10); @$pb.TagNumber(14) - set getVouchers(ApplicationData_GetVouchers value) => $_setField(14, value); + set deprecated14(ApplicationData_Deprecated value) => $_setField(14, value); @$pb.TagNumber(14) - $core.bool hasGetVouchers() => $_has(10); + $core.bool hasDeprecated14() => $_has(10); @$pb.TagNumber(14) - void clearGetVouchers() => $_clearField(14); + void clearDeprecated14() => $_clearField(14); @$pb.TagNumber(14) - ApplicationData_GetVouchers ensureGetVouchers() => $_ensure(10); + ApplicationData_Deprecated ensureDeprecated14() => $_ensure(10); @$pb.TagNumber(15) - ApplicationData_SwitchToPayedPlan get switchtoPayedPlan => $_getN(11); + ApplicationData_Deprecated get deprecated15 => $_getN(11); @$pb.TagNumber(15) - set switchtoPayedPlan(ApplicationData_SwitchToPayedPlan value) => - $_setField(15, value); + set deprecated15(ApplicationData_Deprecated value) => $_setField(15, value); @$pb.TagNumber(15) - $core.bool hasSwitchtoPayedPlan() => $_has(11); + $core.bool hasDeprecated15() => $_has(11); @$pb.TagNumber(15) - void clearSwitchtoPayedPlan() => $_clearField(15); + void clearDeprecated15() => $_clearField(15); @$pb.TagNumber(15) - ApplicationData_SwitchToPayedPlan ensureSwitchtoPayedPlan() => $_ensure(11); + ApplicationData_Deprecated ensureDeprecated15() => $_ensure(11); @$pb.TagNumber(16) - ApplicationData_GetAddAccountsInvites get getAddaccountsInvites => $_getN(12); + ApplicationData_Deprecated get deprecated16 => $_getN(12); @$pb.TagNumber(16) - set getAddaccountsInvites(ApplicationData_GetAddAccountsInvites value) => - $_setField(16, value); + set deprecated16(ApplicationData_Deprecated value) => $_setField(16, value); @$pb.TagNumber(16) - $core.bool hasGetAddaccountsInvites() => $_has(12); + $core.bool hasDeprecated16() => $_has(12); @$pb.TagNumber(16) - void clearGetAddaccountsInvites() => $_clearField(16); + void clearDeprecated16() => $_clearField(16); @$pb.TagNumber(16) - ApplicationData_GetAddAccountsInvites ensureGetAddaccountsInvites() => - $_ensure(12); + ApplicationData_Deprecated ensureDeprecated16() => $_ensure(12); @$pb.TagNumber(17) - ApplicationData_RedeemAdditionalCode get redeemAdditionalCode => $_getN(13); + ApplicationData_Deprecated get deprecated17 => $_getN(13); @$pb.TagNumber(17) - set redeemAdditionalCode(ApplicationData_RedeemAdditionalCode value) => - $_setField(17, value); + set deprecated17(ApplicationData_Deprecated value) => $_setField(17, value); @$pb.TagNumber(17) - $core.bool hasRedeemAdditionalCode() => $_has(13); + $core.bool hasDeprecated17() => $_has(13); @$pb.TagNumber(17) - void clearRedeemAdditionalCode() => $_clearField(17); + void clearDeprecated17() => $_clearField(17); @$pb.TagNumber(17) - ApplicationData_RedeemAdditionalCode ensureRedeemAdditionalCode() => - $_ensure(13); + ApplicationData_Deprecated ensureDeprecated17() => $_ensure(13); @$pb.TagNumber(18) ApplicationData_RemoveAdditionalUser get removeAdditionalUser => $_getN(14); @@ -2891,6 +2789,18 @@ class ApplicationData extends $pb.GeneratedMessage { void clearAddAdditionalUser() => $_clearField(29); @$pb.TagNumber(29) ApplicationData_AddAdditionalUser ensureAddAdditionalUser() => $_ensure(24); + + @$pb.TagNumber(30) + ApplicationData_SetLoginToken get setLoginToken => $_getN(25); + @$pb.TagNumber(30) + set setLoginToken(ApplicationData_SetLoginToken value) => + $_setField(30, value); + @$pb.TagNumber(30) + $core.bool hasSetLoginToken() => $_has(25); + @$pb.TagNumber(30) + void clearSetLoginToken() => $_clearField(30); + @$pb.TagNumber(30) + ApplicationData_SetLoginToken ensureSetLoginToken() => $_ensure(25); } class Response_PreKey extends $pb.GeneratedMessage { diff --git a/lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart b/lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart index a0b6812a..73373bf9 100644 --- a/lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart +++ b/lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart @@ -134,13 +134,23 @@ const Handshake$json = { '9': 0, '10': 'requestPOW' }, + { + '1': 'authenticate_with_login_token', + '3': 6, + '4': 1, + '5': 11, + '6': '.client_to_server.Handshake.AuthenticateWithLoginToken', + '9': 0, + '10': 'authenticateWithLoginToken' + }, ], '3': [ Handshake_RequestPOW$json, Handshake_Register$json, Handshake_GetAuthChallenge$json, Handshake_GetAuthToken$json, - Handshake_Authenticate$json + Handshake_Authenticate$json, + Handshake_AuthenticateWithLoginToken$json ], '8': [ {'1': 'Handshake'}, @@ -186,9 +196,19 @@ const Handshake_Register$json = { {'1': 'is_ios', '3': 8, '4': 1, '5': 8, '10': 'isIos'}, {'1': 'lang_code', '3': 9, '4': 1, '5': 9, '10': 'langCode'}, {'1': 'proof_of_work', '3': 10, '4': 1, '5': 3, '10': 'proofOfWork'}, + { + '1': 'login_token', + '3': 11, + '4': 1, + '5': 12, + '9': 1, + '10': 'loginToken', + '17': true + }, ], '8': [ {'1': '_invite_code'}, + {'1': '_login_token'}, ], }; @@ -247,6 +267,24 @@ const Handshake_Authenticate$json = { ], }; +@$core.Deprecated('Use handshakeDescriptor instead') +const Handshake_AuthenticateWithLoginToken$json = { + '1': 'AuthenticateWithLoginToken', + '2': [ + {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, + { + '1': 'secret_login_token', + '3': 2, + '4': 1, + '5': 12, + '10': 'secretLoginToken' + }, + {'1': 'app_version', '3': 3, '4': 1, '5': 9, '10': 'appVersion'}, + {'1': 'device_id', '3': 4, '4': 1, '5': 3, '10': 'deviceId'}, + {'1': 'in_background', '3': 5, '4': 1, '5': 8, '10': 'inBackground'}, + ], +}; + /// Descriptor for `Handshake`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List handshakeDescriptor = $convert.base64Decode( 'CglIYW5kc2hha2USQgoIcmVnaXN0ZXIYASABKAsyJC5jbGllbnRfdG9fc2VydmVyLkhhbmRzaG' @@ -256,20 +294,27 @@ final $typed_data.Uint8List handshakeDescriptor = $convert.base64Decode( 'LkdldEF1dGhUb2tlbkgAUgxnZXRBdXRoVG9rZW4STgoMYXV0aGVudGljYXRlGAQgASgLMiguY2' 'xpZW50X3RvX3NlcnZlci5IYW5kc2hha2UuQXV0aGVudGljYXRlSABSDGF1dGhlbnRpY2F0ZRJI' 'CgpyZXF1ZXN0UE9XGAUgASgLMiYuY2xpZW50X3RvX3NlcnZlci5IYW5kc2hha2UuUmVxdWVzdF' - 'BPV0gAUgpyZXF1Z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IAEoDFIJYXV0aFRva2' + 'VuEiQKC2FwcF92ZXJzaW9uGAMgASgJSABSCmFwcFZlcnNpb26IAQESIAoJZGV2aWNlX2lkGAQg' + 'ASgDSAFSCGRldmljZUlkiAEBEigKDWluX2JhY2tncm91bmQYBSABKAhIAlIMaW5CYWNrZ3JvdW' + '5kiAEBQg4KDF9hcHBfdmVyc2lvbkIMCgpfZGV2aWNlX2lkQhAKDl9pbl9iYWNrZ3JvdW5kGsYB' + 'ChpBdXRoZW50aWNhdGVXaXRoTG9naW5Ub2tlbhIXCgd1c2VyX2lkGAEgASgDUgZ1c2VySWQSLA' + 'oSc2VjcmV0X2xvZ2luX3Rva2VuGAIgASgMUhBzZWNyZXRMb2dpblRva2VuEh8KC2FwcF92ZXJz' + 'aW9uGAMgASgJUgphcHBWZXJzaW9uEhsKCWRldmljZV9pZBgEIAEoA1IIZGV2aWNlSWQSIwoNaW' + '5fYmFja2dyb3VuZBgFIAEoCFIMaW5CYWNrZ3JvdW5kQgsKCUhhbmRzaGFrZQ=='); @$core.Deprecated('Use applicationDataDescriptor instead') const ApplicationData$json = { @@ -321,13 +366,13 @@ const ApplicationData$json = { '10': 'updateGoogleFcmToken' }, { - '1': 'getLocation', + '1': 'deprecated_9', '3': 9, '4': 1, '5': 11, - '6': '.client_to_server.ApplicationData.GetLocation', + '6': '.client_to_server.ApplicationData.Deprecated', '9': 0, - '10': 'getLocation' + '10': 'deprecated9' }, { '1': 'getCurrentPlanInfos', @@ -339,13 +384,13 @@ const ApplicationData$json = { '10': 'getCurrentPlanInfos' }, { - '1': 'redeemVoucher', + '1': 'deprecated_11', '3': 11, '4': 1, '5': 11, - '6': '.client_to_server.ApplicationData.RedeemVoucher', + '6': '.client_to_server.ApplicationData.Deprecated', '9': 0, - '10': 'redeemVoucher' + '10': 'deprecated11' }, { '1': 'getAvailablePlans', @@ -357,49 +402,49 @@ const ApplicationData$json = { '10': 'getAvailablePlans' }, { - '1': 'createVoucher', + '1': 'deprecated_13', '3': 13, '4': 1, '5': 11, - '6': '.client_to_server.ApplicationData.CreateVoucher', + '6': '.client_to_server.ApplicationData.Deprecated', '9': 0, - '10': 'createVoucher' + '10': 'deprecated13' }, { - '1': 'getVouchers', + '1': 'deprecated_14', '3': 14, '4': 1, '5': 11, - '6': '.client_to_server.ApplicationData.GetVouchers', + '6': '.client_to_server.ApplicationData.Deprecated', '9': 0, - '10': 'getVouchers' + '10': 'deprecated14' }, { - '1': 'switchtoPayedPlan', + '1': 'deprecated_15', '3': 15, '4': 1, '5': 11, - '6': '.client_to_server.ApplicationData.SwitchToPayedPlan', + '6': '.client_to_server.ApplicationData.Deprecated', '9': 0, - '10': 'switchtoPayedPlan' + '10': 'deprecated15' }, { - '1': 'getAddaccountsInvites', + '1': 'deprecated_16', '3': 16, '4': 1, '5': 11, - '6': '.client_to_server.ApplicationData.GetAddAccountsInvites', + '6': '.client_to_server.ApplicationData.Deprecated', '9': 0, - '10': 'getAddaccountsInvites' + '10': 'deprecated16' }, { - '1': 'redeemAdditionalCode', + '1': 'deprecated_17', '3': 17, '4': 1, '5': 11, - '6': '.client_to_server.ApplicationData.RedeemAdditionalCode', + '6': '.client_to_server.ApplicationData.Deprecated', '9': 0, - '10': 'redeemAdditionalCode' + '10': 'deprecated17' }, { '1': 'updatePlanOptions', @@ -500,6 +545,15 @@ const ApplicationData$json = { '9': 0, '10': 'addAdditionalUser' }, + { + '1': 'set_login_token', + '3': 30, + '4': 1, + '5': 11, + '6': '.client_to_server.ApplicationData.SetLoginToken', + '9': 0, + '10': 'setLoginToken' + }, ], '3': [ ApplicationData_TextMessage$json, @@ -507,16 +561,10 @@ const ApplicationData$json = { ApplicationData_ChangeUsername$json, ApplicationData_UpdateGoogleFcmToken$json, ApplicationData_GetUserById$json, - ApplicationData_RedeemVoucher$json, - ApplicationData_SwitchToPayedPlan$json, ApplicationData_UpdatePlanOptions$json, - ApplicationData_CreateVoucher$json, - ApplicationData_GetLocation$json, - ApplicationData_GetVouchers$json, ApplicationData_GetAvailablePlans$json, ApplicationData_GetAddAccountsInvites$json, ApplicationData_GetCurrentPlanInfos$json, - ApplicationData_RedeemAdditionalCode$json, ApplicationData_RemoveAdditionalUser$json, ApplicationData_GetPrekeysByUserId$json, ApplicationData_GetSignedPreKeyByUserId$json, @@ -526,7 +574,9 @@ const ApplicationData$json = { ApplicationData_IPAPurchase$json, ApplicationData_IPAForceCheck$json, ApplicationData_DeleteAccount$json, - ApplicationData_AddAdditionalUser$json + ApplicationData_AddAdditionalUser$json, + ApplicationData_SetLoginToken$json, + ApplicationData_Deprecated$json ], '8': [ {'1': 'ApplicationData'}, @@ -586,24 +636,6 @@ 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'}, - {'1': 'auto_renewal', '3': 3, '4': 1, '5': 8, '10': 'autoRenewal'}, - ], -}; - @$core.Deprecated('Use applicationDataDescriptor instead') const ApplicationData_UpdatePlanOptions$json = { '1': 'UpdatePlanOptions', @@ -612,24 +644,6 @@ const ApplicationData_UpdatePlanOptions$json = { ], }; -@$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') -const ApplicationData_GetLocation$json = { - '1': 'GetLocation', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetVouchers$json = { - '1': 'GetVouchers', -}; - @$core.Deprecated('Use applicationDataDescriptor instead') const ApplicationData_GetAvailablePlans$json = { '1': 'GetAvailablePlans', @@ -645,14 +659,6 @@ 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') const ApplicationData_RemoveAdditionalUser$json = { '1': 'RemoveAdditionalUser', @@ -744,6 +750,19 @@ const ApplicationData_AddAdditionalUser$json = { ], }; +@$core.Deprecated('Use applicationDataDescriptor instead') +const ApplicationData_SetLoginToken$json = { + '1': 'SetLoginToken', + '2': [ + {'1': 'login_token', '3': 1, '4': 1, '5': 12, '10': 'loginToken'}, + ], +}; + +@$core.Deprecated('Use applicationDataDescriptor instead') +const ApplicationData_Deprecated$json = { + '1': 'Deprecated', +}; + /// Descriptor for `ApplicationData`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode( 'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dE1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm' @@ -755,66 +774,62 @@ final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode( 'bnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRVc2VyQnlJZEgAUgtnZXRVc2VyQnlJZB' 'JsChR1cGRhdGVHb29nbGVGY21Ub2tlbhgIIAEoCzI2LmNsaWVudF90b19zZXJ2ZXIuQXBwbGlj' 'YXRpb25EYXRhLlVwZGF0ZUdvb2dsZUZjbVRva2VuSABSFHVwZGF0ZUdvb2dsZUZjbVRva2VuEl' - 'EKC2dldExvY2F0aW9uGAkgASgLMi0uY2xpZW50X3RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGEu' - 'R2V0T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EisKEXZlcm' + 'lmaWNhdGlvbl9kYXRhGAMgASgJUhB2ZXJpZmljYXRpb25EYXRhGg8KDUlQQUZvcmNlQ2hlY2sa' + 'DwoNRGVsZXRlQWNjb3VudBosChFBZGRBZGRpdGlvbmFsVXNlchIXCgd1c2VyX2lkGAEgASgDUg' + 'Z1c2VySWQaMAoNU2V0TG9naW5Ub2tlbhIfCgtsb2dpbl90b2tlbhgBIAEoDFIKbG9naW5Ub2tl' + 'bhoMCgpEZXByZWNhdGVkQhEKD0FwcGxpY2F0aW9uRGF0YQ=='); @$core.Deprecated('Use responseDescriptor instead') const Response$json = { diff --git a/lib/src/model/protobuf/api/websocket/server_to_client.pb.dart b/lib/src/model/protobuf/api/websocket/server_to_client.pb.dart index 499450f2..6c10ff5d 100644 --- a/lib/src/model/protobuf/api/websocket/server_to_client.pb.dart +++ b/lib/src/model/protobuf/api/websocket/server_to_client.pb.dart @@ -16,12 +16,9 @@ import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; import 'error.pbenum.dart' as $0; -import 'server_to_client.pbenum.dart'; export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; -export 'server_to_client.pbenum.dart'; - enum ServerToClient_V { v0, notSet } class ServerToClient extends $pb.GeneratedMessage { @@ -752,90 +749,6 @@ class Response_AddAccountsInvites extends $pb.GeneratedMessage { $pb.PbList get invites => $_getList(0); } -class Response_Transaction extends $pb.GeneratedMessage { - factory Response_Transaction({ - $fixnum.Int64? depositCents, - Response_TransactionTypes? 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._(); - - factory Response_Transaction.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Transaction.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Transaction', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'depositCents') - ..aE(2, _omitFieldNames ? '' : 'transactionType', - enumValues: Response_TransactionTypes.values) - ..aInt64(3, _omitFieldNames ? '' : 'createdAtUnixTimestamp') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Transaction clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Transaction copyWith(void Function(Response_Transaction) updates) => - super.copyWith((message) => updates(message as Response_Transaction)) - as Response_Transaction; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Transaction create() => Response_Transaction._(); - @$core.override - Response_Transaction createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Transaction getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Transaction? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get depositCents => $_getI64(0); - @$pb.TagNumber(1) - set depositCents($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasDepositCents() => $_has(0); - @$pb.TagNumber(1) - void clearDepositCents() => $_clearField(1); - - @$pb.TagNumber(2) - Response_TransactionTypes get transactionType => $_getN(1); - @$pb.TagNumber(2) - set transactionType(Response_TransactionTypes value) => $_setField(2, value); - @$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 value) => $_setInt64(2, value); - @$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, @@ -905,158 +818,82 @@ class Response_AdditionalAccount extends $pb.GeneratedMessage { 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; - } +class Response_Deprecated extends $pb.GeneratedMessage { + factory Response_Deprecated() => create(); - Response_Voucher._(); + Response_Deprecated._(); - factory Response_Voucher.fromBuffer($core.List<$core.int> data, + factory Response_Deprecated.fromBuffer($core.List<$core.int> data, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(data, registry); - factory Response_Voucher.fromJson($core.String json, + factory Response_Deprecated.fromJson($core.String json, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Voucher', + _omitMessageNames ? '' : 'Response.Deprecated', 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('See https://github.com/google/protobuf.dart/issues/998.') - Response_Voucher clone() => deepCopy(); + Response_Deprecated clone() => deepCopy(); @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Voucher copyWith(void Function(Response_Voucher) updates) => - super.copyWith((message) => updates(message as Response_Voucher)) - as Response_Voucher; + Response_Deprecated copyWith(void Function(Response_Deprecated) updates) => + super.copyWith((message) => updates(message as Response_Deprecated)) + as Response_Deprecated; @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static Response_Voucher create() => Response_Voucher._(); + static Response_Deprecated create() => Response_Deprecated._(); @$core.override - Response_Voucher createEmptyInstance() => create(); + Response_Deprecated createEmptyInstance() => create(); @$core.pragma('dart2js:noInline') - static Response_Voucher getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Voucher? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get voucherId => $_getSZ(0); - @$pb.TagNumber(1) - set voucherId($core.String value) => $_setString(0, value); - @$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 value) => $_setInt64(1, value); - @$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 value) => $_setBool(2, value); - @$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 value) => $_setBool(3, value); - @$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 value) => $_setInt64(4, value); - @$pb.TagNumber(5) - $core.bool hasCreatedAtUnixTimestamp() => $_has(4); - @$pb.TagNumber(5) - void clearCreatedAtUnixTimestamp() => $_clearField(5); + static Response_Deprecated getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static Response_Deprecated? _defaultInstance; } -class Response_Vouchers extends $pb.GeneratedMessage { - factory Response_Vouchers({ - $core.Iterable? vouchers, - }) { - final result = create(); - if (vouchers != null) result.vouchers.addAll(vouchers); - return result; - } +class Response_Transaction extends $pb.GeneratedMessage { + factory Response_Transaction() => create(); - Response_Vouchers._(); + Response_Transaction._(); - factory Response_Vouchers.fromBuffer($core.List<$core.int> data, + factory Response_Transaction.fromBuffer($core.List<$core.int> data, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(data, registry); - factory Response_Vouchers.fromJson($core.String json, + factory Response_Transaction.fromJson($core.String json, [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(json, registry); static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Vouchers', + _omitMessageNames ? '' : 'Response.Transaction', package: const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'vouchers', - subBuilder: Response_Voucher.create) ..hasRequiredFields = false; @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Vouchers clone() => deepCopy(); + Response_Transaction clone() => deepCopy(); @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Vouchers copyWith(void Function(Response_Vouchers) updates) => - super.copyWith((message) => updates(message as Response_Vouchers)) - as Response_Vouchers; + Response_Transaction copyWith(void Function(Response_Transaction) updates) => + super.copyWith((message) => updates(message as Response_Transaction)) + as Response_Transaction; @$core.override $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static Response_Vouchers create() => Response_Vouchers._(); + static Response_Transaction create() => Response_Transaction._(); @$core.override - Response_Vouchers createEmptyInstance() => create(); + Response_Transaction createEmptyInstance() => create(); @$core.pragma('dart2js:noInline') - static Response_Vouchers getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Vouchers? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get vouchers => $_getList(0); + static Response_Transaction getDefault() => _defaultInstance ??= + $pb.GeneratedMessage.$_defaultFor(create); + static Response_Transaction? _defaultInstance; } class Response_PlanBallance extends $pb.GeneratedMessage { @@ -1195,85 +1032,6 @@ class Response_PlanBallance extends $pb.GeneratedMessage { void clearAdditionalAccountOwnerId() => $_clearField(8); } -class Response_Location extends $pb.GeneratedMessage { - factory Response_Location({ - $core.String? county, - $core.String? region, - $core.String? city, - }) { - final result = create(); - if (county != null) result.county = county; - if (region != null) result.region = region; - if (city != null) result.city = city; - return result; - } - - Response_Location._(); - - factory Response_Location.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Location.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Location', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'county') - ..aOS(2, _omitFieldNames ? '' : 'region') - ..aOS(3, _omitFieldNames ? '' : 'city') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Location clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Location copyWith(void Function(Response_Location) updates) => - super.copyWith((message) => updates(message as Response_Location)) - as Response_Location; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Location create() => Response_Location._(); - @$core.override - Response_Location createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Location getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Location? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get county => $_getSZ(0); - @$pb.TagNumber(1) - set county($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasCounty() => $_has(0); - @$pb.TagNumber(1) - void clearCounty() => $_clearField(1); - - @$pb.TagNumber(2) - $core.String get region => $_getSZ(1); - @$pb.TagNumber(2) - set region($core.String value) => $_setString(1, value); - @$pb.TagNumber(2) - $core.bool hasRegion() => $_has(1); - @$pb.TagNumber(2) - void clearRegion() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get city => $_getSZ(2); - @$pb.TagNumber(3) - set city($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasCity() => $_has(2); - @$pb.TagNumber(3) - void clearCity() => $_clearField(3); -} - class Response_PreKey extends $pb.GeneratedMessage { factory Response_PreKey({ $fixnum.Int64? id, @@ -1754,11 +1512,11 @@ enum Response_Ok_Ok { uploadtoken, userdata, authtoken, - location, + deprecated7, authenticated, plans, planballance, - vouchers, + deprecated11, addaccountsinvites, downloadtokens, signedprekey, @@ -1774,11 +1532,11 @@ class Response_Ok extends $pb.GeneratedMessage { Response_UploadToken? uploadtoken, Response_UserData? userdata, $core.List<$core.int>? authtoken, - Response_Location? location, + Response_Deprecated? deprecated7, Response_Authenticated? authenticated, Response_Plans? plans, Response_PlanBallance? planballance, - Response_Vouchers? vouchers, + Response_Deprecated? deprecated11, Response_AddAccountsInvites? addaccountsinvites, Response_DownloadTokens? downloadtokens, Response_SignedPreKey? signedprekey, @@ -1791,11 +1549,11 @@ class Response_Ok extends $pb.GeneratedMessage { if (uploadtoken != null) result.uploadtoken = uploadtoken; if (userdata != null) result.userdata = userdata; if (authtoken != null) result.authtoken = authtoken; - if (location != null) result.location = location; + if (deprecated7 != null) result.deprecated7 = deprecated7; 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 (deprecated11 != null) result.deprecated11 = deprecated11; if (addaccountsinvites != null) result.addaccountsinvites = addaccountsinvites; if (downloadtokens != null) result.downloadtokens = downloadtokens; @@ -1820,11 +1578,11 @@ class Response_Ok extends $pb.GeneratedMessage { 4: Response_Ok_Ok.uploadtoken, 5: Response_Ok_Ok.userdata, 6: Response_Ok_Ok.authtoken, - 7: Response_Ok_Ok.location, + 7: Response_Ok_Ok.deprecated7, 8: Response_Ok_Ok.authenticated, 9: Response_Ok_Ok.plans, 10: Response_Ok_Ok.planballance, - 11: Response_Ok_Ok.vouchers, + 11: Response_Ok_Ok.deprecated11, 12: Response_Ok_Ok.addaccountsinvites, 13: Response_Ok_Ok.downloadtokens, 14: Response_Ok_Ok.signedprekey, @@ -1847,16 +1605,16 @@ class Response_Ok extends $pb.GeneratedMessage { subBuilder: Response_UserData.create) ..a<$core.List<$core.int>>( 6, _omitFieldNames ? '' : 'authtoken', $pb.PbFieldType.OY) - ..aOM(7, _omitFieldNames ? '' : 'location', - subBuilder: Response_Location.create) + ..aOM(7, _omitFieldNames ? '' : 'deprecated7', + protoName: 'deprecated_7', subBuilder: Response_Deprecated.create) ..aOM(8, _omitFieldNames ? '' : 'authenticated', subBuilder: Response_Authenticated.create) ..aOM(9, _omitFieldNames ? '' : 'plans', subBuilder: Response_Plans.create) ..aOM(10, _omitFieldNames ? '' : 'planballance', subBuilder: Response_PlanBallance.create) - ..aOM(11, _omitFieldNames ? '' : 'vouchers', - subBuilder: Response_Vouchers.create) + ..aOM(11, _omitFieldNames ? '' : 'deprecated11', + protoName: 'deprecated_11', subBuilder: Response_Deprecated.create) ..aOM( 12, _omitFieldNames ? '' : 'addaccountsinvites', subBuilder: Response_AddAccountsInvites.create) @@ -1979,15 +1737,15 @@ class Response_Ok extends $pb.GeneratedMessage { void clearAuthtoken() => $_clearField(6); @$pb.TagNumber(7) - Response_Location get location => $_getN(6); + Response_Deprecated get deprecated7 => $_getN(6); @$pb.TagNumber(7) - set location(Response_Location value) => $_setField(7, value); + set deprecated7(Response_Deprecated value) => $_setField(7, value); @$pb.TagNumber(7) - $core.bool hasLocation() => $_has(6); + $core.bool hasDeprecated7() => $_has(6); @$pb.TagNumber(7) - void clearLocation() => $_clearField(7); + void clearDeprecated7() => $_clearField(7); @$pb.TagNumber(7) - Response_Location ensureLocation() => $_ensure(6); + Response_Deprecated ensureDeprecated7() => $_ensure(6); @$pb.TagNumber(8) Response_Authenticated get authenticated => $_getN(7); @@ -2023,15 +1781,15 @@ class Response_Ok extends $pb.GeneratedMessage { Response_PlanBallance ensurePlanballance() => $_ensure(9); @$pb.TagNumber(11) - Response_Vouchers get vouchers => $_getN(10); + Response_Deprecated get deprecated11 => $_getN(10); @$pb.TagNumber(11) - set vouchers(Response_Vouchers value) => $_setField(11, value); + set deprecated11(Response_Deprecated value) => $_setField(11, value); @$pb.TagNumber(11) - $core.bool hasVouchers() => $_has(10); + $core.bool hasDeprecated11() => $_has(10); @$pb.TagNumber(11) - void clearVouchers() => $_clearField(11); + void clearDeprecated11() => $_clearField(11); @$pb.TagNumber(11) - Response_Vouchers ensureVouchers() => $_ensure(10); + Response_Deprecated ensureDeprecated11() => $_ensure(10); @$pb.TagNumber(12) Response_AddAccountsInvites get addaccountsinvites => $_getN(11); diff --git a/lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart b/lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart index 6f9554a5..86f414a5 100644 --- a/lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart +++ b/lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart @@ -9,48 +9,3 @@ // ignore_for_file: curly_braces_in_flow_control_structures // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes // ignore_for_file: non_constant_identifier_names, prefer_relative_imports - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -class Response_TransactionTypes extends $pb.ProtobufEnum { - static const Response_TransactionTypes Refund = - Response_TransactionTypes._(0, _omitEnumNames ? '' : 'Refund'); - static const Response_TransactionTypes VoucherRedeemed = - Response_TransactionTypes._(1, _omitEnumNames ? '' : 'VoucherRedeemed'); - static const Response_TransactionTypes VoucherCreated = - Response_TransactionTypes._(2, _omitEnumNames ? '' : 'VoucherCreated'); - static const Response_TransactionTypes Cash = - Response_TransactionTypes._(3, _omitEnumNames ? '' : 'Cash'); - static const Response_TransactionTypes PlanUpgrade = - Response_TransactionTypes._(4, _omitEnumNames ? '' : 'PlanUpgrade'); - static const Response_TransactionTypes Unknown = - Response_TransactionTypes._(5, _omitEnumNames ? '' : 'Unknown'); - static const Response_TransactionTypes ThanksForTesting = - Response_TransactionTypes._(6, _omitEnumNames ? '' : 'ThanksForTesting'); - static const Response_TransactionTypes AutoRenewal = - Response_TransactionTypes._(7, _omitEnumNames ? '' : 'AutoRenewal'); - - static const $core.List values = - [ - Refund, - VoucherRedeemed, - VoucherCreated, - Cash, - PlanUpgrade, - Unknown, - ThanksForTesting, - AutoRenewal, - ]; - - static final $core.List _byValue = - $pb.ProtobufEnum.$_initByValueList(values, 7); - static Response_TransactionTypes? valueOf($core.int value) => - value < 0 || value >= _byValue.length ? null : _byValue[value]; - - const Response_TransactionTypes._(super.value, super.name); -} - -const $core.bool _omitEnumNames = - $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart b/lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart index d71c7ea1..5a936e2b 100644 --- a/lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart +++ b/lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart @@ -166,12 +166,10 @@ const Response$json = { Response_Plans$json, Response_AddAccountsInvite$json, Response_AddAccountsInvites$json, - Response_Transaction$json, Response_AdditionalAccount$json, - Response_Voucher$json, - Response_Vouchers$json, + Response_Deprecated$json, + Response_Transaction$json, Response_PlanBallance$json, - Response_Location$json, Response_PreKey$json, Response_SignedPreKey$json, Response_UserData$json, @@ -180,7 +178,6 @@ const Response$json = { Response_ProofOfWork$json, Response_Ok$json ], - '4': [Response_TransactionTypes$json], '8': [ {'1': 'Response'}, ], @@ -285,29 +282,6 @@ const Response_AddAccountsInvites$json = { ], }; -@$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': 14, - '6': '.server_to_client.Response.TransactionTypes', - '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', @@ -318,36 +292,13 @@ const Response_AdditionalAccount$json = { }; @$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' - }, - ], +const Response_Deprecated$json = { + '1': 'Deprecated', }; @$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' - }, - ], +const Response_Transaction$json = { + '1': 'Transaction', }; @$core.Deprecated('Use responseDescriptor instead') @@ -429,16 +380,6 @@ const Response_PlanBallance$json = { ], }; -@$core.Deprecated('Use responseDescriptor instead') -const Response_Location$json = { - '1': 'Location', - '2': [ - {'1': 'county', '3': 1, '4': 1, '5': 9, '10': 'county'}, - {'1': 'region', '3': 2, '4': 1, '5': 9, '10': 'region'}, - {'1': 'city', '3': 3, '4': 1, '5': 9, '10': 'city'}, - ], -}; - @$core.Deprecated('Use responseDescriptor instead') const Response_PreKey$json = { '1': 'PreKey', @@ -602,13 +543,13 @@ const Response_Ok$json = { }, {'1': 'authtoken', '3': 6, '4': 1, '5': 12, '9': 0, '10': 'authtoken'}, { - '1': 'location', + '1': 'deprecated_7', '3': 7, '4': 1, '5': 11, - '6': '.server_to_client.Response.Location', + '6': '.server_to_client.Response.Deprecated', '9': 0, - '10': 'location' + '10': 'deprecated7' }, { '1': 'authenticated', @@ -638,13 +579,13 @@ const Response_Ok$json = { '10': 'planballance' }, { - '1': 'vouchers', + '1': 'deprecated_11', '3': 11, '4': 1, '5': 11, - '6': '.server_to_client.Response.Vouchers', + '6': '.server_to_client.Response.Deprecated', '9': 0, - '10': 'vouchers' + '10': 'deprecated11' }, { '1': 'addaccountsinvites', @@ -688,21 +629,6 @@ const Response_Ok$json = { ], }; -@$core.Deprecated('Use responseDescriptor instead') -const Response_TransactionTypes$json = { - '1': 'TransactionTypes', - '2': [ - {'1': 'Refund', '2': 0}, - {'1': 'VoucherRedeemed', '2': 1}, - {'1': 'VoucherCreated', '2': 2}, - {'1': 'Cash', '2': 3}, - {'1': 'PlanUpgrade', '2': 4}, - {'1': 'Unknown', '2': 5}, - {'1': 'ThanksForTesting', '2': 6}, - {'1': 'AutoRenewal', '2': 7}, - ], -}; - /// Descriptor for `Response`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List responseDescriptor = $convert.base64Decode( 'CghSZXNwb25zZRIvCgJvaxgBIAEoCzIdLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuT2tIAF' @@ -720,64 +646,53 @@ final $typed_data.Uint8List responseDescriptor = $convert.base64Decode( 'bnQuUmVzcG9uc2UuUGxhblIFcGxhbnMaTQoRQWRkQWNjb3VudHNJbnZpdGUSFwoHcGxhbl9pZB' 'gBIAEoCVIGcGxhbklkEh8KC2ludml0ZV9jb2RlGAIgASgJUgppbnZpdGVDb2RlGlwKEkFkZEFj' 'Y291bnRzSW52aXRlcxJGCgdpbnZpdGVzGAEgAygLMiwuc2VydmVyX3RvX2NsaWVudC5SZXNwb2' - '5zZS5BZGRBY2NvdW50c0ludml0ZVIHaW52aXRlcxrFAQoLVHJhbnNhY3Rpb24SIwoNZGVwb3Np' - 'dF9jZW50cxgBIAEoA1IMZGVwb3NpdENlbnRzElYKEHRyYW5zYWN0aW9uX3R5cGUYAiABKA4yKy' - '5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLlRyYW5zYWN0aW9uVHlwZXNSD3RyYW5zYWN0aW9u' - 'VHlwZRI5ChljcmVhdGVkX2F0X3VuaXhfdGltZXN0YW1wGAMgASgDUhZjcmVhdGVkQXRVbml4VG' - 'ltZXN0YW1wGkUKEUFkZGl0aW9uYWxBY2NvdW50EhcKB3VzZXJfaWQYASABKANSBnVzZXJJZBIX' - 'CgdwbGFuX2lkGAMgASgJUgZwbGFuSWQavgEKB1ZvdWNoZXISHQoKdm91Y2hlcl9pZBgBIAEoCV' - 'IJdm91Y2hlcklkEh8KC3ZhbHVlX2NlbnRzGAIgASgDUgp2YWx1ZUNlbnRzEhoKCHJlZGVlbWVk' - 'GAMgASgIUghyZWRlZW1lZBIcCglyZXF1ZXN0ZWQYBCABKAhSCXJlcXVlc3RlZBI5ChljcmVhdG' - 'VkX2F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UhJhZGRhY2NvdW50c2ludml0ZXMSUwoOZG93bmxvYWR0b2tlbnMYDSABKAsyKS5zZXJ2ZXJf' + 'dG9fY2xpZW50LlJlc3BvbnNlLkRvd25sb2FkVG9rZW5zSABSDmRvd25sb2FkdG9rZW5zEk0KDH' + 'NpZ25lZHByZWtleRgOIAEoCzInLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuU2lnbmVkUHJl' + 'S2V5SABSDHNpZ25lZHByZWtleRJKCgtwcm9vZk9mV29yaxgPIAEoCzImLnNlcnZlcl90b19jbG' + 'llbnQuUmVzcG9uc2UuUHJvb2ZPZldvcmtIAFILcHJvb2ZPZldvcmtCBAoCT2tCCgoIUmVzcG9u' + 'c2U='); diff --git a/lib/src/services/api.service.dart b/lib/src/services/api.service.dart index 7cebbbad..a2a3e3d4 100644 --- a/lib/src/services/api.service.dart +++ b/lib/src/services/api.service.dart @@ -617,13 +617,6 @@ class ApiService { return sendRequestSync(req, ensureRetransmission: true); } - Future getCurrentLocation() async { - final get = ApplicationData_GetLocation(); - final appData = ApplicationData()..getLocation = get; - final req = createClientToServerFromApplicationData(appData); - return sendRequestSync(req); - } - Future getUserData(String username) async { final get = ApplicationData_GetUserByUsername()..username = username; final appData = ApplicationData()..getUserByUsername = get; @@ -652,20 +645,6 @@ class ApiService { return null; } - Future getVoucherList() async { - final get = ApplicationData_GetVouchers(); - final appData = ApplicationData()..getVouchers = get; - final req = createClientToServerFromApplicationData(appData); - final res = await sendRequestSync(req); - if (res.isSuccess) { - final ok = res.value as server.Response_Ok; - if (ok.hasVouchers()) { - return ok.vouchers; - } - } - return null; - } - Future updatePlanOptions(bool autoRenewal) async { final get = ApplicationData_UpdatePlanOptions()..autoRenewal = autoRenewal; final appData = ApplicationData()..updatePlanOptions = get; @@ -687,34 +666,6 @@ class ApiService { return sendRequestSync(req, contactId: userId.toInt()); } - Future buyVoucher(int valueInCents) async { - final get = ApplicationData_CreateVoucher()..valueCents = valueInCents; - final appData = ApplicationData()..createVoucher = get; - final req = createClientToServerFromApplicationData(appData); - return sendRequestSync(req); - } - - Future switchToPayedPlan( - String planId, - bool payMonthly, - bool autoRenewal, - ) async { - final get = ApplicationData_SwitchToPayedPlan() - ..planId = planId - ..payMonthly = payMonthly - ..autoRenewal = autoRenewal; - final appData = ApplicationData()..switchtoPayedPlan = get; - final req = createClientToServerFromApplicationData(appData); - return sendRequestSync(req); - } - - Future redeemVoucher(String voucher) async { - final get = ApplicationData_RedeemVoucher()..voucher = voucher; - final appData = ApplicationData()..redeemVoucher = get; - final req = createClientToServerFromApplicationData(appData); - return sendRequestSync(req); - } - Future reportUser(int userId, String reason) async { final get = ApplicationData_ReportUser() ..reportedUserId = Int64(userId) @@ -731,13 +682,6 @@ class ApiService { return sendRequestSync(req); } - Future redeemUserInviteCode(String inviteCode) async { - final get = ApplicationData_RedeemAdditionalCode()..inviteCode = inviteCode; - final appData = ApplicationData()..redeemAdditionalCode = get; - final req = createClientToServerFromApplicationData(appData); - return sendRequestSync(req); - } - Future updateFCMToken(String googleFcm) async { final get = ApplicationData_UpdateGoogleFcmToken()..googleFcm = googleFcm; final appData = ApplicationData()..updateGoogleFcmToken = get; diff --git a/lib/src/visual/views/camera/share_image_editor_components/layers/filter.layer.dart b/lib/src/visual/views/camera/share_image_editor_components/layers/filter.layer.dart index 954d34c3..75e032fc 100644 --- a/lib/src/visual/views/camera/share_image_editor_components/layers/filter.layer.dart +++ b/lib/src/visual/views/camera/share_image_editor_components/layers/filter.layer.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:twonly/src/visual/views/camera/share_image_editor_components/layer_data.dart'; import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filters/datetime_filter.dart'; import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filters/image_filter.dart'; -import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filters/location_filter.dart'; +import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filters/stickers.dart'; /// Main layer class FilterLayer extends StatefulWidget { @@ -75,7 +75,6 @@ class _FilterLayerState extends State { List pages = [ const FilterSkeleton(), const DateTimeFilter(), - // const LocationFilter(), const FilterSkeleton(), ]; diff --git a/lib/src/visual/views/camera/share_image_editor_components/layers/filters/location_filter.dart b/lib/src/visual/views/camera/share_image_editor_components/layers/filters/location_filter.dart deleted file mode 100644 index 55021aa8..00000000 --- a/lib/src/visual/views/camera/share_image_editor_components/layers/filters/location_filter.dart +++ /dev/null @@ -1,164 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:cached_network_image/cached_network_image.dart'; -import 'package:clock/clock.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; -import 'package:path_provider/path_provider.dart'; -import 'package:twonly/locator.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart'; -import 'package:twonly/src/utils/log.dart'; -import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filter.layer.dart'; -import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filters/datetime_filter.dart'; - -class LocationFilter extends StatefulWidget { - const LocationFilter({super.key}); - - @override - State createState() => _LocationFilterState(); -} - -class _LocationFilterState extends State { - String? _imageUrl; - Response_Location? location; - - @override - void initState() { - super.initState(); - unawaited(initAsync()); - } - - Future initAsync() async { - final res = await apiService.getCurrentLocation(); - if (res.isSuccess) { - // ignore: avoid_dynamic_calls - location = res.value.location as Response_Location?; - await _searchForImage(); - if (mounted) setState(() {}); - } - } - - Future _searchForImage() async { - if (location == null) return; - final imageIndex = await getStickerIndex(); - // Normalize the city and country for search - final normalizedCity = location!.city.toLowerCase().replaceAll(' ', '_'); - final normalizedCountry = location!.county.toLowerCase(); - - // Search for the city first - for (final item in imageIndex) { - if (item.imageSrc.contains('/cities/$normalizedCountry/')) { - // Check if the item matches the normalized city - if (item.imageSrc.contains('$normalizedCity.')) { - if (item.imageSrc.startsWith('/api/')) { - _imageUrl = 'https://twonly.eu/${item.imageSrc}'; - if (mounted) setState(() {}); - } - return; - } - } - } - - // If city not found, search for the country - if (_imageUrl == null) { - for (final item in imageIndex) { - if (item.imageSrc.contains('/countries/') && - item.imageSrc.contains(normalizedCountry)) { - if (item.imageSrc.startsWith('/api/')) { - _imageUrl = 'https://twonly.eu/${item.imageSrc}'; - if (mounted) setState(() {}); - } - break; - } - } - } - } - - @override - Widget build(BuildContext context) { - if (_imageUrl != null) { - return FilterSkeleton( - child: Positioned( - bottom: 0, - left: 40, - right: 40, - child: Center( - child: CachedNetworkImage( - imageUrl: _imageUrl!, - ), - ), - ), - ); - } - - if (location != null) { - if (location!.county != '-') { - return FilterSkeleton( - child: Positioned( - bottom: 50, - left: 40, - child: Column( - children: [ - FilterText(location!.city), - FilterText(location!.county), - ], - ), - ), - ); - } - } - - return const DateTimeFilter(color: Colors.black); - } -} - -class Sticker { - Sticker({required this.imageSrc, required this.source}); - factory Sticker.fromJson(Map json) { - return Sticker( - imageSrc: json['imageSrc'] as String, - source: json['source'] as String? ?? '', - ); - } - final String imageSrc; - final String source; -} - -Future> getStickerIndex() async { - final directory = await getApplicationCacheDirectory(); - final indexFile = File('${directory.path}/stickers.json'); - var res = []; - - if (indexFile.existsSync() && kReleaseMode) { - final lastModified = indexFile.lastModifiedSync(); - final difference = clock.now().difference(lastModified); - final content = await indexFile.readAsString(); - final jsonList = json.decode(content) as List; - res = jsonList - .map((json) => Sticker.fromJson(json as Map)) - .toList(); - if (difference.inHours < 2) { - return res; - } - } - try { - final response = await http.get( - Uri.parse('https://twonly.eu/api/sticker/stickers.json'), - ); - if (response.statusCode == 200) { - await indexFile.writeAsString(response.body); - final jsonList = json.decode(response.body) as List; - return jsonList - .map((json) => Sticker.fromJson(json as Map)) - .toList(); - } else { - return res; - } - } catch (e) { - Log.error('$e'); - return res; - } -} diff --git a/lib/src/visual/views/camera/share_image_editor_components/layers/filters/stickers.dart b/lib/src/visual/views/camera/share_image_editor_components/layers/filters/stickers.dart new file mode 100644 index 00000000..1a9c7f16 --- /dev/null +++ b/lib/src/visual/views/camera/share_image_editor_components/layers/filters/stickers.dart @@ -0,0 +1,57 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:clock/clock.dart'; +import 'package:flutter/foundation.dart'; +import 'package:http/http.dart' as http; +import 'package:path_provider/path_provider.dart'; +import 'package:twonly/src/utils/log.dart'; + +class Sticker { + Sticker({required this.imageSrc, required this.source}); + factory Sticker.fromJson(Map json) { + return Sticker( + imageSrc: json['imageSrc'] as String, + source: json['source'] as String? ?? '', + ); + } + final String imageSrc; + final String source; +} + +Future> getStickerIndex() async { + final directory = await getApplicationCacheDirectory(); + final indexFile = File('${directory.path}/stickers.json'); + var res = []; + + if (indexFile.existsSync() && kReleaseMode) { + final lastModified = indexFile.lastModifiedSync(); + final difference = clock.now().difference(lastModified); + final content = await indexFile.readAsString(); + final jsonList = json.decode(content) as List; + res = jsonList + .map((json) => Sticker.fromJson(json as Map)) + .toList(); + if (difference.inHours < 2) { + return res; + } + } + try { + final response = await http.get( + Uri.parse('https://twonly.eu/api/sticker/stickers.json'), + ); + if (response.statusCode == 200) { + await indexFile.writeAsString(response.body); + final jsonList = json.decode(response.body) as List; + return jsonList + .map((json) => Sticker.fromJson(json as Map)) + .toList(); + } else { + return res; + } + } catch (e) { + Log.error('$e'); + return res; + } +} diff --git a/lib/src/visual/views/settings/help/credits.view.dart b/lib/src/visual/views/settings/help/credits.view.dart index dbd27058..a49c4ccf 100644 --- a/lib/src/visual/views/settings/help/credits.view.dart +++ b/lib/src/visual/views/settings/help/credits.view.dart @@ -4,7 +4,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:twonly/src/utils/misc.dart'; -import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filters/location_filter.dart'; +import 'package:twonly/src/visual/views/camera/share_image_editor_components/layers/filters/stickers.dart'; import 'package:url_launcher/url_launcher.dart'; class UrlListTitle extends StatelessWidget {