@amityco/ts-sdk 7.19.0 → 7.19.1-29603bb2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/@types/domains/channel.d.ts +8 -0
  2. package/dist/@types/domains/channel.d.ts.map +1 -1
  3. package/dist/@types/domains/client.d.ts +1 -0
  4. package/dist/@types/domains/client.d.ts.map +1 -1
  5. package/dist/@types/domains/notificationSettings.d.ts +101 -0
  6. package/dist/@types/domains/notificationSettings.d.ts.map +1 -0
  7. package/dist/@types/index.d.ts +2 -1
  8. package/dist/@types/index.d.ts.map +1 -1
  9. package/dist/channelRepository/api/updateChannel.d.ts +1 -1
  10. package/dist/channelRepository/api/updateChannel.d.ts.map +1 -1
  11. package/dist/channelRepository/channelMembership/observers/getMembers/ChannelMemberQueryStreamController.d.ts.map +1 -1
  12. package/dist/channelRepository/events/onChannelMemberRoleRemoved.d.ts.map +1 -1
  13. package/dist/client/api/index.d.ts +2 -0
  14. package/dist/client/api/index.d.ts.map +1 -1
  15. package/dist/client/api/notifications.d.ts +27 -0
  16. package/dist/client/api/notifications.d.ts.map +1 -0
  17. package/dist/client/api/tests/notifications.integration.test.d.ts +2 -0
  18. package/dist/client/api/tests/notifications.integration.test.d.ts.map +1 -0
  19. package/dist/index.cjs.js +204 -5
  20. package/dist/index.esm.js +205 -6
  21. package/dist/index.umd.js +3 -3
  22. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts +1 -0
  23. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts.map +1 -1
  24. package/dist/reactionRepository/internalApi/addReaction.d.ts.map +1 -1
  25. package/dist/reactionRepository/internalApi/removeReaction.d.ts.map +1 -1
  26. package/dist/utils/linkedObject/channelLinkedObject.d.ts.map +1 -1
  27. package/package.json +1 -1
package/dist/index.esm.js CHANGED
@@ -59,6 +59,13 @@ var FileAccessTypeEnum;
59
59
  FileAccessTypeEnum["NETWORK"] = "network";
60
60
  })(FileAccessTypeEnum || (FileAccessTypeEnum = {}));
61
61
 
62
+ var AmityChannelNotificationModeEnum;
63
+ (function (AmityChannelNotificationModeEnum) {
64
+ AmityChannelNotificationModeEnum["Default"] = "default";
65
+ AmityChannelNotificationModeEnum["Silent"] = "silent";
66
+ AmityChannelNotificationModeEnum["Subscribe"] = "subscribe";
67
+ })(AmityChannelNotificationModeEnum || (AmityChannelNotificationModeEnum = {}));
68
+
62
69
  const CommunityPostSettings = Object.freeze({
63
70
  ONLY_ADMIN_CAN_POST: 'ONLY_ADMIN_CAN_POST',
64
71
  ADMIN_REVIEW_POST_REQUIRED: 'ADMIN_REVIEW_POST_REQUIRED',
@@ -240,6 +247,39 @@ var AnalyticsSourceTypeEnum;
240
247
  AnalyticsSourceTypeEnum["ROOM"] = "room";
241
248
  })(AnalyticsSourceTypeEnum || (AnalyticsSourceTypeEnum = {}));
242
249
 
