UNPKG

agora-react-native-rtm

Version:

React Native around the Agora RTM SDKs for Android and iOS agora

200 lines (199 loc) 6.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IRtmStorageImpl = void 0; var _IrisRtmEngine = require("../../internal/IrisRtmEngine"); // @ts-ignore class IRtmStorageImpl { setChannelMetadata(channelName, channelType, data, options, lockName) { const apiType = this.getApiTypeFromSetChannelMetadata(channelName, channelType, data, options, lockName); const jsonParams = { channelName: channelName, channelType: channelType, data: data, options: options, lockName: lockName, toJSON: () => { return { channelName: channelName, channelType: channelType, data: data, options: options, lockName: lockName }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromSetChannelMetadata(channelName, channelType, data, options, lockName) { return 'RtmStorage_setChannelMetadata_55e6d00'; } updateChannelMetadata(channelName, channelType, data, options, lockName) { const apiType = this.getApiTypeFromUpdateChannelMetadata(channelName, channelType, data, options, lockName); const jsonParams = { channelName: channelName, channelType: channelType, data: data, options: options, lockName: lockName, toJSON: () => { return { channelName: channelName, channelType: channelType, data: data, options: options, lockName: lockName }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromUpdateChannelMetadata(channelName, channelType, data, options, lockName) { return 'RtmStorage_updateChannelMetadata_55e6d00'; } removeChannelMetadata(channelName, channelType, data, options, lockName) { const apiType = this.getApiTypeFromRemoveChannelMetadata(channelName, channelType, data, options, lockName); const jsonParams = { channelName: channelName, channelType: channelType, data: data, options: options, lockName: lockName, toJSON: () => { return { channelName: channelName, channelType: channelType, data: data, options: options, lockName: lockName }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromRemoveChannelMetadata(channelName, channelType, data, options, lockName) { return 'RtmStorage_removeChannelMetadata_55e6d00'; } getChannelMetadata(channelName, channelType) { const apiType = this.getApiTypeFromGetChannelMetadata(channelName, channelType); const jsonParams = { channelName: channelName, channelType: channelType, toJSON: () => { return { channelName: channelName, channelType: channelType }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromGetChannelMetadata(channelName, channelType) { return 'RtmStorage_getChannelMetadata_ad8568b'; } setUserMetadata(userId, data, options) { const apiType = this.getApiTypeFromSetUserMetadata(userId, data, options); const jsonParams = { userId: userId, data: data, options: options, toJSON: () => { return { userId: userId, data: data, options: options }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromSetUserMetadata(userId, data, options) { return 'RtmStorage_setUserMetadata_24ae125'; } updateUserMetadata(userId, data, options) { const apiType = this.getApiTypeFromUpdateUserMetadata(userId, data, options); const jsonParams = { userId: userId, data: data, options: options, toJSON: () => { return { userId: userId, data: data, options: options }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromUpdateUserMetadata(userId, data, options) { return 'RtmStorage_updateUserMetadata_24ae125'; } removeUserMetadata(userId, data, options) { const apiType = this.getApiTypeFromRemoveUserMetadata(userId, data, options); const jsonParams = { userId: userId, data: data, options: options, toJSON: () => { return { userId: userId, data: data, options: options }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromRemoveUserMetadata(userId, data, options) { return 'RtmStorage_removeUserMetadata_24ae125'; } getUserMetadata(userId) { const apiType = this.getApiTypeFromGetUserMetadata(userId); const jsonParams = { userId: userId, toJSON: () => { return { userId: userId }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromGetUserMetadata(userId) { return 'RtmStorage_getUserMetadata_1fa04dd'; } subscribeUserMetadata(userId) { const apiType = this.getApiTypeFromSubscribeUserMetadata(userId); const jsonParams = { userId: userId, toJSON: () => { return { userId: userId }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromSubscribeUserMetadata(userId) { return 'RtmStorage_subscribeUserMetadata_1fa04dd'; } unsubscribeUserMetadata(userId) { const apiType = this.getApiTypeFromUnsubscribeUserMetadata(userId); const jsonParams = { userId: userId, toJSON: () => { return { userId: userId }; } }; return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams); } getApiTypeFromUnsubscribeUserMetadata(userId) { return 'RtmStorage_unsubscribeUserMetadata_1fa04dd'; } } exports.IRtmStorageImpl = IRtmStorageImpl; //# sourceMappingURL=IAgoraRtmStorageImpl.js.map