capabilities/types.ts

AppFromAI · src/capabilities/types.ts · typescript · Apache-2.0
voice

TypeScript definitions for a comprehensive mobile device API interface.

// Source: https://github.com/BiosBrick/AppFromAI | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
export type TorchCapability = {
  (on: boolean): Promise<void>;
  setEnabled: (on: boolean) => Promise<void>;
};

export type MotherApi = {
  camera: {
    takePhoto: () => Promise<{ uri: string; fileUri?: string; width?: number; height?: number } | null>;
  };
  audioRecorder: {
    start: () => Promise<void>;
    stop: () => Promise<{ uri: string; durationMs?: number } | null>;
  };
  audioPlayer: {
    play: (uri: string) => Promise<{ durationMs?: number }>;
    stop: () => Promise<void>;
    pause: () => Promise<void>;
    resume: () => Promise<void>;
    getStatus: () => Promise<

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key