Add control RPC auth method
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user