forked from GetStream/react-native-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.js
More file actions
74 lines (57 loc) · 1.61 KB
/
types.js
File metadata and controls
74 lines (57 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// @flow
import type {
StreamCloudClient,
StreamUser,
StreamUserSession,
ActivityResponse,
StreamFeed,
UserResponse as StreamUserResponse,
EnrichedReactionResponse,
} from 'getstream';
import type { AppCtx } from 'expo-activity-feed';
export type UserData = {
name: string,
url?: string,
desc?: string,
profileImage?: string,
coverImage?: string,
};
export type CloudClient = StreamCloudClient<UserData>;
export type UserSession = StreamUserSession<UserData>;
export type StreamAppCtx = AppCtx<UserData>;
export type User = StreamUser<UserData>;
export type UserResponse = StreamUserResponse<UserData>;
export type OgData = {
title: string,
description: string,
images: Array<{ image: string }>,
url: string,
};
export type CustomActivityData = {
content: string,
link?: boolean,
image?: string,
attachments?: {
images?: Array<string>,
og?: OgData,
},
};
export type ActivityData = ActivityResponse<UserData, CustomActivityData>;
export type Activities = Array<ActivityData>;
export type Feed = StreamFeed<UserData, CustomActivityData>;
export type CommentData = {
text: string,
};
export type RepostData = {
text: string,
};
export type Comment = EnrichedReactionResponse<UserData, CommentData>;
export type Heart = EnrichedReactionResponse<UserData, {}>;
export type Repost = EnrichedReactionResponse<UserData, RepostData>;
export type ReactionMap = {
comment?: Array<Comment>,
heart?: Array<Heart>,
repost?: Array<Repost>,
};
export type NotificationActivity = ActivityResponse<UserData, {}>;
export type NotificationActivities = Array<ActivityResponse<UserData, {}>>;