xverse-components-utils
Version:
xverse components utils
80 lines (79 loc) • 2.56 kB
TypeScript
import type { Xverse3DWorld } from 'xverse-components-world';
import { CsaTextCheckRequest } from './csa';
import { CodeFactorySaveCacheDataRequest, CodeFactoryGetCacheDataRequest, CodeFactoryCountOnlineUserRequest, CodeFactoryCountOnlineUserResponse } from './codefactory';
export { CodeFactoryCountOnlineUserType } from './codefactory';
/**
* @description 检查信息是否合法
* @param options
* @returns
*/
export declare const csaTextCheck: (options: Omit<CsaTextCheckRequest, "traceId">) => Promise<false | import("./csa").CsaTextCheckResponseData>;
/**
* @description 获取在线人数
*/
export declare const getOnlineUser: (options: Omit<CodeFactoryCountOnlineUserRequest, "traceId">, baseURL?: string) => Promise<CodeFactoryCountOnlineUserResponse>;
/**
* @description 获取小程序返回数据
* @param {string} dataType} 获取小程序数据的类型
* @returns
*/
export declare const getMinAppData: (userId: string) => Promise<string>;
export interface ICardShareProps {
world: Xverse3DWorld;
userId: string;
cardId: string;
receiver: string;
}
/**
* @description 卡包-分享卡片
* @param options
* @returns true 成功 false 失败
*/
export declare const cardShare: (options: ICardShareProps) => Promise<any>;
export interface ICardListProps {
world: Xverse3DWorld;
userId: string;
}
/**
* @description 卡包-获取列出卡片信息
* @param options
* @returns
*/
export declare const getCardList: (options: ICardListProps) => Promise<any>;
/**
* @description
*/
export interface ISaveUserInfoProps {
userId?: string;
thirdPartId: string;
birthday?: string;
email?: string;
face?: string;
gender?: any;
mobile?: string;
nickName?: string;
pushToken?: string;
registerSource?: any;
signature?: string;
userName?: string;
userRole?: any;
company?: string;
profession?: string;
company_detail?: string;
address?: string;
extra?: string;
}
/**
* @description 保存用户信息
* @param options
* @returns
*/
export declare const saveUserInfo: (options: ISaveUserInfoProps, world: Xverse3DWorld | null) => Promise<any>;
/**
* @description 获取用户信息
* @param options
* @returns
*/
export declare const getUserList: (userIds: string[], world: Xverse3DWorld | null) => Promise<any>;
export declare const getCacheData: (options: Omit<CodeFactoryGetCacheDataRequest, "traceId">) => Promise<string>;
export declare const setCacheData: (options: Omit<CodeFactorySaveCacheDataRequest, "traceId">) => Promise<void>;