@amityco/ts-sdk 7.30.1-a5f99b06.0 → 7.30.1-de079b8.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.
@@ -7,7 +7,6 @@ export declare const ContentFeedType: Readonly<{
7
7
  }>;
8
8
  export declare enum ContentFlagReasonEnum {
9
9
  CommunityGuidelines = "Against community guidelines",
10
- ChildEndangerment = "Child endangerment",
11
10
  HarassmentOrBullying = "Harassment or bullying",
12
11
  SelfHarmOrSuicide = "Self-harm or suicide",
13
12
  ViolenceOrThreateningContent = "Violence or threatening content",
@@ -1 +1 @@
1
- {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,oBAAY,qBAAqB;IAC/B,mBAAmB,iCAAiC;IACpD,iBAAiB,uBAAuB;IACxC,oBAAoB,2BAA2B;IAC/C,iBAAiB,yBAAyB;IAC1C,4BAA4B,oCAAoC;IAChE,sBAAsB,2CAA2C;IACjE,qBAAqB,6BAA6B;IAClD,WAAW,kBAAkB;IAC7B,gBAAgB,wCAAwC;IACxD,MAAM,WAAW;CAClB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,iBAAiB,GAClB,OAAO,CAAC,GAAG,qBAAqB,EAAE,EAAE,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,GACtE,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;QAElB;;;;;;WAMG;QACH,KAAK,kBAAkB,GAAG;YACxB,MAAM,EAAE,qBAAqB,CAAC;YAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;QAEF,KAAK,WAAW,GACZ,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,YAAY,GACZ,MAAM,GACN,OAAO,GACP,MAAM,CAAC;QAEX,KAAK,eAA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Enum = void 0;
162
162
  (function (ContentFlagReasonEnum) {
163
163
  ContentFlagReasonEnum["CommunityGuidelines"] = "Against community guidelines";
164
- ContentFlagReasonEnum["ChildEndangerment"] = "Child endangerment";
165
164
  ContentFlagReasonEnum["HarassmentOrBullying"] = "Harassment or bullying";
166
165
  ContentFlagReasonEnum["SelfHarmOrSuicide"] = "Self-harm or suicide";
167
166
  ContentFlagReasonEnum["ViolenceOrThreateningContent"] = "Violence or threatening content";
@@ -15932,7 +15931,7 @@ const toUserProfileReportBody = (options) => {
15932
15931
  };
15933
15932
  /**
15934
15933
  * Validates `flagUserBehavior` options and builds its request body. `reason` must be one
15935
- * of the `ContentFlagReasonEnum` values and is sent as that canonical label;
15934
+ * of the nine `ContentFlagReasonEnum` values and is sent as that canonical label;
15936
15935
  * `reportType` is always `behavior`.
15937
15936
  *
15938
15937
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
@@ -16013,7 +16012,7 @@ const flagUserProfile = async (userId, options) => submitUserReport('flagUserPro
16013
16012
  * })
16014
16013
  * ```
16015
16014
  *
16016
- * Reports a user's behavior. `reason` is required and is one of the
16015
+ * Reports a user's behavior. `reason` is required and is one of the nine
16017
16016
  * `ContentFlagReasonEnum` values, sent as its canonical label. Reporter text, including
16018
16017
  * the explanation for `Others`, always travels in `comment`; the reason never carries text.
16019
16018
  *
@@ -21009,7 +21008,7 @@ const isLegacyContentFlagReason = (input) => input === undefined || typeof input
21009
21008
  /**
21010
21009
  * Validates an `Amity.ContentFlagOptions` argument. Untyped (plain JS) callers can pass
21011
21010
  * anything at runtime, so the checks do not trust the declared type: the value must be a
21012
- * plain object, `reason` must be one of the `ContentFlagReasonEnum` values and
21011
+ * plain object, `reason` must be one of the nine `ContentFlagReasonEnum` values and
21013
21012
  * `detail`, when supplied, must be a string (`null` is not a valid supplied detail).
21014
21013
  *
21015
21014
  * @param apiName used in the error message, e.g. `flagPost`
@@ -38188,64 +38187,6 @@ class AmityAttachmentProductTags {
38188
38187
  }
38189
38188
  }
38190
38189
 
38191
- /**
38192
- * Stable, cross-platform key per report category. Android and iOS expose the same
38193
- * keys on `AmityContentFlagReasonType.key`. A UIKit builds its string key from it
38194
- * (`amity_social_label_report_reason_<key>`), so a released key is never renamed.
38195
- * The key is not derived from the enum member name on purpose: the existing UIKit
38196
- * string keys do not follow it (`selling_restricted`, `violence_or_threatening`).
38197
- */
38198
- const CONTENT_FLAG_REASON_KEYS = Object.freeze({
38199
- [exports.ContentFlagReasonEnum.CommunityGuidelines]: 'community_guidelines',
38200
- [exports.ContentFlagReasonEnum.ChildEndangerment]: 'child_endangerment',
38201
- [exports.ContentFlagReasonEnum.HarassmentOrBullying]: 'harassment_or_bullying',
38202
- [exports.ContentFlagReasonEnum.SelfHarmOrSuicide]: 'self_harm_or_suicide',
38203
- [exports.ContentFlagReasonEnum.ViolenceOrThreateningContent]: 'violence_or_threatening',
38204
- [exports.ContentFlagReasonEnum.SellingRestrictedItems]: 'selling_restricted',
38205
- [exports.ContentFlagReasonEnum.SexualContentOrNudity]: 'sexual_content_or_nudity',
38206
- [exports.ContentFlagReasonEnum.SpamOrScams]: 'spam_or_scams',
38207
- [exports.ContentFlagReasonEnum.FalseInformation]: 'false_information',
38208
- [exports.ContentFlagReasonEnum.Others]: 'others',
38209
- });
38210
- /* begin_public_function
38211
- id: content_flag_reason.get_reasons
38212
- */
38213
- /**
38214
- * ```js
38215
- * import { getContentFlagReasons, ContentFlagReasonEnum } from '@amityco/ts-sdk'
38216
- * const reasons = getContentFlagReasons().filter(r => r !== ContentFlagReasonEnum.Others)
38217
- * ```
38218
- *
38219
- * Returns every report category in display order, with `Others` last. Render a report
38220
- * picker from this list rather than a copy, so a category added in a later SDK release
38221
- * appears without a UI change. Each value is also its English default label.
38222
- *
38223
- * @returns a new array on every call; mutating it does not affect the SDK
38224
- *
38225
- * @category Content Flag
38226
- */
38227
- const getContentFlagReasons = () => Object.values(exports.ContentFlagReasonEnum);
38228
- /* end_public_function */
38229
- /* begin_public_function
38230
- id: content_flag_reason.get_key
38231
- */
38232
- /**
38233
- * ```js
38234
- * import { getContentFlagReasonKey, ContentFlagReasonEnum } from '@amityco/ts-sdk'
38235
- * getContentFlagReasonKey(ContentFlagReasonEnum.ChildEndangerment) // 'child_endangerment'
38236
- * ```
38237
- *
38238
- * Returns the stable, cross-platform key of a report category, for building a
38239
- * localisation key. Never send the key to the server: flag with the enum value.
38240
- *
38241
- * @param reason a `ContentFlagReasonEnum` value
38242
- * @returns the category's snake_case key
38243
- *
38244
- * @category Content Flag
38245
- */
38246
- const getContentFlagReasonKey = (reason) => CONTENT_FLAG_REASON_KEYS[reason];
38247
- /* end_public_function */
38248
-
38249
38190
  exports.API_REGIONS = API_REGIONS;
38250
38191
  exports.AdRepository = index$6;
38251
38192
  exports.AmityAttachmentProductTags = AmityAttachmentProductTags;
@@ -38312,8 +38253,6 @@ exports.getChannelTopic = getChannelTopic;
38312
38253
  exports.getCommentTopic = getCommentTopic;
38313
38254
  exports.getCommunityStoriesTopic = getCommunityStoriesTopic;
38314
38255
  exports.getCommunityTopic = getCommunityTopic;
38315
- exports.getContentFlagReasonKey = getContentFlagReasonKey;
38316
- exports.getContentFlagReasons = getContentFlagReasons;
38317
38256
  exports.getLiveReactionTopic = getLiveReactionTopic;
38318
38257
  exports.getLiveStreamTopic = getLiveStreamTopic;
38319
38258
  exports.getMarkedMessageTopic = getMarkedMessageTopic;
package/dist/index.d.ts CHANGED
@@ -35,7 +35,6 @@ export * as EventRepository from './eventRepository';
35
35
  export * as ProductRepository from './productRepository';
36
36
  export * as CuratedContentRepository from './curatedContentRepository';
37
37
  export { AmityAttachmentProductTags } from './productRepository/helpers';
38
- export { getContentFlagReasons, getContentFlagReasonKey } from './utils/contentFlagReason';
39
38
  export { AmityModuleNotEntitledError } from './core/errors';
40
39
  export { resolveModuleAvailability } from './client/utils/resolveModuleAvailability';
41
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts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C;AAC7D,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,sBAAsB,MAAM,0BAA0B,CAAC;AAEnE,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAGrD,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAG/C,cAAc,gBAAgB,CAAC;AAE/B,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAC;AAE/D,OAAO,KAAK,sBAAsB,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,wBAAwB,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC"}
package/dist/index.esm.js CHANGED
@@ -145,7 +145,6 @@ const ContentFeedType = Object.freeze({
145
145
  var ContentFlagReasonEnum;
146
146
  (function (ContentFlagReasonEnum) {
147
147
  ContentFlagReasonEnum["CommunityGuidelines"] = "Against community guidelines";
148
- ContentFlagReasonEnum["ChildEndangerment"] = "Child endangerment";
149
148
  ContentFlagReasonEnum["HarassmentOrBullying"] = "Harassment or bullying";
150
149
  ContentFlagReasonEnum["SelfHarmOrSuicide"] = "Self-harm or suicide";
151
150
  ContentFlagReasonEnum["ViolenceOrThreateningContent"] = "Violence or threatening content";
@@ -15932,7 +15931,7 @@ const toUserProfileReportBody = (options) => {
15932
15931
  };
15933
15932
  /**
15934
15933
  * Validates `flagUserBehavior` options and builds its request body. `reason` must be one
15935
- * of the `ContentFlagReasonEnum` values and is sent as that canonical label;
15934
+ * of the nine `ContentFlagReasonEnum` values and is sent as that canonical label;
15936
15935
  * `reportType` is always `behavior`.
15937
15936
  *
15938
15937
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
@@ -16013,7 +16012,7 @@ const flagUserProfile = async (userId, options) => submitUserReport('flagUserPro
16013
16012
  * })
16014
16013
  * ```
16015
16014
  *
16016
- * Reports a user's behavior. `reason` is required and is one of the
16015
+ * Reports a user's behavior. `reason` is required and is one of the nine
16017
16016
  * `ContentFlagReasonEnum` values, sent as its canonical label. Reporter text, including
16018
16017
  * the explanation for `Others`, always travels in `comment`; the reason never carries text.
16019
16018
  *
@@ -21009,7 +21008,7 @@ const isLegacyContentFlagReason = (input) => input === undefined || typeof input
21009
21008
  /**
21010
21009
  * Validates an `Amity.ContentFlagOptions` argument. Untyped (plain JS) callers can pass
21011
21010
  * anything at runtime, so the checks do not trust the declared type: the value must be a
21012
- * plain object, `reason` must be one of the `ContentFlagReasonEnum` values and
21011
+ * plain object, `reason` must be one of the nine `ContentFlagReasonEnum` values and
21013
21012
  * `detail`, when supplied, must be a string (`null` is not a valid supplied detail).
21014
21013
  *
21015
21014
  * @param apiName used in the error message, e.g. `flagPost`
@@ -38188,62 +38187,4 @@ class AmityAttachmentProductTags {
38188
38187
  }
38189
38188
  }
38190
38189
 
38191
- /**
38192
- * Stable, cross-platform key per report category. Android and iOS expose the same
38193
- * keys on `AmityContentFlagReasonType.key`. A UIKit builds its string key from it
38194
- * (`amity_social_label_report_reason_<key>`), so a released key is never renamed.
38195
- * The key is not derived from the enum member name on purpose: the existing UIKit
38196
- * string keys do not follow it (`selling_restricted`, `violence_or_threatening`).
38197
- */
38198
- const CONTENT_FLAG_REASON_KEYS = Object.freeze({
38199
- [ContentFlagReasonEnum.CommunityGuidelines]: 'community_guidelines',
38200
- [ContentFlagReasonEnum.ChildEndangerment]: 'child_endangerment',
38201
- [ContentFlagReasonEnum.HarassmentOrBullying]: 'harassment_or_bullying',
38202
- [ContentFlagReasonEnum.SelfHarmOrSuicide]: 'self_harm_or_suicide',
38203
- [ContentFlagReasonEnum.ViolenceOrThreateningContent]: 'violence_or_threatening',
38204
- [ContentFlagReasonEnum.SellingRestrictedItems]: 'selling_restricted',
38205
- [ContentFlagReasonEnum.SexualContentOrNudity]: 'sexual_content_or_nudity',
38206
- [ContentFlagReasonEnum.SpamOrScams]: 'spam_or_scams',
38207
- [ContentFlagReasonEnum.FalseInformation]: 'false_information',
38208
- [ContentFlagReasonEnum.Others]: 'others',
38209
- });
38210
- /* begin_public_function
38211
- id: content_flag_reason.get_reasons
38212
- */
38213
- /**
38214
- * ```js
38215
- * import { getContentFlagReasons, ContentFlagReasonEnum } from '@amityco/ts-sdk'
38216
- * const reasons = getContentFlagReasons().filter(r => r !== ContentFlagReasonEnum.Others)
38217
- * ```
38218
- *
38219
- * Returns every report category in display order, with `Others` last. Render a report
38220
- * picker from this list rather than a copy, so a category added in a later SDK release
38221
- * appears without a UI change. Each value is also its English default label.
38222
- *
38223
- * @returns a new array on every call; mutating it does not affect the SDK
38224
- *
38225
- * @category Content Flag
38226
- */
38227
- const getContentFlagReasons = () => Object.values(ContentFlagReasonEnum);
38228
- /* end_public_function */
38229
- /* begin_public_function
38230
- id: content_flag_reason.get_key
38231
- */
38232
- /**
38233
- * ```js
38234
- * import { getContentFlagReasonKey, ContentFlagReasonEnum } from '@amityco/ts-sdk'
38235
- * getContentFlagReasonKey(ContentFlagReasonEnum.ChildEndangerment) // 'child_endangerment'
38236
- * ```
38237
- *
38238
- * Returns the stable, cross-platform key of a report category, for building a
38239
- * localisation key. Never send the key to the server: flag with the enum value.
38240
- *
38241
- * @param reason a `ContentFlagReasonEnum` value
38242
- * @returns the category's snake_case key
38243
- *
38244
- * @category Content Flag
38245
- */
38246
- const getContentFlagReasonKey = (reason) => CONTENT_FLAG_REASON_KEYS[reason];
38247
- /* end_public_function */
38248
-
38249
- export { API_REGIONS, index$6 as AdRepository, AmityAttachmentProductTags, AmityAutoSubscription, AmityChannelNotificationModeEnum, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AmityLiveViewerCountMode, AmityModuleNotEntitledError, AmitySharableContentType, AnalyticsSourceTypeEnum, index$g as CategoryRepository, index$k as ChannelRepository, index$t as Client, index$f as CommentRepository, CommunityNotificationEventNameEnum, CommunityPostSettingMaps, CommunityPostSettings, index$h as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, index as CuratedContentRepository, DefaultCommunityPostSetting, index$2 as EventRepository, FeedDataTypeEnum, index$e as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$q as FileRepository, FileType, GET_WATCHER_URLS, index$4 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$3 as LiveReactionRepository, index$8 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$o as MessageRepository, NotificationRolesFilterTypeEnum, NotificationSettingsLevelEnum, index$9 as PollRepository, PostContentType, index$c as PostRepository, PostStructureType, index$1 as ProductRepository, index$p as ReactionRepository, index$a as RoomPresenceRepository, index$d as RoomRepository, SearchUsersByEnum, index$7 as StoryRepository, index$b as StreamRepository, index$n as SubChannelRepository, SubscriptionLevels, UserNotificationModuleNameEnum, UserProfileFieldEnum, UserReportTypeEnum, UserReportTypeFilterEnum, index$r 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, filterCommentsByBlockUsers, filterPostsByBlockUsers, getBlockUsersId, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getContentFlagReasonKey, getContentFlagReasons, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkId, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$5 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, resolveModuleAvailability, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastMessage, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };
38190
+ export { API_REGIONS, index$6 as AdRepository, AmityAttachmentProductTags, AmityAutoSubscription, AmityChannelNotificationModeEnum, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AmityLiveViewerCountMode, AmityModuleNotEntitledError, AmitySharableContentType, AnalyticsSourceTypeEnum, index$g as CategoryRepository, index$k as ChannelRepository, index$t as Client, index$f as CommentRepository, CommunityNotificationEventNameEnum, CommunityPostSettingMaps, CommunityPostSettings, index$h as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, index as CuratedContentRepository, DefaultCommunityPostSetting, index$2 as EventRepository, FeedDataTypeEnum, index$e as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$q as FileRepository, FileType, GET_WATCHER_URLS, index$4 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$3 as LiveReactionRepository, index$8 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$o as MessageRepository, NotificationRolesFilterTypeEnum, NotificationSettingsLevelEnum, index$9 as PollRepository, PostContentType, index$c as PostRepository, PostStructureType, index$1 as ProductRepository, index$p as ReactionRepository, index$a as RoomPresenceRepository, index$d as RoomRepository, SearchUsersByEnum, index$7 as StoryRepository, index$b as StreamRepository, index$n as SubChannelRepository, SubscriptionLevels, UserNotificationModuleNameEnum, UserProfileFieldEnum, UserReportTypeEnum, UserReportTypeFilterEnum, index$r 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, filterCommentsByBlockUsers, filterPostsByBlockUsers, getBlockUsersId, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkId, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$5 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, resolveModuleAvailability, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastMessage, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };