feat(AppVersion): Add AppVersion proto for cache invalidation
This commit is contained in:
+2
-1
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>0.0.3</Version>
|
<Version>0.0.4</Version>
|
||||||
<DebugType>None</DebugType>
|
<DebugType>None</DebugType>
|
||||||
<DebugSymbols>False</DebugSymbols>
|
<DebugSymbols>False</DebugSymbols>
|
||||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Protobuf Include="Protos\configuration.proto" ProtoRoot="Protos\" GrpcServices="Both" />
|
<Protobuf Include="Protos\configuration.proto" ProtoRoot="Protos\" GrpcServices="Both" />
|
||||||
|
<Protobuf Include="Protos\appversion.proto" ProtoRoot="Protos\" GrpcServices="Both" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Target Name="PushToFourSat" AfterTargets="Pack">
|
<Target Name="PushToFourSat" AfterTargets="Pack">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package appversion;
|
||||||
|
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/wrappers.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
|
||||||
|
option csharp_namespace = "FrontOffice.BFF.Configuration.Protobuf.Protos.AppVersion";
|
||||||
|
|
||||||
|
// Service for tracking app versions and cache invalidation
|
||||||
|
service AppVersionContract
|
||||||
|
{
|
||||||
|
// Get current version for an app - called by frontends to check if cache clear is needed
|
||||||
|
rpc GetAppVersion(GetAppVersionRequest) returns (GetAppVersionResponse){
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/AppVersion/Get"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request to get current version for specific app
|
||||||
|
message GetAppVersionRequest
|
||||||
|
{
|
||||||
|
string app_name = 1; // e.g., "FrontOffice", "BackOffice", "Mobile"
|
||||||
|
google.protobuf.StringValue current_client_version = 2; // Current version on client for comparison
|
||||||
|
}
|
||||||
|
|
||||||
|
// Response with version info
|
||||||
|
message GetAppVersionResponse
|
||||||
|
{
|
||||||
|
bool found = 1; // Whether the app was found
|
||||||
|
string app_name = 2;
|
||||||
|
string current_version = 3;
|
||||||
|
string min_required_version = 4;
|
||||||
|
bool requires_full_cache_clear = 5;
|
||||||
|
bool requires_update = 6; // True if client version < min_required_version
|
||||||
|
google.protobuf.StringValue update_message = 7;
|
||||||
|
google.protobuf.StringValue release_notes = 8;
|
||||||
|
google.protobuf.Timestamp last_updated = 9;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user