Files
sexy/lib/buttplug/types.ts
T
valknarandClaude Sonnet 5 1119c8eea0
CI / Static checks (push) Successful in 1m27s
CI / Build and push image (push) Skipped
Initial implementation of Bluetooth toy control app
Next.js app with a browser-side buttplug/buttplug-wasm control layer
(server never touches real-time device commands), SQLite storage via
Drizzle, single-secret auth, recordings/replay with device remapping,
a usage stats dashboard, Docker deployment, and Gitea CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W8WkFF5ppURBAB918593Eb
2026-08-25 07:51:38 +02:00

34 lines
944 B
TypeScript

/**
* Normalized, app-level types for the Buttplug integration. Kept separate
* from `buttplug`'s own types so the rest of the app (UI, API payloads, DB
* rows) never has to import the client library directly.
*/
export type NormalizedOutputType = "vibrate" | "rotate" | "linear";
export type CommandType = NormalizedOutputType | "stop";
export interface ActuatorInfo {
featureIndex: number;
outputType: NormalizedOutputType;
/** True for outputs (e.g. HwPositionWithDuration) that require a move duration. */
requiresDuration: boolean;
descriptor: string;
}
export interface ConnectedDeviceInfo {
index: number;
name: string;
displayName?: string;
actuators: ActuatorInfo[];
}
/** A single dispatched command, timestamped relative to session start. */
export interface CommandEvent {
tsMs: number;
deviceIndex: number;
commandType: CommandType;
featureIndex: number;
value: number;
durationMs?: number;
}