sidechat.js 2.6.6 → 2.7.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.
- package/dist/classes/SidechatAPIClient.d.ts +166 -11
- package/dist/classes/SidechatAPIClient.d.ts.map +1 -1
- package/dist/index.cjs +853 -311
- package/dist/index.mjs +853 -311
- package/dist/types/SidechatTypes.d.ts +260 -9
- package/dist/types/SidechatTypes.d.ts.map +1 -1
- package/docs/sidechat.js/2.7.0/SidechatAPIClient.html +3 -0
- package/docs/sidechat.js/2.7.0/SidechatAPIError.html +3 -0
- package/docs/sidechat.js/2.7.0/SidechatColorList.html +3 -0
- package/docs/sidechat.js/2.7.0/classes_SidechatAPIClient.js.html +1897 -0
- package/docs/sidechat.js/2.7.0/classes_SidechatAPIError.js.html +16 -0
- package/docs/sidechat.js/2.7.0/classes_SidechatColorList.js.html +79 -0
- package/docs/sidechat.js/2.7.0/data/search.json +1 -0
- package/docs/sidechat.js/2.7.0/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/sidechat.js/2.7.0/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/sidechat.js/2.7.0/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/sidechat.js/2.7.0/global.html +3 -0
- package/docs/sidechat.js/2.7.0/index.html +4 -0
- package/docs/sidechat.js/2.7.0/scripts/core.js +726 -0
- package/docs/sidechat.js/2.7.0/scripts/core.min.js +23 -0
- package/docs/sidechat.js/2.7.0/scripts/resize.js +90 -0
- package/docs/sidechat.js/2.7.0/scripts/search.js +265 -0
- package/docs/sidechat.js/2.7.0/scripts/search.min.js +6 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/Apache-License-2.0.txt +202 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/fuse.js +9 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-line-num-original.js +369 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-line-num.js +1 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-original.js +5171 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/hljs.js +1 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/popper.js +5 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/tippy.js +1 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/tocbot.js +672 -0
- package/docs/sidechat.js/2.7.0/scripts/third-party/tocbot.min.js +1 -0
- package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-base.css +1159 -0
- package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-dark.css +412 -0
- package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-light.css +482 -0
- package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-scrollbar.css +30 -0
- package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
- package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme.min.css +1 -0
- package/docs/sidechat.js/2.7.0/tutorial-Authentication.html +16 -0
- package/docs/sidechat.js/2.7.0/tutorial-Email Registration.html +6 -0
- package/docs/sidechat.js/2.7.0/tutorial-Feeds and Pagination.html +10 -0
- package/docs/sidechat.js/2.7.0/tutorial-Posting and Media.html +19 -0
- package/docs/sidechat.js/2.7.0/types_SidechatTypes.js.html +297 -0
- package/docs/tutorials/Authentication.md +63 -52
- package/docs/tutorials/Email Registration.md +19 -16
- package/docs/tutorials/Feeds and Pagination.md +45 -0
- package/docs/tutorials/Posting and Media.md +63 -0
- package/package.json +55 -55
- package/src/classes/SidechatAPIClient.js +477 -27
- package/src/types/SidechatTypes.js +294 -202
|
@@ -1,202 +1,294 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A user-created post or comment, depending on the "type" prop
|
|
3
|
-
* @typedef {Object} SidechatPostOrComment
|
|
4
|
-
* @prop {"post"|"comment"} type - whether this object represents a post or a comment on a post
|
|
5
|
-
* @prop {String} id - alphanumeric ID of post or comment
|
|
6
|
-
* @prop {Boolean} authored_by_user - whether or not the post or comment was created by the current user
|
|
7
|
-
* @prop {String} alias - post creator's name in-app
|
|
8
|
-
* @prop {String} group_id - alphanumeric ID of group
|
|
9
|
-
* @prop {SidechatGroup} group - group in which post or comment was created
|
|
10
|
-
* @prop {String} text - text content of post or comment
|
|
11
|
-
* @prop {String} created_at - date string of post or comment creation time
|
|
12
|
-
* @prop {Number} vote_total - sum of upvotes and downvotes
|
|
13
|
-
* @prop {SidechatVoteString} vote_status - current user's vote on post or comment
|
|
14
|
-
* @prop {SidechatSimpleAsset[]} assets - array of simple assets attached to post or comment
|
|
15
|
-
* @prop {
|
|
16
|
-
* @prop {Boolean} dms_disabled - whether or not you can send a DM to creator of post
|
|
17
|
-
* @prop {String[]} tags - undocumented
|
|
18
|
-
* @prop {SidechatIdentity} identity - creator's identity information
|
|
19
|
-
* @prop {Boolean} pinned - undocumented
|
|
20
|
-
* @prop {Boolean} is_saved - whether or not the current user has saved the post
|
|
21
|
-
* @prop {"following"|"not_following"} follow_status - whether or not the current user should recieve activity notifications for the post
|
|
22
|
-
* @prop {"group"} [destination] -
|
|
23
|
-
* @prop {
|
|
24
|
-
* @prop {Boolean} [
|
|
25
|
-
* @prop {
|
|
26
|
-
* @prop {
|
|
27
|
-
* @prop {
|
|
28
|
-
* @prop {String} [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
36
|
-
* @prop {String}
|
|
37
|
-
* @prop {
|
|
38
|
-
* @prop {String}
|
|
39
|
-
* @prop {"
|
|
40
|
-
* @prop {
|
|
41
|
-
* @prop {"
|
|
42
|
-
* @prop {
|
|
43
|
-
* @prop {
|
|
44
|
-
* @prop {
|
|
45
|
-
* @prop {
|
|
46
|
-
* @prop {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
*
|
|
53
|
-
* @
|
|
54
|
-
* @prop {
|
|
55
|
-
* @prop {
|
|
56
|
-
* @prop {
|
|
57
|
-
* @prop {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
* @
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
*
|
|
75
|
-
* @
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
*
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
*
|
|
99
|
-
* @
|
|
100
|
-
* @prop {
|
|
101
|
-
* @prop {
|
|
102
|
-
* @prop {
|
|
103
|
-
* @prop {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*
|
|
112
|
-
* @
|
|
113
|
-
* @prop {String}
|
|
114
|
-
* @prop {String}
|
|
115
|
-
* @prop {
|
|
116
|
-
* @prop {
|
|
117
|
-
* @prop {String}
|
|
118
|
-
* @prop {
|
|
119
|
-
* @prop {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
*
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
*
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
*
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
*
|
|
162
|
-
* @
|
|
163
|
-
* @prop {String}
|
|
164
|
-
* @prop {String}
|
|
165
|
-
* @prop {
|
|
166
|
-
* @prop {
|
|
167
|
-
* @prop {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
*
|
|
175
|
-
* @
|
|
176
|
-
* @prop {String}
|
|
177
|
-
* @prop {String}
|
|
178
|
-
* @prop {String}
|
|
179
|
-
* @prop {
|
|
180
|
-
* @prop {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
*
|
|
188
|
-
* @
|
|
189
|
-
* @prop {
|
|
190
|
-
* @prop {
|
|
191
|
-
* @prop {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
*
|
|
199
|
-
* @
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A user-created post or comment, depending on the "type" prop
|
|
3
|
+
* @typedef {Object} SidechatPostOrComment
|
|
4
|
+
* @prop {"post"|"comment"} type - whether this object represents a post or a comment on a post
|
|
5
|
+
* @prop {String} id - alphanumeric ID of post or comment
|
|
6
|
+
* @prop {Boolean} authored_by_user - whether or not the post or comment was created by the current user
|
|
7
|
+
* @prop {String} alias - post creator's name in-app
|
|
8
|
+
* @prop {String} group_id - alphanumeric ID of group
|
|
9
|
+
* @prop {SidechatGroup} group - group in which post or comment was created
|
|
10
|
+
* @prop {String} text - text content of post or comment
|
|
11
|
+
* @prop {String} created_at - date string of post or comment creation time
|
|
12
|
+
* @prop {Number} vote_total - sum of upvotes and downvotes
|
|
13
|
+
* @prop {SidechatVoteString} vote_status - current user's vote on post or comment
|
|
14
|
+
* @prop {SidechatSimpleAsset[]} assets - array of simple assets attached to post or comment
|
|
15
|
+
* @prop {SidechatAttachment[]} attachments - link attachments on the post
|
|
16
|
+
* @prop {Boolean} dms_disabled - whether or not you can send a DM to creator of post
|
|
17
|
+
* @prop {String[]} tags - undocumented
|
|
18
|
+
* @prop {SidechatIdentity} identity - creator's identity information
|
|
19
|
+
* @prop {Boolean} pinned - undocumented
|
|
20
|
+
* @prop {Boolean} is_saved - whether or not the current user has saved the post
|
|
21
|
+
* @prop {"following"|"following_commented"|"not_following"} follow_status - whether or not the current user should recieve activity notifications for the post
|
|
22
|
+
* @prop {"group"|"account"} [destination] - whether the post was made in a group or on the author's profile
|
|
23
|
+
* @prop {Boolean} [is_deleted] - whether or not the post or comment has been deleted
|
|
24
|
+
* @prop {{post: SidechatPostOrComment, is_unavailable: Boolean}} [quote_post] - the post being quoted, if this is a repost
|
|
25
|
+
* @prop {Number} [comment_count] - number of comments on post (only if type=post)
|
|
26
|
+
* @prop {Boolean} [comments_disabled] - whether or not you can comment on post (only if type=post)
|
|
27
|
+
* @prop {SidechatPoll} [poll] - poll attached to post (only if the post has a poll)
|
|
28
|
+
* @prop {String} [parent_post_id] - alphanumeric ID of parent post (only if type=comment)
|
|
29
|
+
* @prop {String} [reply_post_id] - alphanumeric ID of comment being replied to, falls back to parent_post_id (only if type=comment)
|
|
30
|
+
* @prop {String} [context] - text content of comment being replied to, falls back to text (only if type=comment)
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A group object, containing metadata about a group as well as its join conditions and states. Some properties vary based on the endpoint the object came from.
|
|
35
|
+
* @typedef {Object} SidechatGroup
|
|
36
|
+
* @prop {String} id - alphanumeric ID of group
|
|
37
|
+
* @prop {String} name - human-readable name of group
|
|
38
|
+
* @prop {String} analytics_name - name to file group under
|
|
39
|
+
* @prop {"non_member"|"member"} membership_type - whether or not current user is a member of group
|
|
40
|
+
* @prop {String} color - group's theme color as hex code (e.g., #FFFFFF)
|
|
41
|
+
* @prop {"open"|"closed"|"email_domain"} group_join_type - basis on which group accepts new members
|
|
42
|
+
* @prop {"private"|"public_to_all"|"public_to_schools"} group_visibility - group's visibility setting
|
|
43
|
+
* @prop {"show"|"hide"} asset_library_visibility - whether or not group's asset library is visible
|
|
44
|
+
* @prop {Array} [roles] - undocumented
|
|
45
|
+
* @prop {String} [description] - description of group
|
|
46
|
+
* @prop {SidechatPrivateAssetURL} [icon_url] - image URL for group icon
|
|
47
|
+
* @prop {Number} [member_count] - number of users in group
|
|
48
|
+
* @prop {Boolean} [should_show_leaderboard] - undocumented
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* An asset object, containing information about an image within a post or comment
|
|
53
|
+
* @typedef {Object} SidechatSimpleAsset
|
|
54
|
+
* @prop {String} id - alphanumeric ID of asset
|
|
55
|
+
* @prop {"image"|"video"} type - whether the asset is an image or a video
|
|
56
|
+
* @prop {"jpeg"|"png"|"gif"|"webp"|"mp4"|"mov"} content_type - file type of asset
|
|
57
|
+
* @prop {Number} width - width of asset
|
|
58
|
+
* @prop {Number} height - height of asset
|
|
59
|
+
* @prop {SidechatPrivateAssetURL} [url] - URL string of asset's location (an HLS .m3u8 stream for processed videos)
|
|
60
|
+
* @prop {SidechatSimpleAsset} [thumbnail_asset] - preview image (only if type=video)
|
|
61
|
+
* @prop {"not_started"|"ingest"|"complete"|"error"} [vod_status] - processing status (only if type=video)
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* An asset object, containing information about an image from the asset library
|
|
66
|
+
* @typedef {Object} SidechatLibraryAsset
|
|
67
|
+
* @prop {String} id - alphanumeric ID of asset
|
|
68
|
+
* @prop {String} created_at - date string of asset creation time
|
|
69
|
+
* @prop {SidechatAssetMetadata} metadata - metadata associated with asset
|
|
70
|
+
* @prop {SidechatPrivateAssetURL} url - URL string of asset's location
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* An asset object, containing information about an image from the asset library
|
|
75
|
+
* @typedef {Object} SidechatAssetMetadata
|
|
76
|
+
* @prop {Number} width - width of asset
|
|
77
|
+
* @prop {Number} height - height of asset
|
|
78
|
+
* @prop {"image"} type - undocumented
|
|
79
|
+
* @prop {"jpeg"|"png"|"gif"} content_type - file type of asset
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* A user's anonymous identity information
|
|
84
|
+
* @typedef {Object} SidechatIdentity
|
|
85
|
+
* @prop {String} name - representation of user's name (varies across app)
|
|
86
|
+
* @prop {Boolean} posted_with_username - undocumented
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* A conversation icon associated with a user
|
|
91
|
+
* @typedef {Object} SidechatIcon
|
|
92
|
+
* @prop {String} emoji - unicode emoji character
|
|
93
|
+
* @prop {String} color - primary hex color code
|
|
94
|
+
* @prop {String} secondary_color - secondary hex color code
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The current user's information
|
|
99
|
+
* @typedef {Object} SidechatCurrentUser
|
|
100
|
+
* @prop {String} id - alphanumeric ID of current user
|
|
101
|
+
* @prop {String} hashedVerifiedEmail - verified email of current user in an unreadable hashed form
|
|
102
|
+
* @prop {Boolean} isGlobalModerator - whether or not user is a moderator
|
|
103
|
+
* @prop {Boolean} isGlobalAdmin - whether or not user is an admin
|
|
104
|
+
* @prop {SidechatMembership[]} memberships
|
|
105
|
+
* @prop {Array} roles - undocumented
|
|
106
|
+
* @prop {String} emailDomain - domain of verified email address on account
|
|
107
|
+
* @prop {String} wildcardEmailDomain - domain of verified email address on account, preceeded by *. to support subdomains
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* A user's public profile
|
|
112
|
+
* @typedef {Object} SidechatProfile
|
|
113
|
+
* @prop {String} id - alphanumeric ID of user
|
|
114
|
+
* @prop {String} name - public-facing username
|
|
115
|
+
* @prop {SidechatIcon} conversation_icon - icon associated with user
|
|
116
|
+
* @prop {Boolean} description - the user bio
|
|
117
|
+
* @prop {String} index_name - undocumented
|
|
118
|
+
* @prop {String} analytics_name - undocumented
|
|
119
|
+
* @prop {String} color - undocumented
|
|
120
|
+
* @prop {String} share_color_start - undocumented
|
|
121
|
+
* @prop {String} share_color_end - undocumented
|
|
122
|
+
* @prop {"account"} group_join_type - undocumented
|
|
123
|
+
* @prop {"public_to_all"} group_visibility - the profile visibility status
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Representation of a group membership
|
|
128
|
+
* @typedef {Object} SidechatMembership
|
|
129
|
+
* @prop {String} groupId - alphanumeric ID of group
|
|
130
|
+
* @prop {String} type - role of current user in group
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* An asset URL that can only be accessed by making a request with a user's bearer token attached in the Authorization header
|
|
135
|
+
* @typedef {String} SidechatPrivateAssetURL
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* A cursor for paginating through post lists
|
|
140
|
+
* @typedef {String} SidechatCursorString
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* A vote on a comment or post
|
|
145
|
+
* @typedef {"upvote"|"downvote"|"none"} SidechatVoteString
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* A user's bearer authentication token needed for most requests
|
|
150
|
+
* @typedef {String} SidechatAuthToken
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* A list of posts and the associated cursor
|
|
155
|
+
* @typedef {Object} SidechatPostsAndCursor
|
|
156
|
+
* @prop {SidechatPostOrComment[]} posts
|
|
157
|
+
* @prop {SidechatCursorString} cursor
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* A direct message thread
|
|
162
|
+
* @typedef {Object} SidechatDirectThread
|
|
163
|
+
* @prop {String} id - alphanumeric ID of thread
|
|
164
|
+
* @prop {String} group_id - alphanumeric ID of group in which the thread exists
|
|
165
|
+
* @prop {String} updated_at - date string of when the last message in the chat was sent
|
|
166
|
+
* @prop {String} post_id - post or comment from which the thread was originally sent
|
|
167
|
+
* @prop {String} post_context - the context of the DM thread (only "feed" is known at the moment)
|
|
168
|
+
* @prop {"accepted"} accept_status - whether or not the other user has accepted this DM
|
|
169
|
+
* @prop {"post"|"comment"} type - the type of the content from which the DM was originally sent
|
|
170
|
+
* @prop {SidechatDirectMessage[]} messages - array of direct message objects
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* A single direct message
|
|
175
|
+
* @typedef {Object} SidechatDirectMessage
|
|
176
|
+
* @prop {String} created_at - time at which the message was sent
|
|
177
|
+
* @prop {String} client_id - alphanumeric ID of the device the message was sent on
|
|
178
|
+
* @prop {String} obfuscatedUserId - obfuscated version of the sender's alphanumeric ID
|
|
179
|
+
* @prop {String} text - body text of the message
|
|
180
|
+
* @prop {String} id - alphanumeric ID of the message
|
|
181
|
+
* @prop {String} chat_id - alphanumeric ID of the thread in which the message resides
|
|
182
|
+
* @prop {Boolean} authored_by_user - whether or not the current user sent the message
|
|
183
|
+
* @prop {"message"} type - undocumented
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Represents a poll with choices
|
|
188
|
+
* @typedef {Object} SidechatPoll
|
|
189
|
+
* @prop {String} id - alphanumeric ID of poll
|
|
190
|
+
* @prop {String} post_id - alphanumeric ID of post to which poll is attached
|
|
191
|
+
* @prop {SidechatPollChoice[]} choices - array of poll choices
|
|
192
|
+
* @prop {Boolean} allows_view_results - whether or not poll results are publicly visible
|
|
193
|
+
* @prop {Number} view_results_count - number of users who have viewed poll results
|
|
194
|
+
* @prop {Boolean} participated - whether or not current user has voted in poll
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Represents a poll choice
|
|
199
|
+
* @typedef {Object} SidechatPollChoice
|
|
200
|
+
* @prop {Number} count - number of votes for choice
|
|
201
|
+
* @prop {String} text - user-visible text of choice
|
|
202
|
+
* @prop {Boolean} selected - whether or not current user has voted for choice
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* A link attachment on a post
|
|
207
|
+
* @typedef {Object} SidechatAttachment
|
|
208
|
+
* @prop {String} id - alphanumeric ID of attachment
|
|
209
|
+
* @prop {"link"|"youtube"} type - whether the link is a regular link or a YouTube video
|
|
210
|
+
* @prop {String} link_url - URL the attachment points to
|
|
211
|
+
* @prop {String} [display_url] - shortened URL for display
|
|
212
|
+
* @prop {String} [title] - title of the linked page
|
|
213
|
+
* @prop {{id: String, url: String, width: Number, height: Number, content_type: "png"|"gif"}} [asset] - preview image of the linked page
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* A page of the home feed
|
|
218
|
+
* @typedef {Object} SidechatFeed
|
|
219
|
+
* @prop {SidechatFeedItem[]} feed_items - items in the feed
|
|
220
|
+
* @prop {SidechatCursorString} cursor
|
|
221
|
+
*/
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* A single item in the home feed
|
|
225
|
+
* @typedef {Object} SidechatFeedItem
|
|
226
|
+
* @prop {String} item_type - type of item (posts have a type of "post")
|
|
227
|
+
* @prop {SidechatPostOrComment} [post] - the post, if this item is a post
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* A page of the user's activity
|
|
232
|
+
* @typedef {Object} SidechatActivityList
|
|
233
|
+
* @prop {SidechatActivityItem[]} items - activity items
|
|
234
|
+
* @prop {SidechatCursorString} cursor
|
|
235
|
+
*/
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* A single activity item (in-app notification)
|
|
239
|
+
* @typedef {Object} SidechatActivityItem
|
|
240
|
+
* @prop {String} id - alphanumeric ID of activity item
|
|
241
|
+
* @prop {String} type - kind of activity (e.g. "comment", "comment_reply", "votes", "new_follower", "quote", "trending_post")
|
|
242
|
+
* @prop {String} text - user-facing description of the activity
|
|
243
|
+
* @prop {String} timestamp - date string of when the activity happened
|
|
244
|
+
* @prop {Boolean} is_seen - whether or not the user has seen the activity
|
|
245
|
+
* @prop {String} [post_id] - alphanumeric ID of related post
|
|
246
|
+
* @prop {String} [comment_id] - alphanumeric ID of related comment
|
|
247
|
+
* @prop {String} [group_id] - alphanumeric ID of related group
|
|
248
|
+
* @prop {Number} [yakarma] - yakarma gained
|
|
249
|
+
* @prop {String} [username] - username of the other user involved, if any
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* A group leaderboard and the current user's place in it
|
|
254
|
+
* @typedef {Object} SidechatLeaderboard
|
|
255
|
+
* @prop {Array<{value: Number}>} leaderboard - all-time leaderboard entries
|
|
256
|
+
* @prop {Array<{value: Number}>} season_leaderboard - leaderboard entries for the current season
|
|
257
|
+
* @prop {{year: Number, season: String, remaining_days: Number}} season - the current season
|
|
258
|
+
* @prop {SidechatKarma} karma - current user's all-time karma in the group
|
|
259
|
+
* @prop {SidechatKarma} season_karma - current user's karma this season
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* A user's karma within a group
|
|
264
|
+
* @typedef {Object} SidechatKarma
|
|
265
|
+
* @prop {String} group_id - alphanumeric ID of group
|
|
266
|
+
* @prop {Number} post - karma from posts
|
|
267
|
+
* @prop {Number} comment - karma from comments
|
|
268
|
+
* @prop {Number} yakarma - total karma
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Which push notifications a user receives
|
|
273
|
+
* @typedef {Object} SidechatNotificationPreferences
|
|
274
|
+
* @prop {Boolean} [chats] - direct messages
|
|
275
|
+
* @prop {Boolean} [followed_posts_activity] - new comments on followed posts
|
|
276
|
+
* @prop {Boolean} [new_followers] - new followers
|
|
277
|
+
* @prop {Boolean} [post_activity] - comments and votes on the user's own posts
|
|
278
|
+
* @prop {Boolean} [trending] - trending posts
|
|
279
|
+
* @prop {Boolean} [community_activity] - undocumented
|
|
280
|
+
* @prop {Boolean} [leaderboards] - leaderboard updates
|
|
281
|
+
* @prop {Boolean} [rewards] - undocumented
|
|
282
|
+
* @prop {Boolean} [feature_updates] - announcements about new features
|
|
283
|
+
* @prop {Boolean} [yak_ball_updates] - undocumented
|
|
284
|
+
* @prop {Boolean} [game_reminders] - undocumented
|
|
285
|
+
* @prop {Boolean} [daily_game_reminders] - undocumented
|
|
286
|
+
* @prop {Boolean} [game_invitations] - undocumented
|
|
287
|
+
* @prop {Boolean} [game_match_updates] - undocumented
|
|
288
|
+
*/
|
|
289
|
+
/**
|
|
290
|
+
* A reason for reporting a post, comment, or direct message thread
|
|
291
|
+
* @typedef {"username"|"spam"|"offTopic"|"pii"|"selfHarmDangerousActs"|"illegalActivities"|"offensiveHateSpeech"|"harassmentBullying"|"minorSafety"|"sexualContent"|"violentGraphicContent"|"misinformation"|"other"} SidechatReportReason
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
export default {};
|