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.
Files changed (51) 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 +853 -311
  4. package/dist/index.mjs +853 -311
  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.7.0/SidechatAPIClient.html +3 -0
  8. package/docs/sidechat.js/2.7.0/SidechatAPIError.html +3 -0
  9. package/docs/sidechat.js/2.7.0/SidechatColorList.html +3 -0
  10. package/docs/sidechat.js/2.7.0/classes_SidechatAPIClient.js.html +1897 -0
  11. package/docs/sidechat.js/2.7.0/classes_SidechatAPIError.js.html +16 -0
  12. package/docs/sidechat.js/2.7.0/classes_SidechatColorList.js.html +79 -0
  13. package/docs/sidechat.js/2.7.0/data/search.json +1 -0
  14. package/docs/sidechat.js/2.7.0/fonts/Inconsolata-Regular.ttf +0 -0
  15. package/docs/sidechat.js/2.7.0/fonts/OpenSans-Regular.ttf +0 -0
  16. package/docs/sidechat.js/2.7.0/fonts/WorkSans-Bold.ttf +0 -0
  17. package/docs/sidechat.js/2.7.0/global.html +3 -0
  18. package/docs/sidechat.js/2.7.0/index.html +4 -0
  19. package/docs/sidechat.js/2.7.0/scripts/core.js +726 -0
  20. package/docs/sidechat.js/2.7.0/scripts/core.min.js +23 -0
  21. package/docs/sidechat.js/2.7.0/scripts/resize.js +90 -0
  22. package/docs/sidechat.js/2.7.0/scripts/search.js +265 -0
  23. package/docs/sidechat.js/2.7.0/scripts/search.min.js +6 -0
  24. package/docs/sidechat.js/2.7.0/scripts/third-party/Apache-License-2.0.txt +202 -0
  25. package/docs/sidechat.js/2.7.0/scripts/third-party/fuse.js +9 -0
  26. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-line-num-original.js +369 -0
  27. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-line-num.js +1 -0
  28. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs-original.js +5171 -0
  29. package/docs/sidechat.js/2.7.0/scripts/third-party/hljs.js +1 -0
  30. package/docs/sidechat.js/2.7.0/scripts/third-party/popper.js +5 -0
  31. package/docs/sidechat.js/2.7.0/scripts/third-party/tippy.js +1 -0
  32. package/docs/sidechat.js/2.7.0/scripts/third-party/tocbot.js +672 -0
  33. package/docs/sidechat.js/2.7.0/scripts/third-party/tocbot.min.js +1 -0
  34. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-base.css +1159 -0
  35. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-dark.css +412 -0
  36. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-light.css +482 -0
  37. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-scrollbar.css +30 -0
  38. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme-without-scrollbar.min.css +1 -0
  39. package/docs/sidechat.js/2.7.0/styles/clean-jsdoc-theme.min.css +1 -0
  40. package/docs/sidechat.js/2.7.0/tutorial-Authentication.html +16 -0
  41. package/docs/sidechat.js/2.7.0/tutorial-Email Registration.html +6 -0
  42. package/docs/sidechat.js/2.7.0/tutorial-Feeds and Pagination.html +10 -0
  43. package/docs/sidechat.js/2.7.0/tutorial-Posting and Media.html +19 -0
  44. package/docs/sidechat.js/2.7.0/types_SidechatTypes.js.html +297 -0
  45. package/docs/tutorials/Authentication.md +63 -52
  46. package/docs/tutorials/Email Registration.md +19 -16
  47. package/docs/tutorials/Feeds and Pagination.md +45 -0
  48. package/docs/tutorials/Posting and Media.md +63 -0
  49. package/package.json +55 -55
  50. package/src/classes/SidechatAPIClient.js +477 -27
  51. package/src/types/SidechatTypes.js +294 -202
