@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
79 lines (63 loc) • 1.94 kB
text/typescript
export {};
export const enum FeedDataTypeEnum {
Text = 'text',
Video = 'video',
Image = 'image',
File = 'file',
LiveStream = 'liveStream',
Clip = 'clip',
Poll = 'poll',
}
export const enum FeedSortByEnum {
LastCreated = 'lastCreated',
FirstCreated = 'firstCreated',
LastUpdated = 'lastUpdated',
FirstUpdated = 'firstUpdated',
}
export const enum FeedSourceEnum {
Community = 'community',
User = 'user',
}
declare global {
namespace Amity {
type FeedDataType = FeedDataTypeEnum;
type FeedSortBy = FeedSortByEnum;
type FeedSource = FeedSourceEnum;
type Feed = {
feedId: string;
feedType: 'reviewing' | 'published';
targetType: Extract<Amity.Domain, 'community' | 'user'>;
targetId: string;
postCount: number;
} & Amity.Timestamps;
type QueryGlobalFeed = {
dataTypes?: ('video' | 'image' | 'file' | 'liveStream' | 'clip')[];
queryToken?: string;
};
type CustomRankingGlobalFeedLiveCollection = Amity.LiveCollectionParams<
Omit<QueryGlobalFeed, 'resolveParent' | 'queryToken'>
>;
type CustomRankingGlobalFeedLiveCollectionCache = Amity.LiveCollectionCache<
Amity.InternalPost['postId'],
QueryGlobalFeed
>;
type GlobalFeedLiveCollection = Amity.LiveCollectionParams<Omit<QueryGlobalFeed, 'queryToken'>>;
type GlobalFeedLiveCollectionCache = Amity.LiveCollectionCache<
Amity.InternalPost['postId'],
QueryGlobalFeed
>;
type QueryUserFeed = {
userId: string;
includeDeleted?: boolean;
sortBy?: Amity.FeedSortBy;
dataTypes?: Amity.FeedDataType[];
matchingOnlyParentPost?: boolean;
feedSources?: Amity.FeedSource[];
};
type UserFeedLiveCollection = Amity.LiveCollectionParams<QueryUserFeed>;
type UserFeedLiveCollectionCache = Amity.LiveCollectionCache<
Amity.InternalPost['postId'],
QueryUserFeed
>;
}
}