diff --git a/finance/v1/bi.proto b/finance/v1/bi.proto index 9c6c508..0eb56be 100644 --- a/finance/v1/bi.proto +++ b/finance/v1/bi.proto @@ -90,6 +90,8 @@ message Dashboard { bool is_active = 22; repeated string allowed_role_codes = 23; common.v1.AuditInfo audit = 24; + bool is_featured = 25; + int32 feature_order = 26; } message DataSource { @@ -363,6 +365,8 @@ message UpdateDashboardRequest { optional int32 display_order = 17; optional string group_id = 18 [(buf.validate.field).string = {pattern: "^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}]; optional bool is_active = 19; + optional bool is_featured = 25; + optional int32 feature_order = 26; } message UpdateDashboardResponse { common.v1.BaseResponse base = 1; @@ -408,6 +412,12 @@ message ListAccessibleDashboardsResponse { repeated Dashboard data = 2; } +message ListFeaturedDashboardsRequest {} +message ListFeaturedDashboardsResponse { + common.v1.BaseResponse base = 1; + repeated Dashboard data = 2; +} + // =================== ChartDataService =================== message ViewerFilters { @@ -545,6 +555,55 @@ message TriggerJobResponse { BiJobLog data = 2; } +message CreateBiJobRequest { + string job_name = 1 [(buf.validate.field).string = { + min_len: 2 + max_len: 120 + pattern: "^[A-Z][A-Z0-9_]*$" + }]; + string source_code = 2 [(buf.validate.field).string = { + min_len: 2 + max_len: 40 + }]; + string target_type = 3 [(buf.validate.field).string = { + min_len: 2 + max_len: 40 + }]; + string schedule_cron = 4 [(buf.validate.field).string = { + min_len: 9 + max_len: 50 + }]; + string oracle_procedure = 5 [(buf.validate.field).string.max_len = 200]; + google.protobuf.Struct config = 6; + bool is_active = 7; +} + +message CreateBiJobResponse { + common.v1.BaseResponse base = 1; + BiJob data = 2; +} + +message UpdateBiJobRequest { + string job_id = 1 [(buf.validate.field).string.uuid = true]; + optional string schedule_cron = 2 [(buf.validate.field).string.max_len = 50]; + optional string oracle_procedure = 3 [(buf.validate.field).string.max_len = 200]; + optional google.protobuf.Struct config = 4; + optional bool is_active = 5; +} + +message UpdateBiJobResponse { + common.v1.BaseResponse base = 1; + BiJob data = 2; +} + +message DeleteBiJobRequest { + string job_id = 1 [(buf.validate.field).string.uuid = true]; +} + +message DeleteBiJobResponse { + common.v1.BaseResponse base = 1; +} + // =================== Excel Upload =================== message UploadRowError { @@ -710,6 +769,10 @@ service DashboardService { rpc ListAccessibleDashboards(ListAccessibleDashboardsRequest) returns (ListAccessibleDashboardsResponse) { option (google.api.http) = {get: "/api/v1/finance/bi/dashboards/accessible"}; } + // ListFeaturedDashboards returns dashboards pinned to the Executive Dashboard landing page. + rpc ListFeaturedDashboards(ListFeaturedDashboardsRequest) returns (ListFeaturedDashboardsResponse) { + option (google.api.http) = {get: "/api/v1/finance/bi/dashboards/featured"}; + } // CreateDashboardGroup creates a new dashboard group. rpc CreateDashboardGroup(CreateDashboardGroupRequest) returns (CreateDashboardGroupResponse) { option (google.api.http) = { @@ -782,6 +845,24 @@ service BiJobService { body: "*" }; } + // CreateBiJob registers a new ETL job in the bi_job registry. + rpc CreateBiJob(CreateBiJobRequest) returns (CreateBiJobResponse) { + option (google.api.http) = { + post: "/api/v1/finance/bi/jobs" + body: "*" + }; + } + // UpdateBiJob mutates schedule_cron, oracle_procedure, config, or is_active. + rpc UpdateBiJob(UpdateBiJobRequest) returns (UpdateBiJobResponse) { + option (google.api.http) = { + put: "/api/v1/finance/bi/jobs/{job_id}" + body: "*" + }; + } + // DeleteBiJob soft-disables a job (sets is_active=false, preserves logs). + rpc DeleteBiJob(DeleteBiJobRequest) returns (DeleteBiJobResponse) { + option (google.api.http) = {delete: "/api/v1/finance/bi/jobs/{job_id}"}; + } } // BiUploadService handles Excel upload: template download, parse/preview into staging,