From 1de622467dd38dd12fb596aedcd67553cc94f5a6 Mon Sep 17 00:00:00 2001 From: ilhom Date: Fri, 29 May 2026 06:52:40 +0700 Subject: [PATCH 1/2] feat(bi): add CreateBiJob/UpdateBiJob/DeleteBiJob RPCs to BiJobService --- finance/v1/bi.proto | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/finance/v1/bi.proto b/finance/v1/bi.proto index 9c6c508..7bf131c 100644 --- a/finance/v1/bi.proto +++ b/finance/v1/bi.proto @@ -545,6 +545,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 { @@ -782,6 +831,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, From 8acc395a3b83a0cf95600a4fe9e1232327d5f075 Mon Sep 17 00:00:00 2001 From: ilhom Date: Fri, 29 May 2026 16:41:11 +0700 Subject: [PATCH 2/2] feat(bi): add is_featured + feature_order to Dashboard + ListFeaturedDashboards RPC - Dashboard message: fields 25 (is_featured) and 26 (feature_order) - UpdateDashboardRequest: optional is_featured/feature_order for pin/unpin - New ListFeaturedDashboards RPC: GET /api/v1/finance/bi/dashboards/featured Co-Authored-By: Claude Sonnet 4.6 --- finance/v1/bi.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/finance/v1/bi.proto b/finance/v1/bi.proto index 7bf131c..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 { @@ -759,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) = {