250
+ var UserNotificationModuleNameEnum;
251
+ (function (UserNotificationModuleNameEnum) {
252
+ UserNotificationModuleNameEnum["CHAT"] = "chat";
253
+ UserNotificationModuleNameEnum["SOCIAL"] = "social";
254
+ UserNotificationModuleNameEnum["VIDEO_STREAMING"] = "video-streaming";
255
+ })(UserNotificationModuleNameEnum || (UserNotificationModuleNameEnum = {}));
256
+ var CommunityNotificationEventNameEnum;
257
+ (function (CommunityNotificationEventNameEnum) {
258
+ CommunityNotificationEventNameEnum["POST_CREATED"] = "post.created";
259
+ CommunityNotificationEventNameEnum["POST_REACTED"] = "post.reacted";
260
+ CommunityNotificationEventNameEnum["COMMENT_CREATED"] = "comment.created";
261
+ CommunityNotificationEventNameEnum["COMMENT_REPLIED"] = "comment.replied";
262
+ CommunityNotificationEventNameEnum["COMMENT_REACTED"] = "comment.reacted";
263
+ CommunityNotificationEventNameEnum["STORY_CREATED"] = "story.created";
264
+ CommunityNotificationEventNameEnum["STORY_REACTED"] = "story.reacted";
265
+ CommunityNotificationEventNameEnum["STORY_COMMENT_CREATED"] = "story-comment.created";
266
+ CommunityNotificationEventNameEnum["LIVESTREAM_START"] = "video-streaming.didStart";
267
+ })(CommunityNotificationEventNameEnum || (CommunityNotificationEventNameEnum = {}));
268
+ var NotificationSettingsLevelEnum;
269
+ (function (NotificationSettingsLevelEnum) {
270
+ NotificationSettingsLevelEnum["USER"] = "user";
271
+ NotificationSettingsLevelEnum["COMMUNITY"] = "community";
272
+ NotificationSettingsLevelEnum["CHANNEL"] = "channel";
273
+ })(NotificationSettingsLevelEnum || (NotificationSettingsLevelEnum = {}));
274
+ /**
275
+ * `NOT` variant is intentionally excluded from public API (internal server-side use only).
276
+ */
277
+ var NotificationRolesFilterTypeEnum;
278
+ (function (NotificationRolesFilterTypeEnum) {
279
+ NotificationRolesFilterTypeEnum["ALL"] = "all";
280
+ NotificationRolesFilterTypeEnum["ONLY"] = "only";
281
+ })(NotificationRolesFilterTypeEnum || (NotificationRolesFilterTypeEnum = {}));
282
+
243
283
  function getVersion() {
244
284
  try {
245
285
  // the string ''v7.19.0-esm'' should be replaced by actual value by @rollup/plugin-replace
@@ -22770,7 +22810,7 @@ const onChannelMemberRoleRemoved = (callback) => {
22770
22810
  const client = getActiveClient();
22771
22811
  const filter = async (payload) => {
22772
22812
  const { channels, channelUsers } = payload;
22773
- callback(channels[0], channelUsers.find(channelUser => channelUser.membership === 'member'));
22813
+ callbacks$1.forEach(cb => cb(channels[0], channelUsers.find(channelUser => channelUser.membership === 'member')));
22774
22814
  };
22775
22815
  mainDisposer$1 = createEventSubscriber(client, 'onChannelMemberRoleRemoved', 'local.channel-moderator.role-removed', filter);
22776
22816
  }
@@ -22891,6 +22931,17 @@ const channelLinkedObject = (channel) => {
22891
22931
  markAsRead: () => markAsRead(channel.channelInternalId),
22892
22932
  previewMembers,
22893
22933
  myMembership: (callback) => getMyMembership(channel.channelId, callback),
22934
+ get avatar() {
22935
+ var _a;
22936
+ if (!channel.avatarFileId)
22937
+ return undefined;
22938
+ const avatar = (_a = pullFromCache([
22939
+ 'file',
22940
+ 'get',
22941
+ `${channel.avatarFileId}`,
22942
+ ])) === null || _a === void 0 ? void 0 : _a.data;
22943
+ return avatar;
22944
+ },
22894
22945
  });
22895
22946
  };
22896
22947
 
@@ -26880,6 +26931,140 @@ const setAccessTokenHandler = (accessTokenHandler) => {
26880
26931
  client.accessTokenHandler = accessTokenHandler;
26881
26932
  };
26882
26933
 
