diff --git a/src/Protobufs/FrontOffice.BFF.Configuration.Protobuf/FrontOffice.BFF.Configuration.Protobuf.csproj b/src/Protobufs/FrontOffice.BFF.Configuration.Protobuf/FrontOffice.BFF.Configuration.Protobuf.csproj index 27d4dbf..03df4dd 100644 --- a/src/Protobufs/FrontOffice.BFF.Configuration.Protobuf/FrontOffice.BFF.Configuration.Protobuf.csproj +++ b/src/Protobufs/FrontOffice.BFF.Configuration.Protobuf/FrontOffice.BFF.Configuration.Protobuf.csproj @@ -4,7 +4,7 @@ net9.0 enable enable - 0.0.3 + 0.0.4 None False False @@ -24,6 +24,7 @@ + diff --git a/src/Protobufs/FrontOffice.BFF.Configuration.Protobuf/Protos/appversion.proto b/src/Protobufs/FrontOffice.BFF.Configuration.Protobuf/Protos/appversion.proto new file mode 100644 index 0000000..83bf766 --- /dev/null +++ b/src/Protobufs/FrontOffice.BFF.Configuration.Protobuf/Protos/appversion.proto @@ -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; +}