|
@@ -1,6 +1,6 @@
|
|
|
|
|
|
/// Auto generate. Do not edit
|
|
/// Auto generate. Do not edit
|
|
-part of 'dispatch.dart';
|
|
|
|
|
|
+part of '../../dispatch.dart';
|
|
class FolderEventCreateWorkspace {
|
|
class FolderEventCreateWorkspace {
|
|
CreateWorkspaceRequest request;
|
|
CreateWorkspaceRequest request;
|
|
FolderEventCreateWorkspace(this.request);
|
|
FolderEventCreateWorkspace(this.request);
|
|
@@ -411,158 +411,3 @@ class FolderEventExportDocument {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-class NetworkEventUpdateNetworkType {
|
|
|
|
- NetworkState request;
|
|
|
|
- NetworkEventUpdateNetworkType(this.request);
|
|
|
|
-
|
|
|
|
- Future<Either<Unit, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = NetworkEvent.UpdateNetworkType.toString()
|
|
|
|
- ..payload = requestToBytes(this.request);
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request)
|
|
|
|
- .then((bytesResult) => bytesResult.fold(
|
|
|
|
- (bytes) => left(unit),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventInitUser {
|
|
|
|
- UserEventInitUser();
|
|
|
|
-
|
|
|
|
- Future<Either<Unit, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.InitUser.toString();
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
|
|
|
|
- (bytes) => left(unit),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventSignIn {
|
|
|
|
- SignInRequest request;
|
|
|
|
- UserEventSignIn(this.request);
|
|
|
|
-
|
|
|
|
- Future<Either<UserProfile, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.SignIn.toString()
|
|
|
|
- ..payload = requestToBytes(this.request);
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request)
|
|
|
|
- .then((bytesResult) => bytesResult.fold(
|
|
|
|
- (okBytes) => left(UserProfile.fromBuffer(okBytes)),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventSignUp {
|
|
|
|
- SignUpRequest request;
|
|
|
|
- UserEventSignUp(this.request);
|
|
|
|
-
|
|
|
|
- Future<Either<UserProfile, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.SignUp.toString()
|
|
|
|
- ..payload = requestToBytes(this.request);
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request)
|
|
|
|
- .then((bytesResult) => bytesResult.fold(
|
|
|
|
- (okBytes) => left(UserProfile.fromBuffer(okBytes)),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventSignOut {
|
|
|
|
- UserEventSignOut();
|
|
|
|
-
|
|
|
|
- Future<Either<Unit, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.SignOut.toString();
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
|
|
|
|
- (bytes) => left(unit),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventUpdateUser {
|
|
|
|
- UpdateUserRequest request;
|
|
|
|
- UserEventUpdateUser(this.request);
|
|
|
|
-
|
|
|
|
- Future<Either<Unit, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.UpdateUser.toString()
|
|
|
|
- ..payload = requestToBytes(this.request);
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request)
|
|
|
|
- .then((bytesResult) => bytesResult.fold(
|
|
|
|
- (bytes) => left(unit),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventGetUserProfile {
|
|
|
|
- UserEventGetUserProfile();
|
|
|
|
-
|
|
|
|
- Future<Either<UserProfile, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.GetUserProfile.toString();
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
|
|
|
|
- (okBytes) => left(UserProfile.fromBuffer(okBytes)),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventCheckUser {
|
|
|
|
- UserEventCheckUser();
|
|
|
|
-
|
|
|
|
- Future<Either<UserProfile, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.CheckUser.toString();
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
|
|
|
|
- (okBytes) => left(UserProfile.fromBuffer(okBytes)),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventSetAppearanceSetting {
|
|
|
|
- AppearanceSettings request;
|
|
|
|
- UserEventSetAppearanceSetting(this.request);
|
|
|
|
-
|
|
|
|
- Future<Either<Unit, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.SetAppearanceSetting.toString()
|
|
|
|
- ..payload = requestToBytes(this.request);
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request)
|
|
|
|
- .then((bytesResult) => bytesResult.fold(
|
|
|
|
- (bytes) => left(unit),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-class UserEventGetAppearanceSetting {
|
|
|
|
- UserEventGetAppearanceSetting();
|
|
|
|
-
|
|
|
|
- Future<Either<AppearanceSettings, FlowyError>> send() {
|
|
|
|
- final request = FFIRequest.create()
|
|
|
|
- ..event = UserEvent.GetAppearanceSetting.toString();
|
|
|
|
-
|
|
|
|
- return Dispatch.asyncRequest(request).then((bytesResult) => bytesResult.fold(
|
|
|
|
- (okBytes) => left(AppearanceSettings.fromBuffer(okBytes)),
|
|
|
|
- (errBytes) => right(FlowyError.fromBuffer(errBytes)),
|
|
|
|
- ));
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|