import { z } from 'zod';
import { type InferProvider } from './capability-definition.js';
import { DeviceType } from '../device/device-type.js';
/**
 * Two-way audio / talk-back cap. Clients open a WebRTC audio-only
 * session (server-initiated offer pattern, identical to the main
 * video WebRTC flow) and the browser captures the mic; the server
 * receives Opus RTP via werift, decodes through ffmpeg, re-encodes
 * to the firmware's expected codec (Reolink: IMA ADPCM), and pipes
 * it onto the camera's dedicated talk channel.
 *
 * All audio transcoding happens server-side — clients don't need to
 * know the camera's wire format. The `ability` cached in `status`
 * exposes the firmware's codec/sampleRate only for display/debug;
 * the client never has to act on those values.
 */
export declare const IntercomAbilitySchema: z.ZodObject<{
    codecs: z.ZodArray<z.ZodString>;
    sampleRate: z.ZodNumber;
    duplex: z.ZodEnum<{
        full: "full";
        half: "half";
    }>;
    maxBacklogMs: z.ZodNumber;
}, z.core.$strip>;
export type IntercomAbility = z.infer<typeof IntercomAbilitySchema>;
export declare const IntercomStatusSchema: z.ZodObject<{
    talking: z.ZodBoolean;
    lastSessionAt: z.ZodNullable<z.ZodNumber>;
    ability: z.ZodNullable<z.ZodObject<{
        codecs: z.ZodArray<z.ZodString>;
        sampleRate: z.ZodNumber;
        duplex: z.ZodEnum<{
            full: "full";
            half: "half";
        }>;
        maxBacklogMs: z.ZodNumber;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type IntercomStatus = z.infer<typeof IntercomStatusSchema>;
export declare const intercomCapability: {
    readonly name: "intercom";
    readonly scope: "device";
    readonly mode: "singleton";
    readonly deviceTypes: readonly [DeviceType.Camera];
    readonly methods: {
        /**
         * Open a server-side WebRTC audio-only session. Returns an SDP
         * offer with a single sendonly audio m-line the client answers
         * (client → server direction). The server wakes battery cams
         * transparently before opening the upstream talk channel.
         */
        readonly startSession: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
        }, z.core.$strip>, z.ZodObject<{
            sessionId: z.ZodString;
            sdpOffer: z.ZodString;
        }, z.core.$strip>, "mutation">;
        readonly handleAnswer: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            sessionId: z.ZodString;
            sdpAnswer: z.ZodString;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
        /** Close explicitly. Server also auto-closes on 30s idle. */
        readonly stopSession: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            deviceId: z.ZodNumber;
            sessionId: z.ZodString;
        }, z.core.$strip>, z.ZodVoid, "mutation">;
    };
    readonly events: {
        readonly onStatusChanged: {
            readonly data: z.ZodObject<{
                deviceId: z.ZodNumber;
                status: z.ZodObject<{
                    talking: z.ZodBoolean;
                    lastSessionAt: z.ZodNullable<z.ZodNumber>;
                    ability: z.ZodNullable<z.ZodObject<{
                        codecs: z.ZodArray<z.ZodString>;
                        sampleRate: z.ZodNumber;
                        duplex: z.ZodEnum<{
                            full: "full";
                            half: "half";
                        }>;
                        maxBacklogMs: z.ZodNumber;
                    }, z.core.$strip>>;
                }, z.core.$strip>;
            }, z.core.$strip>;
        };
    };
    readonly status: {
        readonly schema: z.ZodObject<{
            talking: z.ZodBoolean;
            lastSessionAt: z.ZodNullable<z.ZodNumber>;
            ability: z.ZodNullable<z.ZodObject<{
                codecs: z.ZodArray<z.ZodString>;
                sampleRate: z.ZodNumber;
                duplex: z.ZodEnum<{
                    full: "full";
                    half: "half";
                }>;
                maxBacklogMs: z.ZodNumber;
            }, z.core.$strip>>;
        }, z.core.$strip>;
        readonly kind: "command-driven";
    };
};
export type IIntercomProvider = InferProvider<typeof intercomCapability>;
//# sourceMappingURL=intercom.cap.d.ts.map