26934
+ function parseRolesFilter(listenFromRoleIds, ignoreFromRoleIds) {
26935
+ if (ignoreFromRoleIds && ignoreFromRoleIds.length > 0) {
26936
+ return { type: 'not', roleIds: ignoreFromRoleIds };
26937
+ }
26938
+ if (listenFromRoleIds && listenFromRoleIds.length > 0) {
26939
+ return { type: NotificationRolesFilterTypeEnum.ONLY, roleIds: listenFromRoleIds };
26940
+ }
26941
+ return { type: NotificationRolesFilterTypeEnum.ALL };
26942
+ }
26943
+ function serializeRolesFilter(rolesFilter) {
26944
+ if ((rolesFilter === null || rolesFilter === void 0 ? void 0 : rolesFilter.type) === NotificationRolesFilterTypeEnum.ONLY) {
26945
+ return { listenFromRoleIds: rolesFilter.roleIds };
26946
+ }
26947
+ return { listenFromRoleIds: [] };
26948
+ }
26949
+ class ChannelNotifications {
26950
+ constructor(channelId) {
26951
+ this.channelId = channelId;
26952
+ }
26953
+ async enable() {
26954
+ const client = getActiveClient();
26955
+ const body = {
26956
+ level: NotificationSettingsLevelEnum.CHANNEL,
26957
+ channelId: this.channelId,
26958
+ isPushNotifiable: true,
26959
+ };
26960
+ await client.http.post('/api/v3/notification/setting', body);
26961
+ }
26962
+ async disable() {
26963
+ const client = getActiveClient();
26964
+ const body = {
26965
+ level: NotificationSettingsLevelEnum.CHANNEL,
26966
+ channelId: this.channelId,
26967
+ isPushNotifiable: false,
26968
+ };
26969
+ await client.http.post('/api/v3/notification/setting', body);
26970
+ }
26971
+ async getSettings() {
26972
+ const client = getActiveClient();
26973
+ const { data } = await client.http.get(`/api/v3/notification/setting?level=${NotificationSettingsLevelEnum.CHANNEL}&channelId=${encodeURIComponent(this.channelId)}`);
26974
+ return { isEnabled: data.isPushNotifiable };
26975
+ }
26976
+ }
26977
+ class UserNotifications {
26978
+ async enable(modules) {
26979
+ var _a;
26980
+ const client = getActiveClient();
26981
+ const notifiableEvents = (_a = modules === null || modules === void 0 ? void 0 : modules.map(module => (Object.assign({ moduleName: module.moduleName, isPushNotifiable: module.isEnabled }, serializeRolesFilter(module.rolesFilter))))) !== null && _a !== void 0 ? _a : [];
26982
+ const body = {
26983
+ level: NotificationSettingsLevelEnum.USER,
26984
+ isPushNotifiable: true,
26985
+ notifiableEvents,
26986
+ };
26987
+ await client.http.post('/api/v3/notification/setting', body);
26988
+ }
26989
+ async disableAllNotifications() {
26990
+ const client = getActiveClient();
26991
+ const body = {
26992
+ level: NotificationSettingsLevelEnum.USER,
26993
+ isPushNotifiable: false,
26994
+ notifiableEvents: [],
26995
+ };
26996
+ await client.http.post('/api/v3/notification/setting', body);
26997
+ }
26998
+ async getSettings() {
26999
+ var _a;
27000
+ const client = getActiveClient();
27001
+ const { data } = await client.http.get(`/api/v3/notification/setting?level=${NotificationSettingsLevelEnum.USER}`);
27002
+ const validModuleNames = Object.values(UserNotificationModuleNameEnum);
27003
+ const modules = ((_a = data.notifiableEvents) !== null && _a !== void 0 ? _a : [])
27004
+ .filter(e => e.moduleName != null && validModuleNames.includes(e.moduleName))
27005
+ .map(e => ({
27006
+ moduleName: e.moduleName,
27007
+ isEnabled: e.isPushNotifiable,
27008
+ rolesFilter: parseRolesFilter(e.listenFromRoleIds, e.ignoreFromRoleIds),
27009
+ }));
27010
+ return { isEnabled: data.isPushNotifiable, modules };
27011
+ }
27012
+ }
27013
+ class CommunityNotifications {
27014
+ constructor(communityId) {
27015
+ this.communityId = communityId;
27016
+ }
27017
+ async enable(events) {
27018
+ var _a;
27019
+ const client = getActiveClient();
27020
+ const notifiableEvents = (_a = events === null || events === void 0 ? void 0 : events.map(event => (Object.assign({ moduleName: UserNotificationModuleNameEnum.SOCIAL, name: event.eventName, isPushNotifiable: event.isEnabled }, serializeRolesFilter(event.rolesFilter))))) !== null && _a !== void 0 ? _a : [];
27021
+ const body = {
27022
+ level: NotificationSettingsLevelEnum.COMMUNITY,
27023
+ communityId: this.communityId,
27024
+ isPushNotifiable: true,
27025
+ notifiableEvents,
27026
+ };
27027
+ await client.http.post('/api/v3/notification/setting', body);
27028
+ }
27029
+ async disable() {
27030
+ const client = getActiveClient();
27031
+ const body = {
27032
+ level: NotificationSettingsLevelEnum.COMMUNITY,
27033
+ communityId: this.communityId,
27034
+ isPushNotifiable: false,
27035
+ notifiableEvents: [],
27036
+ };
27037
+ await client.http.post('/api/v3/notification/setting', body);
27038
+ }
27039
+ async getSettings() {
27040
+ var _a;
27041
+ const client = getActiveClient();
27042
+ const { data } = await client.http.get(`/api/v3/notification/setting?level=${NotificationSettingsLevelEnum.COMMUNITY}&communityId=${encodeURIComponent(this.communityId)}`);
27043
+ const validEventNames = Object.values(CommunityNotificationEventNameEnum);
27044
+ const events = ((_a = data.notifiableEvents) !== null && _a !== void 0 ? _a : [])
27045
+ .filter(e => e.name != null && validEventNames.includes(e.name))
27046
+ .map(e => ({
27047
+ eventName: e.name,
27048
+ isEnabled: e.isPushNotifiable,
27049
+ isNetworkEnabled: e.isNetworkEnabled,
27050
+ rolesFilter: parseRolesFilter(e.listenFromRoleIds, e.ignoreFromRoleIds),
27051
+ }));
27052
+ return { isEnabled: data.isPushNotifiable, events };
27053
+ }
27054
+ }
27055
+ class Notifications {
27056
+ user() {
27057
+ return new UserNotifications();
27058
+ }
27059
+ community(communityId) {
27060
+ return new CommunityNotifications(communityId);
27061
+ }
27062
+ channel(channelId) {
27063
+ return new ChannelNotifications(channelId);
27064
+ }
27065
+ }
27066
+ const notifications = () => new Notifications();
27067
+
26883
27068
  /**
26884
27069
  * ```js
26885
27070
  * import { onChannelMarkerFetched } from '@amityco/ts-sdk'
@@ -27260,6 +27445,8 @@ var index$s = /*#__PURE__*/Object.freeze({
27260
27445
  getCurrentUserType: getCurrentUserType,
27261
27446
  setCurrentUserType: setCurrentUserType,
27262
27447
  setAccessTokenHandler: setAccessTokenHandler,
27448
+ getChatSettings: getChatSettings,
27449
+ notifications: notifications,
27263
27450
  onConnectionError: onConnectionError,
27264
27451
  onClientDisconnected: onClientDisconnected,
27265
27452
  onClientBanned: onClientBanned,
@@ -29295,7 +29482,7 @@ const getWatchSessionStorage = () => {
29295
29482
  return storageInstance;
29296
29483
  };
29297
29484
 
29298
- const privateKey = "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHo80SecH7FuF2\nhFYnb+l26/VN8UMLXAQFLnxciNTEwkGVFMpdezlH8rU2HtUJL4RETogbAOLVY0XM\njs6sPn8G1nALmh9qeDpUtVqFOVtBHxEZ910TLOtQiunjqJKO5nWdqZ71EC3OFluR\niGQkO84BiIFbv37ub7xl3S8XarbtKoLcyVpkDHi+1wx1pgCAn6gtBUgckPL5NR8j\nLseabl3HAXQfhTCKo4tmOFM2Dxwl1IUMmIJrJg/aIU/U0tj/1Eoo7mG0JcNWX19l\nW3EecCbi0ncCJOrkUdwlBrcjaMayaX/ubEwyUeTGiLdyc4L3GRLHjyK8xgVNXRMH\nbZWJ2a5NAgMBAAECggEASxuE+35zTFO/XydKgmvIGcWL9FbgMlXb7Vcf0nBoG945\nbiz0NVc2paraIhJXc608xbYF3qLmtAE1MVBI0ORyRdBHNxY024l/6H6SH60Ed+uI\nM4ysp5ourY6Vj+DLwpdRiI9YDjqYAQDIUmhNxJP7XPhOMoZI6st+xZQBM34ic/bv\nAMSJm9OZphSp3+qXVkFZztr2mxD2EZSJJLYxi8BCdgM2qhazalbcJ6zDKHCZWVWm\n8RRxDGldyMb/237JxETzP40tAlzOZDmBAbUgEnurDJ93RVDIE3rbZUshwgeQd18a\nem096mWgvB1AIKYgsTAR3pw+V19YWAjq/glP6fz8wQKBgQD/oQq+ukKF0PRgBeM5\ngeTjSwsdGppQLmf5ndujvoiz/TpdjDEPu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r0rhLj1cbxcKRdUYACOgtEFQpzxN/HZnTeFAe5nx3pI3uFlRHq3DFEYnT6dHMWaJQmAULYpVIwMi9L6gtyJ9fzoI6uqMtxRDMUqKdaSsTGOY/kJ6KhQ/unXi1K3XXjR+yd1+C0q+HUm1+CYxvrZYLfskCgYEArsEy+IQOiqniJ0NE2vVUF+UK/IRZaic9YKcpov5Ot7Vvzm/MnnW4N1ljVskocETBWMmPUvNSExVjPebi+rxd8fa5kY8BJScPTzMFbunZn/wjtGdcM10qdlVQ9doG61A/9P3ezFKCfS4AvF/H/59LcSx2Bh28fp3/efiVIOpVd4Y=";
29299
29486
  /*
29300
29487
  * The crypto algorithm used for importing key and signing string
29301
29488
  */
@@ -30806,6 +30993,11 @@ const addReaction$1 = async (referenceType, referenceId, reactionName, reference
30806
30993
  });
30807
30994
  return true;
30808
30995
  }
