6bc45e4486
Build and Deploy to Production / build-and-deploy (push) Successful in 1m47s
- Add appversion.proto with GetAll, Get, Update RPCs - Add GetAllAppVersionsQuery and handler - Add UpdateAppVersionCommand and handler - Add AppVersionService gRPC service - Add AppVersionProfile for Mapster mappings - Update IApplicationContractContext with AppVersions client - Bump Configuration.Protobuf to 1.0.20
89 lines
2.2 KiB
Protocol Buffer
89 lines
2.2 KiB
Protocol Buffer
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 = "BackOffice.BFF.Configuration.Protobuf.Protos.AppVersion";
|
|
|
|
// Service for managing app versions (admin panel)
|
|
service AppVersionContract
|
|
{
|
|
// Get all app versions
|
|
rpc GetAllAppVersions(GetAllAppVersionsRequest) returns (GetAllAppVersionsResponse){
|
|
option (google.api.http) = {
|
|
get: "/AppVersion/GetAll"
|
|
};
|
|
};
|
|
|
|
// Get single app version
|
|
rpc GetAppVersion(GetAppVersionRequest) returns (GetAppVersionResponse){
|
|
option (google.api.http) = {
|
|
get: "/AppVersion/Get"
|
|
};
|
|
};
|
|
|
|
// Update/Create app version
|
|
rpc UpdateAppVersion(UpdateAppVersionRequest) returns (google.protobuf.Empty){
|
|
option (google.api.http) = {
|
|
post: "/AppVersion/Update"
|
|
body: "*"
|
|
};
|
|
};
|
|
}
|
|
|
|
// Request to get all app versions
|
|
message GetAllAppVersionsRequest
|
|
{
|
|
bool include_inactive = 1;
|
|
}
|
|
|
|
// Response with all app versions
|
|
message GetAllAppVersionsResponse
|
|
{
|
|
repeated AppVersionItem items = 1;
|
|
}
|
|
|
|
// Request to get single app version
|
|
message GetAppVersionRequest
|
|
{
|
|
string app_name = 1;
|
|
}
|
|
|
|
// Response with version info
|
|
message GetAppVersionResponse
|
|
{
|
|
bool found = 1;
|
|
AppVersionItem item = 2;
|
|
}
|
|
|
|
// Request to update/create app version
|
|
message UpdateAppVersionRequest
|
|
{
|
|
string app_name = 1;
|
|
string current_version = 2;
|
|
google.protobuf.StringValue min_required_version = 3;
|
|
bool requires_full_cache_clear = 4;
|
|
google.protobuf.StringValue update_message = 5;
|
|
google.protobuf.StringValue release_notes = 6;
|
|
google.protobuf.StringValue update_reason = 7; // For admin logs
|
|
}
|
|
|
|
// App version item
|
|
message AppVersionItem
|
|
{
|
|
int64 id = 1;
|
|
string app_name = 2;
|
|
string current_version = 3;
|
|
string min_required_version = 4;
|
|
bool requires_full_cache_clear = 5;
|
|
string update_message = 6;
|
|
string release_notes = 7;
|
|
bool is_active = 8;
|
|
google.protobuf.Timestamp created = 9;
|
|
google.protobuf.Timestamp last_modified = 10;
|
|
}
|