@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,313 lines (1,296 loc) • 219 kB
TypeScript
import { LambdaFunctionURLResult, LambdaFunctionURLHandler } from 'aws-lambda';
import { AxiosResponse } from 'axios';
import { Server } from 'node:http';
import { ServerOptions } from 'node:https';
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 MaybeArray<T> = T | T[];
type MaybePromise<T> = T | Promise<T>;
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 AccountsGetLockedSettingsPathParams = {
accountId: string;
};
type AccountsGetLockedSettingsQueryParams = {
option?: string;
custom_query_fields?: string;
};
type AccountsGetLockedSettingsResponse = {
audio_conferencing?: {
toll_free_and_fee_based_toll_call?: boolean;
};
chat?: {
share_files?: boolean;
chat_emojis?: boolean;
record_voice_messages?: boolean;
record_video_messages?: boolean;
screen_capture?: boolean;
share_links_in_chat?: boolean;
schedule_meetings_in_chat?: boolean;
set_retention_period_in_cloud?: boolean;
set_retention_period_in_local?: boolean;
allow_users_to_add_contacts?: boolean;
allow_users_to_chat_with_others?: boolean;
chat_etiquette_tool?: boolean;
send_data_to_third_party_archiving_service?: boolean;
translate_messages?: boolean;
search_and_send_animated_gif_images?: boolean;
};
email_notification?: {
alternative_host_reminder?: boolean;
cancel_meeting_reminder?: boolean;
cloud_recording_available_reminder?: boolean;
jbh_reminder?: boolean;
schedule_for_reminder?: boolean;
};
in_meeting?: {
alert_guest_join?: boolean;
allow_users_to_delete_messages_in_meeting_chat?: boolean;
allow_live_streaming?: boolean;
allow_show_zoom_windows?: boolean;
annotation?: boolean;
anonymous_question_answer?: boolean;
attendee_on_hold?: boolean;
attention_mode_focus_mode?: boolean;
auto_answer?: boolean;
auto_generated_captions?: boolean;
auto_saving_chat?: boolean;
breakout_room?: boolean;
chat?: boolean;
meeting_question_answer?: boolean;
closed_caption?: boolean;
co_host?: boolean;
custom_data_center_regions?: boolean;
disable_screen_sharing_for_host_meetings?: boolean;
disable_screen_sharing_for_in_meeting_guests?: boolean;
dscp_marking?: boolean;
e2e_encryption?: boolean;
entry_exit_chime?: string;
far_end_camera_control?: boolean;
feedback?: boolean;
file_transfer?: boolean;
full_transcript?: boolean;
group_hd?: boolean;
webinar_group_hd?: boolean;
language_interpretation?: boolean;
sign_language_interpretation?: boolean;
manual_captions?: boolean;
meeting_reactions?: boolean;
webinar_reactions?: boolean;
meeting_survey?: boolean;
original_audio?: boolean;
polling?: boolean;
post_meeting_feedback?: boolean;
private_chat?: boolean;
remote_control?: boolean;
non_verbal_feedback?: boolean;
remote_support?: boolean;
request_permission_to_unmute_participants?: boolean;
save_caption?: boolean;
save_captions?: boolean;
screen_sharing?: boolean;
sending_default_email_invites?: boolean;
show_meeting_control_toolbar?: boolean;
slide_control?: boolean;
stereo_audio?: boolean;
use_html_format_email?: boolean;
virtual_background?: boolean;
webinar_chat?: boolean;
webinar_live_streaming?: boolean;
webinar_polling?: boolean;
webinar_question_answer?: boolean;
webinar_survey?: boolean;
whiteboard?: boolean;
};
other_options?: {
blur_snapshot?: boolean;
webinar_registration_options?: boolean;
};
recording?: {
account_user_access_recording?: boolean;
auto_delete_cmr?: boolean;
auto_recording?: boolean;
cloud_recording?: boolean;
cloud_recording_download?: boolean;
host_delete_cloud_recording?: boolean;
ip_address_access_control?: boolean;
local_recording?: boolean;
prevent_host_access_recording?: boolean;
recording_authentication?: boolean;
archive?: boolean;
};
schedule_meeting?: {
audio_type?: boolean;
embed_password_in_join_link?: boolean;
enforce_login?: boolean;
enforce_login_domains?: string;
enforce_login_with_domains?: boolean;
host_video?: boolean;
join_before_host?: boolean;
meeting_authentication?: boolean;
not_store_meeting_topic?: boolean;
always_display_zoom_webinar_as_topic?: boolean;
participant_video?: boolean;
require_password_for_instant_meetings?: boolean;
require_password_for_pmi_meetings?: boolean;
require_password_for_scheduling_new_meetings?: boolean;
use_pmi_for_instant_meetings?: boolean;
use_pmi_for_scheduled_meetings?: boolean;
continuous_meeting_chat?: boolean;
};
telephony?: {
telephony_regions?: boolean;
third_party_audio?: boolean;
};
tsp?: {
call_out?: boolean;
show_international_numbers_link?: boolean;
};
} | {
meeting_security?: {
approved_or_denied_countries_or_regions?: boolean;
auto_security?: boolean;
block_user_domain?: boolean;
chat_etiquette_tool?: boolean;
embed_password_in_join_link?: boolean;
encryption_type?: boolean;
end_to_end_encrypted_meetings?: boolean;
meeting_password?: boolean;
only_authenticated_can_join_from_webclient?: boolean;
phone_password?: boolean;
pmi_password?: boolean;
waiting_room?: boolean;
webinar_password?: boolean;
};
};
type AccountsUpdateLockedSettingsPathParams = {
accountId: string;
};
type AccountsUpdateLockedSettingsRequestBody = {
audio_conferencing?: {
toll_free_and_fee_based_toll_call?: boolean;
};
chat?: {
share_files?: boolean;
chat_emojis?: boolean;
record_voice_messages?: boolean;
record_video_messages?: boolean;
screen_capture?: boolean;
share_links_in_chat?: boolean;
schedule_meetings_in_chat?: boolean;
set_retention_period_in_cloud?: boolean;
set_retention_period_in_local?: boolean;
allow_users_to_add_contacts?: boolean;
allow_users_to_chat_with_others?: boolean;
chat_etiquette_tool?: boolean;
send_data_to_third_party_archiving_service?: boolean;
translate_messages?: boolean;
search_and_send_animated_gif_images?: boolean;
};
email_notification?: {
alternative_host_reminder?: boolean;
cancel_meeting_reminder?: boolean;
cloud_recording_available_reminder?: boolean;
jbh_reminder?: boolean;
schedule_for_reminder?: boolean;
};
in_meeting?: {
alert_guest_join?: boolean;
allow_users_to_delete_messages_in_meeting_chat?: boolean;
allow_live_streaming?: boolean;
allow_show_zoom_windows?: boolean;
annotation?: boolean;
anonymous_question_answer?: boolean;
attendee_on_hold?: boolean;
attention_mode_focus_mode?: boolean;
auto_answer?: boolean;
auto_generated_captions?: boolean;
auto_saving_chat?: boolean;
breakout_room?: boolean;
chat?: boolean;
meeting_question_answer?: boolean;
closed_caption?: boolean;
co_host?: boolean;
custom_data_center_regions?: boolean;
disable_screen_sharing_for_host_meetings?: boolean;
disable_screen_sharing_for_in_meeting_guests?: boolean;
dscp_marking?: boolean;
e2e_encryption?: boolean;
entry_exit_chime?: string;
far_end_camera_control?: boolean;
feedback?: boolean;
file_transfer?: boolean;
full_transcript?: boolean;
group_hd?: boolean;
webinar_group_hd?: boolean;
language_interpretation?: boolean;
sign_language_interpretation?: boolean;
webinar_reactions?: boolean;
meeting_survey?: boolean;
original_audio?: boolean;
polling?: boolean;
post_meeting_feedback?: boolean;
private_chat?: boolean;
remote_control?: boolean;
non_verbal_feedback?: boolean;
remote_support?: boolean;
request_permission_to_unmute_participants?: boolean;
save_caption?: boolean;
save_captions?: boolean;
screen_sharing?: boolean;
sending_default_email_invites?: boolean;
show_meeting_control_toolbar?: boolean;
slide_control?: boolean;
stereo_audio?: boolean;
use_html_format_email?: boolean;
virtual_background?: boolean;
webinar_chat?: boolean;
webinar_live_streaming?: boolean;
webinar_polling?: boolean;
webinar_question_answer?: boolean;
webinar_survey?: boolean;
whiteboard?: boolean;
};
other_options?: {
blur_snapshot?: boolean;
webinar_registration_options?: boolean;
};
recording?: {
account_user_access_recording?: boolean;
auto_delete_cmr?: boolean;
auto_recording?: boolean;
cloud_recording?: boolean;
cloud_recording_download?: boolean;
host_delete_cloud_recording?: boolean;
ip_address_access_control?: boolean;
local_recording?: boolean;
prevent_host_access_recording?: boolean;
recording_authentication?: boolean;
archive?: boolean;
};
schedule_meeting?: {
audio_type?: boolean;
embed_password_in_join_link?: boolean;
enforce_login?: boolean;
enforce_login_domains?: string;
enforce_login_with_domains?: boolean;
host_video?: boolean;
join_before_host?: boolean;
meeting_authentication?: boolean;
not_store_meeting_topic?: boolean;
always_display_zoom_webinar_as_topic?: boolean;
participant_video?: boolean;
personal_meeting?: boolean;
require_password_for_instant_meetings?: boolean;
require_password_for_pmi_meetings?: boolean;
require_password_for_scheduling_new_meetings?: boolean;
use_pmi_for_instant_meetings?: boolean;
use_pmi_for_scheduled_meetings?: boolean;
continuous_meeting_chat?: boolean;
};
telephony?: {
telephony_regions?: boolean;
third_party_audio?: boolean;
};
tsp?: {
call_out?: boolean;
show_international_numbers_link?: boolean;
};
} | {
meeting_security?: {
approved_or_denied_countries_or_regions?: boolean;
auto_security?: boolean;
block_user_domain?: boolean;
chat_etiquette_tool?: boolean;
embed_password_in_join_link?: boolean;
encryption_type?: string;
end_to_end_encrypted_meetings?: boolean;
meeting_password?: boolean;
only_authenticated_can_join_from_webclient?: boolean;
phone_password?: boolean;
pmi_password?: boolean;
waiting_room?: boolean;
webinar_password?: boolean;
};
};
type AccountsGetAccountsManagedDomainsPathParams = {
accountId: string;
};
type AccountsGetAccountsManagedDomainsResponse = {
domains?: {
domain?: string;
status?: string;
}[];
total_records?: number;
};
type AccountsUpdateAccountOwnerPathParams = {
accountId: string;
};
type AccountsUpdateAccountOwnerRequestBody = {
email: string;
};
type AccountsGetAccountSettingsPathParams = {
accountId: string;
};
type AccountsGetAccountSettingsQueryParams = {
option?: string;
custom_query_fields?: string;
};
type AccountsGetAccountSettingsResponse = {
security?: {
admin_change_name_pic?: boolean;
admin_change_user_info?: boolean;
user_modifiable_info_by_admin?: string[];
signin_with_sso?: {
enable?: boolean;
require_sso_for_domains?: boolean;
domains?: string[];
sso_bypass_users?: {
id?: string;
email?: string;
}[];
};
hide_billing_info?: boolean;
import_photos_from_devices?: boolean;
password_requirement?: {
consecutive_characters_length?: number;
have_special_character?: boolean;
minimum_password_length?: number;
weak_enhance_detection?: boolean;
};
sign_again_period_for_inactivity_on_client?: number;
sign_again_period_for_inactivity_on_web?: number;
sign_in_with_two_factor_auth?: string;
sign_in_with_two_factor_auth_groups?: string[];
sign_in_with_two_factor_auth_roles?: string[];
};
audio_conferencing?: {
toll_free_and_fee_based_toll_call?: {
allow_webinar_attendees_dial?: boolean;
enable?: boolean;
numbers?: {
code?: string;
country_code?: string;
country_name?: string;
display_number?: string;
number?: string;
}[];
};
};
chat?: {
allow_bots_chat?: boolean;
share_files?: {
enable?: boolean;
share_option?: string;
restrictions?: {
only_allow_specific_file_types?: boolean;
file_type_restrictions?: string[];
file_type_restrictions_for_external?: string[];
maximum_file_size?: boolean;
file_size_restrictions?: number;
file_size_restrictions_for_external?: number;
};
};
chat_emojis?: {
enable?: boolean;
emojis_option?: string;
};
record_voice_messages?: boolean;
record_video_messages?: boolean;
screen_capture?: boolean;
create_public_channels?: boolean;
create_private_channels?: boolean;
share_links_in_chat?: boolean;
schedule_meetings_in_chat?: boolean;
set_retention_period_in_cloud?: {
enable?: boolean;
retention_period_of_direct_messages_and_group_conversation?: string;
retention_period_of_channels?: string;
};
set_retention_period_in_local?: {
enable?: boolean;
retention_period_of_direct_messages_and_group_conversation?: string;
retention_period_of_channels?: string;
};
allow_users_to_add_contacts?: {
enable?: boolean;
selected_option?: number;
user_email_addresses?: string;
};
allow_users_to_chat_with_others?: {
enable?: boolean;
selected_option?: number;
user_email_addresses?: string;
};
chat_etiquette_tool?: {
enable?: boolean;
policies?: {
description?: string;
id?: string;
is_locked?: boolean;
keywords?: string[];
name?: string;
regular_expression?: string;
status?: string;
trigger_action?: number;
}[];
policy_max_count?: number;
};
send_data_to_third_party_archiving_service?: {
enable?: boolean;
type?: string;
smtp_delivery_address?: string;
user_name?: string;
passcode?: string;
authorized_channel_token?: string;
};
apply_local_storage_to_personal_channel?: {
enable?: boolean;
retention_period?: string;
};
translate_messages?: boolean;
search_and_send_animated_gif_images?: {
enable?: boolean;
giphy_content_rating?: number;
};
external_user_control?: {
enable?: boolean;
selected_option?: number;
external_account?: boolean;
};
external_invite_approve?: {
enable?: boolean;
selected_option?: number;
channel_id?: string;
external_account?: boolean;
};
external_member_join?: {
enable?: boolean;
external_account?: boolean;
};
external_join_approve?: {
enable?: boolean;
selected_option?: number;
channel_id?: string;
external_account?: boolean;
};
};
email_notification?: {
alternative_host_reminder?: boolean;
cancel_meeting_reminder?: boolean;
cloud_recording_available_reminder?: boolean;
jbh_reminder?: boolean;
low_host_count_reminder?: boolean;
recording_available_reminder_alternative_hosts?: boolean;
recording_available_reminder_schedulers?: boolean;
schedule_for_reminder?: boolean;
};
feature?: {
meeting_capacity?: number;
};
in_meeting?: {
auto_generated_translation?: {
language_item_pairList?: {
trans_lang_config?: {
speak_language?: {
name?: string;
code?: string;
};
translate_to?: {
all?: boolean;
language_config?: {
name?: string;
code?: string;
}[];
};
}[];
all?: boolean;
};
enable?: boolean;
};
alert_guest_join?: boolean;
allow_host_to_enable_focus_mode?: boolean;
allow_live_streaming?: boolean;
allow_participants_chat_with?: number;
allow_participants_to_rename?: boolean;
allow_show_zoom_windows?: boolean;
allow_users_save_chats?: number;
annotation?: boolean;
anonymous_question_answer?: boolean;
attendee_on_hold?: boolean;
attention_mode_focus_mode?: boolean;
auto_answer?: boolean;
auto_saving_chat?: boolean;
breakout_room?: boolean;
breakout_room_schedule?: boolean;
chat?: boolean;
meeting_question_answer?: boolean;
closed_caption?: boolean;
closed_captioning?: {
auto_transcribing?: boolean;
enable?: boolean;
save_caption?: boolean;
third_party_captioning_service?: boolean;
view_full_transcript?: boolean;
};
co_host?: boolean;
custom_data_center_regions?: boolean;
custom_live_streaming_service?: boolean;
custom_service_instructions?: string;
meeting_data_transit_and_residency_method?: string;
data_center_regions?: string[];
disable_screen_sharing_for_host_meetings?: boolean;
disable_screen_sharing_for_in_meeting_guests?: boolean;
dscp_audio?: number;
dscp_marking?: boolean;
dscp_video?: number;
dscp_dual?: boolean;
e2e_encryption?: boolean;
entry_exit_chime?: string;
far_end_camera_control?: boolean;
feedback?: boolean;
file_transfer?: boolean;
group_hd?: boolean;
webinar_group_hd?: boolean;
join_from_desktop?: boolean;
join_from_mobile?: boolean;
language_interpretation?: {
custom_languages?: string[];
enable?: boolean;
enable_language_interpretation_by_default?: boolean;
allow_participants_to_speak_in_listening_channel?: boolean;
allow_up_to_25_custom_languages_when_scheduling_meetings?: boolean;
languages?: string[];
};
sign_language_interpretation?: {
enable?: boolean;
enable_sign_language_interpretation_by_default?: boolean;
languages?: string[];
custom_languages?: string[];
};
live_streaming_facebook?: boolean;
live_streaming_youtube?: boolean;
manual_captioning?: {
allow_to_type?: boolean;
auto_generated_captions?: boolean;
full_transcript?: boolean;
manual_captions?: boolean;
save_captions?: boolean;
third_party_captioning_service?: boolean;
};
meeting_polling?: {
advanced_polls?: boolean;
allow_alternative_host_to_add_edit?: boolean;
manage_saved_polls_and_quizzes?: boolean;
allow_host_to_upload_image?: boolean;
require_answers_to_be_anonymous?: boolean;
enable?: boolean;
};
meeting_reactions?: boolean;
meeting_reactions_emojis?: string;
allow_host_panelists_to_use_audible_clap?: boolean;
webinar_reactions?: boolean;
meeting_survey?: boolean;
original_audio?: boolean;
p2p_connetion?: boolean;
p2p_ports?: boolean;
polling?: boolean;
ports_range?: string;
post_meeting_feedback?: boolean;
private_chat?: boolean;
record_play_own_voice?: boolean;
remote_control?: boolean;
non_verbal_feedback?: boolean;
remote_support?: boolean;
request_permission_to_unmute_participants?: boolean;
screen_sharing?: boolean;
sending_default_email_invites?: boolean;
show_a_join_from_your_browser_link?: boolean;
show_meeting_control_toolbar?: boolean;
slide_control?: boolean;
stereo_audio?: boolean;
unchecked_data_center_regions?: string[];
use_html_format_email?: boolean;
virtual_background?: boolean;
virtual_background_settings?: {
allow_upload_custom?: boolean;
allow_videos?: boolean;
enable?: boolean;
files?: {
id?: string;
is_default?: boolean;
name?: string;
size?: number;
type?: string;
}[];
};
watermark?: boolean;
webinar_chat?: {
allow_attendees_chat_with?: number;
allow_auto_save_local_chat_file?: boolean;
allow_panelists_chat_with?: number;
allow_panelists_send_direct_message?: boolean;
allow_users_save_chats?: number;
allow_users_to_delete_messages_in_meeting_chat?: boolean;
default_attendees_chat_with?: number;
enable?: boolean;
};
webinar_live_streaming?: {
custom_service_instructions?: string;
enable?: boolean;
live_streaming_reminder?: boolean;
live_streaming_service?: string[];
};
webinar_polling?: {
advanced_polls?: boolean;
allow_alternative_host_to_add_edit?: boolean;
require_answers_to_be_anonymous?: boolean;
manage_saved_polls_and_quizzes?: boolean;
allow_host_to_upload_image?: boolean;
enable?: boolean;
};
webinar_question_answer?: boolean;
webinar_survey?: boolean;
whiteboard?: boolean;
who_can_share_screen?: string;
who_can_share_screen_when_someone_is_sharing?: string;
participants_share_simultaneously?: string;
workplace_by_facebook?: boolean;
transfer_meetings_between_devices?: boolean;
};
integration?: {
box?: boolean;
dropbox?: boolean;
google_calendar?: boolean;
google_drive?: boolean;
kubi?: boolean;
microsoft_one_drive?: boolean;
};
other_options?: {
allow_auto_active_users?: boolean;
allow_users_contact_support_via_chat?: boolean;
allow_users_enter_and_share_pronouns?: boolean;
blur_snapshot?: boolean;
display_meetings_scheduled_for_others?: boolean;
meeting_qos_and_mos?: number;
show_one_user_meeting_on_dashboard?: boolean;
use_cdn?: string;
webinar_registration_options?: {
allow_host_to_enable_join_info?: boolean;
allow_host_to_enable_social_share_buttons?: boolean;
enable_custom_questions?: boolean;
};
email_in_attendee_report_for_meeting?: boolean;
};
profile?: {
recording_storage_location?: {
allowed_values?: string[];
value?: string;
};
};
recording?: {
account_user_access_recording?: boolean;
allow_recovery_deleted_cloud_recordings?: boolean;
archive?: {
enable?: boolean;
settings?: {
audio_file?: boolean;
cc_transcript_file?: boolean;
chat_file?: boolean;
chat_with_sender_email?: boolean;
video_file?: boolean;
chat_with_direct_message?: boolean;
archive_retention?: number;
action_when_archive_failed?: number;
notification_when_archiving_starts?: string;
play_voice_prompt_when_archiving_starts?: string;
};
type?: number;
};
auto_delete_cmr?: boolean;
auto_delete_cmr_days?: number;
auto_recording?: string;
cloud_recording?: boolean;
cloud_recording_download?: boolean;
cloud_recording_download_host?: boolean;
display_participant_name?: boolean;
host_delete_cloud_recording?: boolean;
ip_address_access_control?: {
enable?: boolean;
ip_addresses_or_ranges?: string;
};
local_recording?: boolean;
optimize_recording_for_3rd_party_video_editor?: boolean;
prevent_host_access_recording?: boolean;
record_audio_file?: boolean;
record_audio_file_each_participant?: boolean;
record_files_separately?: {
active_speaker?: boolean;
gallery_view?: boolean;
shared_screen?: boolean;
};
record_gallery_view?: boolean;
record_speaker_view?: boolean;
recording_audio_transcript?: boolean;
recording_disclaimer?: boolean;
recording_highlight?: boolean;
smart_recording?: {
create_recording_highlights?: boolean;
create_smart_chapters?: boolean;
create_next_steps?: boolean;
};
recording_password_requirement?: {
have_letter?: boolean;
have_number?: boolean;
have_special_character?: boolean;
length?: number;
only_allow_numeric?: boolean;
};
recording_thumbnails?: boolean;
required_password_for_existing_cloud_recordings?: boolean;
required_password_for_shared_cloud_recordings?: boolean;
save_chat_text?: boolean;
save_close_caption?: boolean;
save_panelist_chat?: boolean;
save_poll_results?: boolean;
show_timestamp?: boolean;
};
schedule_meeting?: {
audio_type?: string;
enforce_login?: boolean;
enforce_login_domains?: string;
enforce_login_with_domains?: boolean;
force_pmi_jbh_password?: boolean;
host_video?: boolean;
enable_dedicated_group_chat?: boolean;
jbh_time?: number;
join_before_host?: boolean;
meeting_password_requirement?: {
consecutive_characters_length?: number;
have_letter?: boolean;
have_number?: boolean;
have_special_character?: boolean;
have_upper_and_lower_characters?: boolean;
length?: number;
only_allow_numeric?: boolean;
weak_enhance_detection?: boolean;
};
not_store_meeting_topic?: boolean;
participant_video?: boolean;
allow_host_to_disable_participant_video?: boolean;
personal_meeting?: boolean;
require_password_for_instant_meetings?: boolean;
require_password_for_pmi_meetings?: string;
require_password_for_scheduled_meetings?: boolean;
require_password_for_scheduling_new_meetings?: boolean;
use_pmi_for_instant_meetings?: boolean;
use_pmi_for_scheduled_meetings?: boolean;
always_display_zoom_meeting_as_topic?: {
enable?: boolean;
display_topic_for_scheduled_meetings?: boolean;
};
hide_meeting_description?: {
enable?: boolean;
hide_description_for_scheduled_meetings?: boolean;
};
always_display_zoom_webinar_as_topic?: {
enable?: boolean;
display_topic_for_scheduled_webinars?: boolean;
};
hide_webinar_description?: {
enable?: boolean;
hide_description_for_scheduled_webinars?: boolean;
};
meeting_template?: {
enable?: boolean;
templates?: {
id?: string;
name?: string;
enable?: boolean;
}[];
};
continuous_meeting_chat?: {
enable?: boolean;
can_add_external_users?: boolean;
auto_add_invited_external_users?: boolean;
};
};
telephony?: {
audio_conference_info?: string;
telephony_regions?: {
allowed_values?: string[];
selection_values?: string;
};
third_party_audio?: boolean;
};
tsp?: {
call_out?: boolean;
call_out_countries?: string[];
display_toll_free_numbers?: boolean;
show_international_numbers_link?: boolean;
};
zoom_rooms?: {
auto_start_stop_scheduled_meetings?: boolean;
cmr_for_instant_meeting?: boolean;
force_private_meeting?: boolean;
hide_host_information?: boolean;
list_meetings_with_calendar?: boolean;
start_airplay_manually?: boolean;
ultrasonic?: boolean;
upcoming_meeting_alert?: boolean;
weekly_system_restart?: boolean;
zr_post_meeting_feedback?: boolean;
};
} | ({
allow_authentication_exception?: boolean;
authentication_options?: {
default_option?: boolean;
domains?: string;
id?: string;
name?: string;
type?: string;
visible?: boolean;
}[];
meeting_authentication?: boolean;
} | {
authentication_options?: {
default_option?: boolean;
domains?: string;
id?: string;
name?: string;
type?: string;
visible?: boolean;
}[];
recording_authentication?: boolean;
}) | {
meeting_security?: {
auto_security?: boolean;
block_user_domain?: boolean;
block_user_domain_list?: string[];
chat_etiquette_tool?: {
enable?: boolean;
policies?: {
description?: string;
id?: string;
is_locked?: boolean;
keywords?: string[];
name?: string;
regular_expression?: string;
status?: string;
trigger_action?: number;
}[];
policy_max_count?: number;
};
embed_password_in_join_link?: boolean;
encryption_type?: string;
end_to_end_encrypted_meetings?: boolean;
meeting_password?: boolean;
meeting_password_requirement?: {
consecutive_characters_length?: number;
have_letter?: boolean;
have_number?: boolean;
have_special_character?: boolean;
have_upper_and_lower_characters?: boolean;
length?: number;
only_allow_numeric?: boolean;
weak_enhance_detection?: boolean;
};
only_authenticated_can_join_from_webclient?: boolean;
phone_password?: boolean;
pmi_password?: boolean;
require_password_for_scheduled_meeting?: boolean;
require_password_for_scheduled_webinar?: boolean;
waiting_room?: boolean;
waiting_room_settings?: {
participants_to_place_in_waiting_room?: number;
users_who_can_admit_participants_from_waiting_room?: number;
whitelisted_domains_for_waiting_room?: string;
};
webinar_password?: boolean;
waiting_room_options?: {
enable?: boolean;
locked?: boolean;
admit_type?: number;
internal_user_auto_admit?: number;
admit_domain_allowlist?: string;
who_can_admit_participants?: number;
sort_order_of_people?: number;
more_options?: {
user_invited_by_host_can_bypass_waiting_room?: boolean;
move_participants_to_waiting_room_when_host_dropped?: boolean;
allow_participants_to_reply_to_host?: boolean;
};
};
};
} | {
in_meeting?: {