@vchatcloud/react-ui-kit
Version:
VChatCloud UI Kit for react integration
39 lines (38 loc) • 1.49 kB
TypeScript
import { Channel } from '@vchatcloud/sdk';
import { FileType } from './constants';
/**
* 10자리 랜덤 문자열 생성
*
* 생성한 값은 localStorage에 "clientKey"에 저장됩니다.
*
* @returns 10자리 랜덤 문자열
*/
export declare const setRandomClientKey: () => string;
/**
* 프로필 이미지 URL생성
* @param index 프로필 이미지 index
* @returns 프로필 이미지 URL
*/
export declare const getProfileImageUrl: (index: number | string) => string;
export declare const getEmoticonUrl: (categoryIndex: number, index: number) => string;
/**
* 서버에서 사용하는 Date 문자열 형식으로 변환
* @param date Date 객체
* @returns 서버 Date 문자열 포맷
*/
export declare const dateObjectToDateString: (date: Date) => string;
/**
* 서버에서 온 Date 문자열을 로컬시 기준 Date 객체로 변환
* @param value Date 문자열 | epoch 숫자
* @returns Date 객체
*/
export declare const dateValueToDateObject: (value: string | number) => Date;
export declare const dateFormat: (date: Date) => string;
export declare const byteNumberToStringFormat: (byteSize: number) => string;
export declare const fileTypeChecker: (fileExt: string) => FileType;
export declare const emailValidate: (email: string) => boolean;
export declare const getFileDownloadUrl: (fileKey: string) => string;
export declare const sendSubOutMessage: ({ channel, privateRoomId, }: {
channel: Channel;
privateRoomId: string;
}) => void;