mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:21:24 +00:00
66 lines
1.8 KiB
TypeScript
66 lines
1.8 KiB
TypeScript
import { Type } from "@sinclair/typebox";
|
|
|
|
import { NonEmptyString } from "./primitives.js";
|
|
|
|
export const NodePairRequestParamsSchema = Type.Object(
|
|
{
|
|
nodeId: NonEmptyString,
|
|
displayName: Type.Optional(NonEmptyString),
|
|
platform: Type.Optional(NonEmptyString),
|
|
version: Type.Optional(NonEmptyString),
|
|
deviceFamily: Type.Optional(NonEmptyString),
|
|
modelIdentifier: Type.Optional(NonEmptyString),
|
|
caps: Type.Optional(Type.Array(NonEmptyString)),
|
|
commands: Type.Optional(Type.Array(NonEmptyString)),
|
|
remoteIp: Type.Optional(NonEmptyString),
|
|
silent: Type.Optional(Type.Boolean()),
|
|
},
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodePairListParamsSchema = Type.Object(
|
|
{},
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodePairApproveParamsSchema = Type.Object(
|
|
{ requestId: NonEmptyString },
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodePairRejectParamsSchema = Type.Object(
|
|
{ requestId: NonEmptyString },
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodePairVerifyParamsSchema = Type.Object(
|
|
{ nodeId: NonEmptyString, token: NonEmptyString },
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodeRenameParamsSchema = Type.Object(
|
|
{ nodeId: NonEmptyString, displayName: NonEmptyString },
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodeListParamsSchema = Type.Object(
|
|
{},
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodeDescribeParamsSchema = Type.Object(
|
|
{ nodeId: NonEmptyString },
|
|
{ additionalProperties: false },
|
|
);
|
|
|
|
export const NodeInvokeParamsSchema = Type.Object(
|
|
{
|
|
nodeId: NonEmptyString,
|
|
command: NonEmptyString,
|
|
params: Type.Optional(Type.Unknown()),
|
|
timeoutMs: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
idempotencyKey: NonEmptyString,
|
|
},
|
|
{ additionalProperties: false },
|
|
);
|