{
  "repo": "tidbcloud/serverless-service",
  "binary": "server",
  "binary_path": "cmd/server/main.go",
  "dependencies": {
    "ServerlessServiceLifecycle.Startup": {
      "infrastructure": {},
      "services": []
    },
    "ServerlessServiceLifecycle.SetupLogger": {
      "infrastructure": {
        "logging": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INITIALIZE LOGGER",
              "trigger": "Install the global redacted zap logger before any server mode starts",
              "conditions": [
                "Always"
              ],
              "implementation": "server.setupLogger() -> log.InitLogger(..., utils.WrapWithRedactor())"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessServiceLifecycle.InitTracing": {
      "infrastructure": {},
      "services": [
        {
          "name": "jaeger",
          "target_interface": "InitJaeger",
          "operation_type": "http_post",
          "target_repo": "jaeger",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "InitJaeger",
              "trigger": "Initialize distributed tracing for the active work mode",
              "conditions": [
                "Always"
              ],
              "implementation": "server.Setup() -> titracing.InitJaeger(\"serverless-service-\"+config.GetWorkMode().String())"
            }
          ]
        }
      ]
    },
    "ServerlessServiceLifecycle.InitAuditLog": {
      "infrastructure": {},
      "services": [
        {
          "name": "auditlog-sdk",
          "target_interface": "InitAuditLogSDK",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tiinf",
          "conditions": [
            "Only when server.enable_audit_log is true"
          ],
          "operations": [
            {
              "operation": "InitAuditLogSDK",
              "trigger": "Initialize audit-log SDK before starting request handlers or workers",
              "conditions": [
                "Only when server.enable_audit_log is true"
              ],
              "implementation": "server.Setup() -> auditlog.InitAuditLogSDK(context.TODO(), time.Second)"
            }
          ]
        }
      ]
    },
    "ServerlessServiceLifecycle.InitDependencies": {
      "infrastructure": {},
      "services": []
    },
    "ServerlessServiceLifecycle.StartInfraManager": {
      "infrastructure": {},
      "services": [
        {
          "name": "infra-api-manager",
          "target_interface": "Manager.Start",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/infra-api",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Manager.Start",
              "trigger": "Start controller-runtime manager and cache for infra objects",
              "conditions": [
                "Always"
              ],
              "implementation": "controller.RunInfraManager() -> infraManager.Start(sigCtx)"
            }
          ]
        }
      ]
    },
    "ServerlessServiceLifecycle.StartConfigWatcher": {
      "infrastructure": {},
      "services": [
        {
          "name": "config-service-oneconfig",
          "target_interface": "Watch remote config",
          "operation_type": "remote_config",
          "target_repo": "tidbcloud/config-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Watch remote config",
              "trigger": "Watch remote config and refresh feature gates when oneconfig changes",
              "conditions": [
                "Always"
              ],
              "implementation": "controller.RunConfigWatcher() -> ov.NewConfigMapConfigManager(\"\"); cm.Watch(config.RemoteConfigPath,nil)"
            }
          ]
        }
      ]
    },
    "ServerlessHTTPMode.StartPublisher": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-eventbus",
          "target_interface": "StartPublisher",
          "operation_type": "mq_publish",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in http mode"
          ],
          "operations": [
            {
              "operation": "StartPublisher",
              "trigger": "Start publish-only eventbus transport for gateway mode",
              "conditions": [
                "Only in http mode"
              ],
              "implementation": "controller.NewPubSubManager().StartPublisher() -> m.eventbus.Run()"
            }
          ]
        }
      ]
    },
    "ServerlessHTTPMode.StartLRPCServer": {
      "infrastructure": {},
      "services": [
        {
          "name": "auth0",
          "target_interface": "GetJWKS",
          "operation_type": "http_get",
          "target_repo": "auth0",
          "conditions": [
            "Only in http mode"
          ],
          "operations": [
            {
              "operation": "GetJWKS",
              "trigger": "Fetch JWKS before enabling authenticated local RPC for the HTTP gateway",
              "conditions": [
                "Only in http mode"
              ],
              "implementation": "server.serveLRPC() -> auth0.GetJWKS(s.portalAuth0.Domain)"
            }
          ]
        }
      ]
    },
    "ServerlessHTTPMode.RegisterHTTPGateway": {
      "infrastructure": {
        "http_gateway": {
          "conditions": [
            "Only in http mode"
          ],
          "operations": [
            {
              "operation": "REGISTER GATEWAY ROUTES",
              "trigger": "Install grpc-gateway routes for console, v1beta, and v1beta1 APIs plus backward-compatible prefixes",
              "conditions": [
                "Only in http mode"
              ],
              "implementation": "server.setupAPIGateway() -> grpc_http.SetupHTTPGateway(...); eng.Any(\"/healthz\", ...)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessHTTPMode.StartHTTPServer": {
      "infrastructure": {
        "http_server": {
          "conditions": [
            "Only in http mode"
          ],
          "operations": [
            {
              "operation": "LISTEN",
              "trigger": "Serve the Gin gateway on the configured listen address",
              "conditions": [
                "Only in http mode"
              ],
              "implementation": "server.ServeHTTP() -> s.httpServer.Run(s.httpAddr)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessHTTPMode.StartMetricsServer": {
      "infrastructure": {
        "metrics_http_server": {
          "conditions": [
            "Only when server.metrics_port > 0"
          ],
          "operations": [
            {
              "operation": "LISTEN",
              "trigger": "Expose Prometheus metrics on the dedicated metrics port",
              "conditions": [
                "Only when server.metrics_port > 0"
              ],
              "implementation": "runMetricsServer() -> mux.Handle(\"/metrics\", promhttp.Handler()); http.ListenAndServe(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessGRPCMode.StartPublisher": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-eventbus",
          "target_interface": "StartPublisher",
          "operation_type": "mq_publish",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in grpc mode"
          ],
          "operations": [
            {
              "operation": "StartPublisher",
              "trigger": "Start publish-only eventbus transport for grpc mode",
              "conditions": [
                "Only in grpc mode"
              ],
              "implementation": "controller.NewPubSubManager().StartPublisher() -> m.eventbus.Run()"
            }
          ]
        }
      ]
    },
    "ServerlessGRPCMode.RegisterGrpcServices": {
      "infrastructure": {
        "grpc_server": {
          "conditions": [
            "Only in grpc mode"
          ],
          "operations": [
            {
              "operation": "REGISTER SERVICES",
              "trigger": "Register internal gRPC services for billing and rpc consumers",
              "conditions": [
                "Only in grpc mode"
              ],
              "implementation": "controller.RegisterGrpcServices(s.rpcServer)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessGRPCMode.StartGRPCServer": {
      "infrastructure": {
        "grpc_server": {
          "conditions": [
            "Only in grpc mode"
          ],
          "operations": [
            {
              "operation": "LISTEN",
              "trigger": "Serve the public gRPC listener on server.grpc_port",
              "conditions": [
                "Only in grpc mode"
              ],
              "implementation": "server.ServeGRPC() -> net.Listen(...); s.rpcServer.Serve(lis)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessGRPCMode.StartMetricsServer": {
      "infrastructure": {
        "metrics_http_server": {
          "conditions": [
            "Only when server.metrics_port > 0"
          ],
          "operations": [
            {
              "operation": "LISTEN",
              "trigger": "Expose Prometheus metrics on the dedicated metrics port",
              "conditions": [
                "Only when server.metrics_port > 0"
              ],
              "implementation": "runMetricsServer() -> mux.Handle(\"/metrics\", promhttp.Handler()); http.ListenAndServe(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessWorkerMode.RunDBMigrate": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "AUTO MIGRATE",
              "trigger": "Apply schema migrations before worker loops start",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller.RunDBMigrate() -> migrate.RunDBMigrate(db)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessWorkerMode.RunReconcilers": {
      "infrastructure": {},
      "services": [
        {
          "name": "infra-api-manager",
          "target_interface": "BranchReconciler/CanaryReconciler",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/infra-api",
          "conditions": [
            "Only in worker mode",
            "Canary reconciler only when worker.disable_canary_controller is false"
          ],
          "operations": [
            {
              "operation": "BranchReconciler/CanaryReconciler",
              "trigger": "Start controller-runtime reconcile loops for branch and canary resources",
              "conditions": [
                "Only in worker mode",
                "Canary reconciler only when worker.disable_canary_controller is false"
              ],
              "implementation": "controller.RunReconcilers() -> branchReconciler.SetupWithManager(...); canaryV2Reconciler.SetupWithManager(...)"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerMode.StartEventbusSubscribers": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-eventbus",
          "target_interface": "Subscribe cluster/spend-limit/branch/backup topics",
          "operation_type": "mq_subscribe",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "Subscribe cluster/spend-limit/branch/backup topics",
              "trigger": "Register and run eventbus subscribers for worker mode",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller.NewPubSubManager().Start() -> subscriber.New*Subscriber(...).RegisterHandlers(...); m.eventbus.Run()"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerMode.StartGlobalWorkers": {
      "infrastructure": {
        "scheduler": {
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "START PERIOD WORKERS",
              "trigger": "Start all configured period workers for cluster, import/export, billing, and DM flows",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller.NewGlobalWorkers().Start() -> for _, worker := range workers { worker.Start() }"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessWorkerMode.StartMetricsServer": {
      "infrastructure": {
        "metrics_http_server": {
          "conditions": [
            "Only when server.metrics_port > 0"
          ],
          "operations": [
            {
              "operation": "LISTEN",
              "trigger": "Expose Prometheus metrics on the dedicated metrics port",
              "conditions": [
                "Only when server.metrics_port > 0"
              ],
              "implementation": "runMetricsServer() -> mux.Handle(\"/metrics\", promhttp.Handler()); http.ListenAndServe(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessBRWorkerMode.StartPublisher": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-eventbus",
          "target_interface": "StartPublisher",
          "operation_type": "mq_publish",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "StartPublisher",
              "trigger": "Start publish-only eventbus transport for backup/restore worker mode",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller.NewPubSubManager().StartPublisher() -> m.eventbus.Run()"
            }
          ]
        }
      ]
    },
    "ServerlessBRWorkerMode.StartBRWorkers": {
      "infrastructure": {
        "scheduler": {
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "START PERIOD WORKERS + CRON",
              "trigger": "Start BR worker loops plus cron-based backup scheduler",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller.NewBRWorkers().Start() -> workers.Start(); scheduler.StartAsync()"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessBRWorkerMode.StartMetricsServer": {
      "infrastructure": {
        "metrics_http_server": {
          "conditions": [
            "Only when server.metrics_port > 0"
          ],
          "operations": [
            {
              "operation": "LISTEN",
              "trigger": "Expose Prometheus metrics on the dedicated metrics port",
              "conditions": [
                "Only when server.metrics_port > 0"
              ],
              "implementation": "runMetricsServer() -> mux.Handle(\"/metrics\", promhttp.Handler()); http.ListenAndServe(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessJobMode.SyncClusterRUMode": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT + UPDATE",
              "trigger": "Load all clusters and persist synchronized ru_mode values",
              "conditions": [
                "Always"
              ],
              "implementation": "jobs.SyncClusterRUMode() -> dbProvider.ReadDB(...).Find(&clusters); clusterRepo.Save(ctx, cluster)"
            }
          ]
        }
      },
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "For each cluster returned from metadata DB"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Fetch live cluster annotations before deciding the local ru_mode value",
              "conditions": [
                "For each cluster returned from metadata DB"
              ],
              "implementation": "jobs.SyncClusterRUMode() -> mgmtFacade.GetCluster(ctx, cluster.ID, ClusterFilter_CLUSTER_VIEW_BASIC)"
            }
          ]
        }
      ]
    },
    "ServerlessJobMode.SendExpensiveSQLEmail": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-billing-domain",
          "target_interface": "BillingService.ListOrgsWithActiveLogs",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "BillingService.ListOrgsWithActiveLogs",
              "trigger": "Enumerate orgs that have active expensive SQL logs before dispatching emails",
              "conditions": [
                "Always"
              ],
              "implementation": "jobs.SendEmail() -> billingDomainSvc.ListOrgsWithActiveLogs(ctx)"
            }
          ]
        },
        {
          "name": "serverless-billing-controller",
          "target_interface": "ServerlessBillingService.SendExpensiveSQLEmail",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only when stage is neither dev nor staging",
            "For each selected org"
          ],
          "operations": [
            {
              "operation": "ServerlessBillingService.SendExpensiveSQLEmail",
              "trigger": "Reuse the billing controller path to render and send expensive SQL emails",
              "conditions": [
                "Only when stage is neither dev nor staging",
                "For each selected org"
              ],
              "implementation": "jobs.SendEmail() -> billingController.SendExpensiveSQLEmail(ctx, &serverless.ExpensiveSqlEmailReq{...})"
            }
          ]
        }
      ]
    },
    "HTTP GET /healthz": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /metrics": {
      "infrastructure": {
        "metrics_http_server": {
          "conditions": [
            "Only when one of grpc/http/worker/brworker modes is running and server.metrics_port > 0"
          ],
          "operations": [
            {
              "operation": "HTTP GET",
              "trigger": "Read Prometheus metrics from the dedicated listener",
              "conditions": [
                "Only when one of grpc/http/worker/brworker modes is running and server.metrics_port > 0"
              ],
              "implementation": "runMetricsServer() -> mux.Handle(\"/metrics\", promhttp.Handler())"
            }
          ]
        }
      },
      "services": []
    },
    "ServerlessWorkerEvents.SpendLimitEvent": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-event-handler",
          "target_interface": "SpendLimitService.UpdateTidbPoolPolicy",
          "operation_type": "mq_subscribe",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "SpendLimitService.UpdateTidbPoolPolicy",
              "trigger": "Dispatch eventbus message into the registered handler implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller.NewPubSubManager().Start() -> subscriber.RegisterHandlers(...)"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerEvents.ClusterEvent": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-event-handler",
          "target_interface": "ClusterEventService.HandleEvent",
          "operation_type": "mq_subscribe",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "ClusterEventService.HandleEvent",
              "trigger": "Dispatch eventbus message into the registered handler implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller.NewPubSubManager().Start() -> subscriber.RegisterHandlers(...)"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerEvents.BranchClusterEvent": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-event-handler",
          "target_interface": "BranchSyncEventService.HandleClusterEvent",
          "operation_type": "mq_subscribe",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "BranchSyncEventService.HandleClusterEvent",
              "trigger": "Dispatch eventbus message into the registered handler implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller.NewPubSubManager().Start() -> subscriber.RegisterHandlers(...)"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerEvents.BackupClusterEvent": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-event-handler",
          "target_interface": "BackupEventService.HandleClusterEvent",
          "operation_type": "mq_subscribe",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "BackupEventService.HandleClusterEvent",
              "trigger": "Dispatch eventbus message into the registered handler implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller.NewPubSubManager().Start() -> subscriber.RegisterHandlers(...)"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.ExportMeteringWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "MeteringService.ExecuteExport",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "MeteringService.ExecuteExport",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> MeteringService.ExecuteExport"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.ClusterTidbPoolSyncer": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "SyncTidbPoolService.Execute",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "SyncTidbPoolService.Execute",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> SyncTidbPoolService.Execute"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.BranchMetricCollector": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "BranchService.CollectMetricsFromDB",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "BranchService.CollectMetricsFromDB",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> BranchService.CollectMetricsFromDB"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.BranchStorageLimiter": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "BranchSizeLimiterService.CheckAndDisableBranch",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "BranchSizeLimiterService.CheckAndDisableBranch",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> BranchSizeLimiterService.CheckAndDisableBranch"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.ImportSyncer": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "ImportSyncerService.Run",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "ImportSyncerService.Run",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> ImportSyncerService.Run"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.ExportSyncer": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "ExportSyncerService.Run",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "ExportSyncerService.Run",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> ExportSyncerService.Run"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.TriggerIndexAdvisorWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "IndexAdvisorRepo.SyncApplyingAdvices",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode",
            "Runs hourly from the period worker scheduler"
          ],
          "operations": [
            {
              "operation": "IndexAdvisorRepo.SyncApplyingAdvices",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode",
                "Runs hourly from the period worker scheduler"
              ],
              "implementation": "controller worker wrapper -> IndexAdvisorRepo.SyncApplyingAdvices"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.DowntimeWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "DowntimeService.Execute",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "DowntimeService.Execute",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> DowntimeService.Execute"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.ServicePlanEventJob": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "ServicePlanEventService.Execute",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "ServicePlanEventService.Execute",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> ServicePlanEventService.Execute"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.DMTaskWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "DMTaskWorker.Run",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "DMTaskWorker.Run",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> DMTaskWorker.Run"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.DMPrecheckWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "DMPrecheckWorker.Run",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "DMPrecheckWorker.Run",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> DMPrecheckWorker.Run"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.DMEndpointWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "DMEndpointWorker.Run",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "DMEndpointWorker.Run",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> DMEndpointWorker.Run"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.BackupCronJob": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "BackupWorker.ExecuteBackupPolicies",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "BackupWorker.ExecuteBackupPolicies",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> BackupWorker.ExecuteBackupPolicies"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.BackupCleanWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "BackupWorker.Clean",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "BackupWorker.Clean",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> BackupWorker.Clean"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.RestoreSyncWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "BackupWorker.SyncRestores",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "BackupWorker.SyncRestores",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> BackupWorker.SyncRestores"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.RestoreWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "BackupWorker.ExecuteRestores",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in worker mode"
          ],
          "operations": [
            {
              "operation": "BackupWorker.ExecuteRestores",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in worker mode"
              ],
              "implementation": "controller worker wrapper -> BackupWorker.ExecuteRestores"
            }
          ]
        }
      ]
    },
    "ServerlessWorkerTasks.BackupScheduleCheckWorker": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "BackupWorker.CheckBackupSchedules",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "BackupWorker.CheckBackupSchedules",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> BackupWorker.CheckBackupSchedules"
            }
          ]
        }
      ]
    },
    "Runtime CDCWorker.SyncCreating": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "CDCWorker.SyncCreating",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "CDCWorker.SyncCreating",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> CDCWorker.SyncCreating"
            }
          ]
        }
      ]
    },
    "Runtime CDCWorker.SyncChangefeedState": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "CDCWorker.SyncChangefeedState",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "CDCWorker.SyncChangefeedState",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> CDCWorker.SyncChangefeedState"
            }
          ]
        }
      ]
    },
    "Runtime PrivateLinkConnectionWorker.SyncPrivateLinkConnections": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "PrivateLinkConnectionWorker.SyncPrivateLinkConnections",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "PrivateLinkConnectionWorker.SyncPrivateLinkConnections",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> PrivateLinkConnectionWorker.SyncPrivateLinkConnections"
            }
          ]
        }
      ]
    },
    "Runtime PrivateLinkConnectionWorker.DeletePrivateLinkConnections": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "PrivateLinkConnectionWorker.DeletePrivateLinkConnections",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "PrivateLinkConnectionWorker.DeletePrivateLinkConnections",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> PrivateLinkConnectionWorker.DeletePrivateLinkConnections"
            }
          ]
        }
      ]
    },
    "Runtime PrivateLinkConnectionWorker.SyncPLCDomainRecords": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-worker",
          "target_interface": "PrivateLinkConnectionWorker.SyncPLCDomainRecords",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only in brworker mode"
          ],
          "operations": [
            {
              "operation": "PrivateLinkConnectionWorker.SyncPLCDomainRecords",
              "trigger": "Delegate the scheduled worker tick to the underlying service implementation",
              "conditions": [
                "Only in brworker mode"
              ],
              "implementation": "controller worker wrapper -> PrivateLinkConnectionWorker.SyncPLCDomainRecords"
            }
          ]
        }
      ]
    },
    "ConsoleClusterService.ListDatabases": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After cluster id parsing succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Load serverless cluster metadata before opening a proxy session",
              "conditions": [
                "After cluster id parsing succeeds"
              ],
              "implementation": "cluster_console.go -> s.mgmtFacade.GetCluster(...)"
            }
          ]
        },
        {
          "name": "account-service",
          "target_interface": "AccessService.GetJwtByUser",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/account",
          "conditions": [
            "After user identity is extracted from context"
          ],
          "operations": [
            {
              "operation": "gRPC GetJwtByUser",
              "trigger": "Mint the per-user JWT used by the cluster proxy connection",
              "conditions": [
                "After user identity is extracted from context"
              ],
              "implementation": "cluster_console.go -> s.accountFacade.GetJwtByUser(...)"
            }
          ]
        },
        {
          "name": "clusterproxy",
          "target_interface": "TiDBService.QueryByNamespacedCluster",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/clusterproxy",
          "conditions": [
            "After cluster lookup and JWT minting succeed"
          ],
          "operations": [
            {
              "operation": "HTTP POST /v1beta1/query",
              "trigger": "Reach the target cluster through cluster-proxy to list or create databases",
              "conditions": [
                "After cluster lookup and JWT minting succeed"
              ],
              "implementation": "cluster_console.go -> s.clusterProxyProviderFacade.GetClusterProxy(...); proxy.QuerySQL(...)"
            }
          ]
        }
      ]
    },
    "ConsoleClusterService.CreateDatabase": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After cluster id parsing succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Load serverless cluster metadata before opening a proxy session",
              "conditions": [
                "After cluster id parsing succeeds"
              ],
              "implementation": "cluster_console.go -> s.mgmtFacade.GetCluster(...)"
            }
          ]
        },
        {
          "name": "account-service",
          "target_interface": "AccessService.GetJwtByUser",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/account",
          "conditions": [
            "After user identity is extracted from context"
          ],
          "operations": [
            {
              "operation": "gRPC GetJwtByUser",
              "trigger": "Mint the per-user JWT used by the cluster proxy connection",
              "conditions": [
                "After user identity is extracted from context"
              ],
              "implementation": "cluster_console.go -> s.accountFacade.GetJwtByUser(...)"
            }
          ]
        },
        {
          "name": "clusterproxy",
          "target_interface": "TiDBService.ExecuteByNamespacedCluster",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/clusterproxy",
          "conditions": [
            "After cluster lookup and JWT minting succeed"
          ],
          "operations": [
            {
              "operation": "HTTP POST /v1beta1/execute",
              "trigger": "Reach the target cluster through cluster-proxy to list or create databases",
              "conditions": [
                "After cluster lookup and JWT minting succeed"
              ],
              "implementation": "cluster_console.go -> s.clusterProxyProviderFacade.GetClusterProxy(...); proxy.ExecuteSQL(...)"
            }
          ]
        }
      ]
    },
    "ConsoleClusterService.AdviseIndexes": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read or update index-advisor records persisted by the local advisor repository",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster_console.go -> advisorRepo.*(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ConsoleClusterService.CloseIndexAdvice": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read or update index-advisor records persisted by the local advisor repository",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster_console.go -> advisorRepo.*(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ConsoleClusterService.ApplyIndexAdvice": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read or update index-advisor records persisted by the local advisor repository",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster_console.go -> advisorRepo.*(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ConsoleClusterService.ListIndexAdvices": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read or update index-advisor records persisted by the local advisor repository",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster_console.go -> advisorRepo.*(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ConsoleClusterService.GetIndexAdviceSummary": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read or update index-advisor records persisted by the local advisor repository",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster_console.go -> advisorRepo.*(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ConsoleClusterService.GetIndexAdvice": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT/UPDATE",
              "trigger": "Read or update index-advisor records persisted by the local advisor repository",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster_console.go -> advisorRepo.*(...)"
            }
          ]
        }
      },
      "services": []
    },
    "ConsoleClusterService.CheckFeature": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After cluster id parsing succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Load cluster metadata before evaluating feature availability",
              "conditions": [
                "After cluster id parsing succeeds"
              ],
              "implementation": "cluster_console.go -> s.mgmtFacade.GetCluster(...)"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.ListBranches": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.ListBranchesInPage",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.ListBranchesInPage",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.ListBranchesInPage"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.CreateBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.CreateBranch",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.CreateBranch",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.CreateBranch"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.GetBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.GetBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.GetBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.GetBranchById"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.DeleteBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.DeleteBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.DeleteBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.DeleteBranchById"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.ChangeBranchPassword": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.UpdateSqlUser",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.UpdateSqlUser",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.UpdateSqlUser"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.ListDatabases": {
      "infrastructure": {},
      "services": [
        {
          "name": "infra-api",
          "target_interface": "BranchService.GetBranch",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/infra-api",
          "conditions": [
            "After branch id lookup succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.GetBranch",
              "trigger": "Resolve live branch metadata from infra before opening a proxy session",
              "conditions": [
                "After branch id lookup succeeds"
              ],
              "implementation": "branch_console.go -> s.infraFacade.GetBranch(...)"
            }
          ]
        },
        {
          "name": "clusterproxy",
          "target_interface": "TiDBService.QueryByNamespacedCluster",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/clusterproxy",
          "conditions": [
            "After branch metadata and decrypted password are available"
          ],
          "operations": [
            {
              "operation": "HTTP POST /v1beta1/query",
              "trigger": "Query branch databases through cluster-proxy",
              "conditions": [
                "After branch metadata and decrypted password are available"
              ],
              "implementation": "branch_console.go -> s.clusterProxyProviderFacade.GetBranchProxy(...); proxy.QuerySQL(...)"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.ResetBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.ResetBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.ResetBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.ResetBranchById"
            }
          ]
        }
      ]
    },
    "ConsoleBranchService.UpdateBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.UpdateBranch",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.UpdateBranch",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.UpdateBranch"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.ListBackups": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.ListBackups",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.ListBackups",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.ListBackups"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.GetBackup": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.GetBackup",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.GetBackup",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.GetBackup"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.ListRecycledInstances": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.ListRecycledInstances",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.ListRecycledInstances",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.ListRecycledInstances"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.GetRecycledInstance": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.GetRecycledInstance",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.GetRecycledInstance",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.GetRecycledInstance"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.ListRecycledInstanceBackups": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.ListRecycledInstanceBackups",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.ListRecycledInstanceBackups",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.ListRecycledInstanceBackups"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.DeleteRecycledInstanceBackup": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.DeleteRecycledInstanceBackup",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.DeleteRecycledInstanceBackup",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.DeleteRecycledInstanceBackup"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.Restore": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.Restore",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.Restore",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.Restore"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.GetBackupRetention": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.GetBackupRetention",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.GetBackupRetention",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.GetBackupRetention"
            }
          ]
        }
      ]
    },
    "ConsoleBackupRestoreService.GetRestoreProgress": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.ListRestores",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.ListRestores",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.ListRestores"
            }
          ]
        }
      ]
    },
    "ConsoleChangefeedService.ListChangefeeds": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.GetChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.StartChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.StopChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.CreateChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.EditChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.DeleteChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.TestChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleChangefeedService.DescribeSchemaTable": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleImportService.Upload": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-upload-repo",
          "target_interface": "UploadRepo.CreateUpload",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "UploadRepo.CreateUpload",
              "trigger": "Create upload metadata and return upload access information",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "console/upload.go -> upload path"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.ListImports": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.ListImports",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.ListImports",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.ListImports"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.CreateImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.CreateImport",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request source validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.CreateImport",
              "trigger": "Create an import task in the local import domain service",
              "conditions": [
                "After request source validation succeeds"
              ],
              "implementation": "console/import.go -> create-import path"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.GetImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.GetImport/GetImportByIDCompat",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.GetImport/GetImportByIDCompat",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.GetImport/GetImportByIDCompat"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.CancelImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.CancelImport",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.CancelImport",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.CancelImport"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.PreviewLocal": {
      "infrastructure": {},
      "services": [
        {
          "name": "stashing-area",
          "target_interface": "GetObject",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After upload id lookup succeeds"
          ],
          "operations": [
            {
              "operation": "GetObject",
              "trigger": "Load the staged import object before doing local preview parsing",
              "conditions": [
                "After upload id lookup succeeds"
              ],
              "implementation": "precheck.go -> s.stashingAreaProvider.GetStashingArea(...); area.GetObject(...)"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.GetTableColumns": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportHelperService.GetTableColumns",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportHelperService.GetTableColumns",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportHelperService.GetTableColumns"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.GetDataIngestionProfile": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.GetDataIngestionProfile",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.GetDataIngestionProfile",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.GetDataIngestionProfile"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.ListSupportedDataTypes": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleImportService.ValidateImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.GetDataIngestionProfile + MgmtSvc.CheckImportPermission",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.GetDataIngestionProfile + MgmtSvc.CheckImportPermission",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.GetDataIngestionProfile + MgmtSvc.CheckImportPermission"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.Precheck": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster/Precheck",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After source and cluster validation succeed"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster/Precheck",
              "trigger": "Load target cluster metadata and ask management service to run import precheck",
              "conditions": [
                "After source and cluster validation succeed"
              ],
              "implementation": "precheck.go -> s.mgmtSvc.GetCluster(...); s.mgmtSvc.Precheck(...)"
            }
          ]
        },
        {
          "name": "account-service",
          "target_interface": "AccessService.GetJwtByUser",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/account",
          "conditions": [
            "After user identity extraction succeeds"
          ],
          "operations": [
            {
              "operation": "gRPC GetJwtByUser",
              "trigger": "Mint the JWT required by downstream precheck operations",
              "conditions": [
                "After user identity extraction succeeds"
              ],
              "implementation": "precheck.go -> s.accountFacade.GetJwtByUser(...)"
            }
          ]
        }
      ]
    },
    "ConsoleImportService.ListTargetTables": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "clusterproxy.QuerySQL",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "clusterproxy.QuerySQL",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "clusterproxy.QuerySQL"
            }
          ]
        }
      ]
    },
    "ConsoleExportService.ListExports": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleExportService.GetExport": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleExportService.CancelExport": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleExportService.CreateExport": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleExportService.DeleteExport": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleExportService.ParseTableFilter": {
      "infrastructure": {},
      "services": []
    },
    "ConsolePrivateLinkConnectionService.GetPrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "ConsolePrivateLinkConnectionService.ListPrivateLinkConnections": {
      "infrastructure": {},
      "services": []
    },
    "ConsolePrivateLinkConnectionService.CreatePrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "ConsolePrivateLinkConnectionService.DeletePrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "ConsolePrivateLinkConnectionService.GetAvailabilityZones": {
      "infrastructure": {},
      "services": []
    },
    "ConsolePrivateLinkConnectionService.AttachDomains": {
      "infrastructure": {},
      "services": []
    },
    "ConsolePrivateLinkConnectionService.DetachDomains": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.ListAuditLogFiles": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.DownloadAuditLogFiles": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.GetAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.ListAuditLogFilterRules": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.CreateAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.DeleteAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.UpdateAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.GetAuditLogConfig": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.UpdateAuditLogConfig": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.PreCheckAuditLogConfig": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleDatabaseAuditLogService.GetCloudStorageProfile": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.Precheck": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.CreateTask": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.GetTask": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.ListTasks": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.DeleteTask": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.PauseTask": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.ResumeTask": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.CancelPrecheck": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.GetPrecheck": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.GetSupportedSources": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.GetSourceTables": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.ValidateMigrationSourceConn": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.ValidateMigrationTargetConn": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.CreateVpcEndpoint": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.DescribeVpcEndpoint": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.GetVpcInfo": {
      "infrastructure": {},
      "services": []
    },
    "ConsoleMigrationService.GetIpWhitelist": {
      "infrastructure": {},
      "services": []
    },
    "RpcClusterService.ListClusters": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Serve the rpc cluster API from metadata stored in MySQL",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster metadata queries"
            }
          ]
        }
      },
      "services": []
    },
    "RpcClusterService.GetCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Serve the rpc cluster API from metadata stored in MySQL",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster metadata queries"
            }
          ]
        }
      },
      "services": []
    },
    "RpcClusterService.ListSpendLimitEvents": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Serve the rpc cluster API from metadata stored in MySQL",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "spend-limit event queries"
            }
          ]
        }
      },
      "services": []
    },
    "RpcClusterService.ListDatabases": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Serve the rpc cluster API from metadata stored in MySQL",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster metadata + proxy path"
            }
          ]
        }
      },
      "services": []
    },
    "RpcClusterService.CreateDatabase": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Serve the rpc cluster API from metadata stored in MySQL",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster metadata + proxy path"
            }
          ]
        }
      },
      "services": []
    },
    "RpcClusterService.CanCreateCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Serve the rpc cluster API from metadata stored in MySQL",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "cluster eligibility checks"
            }
          ]
        }
      },
      "services": []
    },
    "RpcBranchService.ListBranches": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.ListBranches",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.ListBranches",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.ListBranches"
            }
          ]
        }
      ]
    },
    "RpcBranchService.CreateBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.CreateBranch",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.CreateBranch",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.CreateBranch"
            }
          ]
        }
      ]
    },
    "RpcBranchService.GetBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.GetBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.GetBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.GetBranchById"
            }
          ]
        }
      ]
    },
    "RpcBranchService.DeleteBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.DeleteBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.DeleteBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.DeleteBranchById"
            }
          ]
        }
      ]
    },
    "RpcBranchService.CreateDBUser": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-user-role-domain",
          "target_interface": "UserRoleService.CreateUser",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After branch lookup succeeds"
          ],
          "operations": [
            {
              "operation": "UserRoleService.CreateUser",
              "trigger": "Create the DB user in the local domain layer using branch metadata",
              "conditions": [
                "After branch lookup succeeds"
              ],
              "implementation": "branch_rpc.go -> s.ur.CreateUser(...)"
            }
          ]
        }
      ]
    },
    "RpcBranchService.DeleteDBUser": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-user-role-domain",
          "target_interface": "UserRoleService.DeleteUser",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After branch lookup succeeds"
          ],
          "operations": [
            {
              "operation": "UserRoleService.DeleteUser",
              "trigger": "Delete the DB user in the local domain layer using branch metadata",
              "conditions": [
                "After branch lookup succeeds"
              ],
              "implementation": "branch_rpc.go -> s.ur.DeleteUser(...)"
            }
          ]
        }
      ]
    },
    "RpcBranchService.ResetBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.ResetBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.ResetBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.ResetBranchById"
            }
          ]
        }
      ]
    },
    "RpcBackupRestoreService.ListBackupPolicies": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.ListBackupPolicies",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.ListBackupPolicies",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.ListBackupPolicies"
            }
          ]
        }
      ]
    },
    "RpcBackupRestoreService.UpdateBackupPolicy": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-backup-domain",
          "target_interface": "BackupRestoreService.UpdateBackupPolicy",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BackupRestoreService.UpdateBackupPolicy",
              "trigger": "Delegate the API method to the backup/restore domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BackupRestoreService.UpdateBackupPolicy"
            }
          ]
        }
      ]
    },
    "RpcClusterCROperationService.UpdateCluster": {
      "infrastructure": {},
      "services": [
        {
          "name": "account-service",
          "target_interface": "AccountService.GetTenant",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/account",
          "conditions": [
            "After cluster lookup succeeds"
          ],
          "operations": [
            {
              "operation": "AccountService.GetTenant",
              "trigger": "Load tenant metadata before applying CR updates",
              "conditions": [
                "After cluster lookup succeeds"
              ],
              "implementation": "ops_svc/cluster_rpc.go -> c.accountFacade.GetTenant(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "ServerlessBillingService.DeleteSpendLimit",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "Only when the update removes or resets spend-limit state"
          ],
          "operations": [
            {
              "operation": "ServerlessBillingService.DeleteSpendLimit",
              "trigger": "Clean up spend-limit state when cluster updates require it",
              "conditions": [
                "Only when the update removes or resets spend-limit state"
              ],
              "implementation": "ops_svc/cluster_rpc.go -> c.billingRpc.DeleteSpendLimit(...)"
            }
          ]
        },
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.UpdateServerlessClusterAnnotations",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "When annotations need to be updated on the live cluster"
          ],
          "operations": [
            {
              "operation": "ClusterService.UpdateServerlessClusterAnnotations",
              "trigger": "Push cluster annotation changes to the management service",
              "conditions": [
                "When annotations need to be updated on the live cluster"
              ],
              "implementation": "ops_svc/cluster_rpc.go -> c.mgmtSvcFacade.UpdateServerlessClusterAnnotations(...)"
            }
          ]
        }
      ]
    },
    "RpcClusterCROperationService.GetCluster": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Load the live cluster CR view from tidb-management-service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ops cluster rpc get-cluster path"
            }
          ]
        }
      ]
    },
    "RpcRegionalK8sOperationService.ListGatewayHPAInfos": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-k8s-ops",
          "target_interface": "HTTP regional ops endpoint",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/infra-api",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "HTTP regional ops endpoint",
              "trigger": "Forward the request to the configured regional K8S operations endpoint",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ops_svc/k8s_rpc.go -> req.SetHeader(...); regional HTTP request"
            }
          ]
        }
      ]
    },
    "RpcRegionalK8sOperationService.UpdateGatewayHPAMinReplicas": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-k8s-ops",
          "target_interface": "HTTP regional ops endpoint",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/infra-api",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "HTTP regional ops endpoint",
              "trigger": "Forward the request to the configured regional K8S operations endpoint",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ops_svc/k8s_rpc.go -> req.SetHeader(...); regional HTTP request"
            }
          ]
        }
      ]
    },
    "RpcRegionalK8sOperationService.ListTiDBAutoscalingInfos": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-k8s-ops",
          "target_interface": "HTTP regional ops endpoint",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/infra-api",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "HTTP regional ops endpoint",
              "trigger": "Forward the request to the configured regional K8S operations endpoint",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ops_svc/k8s_rpc.go -> req.SetHeader(...); regional HTTP request"
            }
          ]
        }
      ]
    },
    "RpcRegionalK8sOperationService.UpdateTiDBAutoscalingThreshold": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-k8s-ops",
          "target_interface": "HTTP regional ops endpoint",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/infra-api",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "HTTP regional ops endpoint",
              "trigger": "Forward the request to the configured regional K8S operations endpoint",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ops_svc/k8s_rpc.go -> req.SetHeader(...); regional HTTP request"
            }
          ]
        }
      ]
    },
    "RpcUserService.CreateUser": {
      "infrastructure": {},
      "services": [
        {
          "name": "clusterproxy",
          "target_interface": "TiDBService.ExecuteByNamespacedCluster",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/clusterproxy",
          "conditions": [
            "After branch lookup, branch metadata load, and password decryption succeed"
          ],
          "operations": [
            {
              "operation": "HTTP POST /v1beta1/execute",
              "trigger": "Execute CREATE USER statements against the target branch through cluster-proxy",
              "conditions": [
                "After branch lookup, branch metadata load, and password decryption succeed"
              ],
              "implementation": "branch_rpc.go -> s.clusterProxyProviderFacade.GetBranchProxy(...); proxy.ExecuteMultiSQL(...)"
            }
          ]
        }
      ]
    },
    "RpcUserService.DeleteUser": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-user-role-domain",
          "target_interface": "UserRoleService.DeleteUser",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After branch lookup and password decryption succeed"
          ],
          "operations": [
            {
              "operation": "UserRoleService.DeleteUser",
              "trigger": "Delete the user using the user-role domain service",
              "conditions": [
                "After branch lookup and password decryption succeed"
              ],
              "implementation": "branch_rpc.go -> s.ur.DeleteUser(...)"
            }
          ]
        }
      ]
    },
    "ServerlessServerlessBillingService.GetAllSpendLimits": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-billing-domain",
          "target_interface": "BillingService.GetTenantSpendLimitsSettings",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After org lookup succeeds"
          ],
          "operations": [
            {
              "operation": "BillingService.GetTenantSpendLimitsSettings",
              "trigger": "Load persisted org spend-limit settings",
              "conditions": [
                "After org lookup succeeds"
              ],
              "implementation": "billing.go -> s.billingService.GetTenantSpendLimitsSettings(...)"
            }
          ]
        },
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListClusters",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "When cluster-level spend limits need to be attached to the response"
          ],
          "operations": [
            {
              "operation": "ClusterService.ListClusters",
              "trigger": "Enumerate live serverless clusters for the org",
              "conditions": [
                "When cluster-level spend limits need to be attached to the response"
              ],
              "implementation": "billing.go -> s.mgmtFacade.ListClusters/ListAllClustersInOrg(...)"
            }
          ]
        }
      ]
    },
    "ServerlessServerlessBillingService.GetSpendLimit": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After cluster id parsing succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Load live cluster metadata before reading spend-limit settings",
              "conditions": [
                "After cluster id parsing succeeds"
              ],
              "implementation": "billing.go -> s.mgmtFacade.GetCluster(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "HTTP_API.GET /api/v1/billing/tenants/:tenant_id/spend_limits",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "After cluster metadata is available"
          ],
          "operations": [
            {
              "operation": "HTTP GET /api/v1/billing/tenants/{tenant_id}/spend_limits",
              "trigger": "Read the current spend-limit configuration from the billing service",
              "conditions": [
                "After cluster metadata is available"
              ],
              "implementation": "billing.go -> s.billingFacade.GetSpendLimit(...)"
            }
          ]
        }
      ]
    },
    "ServerlessServerlessBillingService.ModifySpendLimit": {
      "infrastructure": {},
      "services": []
    },
    "ServerlessServerlessBillingService.SetSpendLimit": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always unless org 2130684 short-circuits the request before validation",
            "Before spend-limit restrictions and billing-side writes"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Load the live cluster metadata used to validate the plan, region, and autoscaling mode before creating or modifying spend limit state",
              "conditions": [
                "Always unless org 2130684 short-circuits the request before validation"
              ],
              "implementation": "billing.go -> s.mgmtFacade.GetCluster(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "HTTP_API.GET /api/v1/billing/tenants/:tenant_id/spend_limits",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "Always after cluster validation to check whether a spend-limit setting already exists"
          ],
          "operations": [
            {
              "operation": "HTTP GET /api/v1/billing/tenants/{tenant_id}/spend_limits",
              "trigger": "Probe whether the cluster already has a spend-limit setting so the method can branch into create or modify flow",
              "conditions": [
                "Always after cluster validation"
              ],
              "implementation": "billing.go -> s.billingFacade.GetSpendLimit(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "HTTP_API.POST /api/v1/billing/tenants/:tenant_id/spend_limits",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "Only when no existing spend-limit setting is found and validate_only is false"
          ],
          "operations": [
            {
              "operation": "HTTP POST /api/v1/billing/tenants/{tenant_id}/spend_limits",
              "trigger": "Create the initial serverless-cluster spend-limit setting in billing",
              "conditions": [
                "billingFacade.GetSpendLimit(...) returned nil",
                "validate_only != true"
              ],
              "implementation": "billing.go -> s.billingFacade.SetSpendLimit(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "HTTP_API.PUT /api/v1/billing/tenants/:tenant_id/spend_limits/:spend_limit_setting_id",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "Only when an existing spend-limit setting is found and validate_only is false"
          ],
          "operations": [
            {
              "operation": "HTTP PUT /api/v1/billing/tenants/{tenant_id}/spend_limits/{spend_limit_setting_id}",
              "trigger": "Modify the existing spend-limit setting after reusing the current billing-side record",
              "conditions": [
                "billingFacade.GetSpendLimit(...) returned a setting",
                "validate_only != true"
              ],
              "implementation": "billing.go -> modifySpendLimit(...) -> s.billingFacade.ModifySpendLimit(...)"
            }
          ]
        }
      ]
    },
    "ServerlessServerlessBillingService.DeleteSpendLimit": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After cluster id parsing succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Load the live cluster metadata before removing spend-limit state",
              "conditions": [
                "After cluster id parsing succeeds"
              ],
              "implementation": "billing.go -> s.mgmtFacade.GetCluster(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "HTTP_API.GET /api/v1/billing/tenants/:tenant_id/spend_limits",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "Always after cluster metadata is available to resolve the existing spend-limit setting ID"
          ],
          "operations": [
            {
              "operation": "HTTP GET /api/v1/billing/tenants/{tenant_id}/spend_limits",
              "trigger": "Load the current spend-limit setting so the delete flow can locate the billing-side record",
              "conditions": [
                "After cluster metadata is available"
              ],
              "implementation": "billing.go -> s.billingFacade.GetSpendLimit(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "HTTP_API.DELETE /api/v1/billing/tenants/:tenant_id/spend_limits/:spend_limit_setting_id",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "Only when an existing spend-limit setting is found"
          ],
          "operations": [
            {
              "operation": "HTTP DELETE /api/v1/billing/tenants/{tenant_id}/spend_limits/{spend_limit_setting_id}",
              "trigger": "Delete the existing serverless-cluster spend-limit setting in billing",
              "conditions": [
                "billingFacade.GetSpendLimit(...) returned a setting"
              ],
              "implementation": "billing.go -> s.billingFacade.DeleteSpendLimit(...)"
            }
          ]
        }
      ]
    },
    "ServerlessServerlessBillingService.PredictSpendLimit": {
      "infrastructure": {},
      "services": []
    },
    "ServerlessServerlessBillingService.PredictClusterSpendLimit": {
      "infrastructure": {},
      "services": []
    },
    "ServerlessServerlessBillingService.GetSpendLimitDetails": {
      "infrastructure": {},
      "services": [
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.GetCluster",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After cluster id parsing succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.GetCluster",
              "trigger": "Resolve cluster cloud provider, region, and serverless metadata",
              "conditions": [
                "After cluster id parsing succeeds"
              ],
              "implementation": "billing.go -> s.mgmtFacade.GetCluster(...)"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "HTTP_API.GET /api/v1/billing/tenants/:tenant_id/spend_limits/:spend_limit_setting_id/info",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "After cluster metadata is available"
          ],
          "operations": [
            {
              "operation": "HTTP GET /api/v1/billing/tenants/{tenant_id}/spend_limits/{spend_limit_setting_id}/info",
              "trigger": "Load billing-side spend-limit detail and quota data",
              "conditions": [
                "After cluster metadata is available"
              ],
              "implementation": "billing.go -> s.billingFacade.GetSpendLimitInfo(...)"
            }
          ]
        }
      ]
    },
    "ServerlessServerlessBillingService.GetResourceLimitMode": {
      "infrastructure": {},
      "services": []
    },
    "ServerlessServerlessBillingService.GetPricingDetails": {
      "infrastructure": {},
      "services": []
    },
    "ServerlessServerlessBillingService.SendExpensiveSQLEmail": {
      "infrastructure": {},
      "services": [
        {
          "name": "account-service",
          "target_interface": "AccountService.GetTenant/ListProjectsMapByOrg/SendTenantOwnerEmailOnce",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/account",
          "conditions": [
            "After org resolution succeeds"
          ],
          "operations": [
            {
              "operation": "AccountService.GetTenant/ListProjectsMapByOrg/SendTenantOwnerEmailOnce",
              "trigger": "Load org/project metadata and send the rendered email to tenant owners",
              "conditions": [
                "After org resolution succeeds"
              ],
              "implementation": "billing.go -> s.accountFacade.GetTenant(...); ListProjectsMapByOrg(...); SendTenantOwnerEmailOnce(...)"
            }
          ]
        },
        {
          "name": "tidb-management-service",
          "target_interface": "ClusterService.ListAllClustersInOrg",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "After org resolution succeeds"
          ],
          "operations": [
            {
              "operation": "ClusterService.ListAllClustersInOrg",
              "trigger": "Enumerate live clusters whose expensive SQL logs may be included in the email",
              "conditions": [
                "After org resolution succeeds"
              ],
              "implementation": "billing.go -> s.mgmtFacade.ListAllClustersInOrg(...)"
            }
          ]
        }
      ]
    },
    "ServerlessServerlessBillingService.PredictCost": {
      "infrastructure": {},
      "services": [
        {
          "name": "billing-service",
          "target_interface": "BillingService.GetSkuUnitPrices",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BillingService.GetSkuUnitPrices",
              "trigger": "Fetch SKU unit prices before computing the projected cost locally",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "billing.go -> s.billingService.GetSkuUnitPrices(...)"
            }
          ]
        }
      ]
    },
    "V1betaImportService.ListImports": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.ListImports",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.ListImports",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.ListImports"
            }
          ]
        }
      ]
    },
    "V1betaImportService.CreateImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.CreateImport",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.CreateImport",
              "trigger": "Create an import task through the v1beta API",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "v1beta/import.go -> create-import path"
            }
          ]
        }
      ]
    },
    "V1betaImportService.GetImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.GetImport/GetImportByIDCompat",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.GetImport/GetImportByIDCompat",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.GetImport/GetImportByIDCompat"
            }
          ]
        }
      ]
    },
    "V1betaImportService.CancelImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.CancelImport",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.CancelImport",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.CancelImport"
            }
          ]
        }
      ]
    },
    "V1betaImportService.GenerateUploadURL": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-upload-repo",
          "target_interface": "UploadRepo.CreateUpload",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "UploadRepo.CreateUpload",
              "trigger": "Create upload metadata and return the versioned upload URL",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "v1beta/import.go -> generate-upload-url path"
            }
          ]
        }
      ]
    },
    "V1betaBranchService.ListBranches": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.ListBranchesInPage",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.ListBranchesInPage",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.ListBranchesInPage"
            }
          ]
        }
      ]
    },
    "V1betaBranchService.CreateBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.CreateBranch",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.CreateBranch",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.CreateBranch"
            }
          ]
        }
      ]
    },
    "V1betaBranchService.GetBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.GetBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.GetBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.GetBranchById"
            }
          ]
        }
      ]
    },
    "V1betaBranchService.DeleteBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.DeleteBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.DeleteBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.DeleteBranchById"
            }
          ]
        }
      ]
    },
    "V1betaUserService.CreateUser": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-user-role-domain",
          "target_interface": "UserRoleService.CreateUser",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "UserRoleService.CreateUser",
              "trigger": "Create the DB user through the versioned branch user API",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "branch_v1beta.go -> create-user path"
            }
          ]
        }
      ]
    },
    "V1betaUserService.DeleteUser": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-user-role-domain",
          "target_interface": "UserRoleService.DeleteUser",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "UserRoleService.DeleteUser",
              "trigger": "Delete the DB user through the versioned branch user API",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "branch_v1beta.go -> delete-user path"
            }
          ]
        }
      ]
    },
    "V1beta1BranchService.CreateBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.CreateBranch",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.CreateBranch",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.CreateBranch"
            }
          ]
        }
      ]
    },
    "V1beta1BranchService.ListBranches": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.ListBranchesInPage",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.ListBranchesInPage",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.ListBranchesInPage"
            }
          ]
        }
      ]
    },
    "V1beta1BranchService.GetBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.GetBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.GetBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.GetBranchById"
            }
          ]
        }
      ]
    },
    "V1beta1BranchService.DeleteBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.DeleteBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.DeleteBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.DeleteBranchById"
            }
          ]
        }
      ]
    },
    "V1beta1BranchService.ResetBranch": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-branch-domain",
          "target_interface": "BranchService.ResetBranchById",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "BranchService.ResetBranchById",
              "trigger": "Delegate the API method to the branch domain service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "BranchService.ResetBranchById"
            }
          ]
        }
      ]
    },
    "V1beta1BranchService.UpdateSqlUser": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ImportService.StartUpload": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-upload-repo",
          "target_interface": "UploadRepo.CreateUpload",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "UploadRepo.CreateUpload",
              "trigger": "Drive the staged-upload lifecycle for the v1beta1 import API",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "UploadRepo.CreateUpload"
            }
          ]
        }
      ]
    },
    "V1beta1ImportService.CompleteUpload": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-upload-repo",
          "target_interface": "UploadRepo.CompleteUpload",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "UploadRepo.CompleteUpload",
              "trigger": "Drive the staged-upload lifecycle for the v1beta1 import API",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "UploadRepo.CompleteUpload"
            }
          ]
        }
      ]
    },
    "V1beta1ImportService.CancelUpload": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-upload-repo",
          "target_interface": "UploadRepo.CancelUpload",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "UploadRepo.CancelUpload",
              "trigger": "Drive the staged-upload lifecycle for the v1beta1 import API",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "UploadRepo.CancelUpload"
            }
          ]
        }
      ]
    },
    "V1beta1ImportService.ListImports": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.ListImports",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.ListImports",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.ListImports"
            }
          ]
        }
      ]
    },
    "V1beta1ImportService.CreateImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.CreateImport",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.CreateImport",
              "trigger": "Create an import task through the v1beta1 API",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "v1beta1/import.go -> create-import path"
            }
          ]
        }
      ]
    },
    "V1beta1ImportService.GetImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.GetImport/GetImportByIDCompat",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.GetImport/GetImportByIDCompat",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.GetImport/GetImportByIDCompat"
            }
          ]
        }
      ]
    },
    "V1beta1ImportService.CancelImport": {
      "infrastructure": {},
      "services": [
        {
          "name": "serverless-import-domain",
          "target_interface": "ImportService.CancelImport",
          "operation_type": "local_call",
          "target_repo": "tidbcloud/serverless-service",
          "conditions": [
            "After request validation succeeds"
          ],
          "operations": [
            {
              "operation": "ImportService.CancelImport",
              "trigger": "Delegate the import API to the import domain/helper service",
              "conditions": [
                "After request validation succeeds"
              ],
              "implementation": "ImportService.CancelImport"
            }
          ]
        }
      ]
    },
    "V1beta1ExportService.ListExports": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ExportService.GetExport": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ExportService.CancelExport": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ExportService.CreateExport": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ExportService.DeleteExport": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ExportService.DownloadExport": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ExportService.ListExportFiles": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ExportService.DownloadExportFiles": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1AuditLogService.ListAuditLogs": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1AuditLogService.DownloadAuditLogs": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1AuditLogService.GetAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1AuditLogService.ListAuditLogFilterRules": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1AuditLogService.CreateAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1AuditLogService.DeleteAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1AuditLogService.UpdateAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.ListAuditLogFiles": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.DownloadAuditLogFiles": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.GetAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.ListAuditLogFilterRules": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.CreateAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.DeleteAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.UpdateAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.GetAuditLogConfig": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1DatabaseAuditLogService.UpdateAuditLogConfig": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.ListChangefeeds": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.GetChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.CreateChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.EditChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.DeleteChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.StartChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.StopChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.TestChangefeed": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1ChangefeedService.DescribeSchemaTable": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1PrivateLinkConnectionService.GetPrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1PrivateLinkConnectionService.ListPrivateLinkConnections": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1PrivateLinkConnectionService.CreatePrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1PrivateLinkConnectionService.DeletePrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1PrivateLinkConnectionService.GetAvailabilityZones": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1PrivateLinkConnectionService.AttachDomains": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1PrivateLinkConnectionService.DetachDomains": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.CreateMigration": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.GetMigration": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.ListMigrations": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.DeleteMigration": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.PauseMigration": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.ResumeMigration": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.Precheck": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.CancelPrecheck": {
      "infrastructure": {},
      "services": []
    },
    "V1beta1MigrationService.GetPrecheck": {
      "infrastructure": {},
      "services": []
    }
  },
  "notes": [
    "Every interface method now has a canonical mapping key. Many business API methods still share large in-repo domain layers, so this rescan focuses on runtime mode conditions, event/worker surfaces, and the highest-signal cross-service dependencies first.",
    "Console, v1beta, and v1beta1 methods are listed once per transport family. Shared gateway exposure is documented in the interface file rather than duplicated as separate dependency keys."
  ]
}
