@zoom/rivet
Version:
Zoom Rivet is a comprehensive toolkit built to help developers quickly integrate and manage server-side applications within the Zoom ecosystem. This tool currently supports Node.js, offering core functionalities like authentication, API wrappers, and even
1,601 lines (1,585 loc) • 274 kB
TypeScript
import { LambdaFunctionURLResult, LambdaFunctionURLHandler } from 'aws-lambda';
import { AxiosResponse } from 'axios';
import { Server } from 'node:http';
import { ServerOptions } from 'node:https';
import { ReadStream } from 'node:fs';
type AllKeysOf<T> = T extends any ? keyof T : never;
type AllPropsOptional<T, True, False> = Exclude<{
[P in keyof T]: undefined extends T[P] ? True : False;
}[keyof T], undefined> extends True ? True : False;
type Constructor<T> = new (...args: any[]) => T;
type ExactlyOneOf<T extends any[]> = {
[K in keyof T]: T[K] & ProhibitKeys<Exclude<AllKeysOf<T[number]>, keyof T[K]>>;
}[number];
type MaybeArray<T> = T | T[];
type MaybePromise<T> = T | Promise<T>;
type ProhibitKeys<K extends keyof any> = {
[P in K]?: never;
};
type StringIndexed<V = any> = Record<string, V>;
/**
* {@link StateStore} defines methods for generating and verifying OAuth state.
*
* This interface is implemented internally for the default state store; however,
* it can also be implemented and passed to an OAuth client as well.
*/
interface StateStore {
/**
* Generate a new state string, which is directly appended to the OAuth `state` parameter.
*/
generateState(): MaybePromise<string>;
/**
* Verify that the state received during OAuth callback is valid and not forged.
*
* If state verification fails, {@link OAuthStateVerificationFailedError} should be thrown.
*
* @param state The state parameter that was received during OAuth callback
*/
verifyState(state: string): MaybePromise<void>;
}
/**
* Guard if an object implements the {@link StateStore} interface — most notably,
* `generateState()` and `verifyState(state: string)`.
*/
declare const isStateStore: (obj: unknown) => obj is StateStore;
interface TokenStore<Token> {
getLatestToken(): MaybePromise<Token | null | undefined>;
storeToken(token: Token): MaybePromise<void>;
}
interface RivetError<ErrorCode extends string = string> extends Error {
readonly errorCode: ErrorCode;
}
declare const isCoreError: <K extends "ApiResponseError" | "AwsReceiverRequestError" | "ClientCredentialsRawResponseError" | "S2SRawResponseError" | "CommonHttpRequestError" | "ReceiverInconsistentStateError" | "ReceiverOAuthFlowError" | "HTTPReceiverConstructionError" | "HTTPReceiverPortNotNumberError" | "HTTPReceiverRequestError" | "OAuthInstallerNotInitializedError" | "OAuthTokenDoesNotExistError" | "OAuthTokenFetchFailedError" | "OAuthTokenRawResponseError" | "OAuthTokenRefreshFailedError" | "OAuthStateVerificationFailedError" | "ProductClientConstructionError">(obj: unknown, key?: K | undefined) => obj is RivetError<{
readonly ApiResponseError: "zoom_rivet_api_response_error";
readonly AwsReceiverRequestError: "zoom_rivet_aws_receiver_request_error";
readonly ClientCredentialsRawResponseError: "zoom_rivet_client_credentials_raw_response_error";
readonly S2SRawResponseError: "zoom_rivet_s2s_raw_response_error";
readonly CommonHttpRequestError: "zoom_rivet_common_http_request_error";
readonly ReceiverInconsistentStateError: "zoom_rivet_receiver_inconsistent_state_error";
readonly ReceiverOAuthFlowError: "zoom_rivet_receiver_oauth_flow_error";
readonly HTTPReceiverConstructionError: "zoom_rivet_http_receiver_construction_error";
readonly HTTPReceiverPortNotNumberError: "zoom_rivet_http_receiver_port_not_number_error";
readonly HTTPReceiverRequestError: "zoom_rivet_http_receiver_request_error";
readonly OAuthInstallerNotInitializedError: "zoom_rivet_oauth_installer_not_initialized_error";
readonly OAuthTokenDoesNotExistError: "zoom_rivet_oauth_does_not_exist_error";
readonly OAuthTokenFetchFailedError: "zoom_rivet_oauth_token_fetch_failed_error";
readonly OAuthTokenRawResponseError: "zoom_rivet_oauth_token_raw_response_error";
readonly OAuthTokenRefreshFailedError: "zoom_rivet_oauth_token_refresh_failed_error";
readonly OAuthStateVerificationFailedError: "zoom_rivet_oauth_state_verification_failed_error";
readonly ProductClientConstructionError: "zoom_rivet_product_client_construction_error";
}[K]>;
declare const ApiResponseError: Constructor<Error>;
declare const AwsReceiverRequestError: Constructor<Error>;
declare const ClientCredentialsRawResponseError: Constructor<Error>;
declare const S2SRawResponseError: Constructor<Error>;
declare const CommonHttpRequestError: Constructor<Error>;
declare const ReceiverInconsistentStateError: Constructor<Error>;
declare const ReceiverOAuthFlowError: Constructor<Error>;
declare const HTTPReceiverConstructionError: Constructor<Error>;
declare const HTTPReceiverPortNotNumberError: Constructor<Error>;
declare const HTTPReceiverRequestError: Constructor<Error>;
declare const OAuthInstallerNotInitializedError: Constructor<Error>;
declare const OAuthTokenDoesNotExistError: Constructor<Error>;
declare const OAuthTokenFetchFailedError: Constructor<Error>;
declare const OAuthTokenRawResponseError: Constructor<Error>;
declare const OAuthTokenRefreshFailedError: Constructor<Error>;
declare const OAuthStateVerificationFailedError: Constructor<Error>;
declare const ProductClientConstructionError: Constructor<Error>;
declare enum LogLevel {
ERROR = "error",
WARN = "warn",
INFO = "info",
DEBUG = "debug"
}
interface Logger {
/**
* Output debug message
* @param msg any data to be logged
*/
debug(...msg: unknown[]): void;
/**
* Output info message
* @param msg any data to be logged
*/
info(...msg: unknown[]): void;
/**
* Output warn message
* @param msg any data to be logged
*/
warn(...msg: unknown[]): void;
/**
* Output error message
* @param msg any data to be logged
*/
error(...msg: unknown[]): void;
/**
* Disables all logging below the given level
* @param level as a string, 'error' | 'warn' | 'info' | 'debug'
*/
setLevel(level: LogLevel): void;
/**
* Return the current LogLevel.
*/
getLevel(): LogLevel;
/**
* Name the instance so that it can be filtered when many loggers are sending output
* to the same destination.
* @param name as a string
*/
setName(name: string): void;
}
declare class ConsoleLogger implements Logger {
private level;
private name;
private static labels;
private static severity;
constructor();
getLevel(): LogLevel;
setLevel(level: LogLevel): void;
setName(name: string): void;
debug(...msg: unknown[]): void;
info(...msg: unknown[]): void;
warn(...msg: unknown[]): void;
error(...msg: unknown[]): void;
private static isMoreOrEqualSevere;
}
interface AuthOptions<Token> {
clientId: string;
clientSecret: string;
tokenStore?: TokenStore<Token> | undefined;
logger?: Logger;
}
type OAuthGrantType = "authorization_code" | "client_credentials" | "refresh_token" | "account_credentials";
interface BaseOAuthRequest {
grant_type: OAuthGrantType;
}
interface OAuthAuthorizationCodeRequest extends BaseOAuthRequest {
code: string;
grant_type: "authorization_code";
redirect_uri?: string;
}
interface OAuthRefreshTokenRequest extends BaseOAuthRequest {
grant_type: "refresh_token";
refresh_token: string;
}
interface S2SAuthTokenRequest extends BaseOAuthRequest {
grant_type: "account_credentials";
account_id: string;
}
type OAuthRequest = OAuthAuthorizationCodeRequest | OAuthRefreshTokenRequest | S2SAuthTokenRequest;
/**
* {@link Auth} is the base implementation of authentication for Zoom's APIs.
*
* It only requires a `clientId` and `tokenStore`, as these options are shared across
* all authentication implementations, namely OAuth and server-to-server auth (client
* credentials, JWT, and server-to-server OAuth.)
*/
declare abstract class Auth<Token = unknown> {
protected readonly clientId: string;
protected readonly clientSecret: string;
protected readonly tokenStore: TokenStore<Token>;
protected readonly logger: Logger | undefined;
constructor({ clientId, clientSecret, tokenStore, logger }: AuthOptions<Token>);
protected getBasicAuthorization(): string;
abstract getToken(): MaybePromise<string>;
protected isAlmostExpired(isoTime: string): boolean;
protected makeOAuthTokenRequest<T extends OAuthGrantType>(grantType: T, payload?: Omit<Extract<OAuthRequest, {
grant_type: T;
}>, "grant_type">): Promise<AxiosResponse>;
}
interface S2SAuthToken {
accessToken: string;
expirationTimeIso: string;
scopes: string[];
}
interface S2SAuthOptions {
accountId: string;
}
declare class S2SAuth extends Auth<S2SAuthToken> {
private accountId;
constructor({ accountId, ...restOptions }: AuthOptions<S2SAuthToken> & S2SAuthOptions);
private assertRawToken;
private fetchAccessToken;
getToken(): Promise<string>;
private mapAccessToken;
}
interface Event<Type extends string> {
event: Type;
}
type EventKeys<T> = T extends Event<infer U> ? U : never;
type EventPayload<T, K> = Extract<T, {
event: K;
}>;
type EventListenerFn<Events, EventName extends EventKeys<Events>, ReturnType = MaybePromise<void>> = (payload: EventPayload<Events, EventName>) => ReturnType;
type EventListenerPredicateFn<Events, EventName extends EventKeys<Events>> = EventListenerFn<Events, EventName, MaybePromise<boolean>>;
type ContextListener<Events, EventName extends EventKeys<Events>, Context> = (_: EventPayload<Events, EventName> & Context) => MaybePromise<void>;
type GenericEventManager = EventManager<any, any>;
declare class EventManager<Endpoints, Events> {
protected endpoints: Endpoints;
constructor(endpoints: Endpoints);
private appendListener;
filteredEvent<EventName extends EventKeys<Events>>(eventName: EventName, predicate: EventListenerPredicateFn<Events, EventName>, listener: EventListenerFn<Events, EventName>): void;
emit<EventName extends EventKeys<Events>>(eventName: EventName, payload: EventPayload<Events, EventName>): Promise<void>;
event<EventName extends EventKeys<Events>>(eventName: EventName, listener: EventListenerFn<Events, EventName>): void;
protected withContext<EventName extends EventKeys<Events>, Context>(): ContextListener<Events, EventName, Context>;
}
interface HttpReceiverOptions extends Partial<SecureServerOptions> {
endpoints?: MaybeArray<string> | undefined;
port?: number | string | undefined;
webhooksSecretToken: string;
logger?: Logger;
logLevel?: LogLevel;
}
type SecureServerOptions = {
[K in (typeof secureServerOptionKeys)[number]]: ServerOptions[K];
};
declare const secureServerOptionKeys: (keyof ServerOptions)[];
declare class HttpReceiver implements Receiver {
private eventEmitter?;
private interactiveAuth?;
private server?;
private logger;
constructor(options: HttpReceiverOptions);
canInstall(): true;
private getServerCreator;
private hasEndpoint;
private hasSecureOptions;
init({ eventEmitter, interactiveAuth }: ReceiverInitOptions): void;
start(port?: number | string): Promise<Server>;
stop(): Promise<void>;
private writeTemporaryRedirect;
private writeResponse;
}
interface BaseResponse<Data = unknown> {
data?: Data | undefined;
statusCode: number;
trackingId?: string | undefined;
}
interface BuildEndpointOptions<PathSchema> {
method: HttpMethod;
baseUrlOverride?: string | undefined;
urlPathBuilder: (params: PathSchema) => string;
requestMimeType?: RequestMimeType;
}
interface WebEndpointOptions {
auth: Auth;
baseUrl?: string | undefined;
doubleEncodeUrl?: boolean | undefined;
timeout?: number | undefined;
}
type EndpointArguments<PathSchema extends StringIndexed | NoParams, BodySchema extends StringIndexed | NoParams, QuerySchema extends StringIndexed | NoParams> = (PathSchema extends NoParams ? object : AllPropsOptional<PathSchema, "t", "f"> extends "t" ? {
path?: PathSchema;
} : {
path: PathSchema;
}) & (BodySchema extends NoParams ? object : AllPropsOptional<BodySchema, "t", "f"> extends "t" ? {
body?: BodySchema;
} : {
body: BodySchema;
}) & (QuerySchema extends NoParams ? object : AllPropsOptional<QuerySchema, "t", "f"> extends "t" ? {
query?: QuerySchema;
} : {
query: QuerySchema;
});
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
type NoParams = "_NO_PARAMS_";
type RequestMimeType = "application/json" | "multipart/form-data";
declare class WebEndpoints {
constructor(options: WebEndpointOptions);
protected buildEndpoint<PathSchema extends StringIndexed | NoParams, BodySchema extends StringIndexed | NoParams, QuerySchema extends StringIndexed | NoParams, ResponseData = unknown>({ method, baseUrlOverride, urlPathBuilder, requestMimeType }: BuildEndpointOptions<PathSchema>): (_: EndpointArguments<PathSchema, BodySchema, QuerySchema>) => Promise<BaseResponse<ResponseData>>;
private buildUserAgent;
private getHeaders;
private getRequestBody;
private isOk;
private isZoomResponseError;
private makeRequest;
}
type CommonClientOptions<A extends Auth, R extends Receiver> = GetAuthOptions<A> & ExtractInstallerOptions<A, R> & {
disableReceiver?: boolean | undefined;
logger?: Logger | undefined;
logLevel?: LogLevel | undefined;
};
interface ClientReceiverOptions<R extends Receiver> {
receiver: R;
}
type ClientConstructorOptions<A extends Auth, O extends CommonClientOptions<A, R>, R extends Receiver> = IsReceiverDisabled<O> extends true ? O : O & (ClientReceiverOptions<R> | HttpReceiverOptions);
type ExtractInstallerOptions<A extends Auth, R extends Receiver> = A extends InteractiveAuth ? [
ReturnType<R["canInstall"]>
] extends [true] ? WideInstallerOptions : object : object;
type ExtractAuthTokenType<A> = A extends Auth<infer T> ? T : never;
type GenericClientOptions = CommonClientOptions<any, any>;
type GetAuthOptions<A extends Auth> = AuthOptions<ExtractAuthTokenType<A>> & (A extends S2SAuth ? S2SAuthOptions : object);
type IsReceiverDisabled<O extends Pick<GenericClientOptions, "disableReceiver">> = [
O["disableReceiver"]
] extends [true] ? true : false;
type WideInstallerOptions = {
installerOptions: InstallerOptions;
};
declare abstract class ProductClient<AuthType extends Auth, EndpointsType extends WebEndpoints, EventProcessorType extends GenericEventManager, OptionsType extends CommonClientOptions<AuthType, ReceiverType>, ReceiverType extends Receiver> {
private readonly auth;
readonly endpoints: EndpointsType;
readonly webEventConsumer: EventProcessorType;
private readonly receiver?;
constructor(options: ClientConstructorOptions<AuthType, OptionsType, ReceiverType>);
protected abstract initAuth(options: OptionsType): AuthType;
protected abstract initEndpoints(auth: AuthType, options: OptionsType): EndpointsType;
protected abstract initEventProcessor(endpoints: EndpointsType, options: OptionsType): EventProcessorType;
private initDefaultReceiver;
start(this: IsReceiverDisabled<OptionsType> extends true ? never : this): Promise<ReturnType<ReceiverType["start"]>>;
}
interface InstallerOptions {
directInstall?: boolean | undefined;
installPath?: string | undefined;
redirectUri: string;
redirectUriPath?: string | undefined;
stateStore: StateStore | string;
}
/**
* {@link InteractiveAuth}, an extension of {@link Auth}, is designed for use cases where authentication
* is initiated server-side, but requires manual authorization from a user, by redirecting the user to Zoom.
*
* In addition to all required fields from {@link AuthOptions}, this class requires a `redirectUri`, as this
* value is appended to the authorization URL when the user is redirected to Zoom and subsequently redirected
* back to an endpoint on this server.
*
* @see {@link https://developers.zoom.us/docs/integrations/oauth/ | OAuth - Zoom Developers}
*/
declare abstract class InteractiveAuth<Token = unknown> extends Auth<Token> {
installerOptions?: ReturnType<typeof this.setInstallerOptions>;
getAuthorizationUrl(): Promise<string>;
getFullRedirectUri(): string;
setInstallerOptions({ directInstall, installPath, redirectUri, redirectUriPath, stateStore }: InstallerOptions): {
directInstall: boolean;
installPath: string;
redirectUri: string;
redirectUriPath: string;
stateStore: StateStore;
};
}
declare enum StatusCode {
OK = 200,
TEMPORARY_REDIRECT = 302,
BAD_REQUEST = 400,
NOT_FOUND = 404,
METHOD_NOT_ALLOWED = 405,
INTERNAL_SERVER_ERROR = 500
}
interface ReceiverInitOptions {
eventEmitter: GenericEventManager;
interactiveAuth?: InteractiveAuth | undefined;
}
interface Receiver {
canInstall(): true | false;
init(options: ReceiverInitOptions): void;
start(...args: any[]): MaybePromise<unknown>;
stop(...args: any[]): MaybePromise<unknown>;
}
interface AwsLambdaReceiverOptions {
webhooksSecretToken: string;
}
declare class AwsLambdaReceiver implements Receiver {
private eventEmitter?;
private readonly webhooksSecretToken;
constructor({ webhooksSecretToken }: AwsLambdaReceiverOptions);
buildResponse(statusCode: StatusCode, body: object): LambdaFunctionURLResult;
canInstall(): false;
init({ eventEmitter }: ReceiverInitOptions): void;
start(): LambdaFunctionURLHandler;
stop(): Promise<void>;
}
type ArchivingListArchivedFilesQueryParams = {
page_size?: number;
next_page_token?: string;
from?: string;
to?: string;
query_date_type?: string;
group_id?: string;
group_ids?: string;
};
type ArchivingListArchivedFilesResponse = {
from?: string;
meetings?: {
account_name: string;
archive_files: {
download_url: string;
file_extension: string;
file_path?: string;
file_size: number;
file_type: string;
id: string;
individual: boolean;
participant_email?: string;
participant_join_time: string;
participant_leave_time: string;
recording_type: string;
status: string;
encryption_fingerprint: string;
number_of_messages?: number;
storage_location?: string;
auto_delete?: boolean;
}[];
complete_time: string;
duration: number;
duration_in_second: number;
host_id: string;
id: number;
is_breakout_room: boolean;
meeting_type: string;
parent_meeting_id?: string;
recording_count: number;
start_time: string;
timezone: string;
topic: string;
total_size: number;
type: number;
uuid: string;
status: string;
group_id?: string;
}[];
next_page_token?: string;
page_size?: number;
to?: string;
total_records?: number;
};
type ArchivingGetArchivedFileStatisticsQueryParams = {
from?: string;
to?: string;
};
type ArchivingGetArchivedFileStatisticsResponse = {
from?: string;
to?: string;
total_records?: number;
statistic_by_file_extension?: {
mp4_file_count?: number;
m4a_file_count?: number;
txt_file_count?: number;
json_file_count?: number;
vtt_file_count?: number;
};
statistic_by_file_status?: {
processing_file_count?: number;
completed_file_count?: number;
failed_file_count?: number;
};
};
type ArchivingUpdateArchivedFilesAutoDeleteStatusPathParams = {
fileId: string;
};
type ArchivingUpdateArchivedFilesAutoDeleteStatusRequestBody = {
auto_delete: boolean;
};
type ArchivingGetMeetingsArchivedFilesPathParams = {
meetingUUID: string;
};
type ArchivingGetMeetingsArchivedFilesResponse = {
account_name: string;
archive_files: {
download_url: string;
file_extension: string;
file_path?: string;
file_size: number;
file_type: string;
id: string;
individual: boolean;
participant_email?: string;
participant_join_time: string;
participant_leave_time: string;
recording_type: string;
status: string;
encryption_fingerprint: string;
number_of_messages?: number;
storage_location?: string;
auto_delete?: boolean;
}[];
complete_time: string;
duration: number;
duration_in_second: number;
host_id: string;
id: number;
is_breakout_room: boolean;
meeting_type: string;
parent_meeting_id?: string;
recording_count: number;
start_time: string;
timezone: string;
topic: string;
total_size: number;
type: number;
uuid: string;
status: string;
group_id?: string;
};
type ArchivingDeleteMeetingsArchivedFilesPathParams = {
meetingUUID: string;
};
type CloudRecordingGetMeetingRecordingsPathParams = {
meetingId: string;
};
type CloudRecordingGetMeetingRecordingsQueryParams = {
include_fields?: string;
ttl?: number;
};
type CloudRecordingGetMeetingRecordingsResponse = ({
account_id?: string;
duration?: number;
host_id?: string;
id?: number;
recording_count?: number;
start_time?: string;
topic?: string;
total_size?: number;
type?: string;
uuid?: string;
recording_play_passcode?: string;
auto_delete?: boolean;
auto_delete_date?: string;
} & {
recording_files?: {
deleted_time?: string;
download_url?: string;
file_path?: string;
file_size?: number;
file_type?: string;
file_extension?: string;
id?: string;
meeting_id?: string;
play_url?: string;
recording_end?: string;
recording_start?: string;
recording_type?: string;
status?: string;
}[];
}) & {
download_access_token?: string;
password?: string;
recording_play_passcode?: string;
} & {
participant_audio_files?: {
download_url?: string;
file_name?: string;
file_path?: string;
file_size?: number;
file_type?: string;
id?: string;
play_url?: string;
recording_end?: string;
recording_start?: string;
status?: string;
}[];
};
type CloudRecordingDeleteMeetingOrWebinarRecordingsPathParams = {
meetingId: string;
};
type CloudRecordingDeleteMeetingOrWebinarRecordingsQueryParams = {
action?: string;
};
type CloudRecordingGetMeetingOrWebinarRecordingsAnalyticsDetailsPathParams = {
meetingId: string;
};
type CloudRecordingGetMeetingOrWebinarRecordingsAnalyticsDetailsQueryParams = {
page_size?: number;
next_page_token?: string;
from?: string;
to?: string;
type?: string;
};
type CloudRecordingGetMeetingOrWebinarRecordingsAnalyticsDetailsResponse = {
from?: string;
to?: string;
next_page_token?: string;
page_size?: number;
total_records?: number;
analytics_details?: {
date_time?: string;
name?: string;
email?: string;
duration?: number;
}[];
};
type CloudRecordingGetMeetingOrWebinarRecordingsAnalyticsSummaryPathParams = {
meetingId: string;
};
type CloudRecordingGetMeetingOrWebinarRecordingsAnalyticsSummaryQueryParams = {
from?: string;
to?: string;
};
type CloudRecordingGetMeetingOrWebinarRecordingsAnalyticsSummaryResponse = {
from?: string;
to?: string;
analytics_summary?: {
date?: string;
views_total_count?: number;
downloads_total_count?: number;
}[];
};
type CloudRecordingListRecordingRegistrantsPathParams = {
meetingId: number;
};
type CloudRecordingListRecordingRegistrantsQueryParams = {
status?: string;
page_size?: number;
page_number?: number;
next_page_token?: string;
};
type CloudRecordingListRecordingRegistrantsResponse = {
next_page_token?: string;
page_count?: number;
page_number?: number;
page_size?: number;
total_records?: number;
} & {
registrants?: ({
id?: string;
} & {
address?: string;
city?: string;
comments?: string;
country?: string;
custom_questions?: {
title?: string;
value?: string;
}[];
email: string;
first_name: string;
industry?: string;
job_title?: string;
last_name?: string;
no_of_employees?: string;
org?: string;
phone?: string;
purchasing_time_frame?: string;
role_in_purchase_process?: string;
state?: string;
status?: string;
zip?: string;
})[];
};
type CloudRecordingCreateRecordingRegistrantPathParams = {
meetingId: number;
};
type CloudRecordingCreateRecordingRegistrantRequestBody = {
address?: string;
city?: string;
comments?: string;
country?: string;
custom_questions?: {
title?: string;
value?: string;
}[];
email: string;
first_name: string;
industry?: string;
job_title?: string;
last_name?: string;
no_of_employees?: string;
org?: string;
phone?: string;
purchasing_time_frame?: string;
role_in_purchase_process?: string;
state?: string;
status?: string;
zip?: string;
};
type CloudRecordingCreateRecordingRegistrantResponse = {
id?: number;
registrant_id?: string;
share_url?: string;
topic?: string;
};
type CloudRecordingGetRegistrationQuestionsPathParams = {
meetingId: string;
};
type CloudRecordingGetRegistrationQuestionsResponse = {
custom_questions?: {
answers?: string[];
required?: boolean;
title?: string;
type?: string;
}[];
questions?: {
field_name?: string;
required?: boolean;
}[];
};
type CloudRecordingUpdateRegistrationQuestionsPathParams = {
meetingId: string;
};
type CloudRecordingUpdateRegistrationQuestionsRequestBody = {
custom_questions?: {
answers?: string[];
required?: boolean;
title?: string;
type?: string;
}[];
questions?: {
field_name?: string;
required?: boolean;
}[];
};
type CloudRecordingUpdateRegistrantsStatusPathParams = {
meetingId: number;
};
type CloudRecordingUpdateRegistrantsStatusRequestBody = {
action: string;
registrants?: {
id?: string;
}[];
};
type CloudRecordingGetMeetingRecordingSettingsPathParams = {
meetingId: string;
};
type CloudRecordingGetMeetingRecordingSettingsResponse = {
approval_type?: number;
authentication_domains?: string;
authentication_option?: string;
on_demand?: boolean;
password?: string;
recording_authentication?: boolean;
send_email_to_host?: boolean;
share_recording?: string;
show_social_share_buttons?: boolean;
topic?: string;
viewer_download?: boolean;
auto_delete?: boolean;
auto_delete_date?: string;
};
type CloudRecordingUpdateMeetingRecordingSettingsPathParams = {
meetingId: string;
};
type CloudRecordingUpdateMeetingRecordingSettingsRequestBody = {
approval_type?: number;
authentication_domains?: string;
authentication_option?: string;
on_demand?: boolean;
password?: string;
recording_authentication?: boolean;
send_email_to_host?: boolean;
share_recording?: string;
show_social_share_buttons?: boolean;
topic?: string;
viewer_download?: boolean;
auto_delete?: boolean;
};
type CloudRecordingDeleteRecordingFileForMeetingOrWebinarPathParams = {
meetingId: string;
recordingId: string;
};
type CloudRecordingDeleteRecordingFileForMeetingOrWebinarQueryParams = {
action?: string;
};
type CloudRecordingRecoverSingleRecordingPathParams = {
meetingId: string;
recordingId: string;
};
type CloudRecordingRecoverSingleRecordingRequestBody = {
action?: string;
};
type CloudRecordingRecoverMeetingRecordingsPathParams = {
meetingUUID: string;
};
type CloudRecordingRecoverMeetingRecordingsRequestBody = {
action?: string;
};
type CloudRecordingListAllRecordingsPathParams = {
userId: string;
};
type CloudRecordingListAllRecordingsQueryParams = {
page_size?: number;
next_page_token?: string;
mc?: string;
trash?: boolean;
from?: string;
to?: string;
trash_type?: string;
meeting_id?: number;
};
type CloudRecordingListAllRecordingsResponse = {
from?: string;
to?: string;
} & {
next_page_token?: string;
page_count?: number;
page_size?: number;
total_records?: number;
} & {
meetings?: ({
account_id?: string;
duration?: number;
host_id?: string;
id?: number;
recording_count?: number;
start_time?: string;
topic?: string;
total_size?: number;
type?: string;
uuid?: string;
recording_play_passcode?: string;
auto_delete?: boolean;
auto_delete_date?: string;
} & {
recording_files?: {
deleted_time?: string;
download_url?: string;
file_path?: string;
file_size?: number;
file_type?: string;
file_extension?: string;
id?: string;
meeting_id?: string;
play_url?: string;
recording_end?: string;
recording_start?: string;
recording_type?: string;
status?: string;
}[];
})[];
};
type DevicesListDevicesQueryParams = {
search_text?: string;
platform_os?: string;
is_enrolled_in_zdm?: boolean;
device_type?: number;
device_vendor?: string;
device_model?: string;
device_status?: number;
page_size?: number;
next_page_token?: string;
};
type DevicesListDevicesResponse = {
next_page_token?: string;
page_size?: number;
devices?: {
device_id?: string;
device_name?: string;
mac_address?: string;
serial_number?: string;
vendor?: string;
model?: string;
platform_os?: string;
app_version?: string;
tag?: string;
enrolled_in_zdm?: boolean;
connected_to_zdm?: boolean;
room_id?: string;
room_name?: string;
device_type?: number;
skd_version?: string;
device_status?: number;
last_online?: string;
user_email?: string;
}[];
};
type DevicesAddNewDeviceRequestBody = {
device_name: string;
mac_address: string;
serial_number: string;
vendor: string;
model: string;
room_id?: string;
user_email?: string;
device_type: number;
tag?: string;
zdm_group_id?: string;
extension_number?: string;
};
type DevicesGetZDMGroupInfoQueryParams = {
page_size?: number;
next_page_token?: string;
};
type DevicesGetZDMGroupInfoResponse = {
groups?: {
zdm_group_id?: string;
name?: string;
description?: string;
}[];
next_page_token?: string;
page_size?: number;
};
type DevicesAssignDeviceToUserOrCommonareaRequestBody = {
extension_number?: string;
mac_address: string;
vendor: string;
};
type DevicesUpgradeZpaOsAppRequestBody = {
zdm_group_id: string;
data: {
firmware_versions?: {
vendor?: string;
version?: string;
model?: string;
}[];
upgrade_type: string;
} | {
app_version?: string;
upgrade_type: string;
};
};
type DevicesDeleteZPADeviceByVendorAndMacAddressPathParams = {
vendor: string;
macAddress: string;
};
type DevicesGetZPAVersionInfoPathParams = {
zdmGroupId: string;
};
type DevicesGetZPAVersionInfoResponse = {
firmware_versions?: {
vendor?: string;
model?: string;
version?: string;
warn_info?: string;
}[];
app_versions?: string[];
};
type DevicesGetDeviceDetailPathParams = {
deviceId: string;
};
type DevicesGetDeviceDetailResponse = {
device_id?: string;
device_name?: string;
mac_address?: string;
serial_number?: string;
vendor?: string;
model?: string;
platform_os?: string;
app_version?: string;
tag?: string;
enrolled_in_zdm?: boolean;
connected_to_zdm?: boolean;
room_id?: string;
room_name?: string;
device_type?: number;
sdk_version?: string;
device_status?: number;
last_online?: string;
user_email?: string;
};
type DevicesDeleteDevicePathParams = {
deviceId: string;
};
type DevicesChangeDevicePathParams = {
deviceId: string;
};
type DevicesChangeDeviceRequestBody = {
device_name: string;
tag?: string;
room_id?: string;
device_type?: number;
};
type DevicesChangeDeviceAssociationPathParams = {
deviceId: string;
};
type DevicesChangeDeviceAssociationRequestBody = {
room_id?: string;
app_type?: string;
};
type H323DevicesListHSIPDevicesQueryParams = {
page_size?: number;
page_number?: number;
next_page_token?: string;
};
type H323DevicesListHSIPDevicesResponse = {
next_page_token?: string;
page_count?: number;
page_number?: number;
page_size?: number;
total_records?: number;
} & {
devices?: ({
id?: string;
} & {
encryption: string;
ip: string;
name: string;
protocol: string;
})[];
};
type H323DevicesCreateHSIPDeviceRequestBody = {
encryption: string;
ip: string;
name: string;
protocol: string;
};
type H323DevicesCreateHSIPDeviceResponse = {
id?: string;
} & {
encryption: string;
ip: string;
name: string;
protocol: string;
};
type H323DevicesDeleteHSIPDevicePathParams = {
deviceId: string;
};
type H323DevicesUpdateHSIPDevicePathParams = {
deviceId: string;
};
type H323DevicesUpdateHSIPDeviceRequestBody = {
encryption: string;
ip: string;
name: string;
protocol: string;
};
type MeetingsDeleteLiveMeetingMessagePathParams = {
meetingId: number;
messageId: string;
};
type MeetingsDeleteLiveMeetingMessageQueryParams = {
file_ids?: string;
};
type MeetingsUpdateLiveMeetingMessagePathParams = {
meetingId: number;
messageId: string;
};
type MeetingsUpdateLiveMeetingMessageRequestBody = {
message_content: string;
};
type MeetingsUseInMeetingControlsPathParams = {
meetingId: string;
};
type MeetingsUseInMeetingControlsRequestBody = {
method?: string;
params?: {
contacts?: {
email?: string;
id?: string;
}[];
invitee_name?: string;
phone_number?: string;
invite_options?: {
require_greeting?: boolean;
require_pressing_one?: boolean;
};
call_type?: string;
device_ip?: string;
h323_headers?: {
from_display_name?: string;
to_display_name?: string;
};
sip_headers?: {
from_display_name?: string;
to_display_name?: string;
from_uri?: string;
additional_headers?: {
key?: string;
value?: string;
}[];
};
};
};
type MeetingsListMeetingSummariesOfAccountQueryParams = {
page_size?: number;
next_page_token?: string;
from?: string;
to?: string;
};
type MeetingsListMeetingSummariesOfAccountResponse = {
page_size?: number;
next_page_token?: string;
from?: string;
to?: string;
summaries?: {
meeting_host_id?: string;
meeting_host_email?: string;
meeting_uuid?: string;
meeting_id?: number;
meeting_topic?: string;
meeting_start_time?: string;
meeting_end_time?: string;
summary_start_time?: string;
summary_end_time?: string;
summary_created_time?: string;
summary_last_modified_time?: string;
}[];
};
type MeetingsGetMeetingPathParams = {
meetingId: number;
};
type MeetingsGetMeetingQueryParams = {
occurrence_id?: string;
show_previous_occurrences?: boolean;
};
type MeetingsGetMeetingResponse = {
assistant_id?: string;
host_email?: string;
host_id?: string;
id?: number;
uuid?: string;
agenda?: string;
created_at?: string;
duration?: number;
encrypted_password?: string;
pstn_password?: string;
h323_password?: string;
join_url?: string;
chat_join_url?: string;
occurrences?: {
duration?: number;
occurrence_id?: string;
start_time?: string;
status?: string;
}[];
password?: string;
pmi?: string;
pre_schedule?: boolean;
recurrence?: {
end_date_time?: string;
end_times?: number;
monthly_day?: number;
monthly_week?: number;
monthly_week_day?: number;
repeat_interval?: number;
type: number;
weekly_days?: string;
};
settings?: {
allow_multiple_devices?: boolean;
alternative_hosts?: string;
alternative_hosts_email_notification?: boolean;
alternative_host_update_polls?: boolean;
approval_type?: number;
approved_or_denied_countries_or_regions?: {
approved_list?: string[];
denied_list?: string[];
enable?: boolean;
method?: string;
};
audio?: string;
audio_conference_info?: string;
authentication_domains?: string;
authentication_exception?: {
email?: string;
name?: string;
join_url?: string;
}[];
authentication_name?: string;
authentication_option?: string;
auto_recording?: string;
breakout_room?: {
enable?: boolean;
rooms?: {
name?: string;
participants?: string[];
}[];
};
calendar_type?: number;
close_registration?: boolean;
cn_meeting?: boolean;
contact_email?: string;
contact_name?: string;
custom_keys?: {
key?: string;
value?: string;
}[];
email_notification?: boolean;
encryption_type?: string;
enforce_login?: boolean;
enforce_login_domains?: string;
focus_mode?: boolean;
global_dial_in_countries?: string[];
global_dial_in_numbers?: {
city?: string;
country?: string;
country_name?: string;
number?: string;
type?: string;
}[];
host_video?: boolean;
in_meeting?: boolean;
jbh_time?: number;
join_before_host?: boolean;
language_interpretation?: {
enable?: boolean;
interpreters?: {
email?: string;
languages?: string;
}[];
};
sign_language_interpretation?: {
enable?: boolean;
interpreters?: {
email?: string;
sign_language?: string;
}[];
};
meeting_authentication?: boolean;
mute_upon_entry?: boolean;
participant_video?: boolean;
private_meeting?: boolean;
registrants_confirmation_email?: boolean;
registrants_email_notification?: boolean;
registration_type?: number;
show_share_button?: boolean;
use_pmi?: boolean;
waiting_room?: boolean;
watermark?: boolean;
host_save_video_order?: boolean;
internal_meeting?: boolean;
meeting_invitees?: {
email?: string;
internal_user?: boolean;
}[];
continuous_meeting_chat?: {
enable?: boolean;
auto_add_invited_external_users?: boolean;
auto_add_meeting_participants?: boolean;
channel_id?: string;
};
participant_focused_meeting?: boolean;
push_change_to_calendar?: boolean;
resources?: {
resource_type?: string;
resource_id?: string;
permission_level?: string;
}[];
auto_start_meeting_summary?: boolean;
auto_start_ai_companion_questions?: boolean;
device_testing?: boolean;
};
start_time?: string;
start_url?: string;
status?: string;
timezone?: string;
topic?: string;
tracking_fields?: {
field?: string;
value?: string;
visible?: boolean;
}[];
type?: number;
dynamic_host_key?: string;
};
type MeetingsDeleteMeetingPathParams = {
meetingId: number;
};
type MeetingsDeleteMeetingQueryParams = {
occurrence_id?: string;
schedule_for_reminder?: boolean;
cancel_meeting_reminder?: boolean;
};
type MeetingsUpdateMeetingPathParams = {
meetingId: number;
};
type MeetingsUpdateMeetingQueryParams = {
occurrence_id?: string;
};
type MeetingsUpdateMeetingRequestBody = {
agenda?: string;
duration?: number;
password?: string;
pre_schedule?: boolean;
schedule_for?: string;
recurrence?: {
end_date_time?: string;
end_times?: number;
monthly_day?: number;
monthly_week?: number;
monthly_week_day?: number;
repeat_interval?: number;
type: number;
weekly_days?: string;
};
settings?: {
allow_multiple_devices?: boolean;
alternative_hosts?: string;
alternative_hosts_email_notification?: boolean;
alternative_host_update_polls?: boolean;
approval_type?: number;
approved_or_denied_countries_or_regions?: {
approved_list?: string[];
denied_list?: string[];
enable?: boolean;
method?: string;
};
audio?: string;
audio_conference_info?: string;
authentication_domains?: string;
authentication_exception?: {
email?: string;
name?: string;
join_url?: string;
}[];
authentication_name?: string;
authentication_option?: string;
auto_recording?: string;
breakout_room?: {
enable?: boolean;
rooms?: {
name?: string;
participants?: string[];
}[];
};
calendar_type?: number;
close_registration?: boolean;
cn_meeting?: boolean;
contact_email?: string;
contact_name?: string;
custom_keys?: {
key?: string;
value?: string;
}[];
email_notification?: boolean;
encryption_type?: string;
enforce_login?: boolean;
enforce_login_domains?: string;
focus_mode?: boolean;
global_dial_in_countries?: string[];
global_dial_in_numbers?: {
city?: string;
country?: string;
country_name?: string;
number?: string;
type?: string;
}[];
host_video?: boolean;
in_meeting?: boolean;
jbh_time?: number;
join_before_host?: boolean;
language_interpretation?: {
enable?: boolean;
interpreters?: {
email?: string;
languages?: string;
}[];
};
sign_language_interpretation?: {
enable?: boolean;
interpreters?: {
email?: string;
sign_language?: string;
}[];
};
meeting_authentication?: boolean;
meeting_invitees?: {
email?: string;
}[];
mute_upon_entry?: boolean;
participant_video?: boolean;
private_meeting?: boolean;
registrants_confirmation_email?: boolean;
registrants_email_notification?: boolean;
registration_type?: number;
show_share_button?: boolean;
use_pmi?: boolean;
waiting_room?: boolean;
watermark?: boolean;
host_save_video_order?: boolean;
internal_meeting?: boolean;
continuous_meeting_chat?: {
enable?: boolean;
auto_add_invited_external_users?: boolean;
auto_add_meeting_participants?: boolean;
};
participant_focused_meeting?: boolean;
resources?: {
resource_type?: string;
resource_id?: string;
permission_level?: string;
}[];
auto_start_meeting_summary?: boolean;
auto_start_ai_companion_questions?: boolean;
device_testing?: boolean;
};
start_time?: string;
template_id?: string;
timezone?: string;
topic?: string;
tracking_fields?: {
field?: string;
value?: string;
}[];
type?: number;
};
type MeetingsPerformBatchPollCreationPathParams = {
meetingId: string;
};
type MeetingsPerformBatchPollCreationRequestBody = {
polls?: {
anonymous?: boolean;
poll_type?: number;
questions?: {
answer_max_character?: number;
answer_min_character?: number;
answer_required?: boolean;
answers?: string[];
case_sensitive?: boolean;
name?: string;
prompts?: {
prompt_question?: string;
prompt_right_answers?: string[];
}[];
rating_max_label?: string;
rating_max_value?: number;
rating_min_label?: string;
rating_min_value?: number;
right_answers?: string[];
show_as_dropdown?: boolean;
type?: string;
}[];
title?: string;
}[];
};
type MeetingsPerformBatchPollCreationResponse = {
polls?: {
anonymous?: boolean;
id?: string;
poll_type?: number;
questions?: {
answer_max_character?: number;
answer_min_character?: number;
answer_required?: boolean;
answers?: string[];
case_sensitive?: boolean;
name?: string;
prompts?: {
prompt_question?: string;
prompt_right_answers?: string[];
}[];
rating_max_label?: string;
rating_max_value?: number;
rating_min_label?: string;
rating_min_value?: number;
right_answers?: string[];
show_as_dropdown?: boolean;
type?: string;
}[];
status?: string;
title?: string;
}[];
};
type MeetingsPerformBatchRegistrationPathParams = {
meetingId: string;
};
type MeetingsPerformBatchRegistrationRequestBody = {
auto_approve?: boolean;
registrants_confirmation_email?: boolean;
registrants?: {
email: string;
first_name: string;
last_name?: string;
}[];
};
type MeetingsPerformBatchRegistrationResponse = {
registrants?: {
email?: string;
join_url?: string;
registrant_id?: string;
participant_pin_code?: number;
}[];
};
type MeetingsGetMeetingInvitationPathParams = {
meetingId: number;
};
type MeetingsGetMeetingInvitationResponse = {
invitation?: string;
sip_links?: string[];
};
type MeetingsCreateMeetingsInviteLinksPathParams = {
meetingId: number;
};
type MeetingsCreateMeetingsInviteLinksRequestBody = {
attendees?: {
name: string;
}[];
ttl?: number;
};
type MeetingsCreateMeetingsInviteLinksResponse = {
attendees?: {
join_url?: string;
name?: string;
}[];
};
type MeetingsGetMeetingsJoinTokenForLiveStreamingPathParams = {
meetingId: number;
};
type MeetingsGetMeetingsJoinTokenForLiveStreamingResponse = {
expire_in?: number;
token?: string;
};
type MeetingsGetMeetingsArchiveTokenForLocalArchivingPathParams = {
meetingId: number;
};
type MeetingsGetMeetingsArchiveTokenForLocalArchivingResponse = {
expire_in?: number;
token?: string;
};
type MeetingsGetMeetingsJoinTokenForLocalRecordingPathParams = {
meetingId: number;
};
type MeetingsGetMeetingsJoinTokenForLocalRecordingQueryParams = {
bypass_waiting_room?: boolean;
};
type MeetingsGetMeetingsJoinTokenForLocalRecordingResponse = {
expire_in?: number;
token?: string;
};
type MeetingsGetLivestreamDetailsPathParams = {
meetingId: string;
};
type MeetingsGetLivestreamDetailsResponse = {
page_url?: string;
stream_key?: string;
stream_url?: string;
resolution?: string;
};
type MeetingsUpdateLivestreamPathParams = {
meetingId: number;
};
type MeetingsUpdateLivestreamRequestBody = {
page_url: string;
stream_key: string;
stream_url: string;
resolution?: string;
};
type MeetingsUpdateLivestreamStatusPathParams = {
meetingId: number;
};
type MeetingsUpdateLivestreamStatusRequestBody = {
action?: string;
settings?: {
active_speaker_name?: boolean;
display_name?: string;
layout?: string;
close_caption?: string;
};
};
type MeetingsGetMeetingSummaryPathParams = {
meetingId: string;
};
type MeetingsGetMeetingSummaryResponse = {
meeting_host_id?: string;
meeting_host_email?: string;
meeting_uuid?: string;
meeting_id?: number;
meeting_topic?: string;
meeting_start_time?: string;
meeting_end_time?: string;
summary_start_time?: string;
summary_end_time?: string;
summary_created_time?: string;
summary_last_modified_time?: string;
summary_title?: string;
summary_overview?: string;
summary_details?: {
label?: string;
summary?: string;
}[];
next_steps?: string[];
edited_summary?: {
summary_details?: string;
next_steps?: string[];
};
};
type MeetingsAddMeetingAppPathParams = {
meetingId: number;
};
type MeetingsAddMeetingAppResponse = {
id?: number;
start_time?: string;
app_id?: string;
};
type MeetingsDeleteMeetingAppPathParams = {
meetingId: number;
};
type MeetingsListMeetingPollsPathParams = {
meetingId: number;
};
type MeetingsL