sidechat.js 2.6.5 → 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.
Files changed (87) hide show
  1. package/dist/classes/SidechatAPIClient.d.ts +166 -11
  2. package/dist/classes/SidechatAPIClient.d.ts.map +1 -1
  3. package/dist/index.cjs +925 -365
  4. package/dist/index.mjs +925 -365
  5. package/dist/types/SidechatTypes.d.ts +260 -9
  6. package/dist/types/SidechatTypes.d.ts.map +1 -1
  7. package/docs/sidechat.js/2.6.6/SidechatAPIClient.html +3 -0
  8. package/docs/sidechat.js/2.6.6/SidechatAPIError.html +3 -0
  9. package/docs/sidechat.js/2.6.6/SidechatColorList.html +3 -0
  10. package/docs/sidechat.js/2.6.6/classes_SidechatAPIClient.js.html +1447 -0
  11. package/docs/sidechat.js/2.6.6/classes_SidechatAPIError.js.html +16 -0
  12. package/docs/sidechat.js/2.6.6/classes_SidechatColorList.js.html +79 -0
  13. package/docs/sidechat.js/2.6.6/data/search.json +1 -0
  14. package/docs/sidechat.js/2.6.6/fonts/Inconsolata-Regular.ttf +0 -0
  15. package/docs/sidechat.js/2.6.6/fonts/OpenSans-Regular.ttf +0 -0
  16. package/docs/sidechat.js/2.6.6/fonts/WorkSans-Bold.ttf +0 -0
  17. package/docs/sidechat.js/2.6.6/global.html +3 -0
  18. package/docs/sidechat.js/2.6.6/index.html +4 -0
  19. package/docs/sidechat.js/2.6.6/scripts/core.js +726 -0
  20. package/docs/sidechat.js/2.6.6/scripts/core.min.js +23 -0
  21. package/docs/sidechat.js/2.6.6/scripts/resize.js +90 -0
  22. package/docs/sidechat.js/2.6.6/scripts/search.js +265 -0
  23. package/docs/sidechat.js/2.6.6/scripts/search.min.js +6 -0
  24. package/docs/sidechat.js/2.6.6/scripts/third-party/Apache-License-2.0.txt +202 -0
  25. package/docs/sidechat.js/2.6.6/scripts/third-party/fuse.js +9 -0
  26. package/docs/sidechat.js/2.6.6/scripts/third-party/hljs-line-num-original.js +369 -0
  27. package/docs/sidechat.js/2.6.6/scripts/third-party/hljs-line-num.js +1 -0
  28. package/docs/sidechat.js/2.6.6/scripts/third-party/hljs-original.js +5171 -0
  29. package/docs/sidechat.js/2.6.6/scripts/third-party/hljs.js +1 -0
  30. package/docs/sidechat.js/2.6.6/scripts/third-party/popper.js +5 -0
  31. package/docs/sidechat.js/2.6.6/scripts/third-party/tippy.js +1 -0
  32. package/docs/sidechat.js/2.6.6/scripts/third-party/tocbot.js +672 -0
  33. package/docs/sidechat.js/2.6.6/scripts/third-party/tocbot.min.js +1 -0
  34. package/docs/sidechat.js/2.6.6/styles/clean-jsdoc-theme-base.css +1159 -0
  35. package/docs/sidechat.js/2.6.6/styles/clean-jsdoc-theme-dark.css +412 -0
  36. package/docs/sidechat.js/2.6.6/styles/clean-jsdoc-theme-light.css +482 -0
  37. package/docs/sidechat.js/2.6.6/styles/clean-jsdoc-theme-scrollbar.css +30 -0
  38. package/docs/sidechat.js/2.6.6/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
  39. package/docs/sidechat.js/2.6.6/styles/clean-jsdoc-theme.min.css +1 -0
  40. package/docs/sidechat.js/2.6.6/tutorial-Authentication.html +14 -0
  41. package/docs/sidechat.js/2.6.6/tutorial-Email Registration.html +6 -0
  42. package/docs/sidechat.js/2.6.6/types_SidechatTypes.js.html +204 -0
  43. package/docs/sidechat.js/2.7.0/SidechatAPIClient.html +3 -0
  44. package/docs/sidechat.js/2.7.0/SidechatAPIError.html +3 -0
  45. package/docs/sidechat.js/2.7.0/SidechatColorList.html +3 -0
  46. package/docs/sidechat.js/2.7.0/classes_SidechatAPIClient.js.html +1897 -0
  47. package/docs/sidechat.js/2.7.0/classes_SidechatAPIError.js.html +16 -0
  48. package/docs/sidechat.js/2.7.0/classes_SidechatColorList.js.html +79 -0
  49. package/docs/sidechat.js/2.7.0/data/search.json +1 -0
  50. package/docs/sidechat.js/2.7.0/fonts/Inconsolata-Regular.ttf +0 -0
  51. package/docs/sidechat.js/2.7.0/fonts/OpenSans-Regular.ttf +0 -0
  52. package/docs/sidechat.js/2.7.0/fonts/WorkSans-Bold.ttf +0 -0
  53. package/docs/sidechat.js/2.7.0/global.html +3 -0
  54. package/docs/sidechat.js/2.7.0/index.html +4 -0
  55. package/docs/sidechat.js/2.7.0/scripts/core.js +726 -0
  56. package/docs/sidechat.js/2.7.0/scripts/core.min.js +23 -0
  57. package/docs/sidechat.js/2.7.0/scripts/resize.js +90 -0
  58. package/docs/sidechat.js/2.7.0/scripts/search.js +265 -0
  59. package/docs/sidechat.js/2.7.0/scripts/search.min.js +6 -0
  60. package/docs/sidechat.js/2.7.0/scripts/third-party/Apache-License-2.0.txt +202 -0
  61. package/docs/sidechat.js/2.7.0/scripts/third-party/fuse.js +9 -0
  62. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-line-num-original.js +369 -0
  63. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-line-num.js +1 -0
  64. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-original.js +5171 -0
  65. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs.js +1 -0
  66. package/docs/sidechat.js/2.7.0/scripts/third-party/popper.js +5 -0
  67. package/docs/sidechat.js/2.7.0/scripts/third-party/tippy.js +1 -0
  68. package/docs/sidechat.js/2.7.0/scripts/third-party/tocbot.js +672 -0
  69. package/docs/sidechat.js/2.7.0/scripts/third-party/tocbot.min.js +1 -0
  70. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-base.css +1159 -0
  71. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-dark.css +412 -0
  72. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-light.css +482 -0
  73. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-scrollbar.css +30 -0
  74. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
  75. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme.min.css +1 -0
  76. package/docs/sidechat.js/2.7.0/tutorial-Authentication.html +16 -0
  77. package/docs/sidechat.js/2.7.0/tutorial-Email Registration.html +6 -0
  78. package/docs/sidechat.js/2.7.0/tutorial-Feeds and Pagination.html +10 -0
  79. package/docs/sidechat.js/2.7.0/tutorial-Posting and Media.html +19 -0
  80. package/docs/sidechat.js/2.7.0/types_SidechatTypes.js.html +297 -0
  81. package/docs/tutorials/Authentication.md +63 -52
  82. package/docs/tutorials/Email Registration.md +19 -16
  83. package/docs/tutorials/Feeds and Pagination.md +45 -0
  84. package/docs/tutorials/Posting and Media.md +63 -0
  85. package/package.json +55 -55
  86. package/src/classes/SidechatAPIClient.js +549 -81
  87. 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 {Array} attachments - undocumented
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] - undocumented
23
- * @prop {Number} [comment_count] - number of comments on post (only if type=post)
24
- * @prop {Boolean} [comments_disabled] - whether or not you can comment on post (only if type=post)
25
- * @prop {SidechatPoll} [poll] - poll attached to post (only if the post has a poll)
26
- * @prop {String} [parent_post_id] - alphanumeric ID of parent post (only if type=comment)
27
- * @prop {String} [reply_post_id] - alphanumeric ID of comment being replied to, falls back to parent_post_id (only if type=comment)
28
- * @prop {String} [context] - text content of comment being replied to, falls back to text (only if type=comment)
29
- */
30
-
31
- /**
32
- * 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.
33
- * @typedef {Object} SidechatGroup
34
- * @prop {String} id - alphanumeric ID of group
35
- * @prop {String} name - human-readable name of group
36
- * @prop {String} analytics_name - name to file group under
37
- * @prop {"non_member"|"member"} membership_type - whether or not current user is a member of group
38
- * @prop {String} color - group's theme color as hex code (e.g., #FFFFFF)
39
- * @prop {"open"|"closed"|"email_domain"} group_join_type - basis on which group accepts new members
40
- * @prop {"private"|"public_to_all"|"public_to_schools"} group_visibility - group's visibility setting
41
- * @prop {"show"|"hide"} asset_library_visibility - whether or not group's asset library is visible
42
- * @prop {Array} [roles] - undocumented
43
- * @prop {String} [description] - description of group
44
- * @prop {SidechatPrivateAssetURL} [icon_url] - image URL for group icon
45
- * @prop {Number} [member_count] - number of users in group
46
- * @prop {Boolean} [should_show_leaderboard] - undocumented
47
- */
48
-
49
- /**
50
- * An asset object, containing information about an image within a post or comment
51
- * @typedef {Object} SidechatSimpleAsset
52
- * @prop {String} id - alphanumeric ID of asset
53
- * @prop {"image"} type - undocumented
54
- * @prop {"jpeg"|"png"|"gif"} content_type - file type of asset
55
- * @prop {Number} width - width of asset
56
- * @prop {Number} height - height of asset
57
- * @prop {SidechatPrivateAssetURL} [url] - URL string of asset's location
58
- */
59
-
60
- /**
61
- * An asset object, containing information about an image from the asset library
62
- * @typedef {Object} SidechatLibraryAsset
63
- * @prop {String} id - alphanumeric ID of asset
64
- * @prop {String} created_at - date string of asset creation time
65
- * @prop {SidechatAssetMetadata} metadata - metadata associated with asset
66
- * @prop {SidechatPrivateAssetURL} url - URL string of asset's location
67
- */
68
-
69
- /**
70
- * An asset object, containing information about an image from the asset library
71
- * @typedef {Object} SidechatAssetMetadata
72
- * @prop {Number} width - width of asset
73
- * @prop {Number} height - height of asset
74
- * @prop {"image"} type - undocumented
75
- * @prop {"jpeg"|"png"|"gif"} content_type - file type of asset
76
- */
77
-
78
- /**
79
- * A user's anonymous identity information
80
- * @typedef {Object} SidechatIdentity
81
- * @prop {String} name - representation of user's name (varies across app)
82
- * @prop {Boolean} posted_with_username - undocumented
83
- */
84
-
85
- /**
86
- * A conversation icon associated with a user
87
- * @typedef {Object} SidechatIcon
88
- * @prop {String} emoji - unicode emoji character
89
- * @prop {String} color - primary hex color code
90
- * @prop {String} secondary_color - secondary hex color code
91
- */
92
-
93
- /**
94
- * The current user's information
95
- * @typedef {Object} SidechatCurrentUser
96
- * @prop {String} id - alphanumeric ID of current user
97
- * @prop {String} hashedVerifiedEmail - verified email of current user in an unreadable hashed form
98
- * @prop {Boolean} isGlobalModerator - whether or not user is a moderator
99
- * @prop {Boolean} isGlobalAdmin - whether or not user is an admin
100
- * @prop {SidechatMembership[]} memberships
101
- * @prop {Array} roles - undocumented
102
- * @prop {String} emailDomain - domain of verified email address on account
103
- * @prop {String} wildcardEmailDomain - domain of verified email address on account, preceeded by *. to support subdomains
104
- */
105
-
106
- /**
107
- * A user's public profile
108
- * @typedef {Object} SidechatProfile
109
- * @prop {String} id - alphanumeric ID of user
110
- * @prop {String} name - public-facing username
111
- * @prop {SidechatIcon} conversation_icon - icon associated with user
112
- * @prop {Boolean} description - the user bio
113
- * @prop {String} index_name - undocumented
114
- * @prop {String} analytics_name - undocumented
115
- * @prop {String} color - undocumented
116
- * @prop {String} share_color_start - undocumented
117
- * @prop {String} share_color_end - undocumented
118
- * @prop {"account"} group_join_type - undocumented
119
- * @prop {"public_to_all"} group_visibility - the profile visibility status
120
- */
121
-
122
- /**
123
- * Representation of a group membership
124
- * @typedef {Object} SidechatMembership
125
- * @prop {String} groupId - alphanumeric ID of group
126
- * @prop {String} type - role of current user in group
127
- */
128
-
129
- /**
130
- * An asset URL that can only be accessed by making a request with a user's bearer token attached in the Authorization header
131
- * @typedef {String} SidechatPrivateAssetURL
132
- */
133
-
134
- /**
135
- * A cursor for paginating through post lists
136
- * @typedef {String} SidechatCursorString
137
- */
138
-
139
- /**
140
- * A vote on a comment or post
141
- * @typedef {"upvote"|"downvote"|"none"} SidechatVoteString
142
- */
143
-
144
- /**
145
- * A user's bearer authentication token needed for most requests
146
- * @typedef {String} SidechatAuthToken
147
- */
148
-
149
- /**
150
- * A list of posts and the associated cursor
151
- * @typedef {Object} SidechatPostsAndCursor
152
- * @prop {SidechatPostOrComment[]} posts
153
- * @prop {SidechatCursorString} cursor
154
- */
155
-
156
-
157
- /**
158
- * A direct message thread
159
- * @typedef {Object} SidechatDirectThread
160
- * @prop {String} id - alphanumeric ID of thread
161
- * @prop {String} group_id - alphanumeric ID of group in which the thread exists
162
- * @prop {String} updated_at - date string of when the last message in the chat was sent
163
- * @prop {String} post_id - post or comment from which the thread was originally sent
164
- * @prop {String} post_context - the context of the DM thread (only "feed" is known at the moment)
165
- * @prop {"accepted"} accept_status - whether or not the other user has accepted this DM
166
- * @prop {"post"|"comment"} type - the type of the content from which the DM was originally sent
167
- * @prop {SidechatDirectMessage[]} messages - array of direct message objects
168
- */
169
-
170
- /**
171
- * A single direct message
172
- * @typedef {Object} SidechatDirectMessage
173
- * @prop {String} created_at - time at which the message was sent
174
- * @prop {String} client_id - alphanumeric ID of the device the message was sent on
175
- * @prop {String} obfuscatedUserId - obfuscated version of the sender's alphanumeric ID
176
- * @prop {String} text - body text of the message
177
- * @prop {String} id - alphanumeric ID of the message
178
- * @prop {String} chat_id - alphanumeric ID of the thread in which the message resides
179
- * @prop {Boolean} authored_by_user - whether or not the current user sent the message
180
- * @prop {"message"} type - undocumented
181
- */
182
-
183
- /**
184
- * Represents a poll with choices
185
- * @typedef {Object} SidechatPoll
186
- * @prop {String} id - alphanumeric ID of poll
187
- * @prop {String} post_id - alphanumeric ID of post to which poll is attached
188
- * @prop {SidechatPollChoice[]} choices - array of poll choices
189
- * @prop {Boolean} allows_view_results - whether or not poll results are publicly visible
190
- * @prop {Number} view_results_count - number of users who have viewed poll results
191
- * @prop {Boolean} participated - whether or not current user has voted in poll
192
- */
193
-
194
- /**
195
- * Represents a poll choice
196
- * @typedef {Object} SidechatPollChoice
197
- * @prop {Number} count - number of votes for choice
198
- * @prop {String} text - user-visible text of choice
199
- * @prop {Boolean} selected - whether or not current user has voted for choice
200
- */
201
-
202
- export default {};
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 {};