@@ -49,9 +49,9 @@ export type SidechatPostOrComment = {
49
49
  */
50
50
  assets: SidechatSimpleAsset[];
51
51
  /**
52
- * - undocumented
52
+ * - link attachments on the post
53
53
  */
54
- attachments: any[];
54
+ attachments: SidechatAttachment[];
55
55
  /**
56
56
  * - whether or not you can send a DM to creator of post
57
57
  */
@@ -75,11 +75,22 @@ export type SidechatPostOrComment = {
75
75
  /**
76
76
  * - whether or not the current user should recieve activity notifications for the post
77
77
  */
78
- follow_status: "following" | "not_following";
78
+ follow_status: "following" | "following_commented" | "not_following";
79
79
  /**
80
- * - undocumented
80
+ * - whether the post was made in a group or on the author's profile
81
81
  */
82
- destination?: "group";
82
+ destination?: "group" | "account";
83
+ /**
84
+ * - whether or not the post or comment has been deleted
85
+ */
86
+ is_deleted?: boolean;
87
+ /**
88
+ * - the post being quoted, if this is a repost
89
+ */
90
+ quote_post?: {
91
+ post: SidechatPostOrComment;
92
+ is_unavailable: boolean;
93
+ };
83
94
  /**
84
95
  * - number of comments on post (only if type=post)
85
96
  */
@@ -171,13 +182,13 @@ export type SidechatSimpleAsset = {
171
182
  */
172
183
  id: string;
173
184
  /**
174
- * - undocumented
185
+ * - whether the asset is an image or a video
175
186
  */
176
- type: "image";
187
+ type: "image" | "video";
177
188
  /**
178
189
  * - file type of asset
179
190
  */
180
- content_type: "jpeg" | "png" | "gif";
191
+ content_type: "jpeg" | "png" | "gif" | "webp" | "mp4" | "mov";
181
192
  /**
182
193
  * - width of asset
183
194
  */
@@ -187,9 +198,17 @@ export type SidechatSimpleAsset = {
187
198
  */
188
199
  height: number;
189
200
  /**
190
- * - URL string of asset's location
201
+ * - URL string of asset's location (an HLS .m3u8 stream for processed videos)
191
202
  */
192
203
  url?: SidechatPrivateAssetURL;
204
+ /**
205
+ * - preview image (only if type=video)
206
+ */
207
+ thumbnail_asset?: SidechatSimpleAsset;
208
+ /**
209
+ * - processing status (only if type=video)
210
+ */
211
+ vod_status?: "not_started" | "ingest" | "complete" | "error";
193
212
  };
194
213
  /**
195
214
  * An asset object, containing information about an image from the asset library
@@ -502,4 +521,236 @@ export type SidechatPollChoice = {
502
521
  */
503
522
  selected: boolean;
504
523
  };
524
+ /**
525
+ * A link attachment on a post
526
+ */
527
+ export type SidechatAttachment = {
528
+ /**
529
+ * - alphanumeric ID of attachment
530
+ */
531
+ id: string;
532
+ /**
533
+ * - whether the link is a regular link or a YouTube video
534
+ */
535
+ type: "link" | "youtube";
536
+ /**
537
+ * - URL the attachment points to
538
+ */
539
+ link_url: string;
540
+ /**
541
+ * - shortened URL for display
542
+ */
543
+ display_url?: string;
544
+ /**
545
+ * - title of the linked page
546
+ */
547
+ title?: string;
548
+ /**
549
+ * - preview image of the linked page
550
+ */
551
+ asset?: {
552
+ id: string;
553
+ url: string;
554
+ width: number;
555
+ height: number;
556
+ content_type: "png" | "gif";
557
+ };
558
+ };
559
+ /**
560
+ * A page of the home feed
561
+ */
562
+ export type SidechatFeed = {
563
+ /**
564
+ * - items in the feed
565
+ */
566
+ feed_items: SidechatFeedItem[];
567
+ cursor: SidechatCursorString;
568
+ };
569
+ /**
570
+ * A single item in the home feed
571
+ */
572
+ export type SidechatFeedItem = {
573
+ /**
574
+ * - type of item (posts have a type of "post")
575
+ */
576
+ item_type: string;
577
+ /**
578
+ * - the post, if this item is a post
579
+ */
580
+ post?: SidechatPostOrComment;
581
+ };
582
+ /**
583
+ * A page of the user's activity
584
+ */
585
+ export type SidechatActivityList = {
586
+ /**
587
+ * - activity items
588
+ */
589
+ items: SidechatActivityItem[];
590
+ cursor: SidechatCursorString;
591
+ };
592
+ /**
593
+ * A single activity item (in-app notification)
594
+ */
595
+ export type SidechatActivityItem = {
596
+ /**
597
+ * - alphanumeric ID of activity item
598
+ */
599
+ id: string;
600
+ /**
601
+ * - kind of activity (e.g. "comment", "comment_reply", "votes", "new_follower", "quote", "trending_post")
602
+ */
603
+ type: string;
604
+ /**
605
+ * - user-facing description of the activity
606
+ */
607
+ text: string;
608
+ /**
609
+ * - date string of when the activity happened
610
+ */
611
+ timestamp: string;
612
+ /**
613
+ * - whether or not the user has seen the activity
614
+ */
615
+ is_seen: boolean;
616
+ /**
617
+ * - alphanumeric ID of related post
618
+ */
619
+ post_id?: string;
620
+ /**
621
+ * - alphanumeric ID of related comment
622
+ */
623
+ comment_id?: string;
624
+ /**
625
+ * - alphanumeric ID of related group
626
+ */
627
+ group_id?: string;
628
+ /**
629
+ * - yakarma gained
630
+ */
631
+ yakarma?: number;
632
+ /**
633
+ * - username of the other user involved, if any
634
+ */
635
+ username?: string;
636
+ };
637
+ /**
638
+ * A group leaderboard and the current user's place in it
639
+ */
640
+ export type SidechatLeaderboard = {
641
+ /**
642
+ * - all-time leaderboard entries
643
+ */
644
+ leaderboard: Array<{
645
+ value: number;
646
+ }>;
647
+ /**
648
+ * - leaderboard entries for the current season
649
+ */
650
+ season_leaderboard: Array<{
651
+ value: number;
652
+ }>;
653
+ /**
654
+ * - the current season
655
+ */
656
+ season: {
657
+ year: number;
658
+ season: string;
659
+ remaining_days: number;
660
+ };
661
+ /**
662
+ * - current user's all-time karma in the group
663
+ */
664
+ karma: SidechatKarma;
665
+ /**
666
+ * - current user's karma this season
667
+ */
668
+ season_karma: SidechatKarma;
669
+ };
670
+ /**
671
+ * A user's karma within a group
672
+ */
673
+ export type SidechatKarma = {
674
+ /**
675
+ * - alphanumeric ID of group
676
+ */
677
+ group_id: string;
678
+ /**
679
+ * - karma from posts
680
+ */
681
+ post: number;
682
+ /**
683
+ * - karma from comments
684
+ */
685
+ comment: number;
686
+ /**
687
+ * - total karma
688
+ */
689
+ yakarma: number;
690
+ };
691
+ /**
692
+ * Which push notifications a user receives
693
+ */
694
+ export type SidechatNotificationPreferences = {
695
+ /**
696
+ * - direct messages
697
+ */
698
+ chats?: boolean;
699
+ /**
700
+ * - new comments on followed posts
701
+ */
702
+ followed_posts_activity?: boolean;
703
+ /**
704
+ * - new followers
705
+ */
706
+ new_followers?: boolean;
707
+ /**
708
+ * - comments and votes on the user's own posts
709
+ */
710
+ post_activity?: boolean;
711
+ /**
712
+ * - trending posts
713
+ */
714
+ trending?: boolean;
715
+ /**
716
+ * - undocumented
717
+ */
718
+ community_activity?: boolean;
719
+ /**
720
+ * - leaderboard updates
721
+ */
722
+ leaderboards?: boolean;
723
+ /**
724
+ * - undocumented
725
+ */
726
+ rewards?: boolean;
727
+ /**
728
+ * - announcements about new features
729
+ */
730
+ feature_updates?: boolean;
731
+ /**
732
+ * - undocumented
733
+ */
734
+ yak_ball_updates?: boolean;
735
+ /**
736
+ * - undocumented
737
+ */
738
+ game_reminders?: boolean;
739
+ /**
740
+ * - undocumented
741
+ */
742
+ daily_game_reminders?: boolean;
743
+ /**
744
+ * - undocumented
745
+ */
746
+ game_invitations?: boolean;
747
+ /**
748
+ * - undocumented
749
+ */
750
+ game_match_updates?: boolean;
751
+ };
752
+ /**
753
+ * A reason for reporting a post, comment, or direct message thread
754
+ */
755
+ export type SidechatReportReason = "username" | "spam" | "offTopic" | "pii" | "selfHarmDangerousActs" | "illegalActivities" | "offensiveHateSpeech" | "harassmentBullying" | "minorSafety" | "sexualContent" | "violentGraphicContent" | "misinformation" | "other";
505
756
  //# sourceMappingURL=SidechatTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidechatTypes.d.ts","sourceRoot":"","sources":["../../src/types/SidechatTypes.js"],"names":[],"mappings":";;;;;;;;;UAGU,MAAM,GAAC,SAAS;;;;;;;;;;;;;;;;;;;;WAKhB,aAAa;;;;;;;;;;;;;;;;iBAIb,kBAAkB;;;;YAClB,mBAAmB,EAAE;;;;;;;;;;;;UAGrB,QAAQ;;;;cACR,gBAAgB;;;;;;;;;;;;mBAGhB,WAAW,GAAC,eAAe;;;;kBAC3B,OAAO;;;;;;;;;;;;WAGP,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAYZ,YAAY,GAAC,QAAQ;;;;;;;;qBAErB,MAAM,GAAC,QAAQ,GAAC,cAAc;;;;sBAC9B,SAAS,GAAC,eAAe,GAAC,mBAAmB;;;;8BAC7C,MAAM,GAAC,MAAM;;;;;;;;;;;;eAGb,uBAAuB;;;;;;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