diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a9eff1..0f1d0f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.1.1 +- The ServerAction model has been extended with new properties to maintain local executed actions ## 1.1.0 - Added classes for implementing Duit components, such as DuitComponentDescription and ValueReference ## 1.0.1 diff --git a/lib/src/action.dart b/lib/src/action.dart index ebd587b..189ae9c 100644 --- a/lib/src/action.dart +++ b/lib/src/action.dart @@ -33,6 +33,8 @@ final class ActionDependency { } } +final class LocalExecutionOptions {} + /// Represents a server action. /// /// The [ServerAction] class encapsulates information about a server action, including its dependencies, event, and metadata. @@ -46,10 +48,22 @@ final class ServerAction { /// The event associated with the server action. HttpActionMetainfo? meta; + /// Event execution type + /// + /// 0 - transport + /// + /// 1 - local execution + int executionType; + + /// Optional action payload for local execution + Map? payload; + ServerAction({ required this.event, + required this.executionType, this.dependsOn = const [], this.meta, + this.payload, }); static ServerAction? fromJSON(Map? json) { @@ -66,8 +80,10 @@ final class ServerAction { return ServerAction( event: json["event"] ?? "", + executionType: json["executionType"], dependsOn: deps, meta: HttpActionMetainfo.fromJson(json["meta"]), + payload: json["payload"], ); } diff --git a/pubspec.yaml b/pubspec.yaml index 7a02ed4..75e8ecf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: duit_kernel description: "Core library for flutter_duit package. Contains reusable models for developing third-party packages." -version: 1.1.0 +version: 1.1.1 repository: https://github.com/lesleysin/duit_kernel environment: