smule.js 1.3.2 → 1.4.1

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/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AxiosResponse } from 'axios';
2
+ import { Element } from '@xmpp/xml';
2
3
  import EventEmitter from 'events';
3
4
  import { JID } from '@xmpp/jid';
4
5
 
@@ -1490,6 +1491,15 @@ type GiftsResult = {
1490
1491
  }>;
1491
1492
  giftCount: number;
1492
1493
  };
1494
+ type GiftRecentTransactionsResult = {
1495
+ transactions: Array<{
1496
+ giverAccountIcon: AccountIcon;
1497
+ giftIcon: GiftIcon;
1498
+ time: Date;
1499
+ }>;
1500
+ cursor: Cursor;
1501
+ giftCnt: number;
1502
+ };
1493
1503
  type InviteMeResult = {
1494
1504
  invites: SocialInvite[];
1495
1505
  cursor: Cursor;
@@ -1808,6 +1818,16 @@ type SongbookResult = {
1808
1818
  cat1Cursor: Cursor;
1809
1819
  disinterestedSongs: Array<Song>;
1810
1820
  };
1821
+ type SparkChatListResult = {
1822
+ inbox: Array<{
1823
+ name: string;
1824
+ type: "ACCT" | "GRP";
1825
+ }>;
1826
+ other: Array<{
1827
+ name: string;
1828
+ type: "ACCT" | "GRP";
1829
+ }>;
1830
+ };
1811
1831
  type StoreSubscriptionStatusResult = {
1812
1832
  isActive: boolean;
1813
1833
  status: string;
@@ -1902,9 +1922,7 @@ declare class SmuleLiveChat {
1902
1922
  state: SmuleChatState;
1903
1923
  private client;
1904
1924
  private jid;
1905
- private ongoingIq;
1906
- private iqHasMore;
1907
- private lastIqId;
1925
+ private iqs;
1908
1926
  private roomJID;
1909
1927
  private roomUsers;
1910
1928
  private chat;
@@ -1922,38 +1940,13 @@ declare class SmuleLiveChat {
1922
1940
  * it might throw an error (socket write after end).
1923
1941
  */
1924
1942
  disconnect(): Promise<void>;
1943
+ sendIq(data: Element, callback: any, iqType?: string): void;
1944
+ sendIqQuery(xmlns: string, callback: any, iqType?: string): void;
1925
1945
  /**
1926
- * Send a chat state to the server. This is used to
1927
- * signal whether you are currently active or not.
1928
- *
1929
- * active -> You're active
1930
- *
1931
- * composing -> Typing
1932
- *
1933
- * paused -> Just stopped typing
1934
- *
1935
- * inactive -> You're inactive
1936
- *
1937
- * gone -> You're hidden / disconnected / You've left the chat
1938
- *
1939
- * @param state One of `active`, `composing`, `paused`, `inactive`, or `gone`.
1940
- * Default is `active`
1941
- */
1942
- sendChatState(to: JID | string | AccountIcon, state?: SmulePartnerStatus): Promise<void>;
1943
- /**
1944
- * Loads the entire message history
1945
- * @param limit The maximum number of messages to fetch. Default is 50.
1946
- * @remarks This currently recurses until it loads ALL archived messages.
1947
- * This means that it will take a long time to load all messages.
1948
- * @remarks Filtering by a specific JID may not work yet
1949
- */
1950
- loadMessageHistory(limit?: number, before?: any, after?: any, jid?: JID | string): Promise<void>;
1951
- /**
1952
- * Send a text message
1953
- * @param jid The JID to send the message to
1946
+ * Send a text message to the livestream
1954
1947
  * @param message The message body
1955
1948
  */
1956
- sendTextMessage(jid: JID | string | AccountIcon, message: string): Promise<void>;
1949
+ sendTextMessage(message: string): Promise<void>;
1957
1950
  /**
1958
1951
  * Read-only jid to prevent any bugs
1959
1952
  * @returns user's JID
@@ -2003,12 +1996,8 @@ declare class SmuleChat {
2003
1996
  state: SmuleChatState;
2004
1997
  private client;
2005
1998
  private jid;
2006
- private ongoingIq;
2007
- private iqHasMore;
2008
- private lastIqId;
2009
- private isLive;
1999
+ private iqs;
2010
2000
  private roomJID;
2011
- private roomUsers;
2012
2001
  private chats;
2013
2002
  constructor(userId: number, session: string, host?: string, roomJID?: string);
2014
2003
  /**
@@ -2024,6 +2013,8 @@ declare class SmuleChat {
2024
2013
  * it might throw an error (socket write after end).
2025
2014
  */
2026
2015
  disconnect(): Promise<void>;
2016
+ sendIq(data: Element, callback: any, iqType?: string): void;
2017
+ sendIqQuery(xmlns: string, callback: any, iqType?: string): void;
2027
2018
  /**
2028
2019
  * Send a chat state to the server. This is used to
2029
2020
  * signal whether you are currently active or not.
@@ -2067,7 +2058,6 @@ declare class SmuleChat {
2067
2058
  * @param jid The JID to inform about it
2068
2059
  */
2069
2060
  sendReadReceipt(jid: JID | string | AccountIcon): Promise<void>;
2070
- private archiveMessage;
2071
2061
  /**
2072
2062
  * Read-only jid to prevent any bugs
2073
2063
  * @returns user's JID
@@ -2100,7 +2090,6 @@ declare class SmuleChat {
2100
2090
  * @returns The chat, or an empty new one
2101
2091
  */
2102
2092
  fetchChat(user: number): SmuleChatContainer;
2103
- fetchUsers(): any[];
2104
2093
  private onClose;
2105
2094
  private onClosing;
2106
2095
  private onConnect;
@@ -2309,9 +2298,24 @@ declare class Smule {
2309
2298
  * Creates a new spark chat
2310
2299
  * @param address The JID address of the chat partner
2311
2300
  * @param type Whether the JID address is an individual or a group
2312
- * @returns idk
2313
2301
  */
2314
- create: (address: string, type?: "ACCT" | "GRP") => Promise<any>;
2302
+ create: (address: string, type?: "ACCT" | "GRP") => Promise<void>;
2303
+ /**
2304
+ * Deletes an existing spark chat
2305
+ * @param address The JID address of the chat partner
2306
+ * @param type Whether the JID address is an individual or a group
2307
+ */
2308
+ delete: (address: string, type?: "ACCT" | "GRP") => Promise<void>;
2309
+ /**
2310
+ * Fetches your existing chats
2311
+ * @param type Whether an individual or a group
2312
+ * @returns Your inbox and your message requests
2313
+ */
2314
+ fetchInboxes: (type?: "ACCT" | "GRP") => Promise<SparkChatListResult>;
2315
+ /**
2316
+ * Marks you as offline to your chats
2317
+ */
2318
+ markOffline: () => Promise<void>;
2315
2319
  /**
2316
2320
  * Creates a connection to the XMPP chat server
2317
2321
  */
@@ -2958,27 +2962,40 @@ declare class Smule {
2958
2962
  * @param to The user to send the message to
2959
2963
  * @param message The message body
2960
2964
  */
2961
- sendTextMessage: (to: JID | string | AccountIcon, message: string) => Promise<void>;
2965
+ sendTextMessage: (message: string) => Promise<void>;
2962
2966
  /**
2963
2967
  * Fetch all loaded chats
2964
2968
  * @returns All loaded chats
2965
2969
  */
2966
2970
  fetchChat: () => SmuleChatContainer;
2967
2971
  fetchUsers: () => any[];
2968
- /**
2969
- * Loads the entire message history
2970
- * @param limit How many messages
2971
- * @param before Messages before this
2972
- * @param after Messages after this
2973
- * @param user The chat partner
2974
- *
2975
- * @remarks This currently recurses until it loads ALL archived messages.
2976
- * This means that it will take a long time to load all messages.
2977
- * @remarks Filtering by a specific user may not work yet
2978
- */
2979
- loadMessageHistory: (limit?: number, before?: any, after?: any, user?: JID | string) => Promise<void>;
2980
2972
  };
2973
+ /**
2974
+ * Fetches ("syncs") a livestream (campfire) so you can connect to it
2975
+ *
2976
+ * @param campfireId The campfire's id
2977
+ * @returns Data regarding the campfire and the streaming details
2978
+ */
2981
2979
  fetch: (campfireId: number) => Promise<CampfireSyncResult>;
2980
+ /**
2981
+ * Fetches gifts that have been sent to a live
2982
+ *
2983
+ * @param campfireId The campfire's id
2984
+ * @param cursor The starting point
2985
+ * @param limit How many results
2986
+ * @returns A list of gifts data
2987
+ */
2988
+ fetchRecentGifts: (campfireId: number, cursor?: string, limit?: number) => Promise<GiftRecentTransactionsResult>;
2989
+ /**
2990
+ * Sign up as available to sing
2991
+ * @param campfireId The livestream's id
2992
+ */
2993
+ joinToSing: (campfireId: number) => Promise<void>;
2994
+ /**
2995
+ * Revoke your availability to sing
2996
+ * @param campfireId The livestream's id
2997
+ */
2998
+ revokeJoinToSing: (campfireId: number) => Promise<void>;
2982
2999
  };
2983
3000
  groups: {
2984
3001
  /**
@@ -3050,7 +3067,7 @@ declare class Smule {
3050
3067
  deleteOne: (playlistKey: string) => Promise<void>;
3051
3068
  };
3052
3069
  TEST: {
3053
- runRawRequest: (url: string, data: any) => Promise<AxiosResponse<any, any>>;
3070
+ runRawRequest: (url: string, data: any) => Promise<AxiosResponse<any, any, {}>>;
3054
3071
  };
3055
3072
  }
3056
3073
 
@@ -3795,4 +3812,4 @@ type SmulePitchesData = {
3795
3812
  smallestNote: number;
3796
3813
  };
3797
3814
 
3798
- export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrOwnedBy, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCProfileResult, type SDCProfileSongsResult, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SDCSong, type SDCUser, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };
3815
+ export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrOwnedBy, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftRecentTransactionsResult, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCProfileResult, type SDCProfileSongsResult, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SDCSong, type SDCUser, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type SparkChatListResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { AxiosResponse } from 'axios';
2
+ import { Element } from '@xmpp/xml';
2
3
  import EventEmitter from 'events';
3
4
  import { JID } from '@xmpp/jid';
4
5
 
@@ -1490,6 +1491,15 @@ type GiftsResult = {
1490
1491
  }>;
1491
1492
  giftCount: number;
1492
1493
  };
1494
+ type GiftRecentTransactionsResult = {
1495
+ transactions: Array<{
1496
+ giverAccountIcon: AccountIcon;
1497
+ giftIcon: GiftIcon;
1498
+ time: Date;
1499
+ }>;
1500
+ cursor: Cursor;
1501
+ giftCnt: number;
1502
+ };
1493
1503
  type InviteMeResult = {
1494
1504
  invites: SocialInvite[];
1495
1505
  cursor: Cursor;
@@ -1808,6 +1818,16 @@ type SongbookResult = {
1808
1818
  cat1Cursor: Cursor;
1809
1819
  disinterestedSongs: Array<Song>;
1810
1820
  };
1821
+ type SparkChatListResult = {
1822
+ inbox: Array<{
1823
+ name: string;
1824
+ type: "ACCT" | "GRP";
1825
+ }>;
1826
+ other: Array<{
1827
+ name: string;
1828
+ type: "ACCT" | "GRP";
1829
+ }>;
1830
+ };
1811
1831
  type StoreSubscriptionStatusResult = {
1812
1832
  isActive: boolean;
1813
1833
  status: string;
@@ -1902,9 +1922,7 @@ declare class SmuleLiveChat {
1902
1922
  state: SmuleChatState;
1903
1923
  private client;
1904
1924
  private jid;
1905
- private ongoingIq;
1906
- private iqHasMore;
1907
- private lastIqId;
1925
+ private iqs;
1908
1926
  private roomJID;
1909
1927
  private roomUsers;
1910
1928
  private chat;
@@ -1922,38 +1940,13 @@ declare class SmuleLiveChat {
1922
1940
  * it might throw an error (socket write after end).
1923
1941
  */
1924
1942
  disconnect(): Promise<void>;
1943
+ sendIq(data: Element, callback: any, iqType?: string): void;
1944
+ sendIqQuery(xmlns: string, callback: any, iqType?: string): void;
1925
1945
  /**
1926
- * Send a chat state to the server. This is used to
1927
- * signal whether you are currently active or not.
1928
- *
1929
- * active -> You're active
1930
- *
1931
- * composing -> Typing
1932
- *
1933
- * paused -> Just stopped typing
1934
- *
1935
- * inactive -> You're inactive
1936
- *
1937
- * gone -> You're hidden / disconnected / You've left the chat
1938
- *
1939
- * @param state One of `active`, `composing`, `paused`, `inactive`, or `gone`.
1940
- * Default is `active`
1941
- */
1942
- sendChatState(to: JID | string | AccountIcon, state?: SmulePartnerStatus): Promise<void>;
1943
- /**
1944
- * Loads the entire message history
1945
- * @param limit The maximum number of messages to fetch. Default is 50.
1946
- * @remarks This currently recurses until it loads ALL archived messages.
1947
- * This means that it will take a long time to load all messages.
1948
- * @remarks Filtering by a specific JID may not work yet
1949
- */
1950
- loadMessageHistory(limit?: number, before?: any, after?: any, jid?: JID | string): Promise<void>;
1951
- /**
1952
- * Send a text message
1953
- * @param jid The JID to send the message to
1946
+ * Send a text message to the livestream
1954
1947
  * @param message The message body
1955
1948
  */
1956
- sendTextMessage(jid: JID | string | AccountIcon, message: string): Promise<void>;
1949
+ sendTextMessage(message: string): Promise<void>;
1957
1950
  /**
1958
1951
  * Read-only jid to prevent any bugs
1959
1952
  * @returns user's JID
@@ -2003,12 +1996,8 @@ declare class SmuleChat {
2003
1996
  state: SmuleChatState;
2004
1997
  private client;
2005
1998
  private jid;
2006
- private ongoingIq;
2007
- private iqHasMore;
2008
- private lastIqId;
2009
- private isLive;
1999
+ private iqs;
2010
2000
  private roomJID;
2011
- private roomUsers;
2012
2001
  private chats;
2013
2002
  constructor(userId: number, session: string, host?: string, roomJID?: string);
2014
2003
  /**
@@ -2024,6 +2013,8 @@ declare class SmuleChat {
2024
2013
  * it might throw an error (socket write after end).
2025
2014
  */
2026
2015
  disconnect(): Promise<void>;
2016
+ sendIq(data: Element, callback: any, iqType?: string): void;
2017
+ sendIqQuery(xmlns: string, callback: any, iqType?: string): void;
2027
2018
  /**
2028
2019
  * Send a chat state to the server. This is used to
2029
2020
  * signal whether you are currently active or not.
@@ -2067,7 +2058,6 @@ declare class SmuleChat {
2067
2058
  * @param jid The JID to inform about it
2068
2059
  */
2069
2060
  sendReadReceipt(jid: JID | string | AccountIcon): Promise<void>;
2070
- private archiveMessage;
2071
2061
  /**
2072
2062
  * Read-only jid to prevent any bugs
2073
2063
  * @returns user's JID
@@ -2100,7 +2090,6 @@ declare class SmuleChat {
2100
2090
  * @returns The chat, or an empty new one
2101
2091
  */
2102
2092
  fetchChat(user: number): SmuleChatContainer;
2103
- fetchUsers(): any[];
2104
2093
  private onClose;
2105
2094
  private onClosing;
2106
2095
  private onConnect;
@@ -2309,9 +2298,24 @@ declare class Smule {
2309
2298
  * Creates a new spark chat
2310
2299
  * @param address The JID address of the chat partner
2311
2300
  * @param type Whether the JID address is an individual or a group
2312
- * @returns idk
2313
2301
  */
2314
- create: (address: string, type?: "ACCT" | "GRP") => Promise<any>;
2302
+ create: (address: string, type?: "ACCT" | "GRP") => Promise<void>;
2303
+ /**
2304
+ * Deletes an existing spark chat
2305
+ * @param address The JID address of the chat partner
2306
+ * @param type Whether the JID address is an individual or a group
2307
+ */
2308
+ delete: (address: string, type?: "ACCT" | "GRP") => Promise<void>;
2309
+ /**
2310
+ * Fetches your existing chats
2311
+ * @param type Whether an individual or a group
2312
+ * @returns Your inbox and your message requests
2313
+ */
2314
+ fetchInboxes: (type?: "ACCT" | "GRP") => Promise<SparkChatListResult>;
2315
+ /**
2316
+ * Marks you as offline to your chats
2317
+ */
2318
+ markOffline: () => Promise<void>;
2315
2319
  /**
2316
2320
  * Creates a connection to the XMPP chat server
2317
2321
  */
@@ -2958,27 +2962,40 @@ declare class Smule {
2958
2962
  * @param to The user to send the message to
2959
2963
  * @param message The message body
2960
2964
  */
2961
- sendTextMessage: (to: JID | string | AccountIcon, message: string) => Promise<void>;
2965
+ sendTextMessage: (message: string) => Promise<void>;
2962
2966
  /**
2963
2967
  * Fetch all loaded chats
2964
2968
  * @returns All loaded chats
2965
2969
  */
2966
2970
  fetchChat: () => SmuleChatContainer;
2967
2971
  fetchUsers: () => any[];
2968
- /**
2969
- * Loads the entire message history
2970
- * @param limit How many messages
2971
- * @param before Messages before this
2972
- * @param after Messages after this
2973
- * @param user The chat partner
2974
- *
2975
- * @remarks This currently recurses until it loads ALL archived messages.
2976
- * This means that it will take a long time to load all messages.
2977
- * @remarks Filtering by a specific user may not work yet
2978
- */
2979
- loadMessageHistory: (limit?: number, before?: any, after?: any, user?: JID | string) => Promise<void>;
2980
2972
  };
2973
+ /**
2974
+ * Fetches ("syncs") a livestream (campfire) so you can connect to it
2975
+ *
2976
+ * @param campfireId The campfire's id
2977
+ * @returns Data regarding the campfire and the streaming details
2978
+ */
2981
2979
  fetch: (campfireId: number) => Promise<CampfireSyncResult>;
2980
+ /**
2981
+ * Fetches gifts that have been sent to a live
2982
+ *
2983
+ * @param campfireId The campfire's id
2984
+ * @param cursor The starting point
2985
+ * @param limit How many results
2986
+ * @returns A list of gifts data
2987
+ */
2988
+ fetchRecentGifts: (campfireId: number, cursor?: string, limit?: number) => Promise<GiftRecentTransactionsResult>;
2989
+ /**
2990
+ * Sign up as available to sing
2991
+ * @param campfireId The livestream's id
2992
+ */
2993
+ joinToSing: (campfireId: number) => Promise<void>;
2994
+ /**
2995
+ * Revoke your availability to sing
2996
+ * @param campfireId The livestream's id
2997
+ */
2998
+ revokeJoinToSing: (campfireId: number) => Promise<void>;
2982
2999
  };
2983
3000
  groups: {
2984
3001
  /**
@@ -3050,7 +3067,7 @@ declare class Smule {
3050
3067
  deleteOne: (playlistKey: string) => Promise<void>;
3051
3068
  };
3052
3069
  TEST: {
3053
- runRawRequest: (url: string, data: any) => Promise<AxiosResponse<any, any>>;
3070
+ runRawRequest: (url: string, data: any) => Promise<AxiosResponse<any, any, {}>>;
3054
3071
  };
3055
3072
  }
3056
3073
 
@@ -3795,4 +3812,4 @@ type SmulePitchesData = {
3795
3812
  smallestNote: number;
3796
3813
  };
3797
3814
 
3798
- export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrOwnedBy, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCProfileResult, type SDCProfileSongsResult, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SDCSong, type SDCUser, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };
3815
+ export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, type ArrOwnedBy, type ArrResult, AvTemplateCategoryListRequest, type AvTemplateCategoryListResult, type AvTemplateLite, Banner, type BannersResult, type Campfire, type CampfireListResult, type CampfirePlayStream, type CampfireSyncResult, type CategoryListResult, CategoryRequest, type CategorySongsResult, type Comment, type Contact, type ContactFindResult, type Cursor, CustomFormData, Device, type DeviceSettingsResult, type EnsembleType, type FeedItem, type GiftIcon, type GiftRecentTransactionsResult, type GiftsResult, type InviteListResult, type InviteMeResult, IsFollowingRequest, type ListEntitlementsResult, LoginAsGuestRequest, type LoginAsGuestResult, LoginCommonData, type LoginInfoResult, LoginRequest, type LoginResult, type ParticipationIcon, type PerformanceBookmarkSeedResult, type PerformanceByKeysResult, type PerformanceCommentsResult, type PerformanceCreateCommentResult, PerformanceCreateRequest, type PerformanceCreateResult, type PerformanceDetail, type PerformanceDetailsResult, type PerformanceIcon, PerformanceList, PerformancePartsRequest, type PerformancePartsResult, PerformanceReq, type PerformanceResult, type PerformanceSortMethod, type PerformancesByAvTemplateResult, type PerformancesByUserResult, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistExploreResult, type PlaylistGetResult, type PlaylistIcon, type PlaylistSortMethod, type PlaylistViewResult, type PlaylistVisibility, PreferencesRequest, type PreferencesResult, PreuploadRequest, type PreuploadResult, type Profile, RecAccount, type RecAccountsResult, type RecPerformanceIcon, type RecTrendingSearchResult, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCProfileResult, type SDCProfileSongsResult, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SDCSong, type SDCUser, type SFam, type SFamInfoResult, type SFamList, type SFamListResult, type SFamMemberListResult, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, type SearchAutocompleteResult, SearchRequest, type SearchResult, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SettingsResult, type SingProfile, SingUserProfileRequest, type SingUserProfileResult, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialBlockListResult, type SocialCommentLikesResult, type SocialFeedListResult, type SocialFolloweesResult, type SocialFollowersResult, type SocialInvite, type SocialInvite2, type SocialIsFollowingResult, type Song, type SongCategory, SongbookRequest, type SongbookResult, type SparkChatListResult, type StoreSubscriptionStatusResult, type TippingHandleType, type TopicChooseResult, type TopicOptionResult, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, type UserUploadPictureResult, Util, type Wallet, type avTmplSegment };