import { NativeModules } from 'react-native'; import type { ZoomVideoSdkPhoneSupportCountryInfo } from './ZoomVideoSdkPhoneSupportCountryInfo'; import type { PhoneStatus } from './ZoomVideoSdk'; import type { Errors } from '../native/ZoomVideoSdk'; import type {ZoomVideoSdkSessionDialInNumberInfo} from "./ZoomVideoSdkSessionDialInNumberInfo"; const { RNZoomVideoSdkPhoneHelper } = NativeModules; export type ZoomVideoSdkPhoneHelperType = { /** * Cancel the invitation that is being called out by phone. */ cancelInviteByPhone: () => Promise; /** * Get the status of the invitation by phone. */ getInviteByPhoneStatus: () => Promise; /** * Get the list of the country information where the session supports to join by telephone. */ getSupportCountryInfo: () => Promise; /** * Invite the specified user to join the session by call out. */ inviteByPhone: ( countryCode: string, phoneNumber: string, name: string ) => Promise; /** * Determine if the session supports join by phone or not. */ isSupportPhoneFeature: () => Promise; /** * Get the Video SDK dial in number information list. */ getSessionDialInNumbers: () => Promise }; export class ZoomVideoSdkPhoneHelper implements ZoomVideoSdkPhoneHelperType { inviteByPhone(countryCode: string, phoneNumber: string, name: string) { return RNZoomVideoSdkPhoneHelper.inviteByPhone( countryCode, phoneNumber, name ); } async cancelInviteByPhone() { return await RNZoomVideoSdkPhoneHelper.cancelInviteByPhone(); } async getInviteByPhoneStatus() { return await RNZoomVideoSdkPhoneHelper.getInviteByPhoneStatus(); } async getSupportCountryInfo() { return await RNZoomVideoSdkPhoneHelper.getSupportCountryInfo(); } async isSupportPhoneFeature() { return await RNZoomVideoSdkPhoneHelper.isSupportPhoneFeature(); } async getSessionDialInNumbers() { return await RNZoomVideoSdkPhoneHelper.getSessionDialInNumbers(); } }