Add control RPC auth method

This commit is contained in:
Timothy J. Aveni
2026-06-25 21:02:37 -07:00
parent d6fc9bd13e
commit 27796e97dc
+6
View File
@@ -35,6 +35,7 @@ export const CONTROL_PLANE_ROUTES = {
} as const;
export const CONTROL_PLANE_RPC_METHODS = {
auth: "control.auth",
run: "control.run",
status: "control.status",
check: "control.check",
@@ -76,6 +77,10 @@ const parseWith = <Schema extends z.ZodType>(
return parsed.success ? parsed.data : null;
};
export const ControlPlaneRpcAuthRequestSchema = z.object({
secret: nonEmptyString,
});
export const ControlPlaneRunRequestSchema = z.object({
target: nonEmptyString,
});
@@ -681,6 +686,7 @@ export const ControlPlaneCutoverResponseSchema = z.object({
});
export const ControlPlaneRpcMethodParamsSchemas = {
[CONTROL_PLANE_RPC_METHODS.auth]: ControlPlaneRpcAuthRequestSchema,
[CONTROL_PLANE_RPC_METHODS.run]: ControlPlaneRunRequestSchema,
[CONTROL_PLANE_RPC_METHODS.status]: z.object({}).optional(),
[CONTROL_PLANE_RPC_METHODS.check]: ControlPlaneCheckRequestSchema,