import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; export declare class ActiveSession extends APIResource { /** * Creates a new poll in an active session for the given meeting ID. * * @example * ```ts * const response = * await client.realtimeKit.activeSession.createPoll( * 'app_id', * 'meeting_id', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * options: ['string'], * question: 'question', * }, * ); * ``` */ createPoll(appId: string, meetingId: string, params: ActiveSessionCreatePollParams, options?: Core.RequestOptions): Core.APIPromise; /** * Returns details of an ongoing active session for the given meeting ID. * * @example * ```ts * const response = * await client.realtimeKit.activeSession.getActiveSession( * 'app_id', * 'meeting_id', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ getActiveSession(appId: string, meetingId: string, params: ActiveSessionGetActiveSessionParams, options?: Core.RequestOptions): Core.APIPromise; /** * Kicks all participants from an active session for the given meeting ID. * * @example * ```ts * const response = * await client.realtimeKit.activeSession.kickAllParticipants( * 'app_id', * 'meeting_id', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ kickAllParticipants(appId: string, meetingId: string, params: ActiveSessionKickAllParticipantsParams, options?: Core.RequestOptions): Core.APIPromise; /** * Kicks one or more participants from an active session using user ID or custom * participant ID. * * @example * ```ts * const response = * await client.realtimeKit.activeSession.kickParticipants( * 'app_id', * 'meeting_id', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * custom_participant_ids: ['string'], * participant_ids: ['string'], * }, * ); * ``` */ kickParticipants(appId: string, meetingId: string, params: ActiveSessionKickParticipantsParams, options?: Core.RequestOptions): Core.APIPromise; } export interface ActiveSessionCreatePollResponse { data?: ActiveSessionCreatePollResponse.Data; success?: boolean; } export declare namespace ActiveSessionCreatePollResponse { interface Data { action?: string; poll?: Data.Poll; } namespace Data { interface Poll { /** * ID of the poll */ id: string; /** * Answer options */ options: Array; /** * Question asked by the poll */ question: string; anonymous?: boolean; created_by?: string; hide_votes?: boolean; voted?: Array; } namespace Poll { interface Option { count: number; /** * Text of the answer option */ text: string; votes: Array; } namespace Option { interface Vote { id: string; name: string; } } } } } export interface ActiveSessionGetActiveSessionResponse { data?: ActiveSessionGetActiveSessionResponse.Data; success?: boolean; } export declare namespace ActiveSessionGetActiveSessionResponse { interface Data { /** * ID of the session */ id: string; /** * ID of the meeting this session is associated with. In the case of V2 meetings, * it is always a UUID. In V1 meetings, it is a room name of the form * `abcdef-ghijkl` */ associated_id: string; /** * timestamp when session created */ created_at: string; /** * number of participants currently in the session */ live_participants: number; /** * number of maximum participants that were in the session */ max_concurrent_participants: number; /** * Title of the meeting this session belongs to */ meeting_display_name: string; /** * number of minutes consumed since the session started */ minutes_consumed: number; /** * App id that hosted this session */ organization_id: string; /** * timestamp when session started */ started_at: string; /** * current status of session */ status: 'LIVE' | 'ENDED'; /** * type of session */ type: 'meeting' | 'livestream' | 'participant'; /** * timestamp when session was last updated */ updated_at: string; breakout_rooms?: Array; /** * timestamp when session ended */ ended_at?: string; /** * Any meta data about session. */ meta?: unknown; } } export interface ActiveSessionKickAllParticipantsResponse { data?: ActiveSessionKickAllParticipantsResponse.Data; success?: boolean; } export declare namespace ActiveSessionKickAllParticipantsResponse { interface Data { action?: string; kicked_participants_count?: number; } } export interface ActiveSessionKickParticipantsResponse { data?: ActiveSessionKickParticipantsResponse.Data; success?: boolean; } export declare namespace ActiveSessionKickParticipantsResponse { interface Data { action?: string; participants?: Array; } namespace Data { interface Participant { /** * ID of the session participant */ id: string; created_at: string; updated_at: string; /** * Email of the session participant. */ email?: string; /** * Name of the session participant. */ name?: string; /** * A URL pointing to a picture of the participant. */ picture?: string; } } } export interface ActiveSessionCreatePollParams { /** * Path param: The account identifier tag. */ account_id: string; /** * Body param: Different options for the question */ options: Array; /** * Body param: Question of the poll */ question: string; /** * Body param: if voters on a poll are anonymous */ anonymous?: boolean; /** * Body param: if votes on an option are visible before a person votes */ hide_votes?: boolean; } export interface ActiveSessionGetActiveSessionParams { /** * The account identifier tag. */ account_id: string; } export interface ActiveSessionKickAllParticipantsParams { /** * The account identifier tag. */ account_id: string; } export interface ActiveSessionKickParticipantsParams { /** * Path param: The account identifier tag. */ account_id: string; /** * Body param */ custom_participant_ids: Array; /** * Body param */ participant_ids: Array; } export declare namespace ActiveSession { export { type ActiveSessionCreatePollResponse as ActiveSessionCreatePollResponse, type ActiveSessionGetActiveSessionResponse as ActiveSessionGetActiveSessionResponse, type ActiveSessionKickAllParticipantsResponse as ActiveSessionKickAllParticipantsResponse, type ActiveSessionKickParticipantsResponse as ActiveSessionKickParticipantsResponse, type ActiveSessionCreatePollParams as ActiveSessionCreatePollParams, type ActiveSessionGetActiveSessionParams as ActiveSessionGetActiveSessionParams, type ActiveSessionKickAllParticipantsParams as ActiveSessionKickAllParticipantsParams, type ActiveSessionKickParticipantsParams as ActiveSessionKickParticipantsParams, }; } //# sourceMappingURL=active-session.d.ts.map