30996
+ if (referenceType === 'message') {
30997
+ upsertInCache(['message', 'get', referenceId], updatedModel);
30998
+ fireEvent('local.message.updated', { messages: [updatedModel] });
30999
+ return true;
31000
+ }
30809
31001
  }
30810
31002
  return true;
30811
31003
  };
@@ -30884,7 +31076,7 @@ const removeReaction$1 = async (referenceType, referenceId, reactionName, refere
30884
31076
  return true;
30885
31077
  }
30886
31078
  if (referenceType === 'story') {
30887
- fireEvent('local.story.reactionAdded', {
31079
+ fireEvent('local.story.reactionRemoved', {
30888
31080
  story: updatedModel,
30889
31081
  reactor: {
30890
31082
  userId: client.userId,
@@ -30894,6 +31086,11 @@ const removeReaction$1 = async (referenceType, referenceId, reactionName, refere
30894
31086
  });
30895
31087
  return true;
30896
31088
  }
31089
+ if (referenceType === 'message') {
31090
+ upsertInCache(['message', 'get', referenceId], updatedModel);
31091
+ fireEvent('local.message.updated', { messages: [updatedModel] });
31092
+ return true;
31093
+ }
30897
31094
  }
30898
31095
  return true;
30899
31096
  };
@@ -33817,7 +34014,7 @@ const removeReaction = async (referenceType, referenceId, reactionName) => {
33817
34014
  return true;
33818
34015
  }
33819
34016
  if (referenceType === 'story') {
33820
- fireEvent('local.story.reactionAdded', {
34017
+ fireEvent('local.story.reactionRemoved', {
33821
34018
  story: updatedModel,
33822
34019
  reactor: {
33823
34020
  userId: client.userId,
@@ -38410,7 +38607,9 @@ class ChannelMemberQueryStreamController extends QueryStreamController {
38410
38607
  channelId: this.query.channelId,
38411
38608
  userId: channelMember.userId,
38412
38609
  });
38413
- if (channelMember.membership === 'none') {
38610
+ const membershipFilter = this.query.memberships;
38611
+ const isInFilter = !membershipFilter || membershipFilter.includes(channelMember.membership);
38612
+ if (channelMember.membership === 'none' || !isInFilter) {
38414
38613
  collection.data = collection.data.filter(m => m !== channelMemberCacheId);
38415
38614
  }
38416
38615
  else if (!collection.data.includes(channelMemberCacheId)) {
@@ -51579,4 +51778,4 @@ class AmityAttachmentProductTags {
51579
51778
  }
51580
51779
  }
51581
51780
 
51582
- export { API_REGIONS, index$5 as AdRepository, AmityAttachmentProductTags, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AnalyticsSourceTypeEnum, index$f as CategoryRepository, index$j as ChannelRepository, index$s as Client, index$e as CommentRepository, CommunityPostSettingMaps, CommunityPostSettings, index$g as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, DefaultCommunityPostSetting, index$1 as EventRepository, FeedDataTypeEnum, index$d as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$p as FileRepository, FileType, GET_WATCHER_URLS, index$3 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$2 as LiveReactionRepository, index$7 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$n as MessageRepository, index$8 as PollRepository, PostContentType, index$b as PostRepository, PostStructureType, index as ProductRepository, index$o as ReactionRepository, index$9 as RoomPresenceRepository, index$c as RoomRepository, SearchUsersByEnum, index$6 as StoryRepository, index$a as StreamRepository, index$m as SubChannelRepository, SubscriptionLevels, index$q as UserRepository, UserTypeEnum, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, exceedsUntilAtBoundary, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, filterByUntilAt, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$4 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };
51781
+ export { API_REGIONS, index$5 as AdRepository, AmityAttachmentProductTags, AmityChannelNotificationModeEnum, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AnalyticsSourceTypeEnum, index$f as CategoryRepository, index$j as ChannelRepository, index$s as Client, index$e as CommentRepository, CommunityNotificationEventNameEnum, CommunityPostSettingMaps, CommunityPostSettings, index$g as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, DefaultCommunityPostSetting, index$1 as EventRepository, FeedDataTypeEnum, index$d as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$p as FileRepository, FileType, GET_WATCHER_URLS, index$3 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$2 as LiveReactionRepository, index$7 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$n as MessageRepository, NotificationRolesFilterTypeEnum, NotificationSettingsLevelEnum, index$8 as PollRepository, PostContentType, index$b as PostRepository, PostStructureType, index as ProductRepository, index$o as ReactionRepository, index$9 as RoomPresenceRepository, index$c as RoomRepository, SearchUsersByEnum, index$6 as StoryRepository, index$a as StreamRepository, index$m as SubChannelRepository, SubscriptionLevels, UserNotificationModuleNameEnum, index$q as UserRepository, UserTypeEnum, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, exceedsUntilAtBoundary, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, filterByUntilAt, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$4 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };