smule.js 1.1.1 → 1.2.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/index.cjs +578 -85
- package/dist/index.d.cts +457 -10
- package/dist/index.d.ts +457 -10
- package/dist/index.js +576 -85
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -725,6 +725,7 @@ declare class LoginAsGuestRequest {
|
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
727
|
declare class LoginRequest {
|
|
728
|
+
private loginCommon;
|
|
728
729
|
private data;
|
|
729
730
|
constructor(email: string, password: string, loginCommon?: LoginCommonData);
|
|
730
731
|
toJSON(): {
|
|
@@ -932,6 +933,11 @@ type AccountIcon = {
|
|
|
932
933
|
latitude?: number;
|
|
933
934
|
longitude?: number;
|
|
934
935
|
};
|
|
936
|
+
type Contact = {
|
|
937
|
+
emails: string[];
|
|
938
|
+
phoneNumbers: string[];
|
|
939
|
+
realName: string;
|
|
940
|
+
};
|
|
935
941
|
type Profile = {
|
|
936
942
|
accountIcon: AccountIcon;
|
|
937
943
|
apps: SMULE_APP[];
|
|
@@ -1266,6 +1272,7 @@ type SFam = {
|
|
|
1266
1272
|
enrollStatus: number;
|
|
1267
1273
|
approvalStatus: number;
|
|
1268
1274
|
};
|
|
1275
|
+
type SFamMembershipType = "UNKNOWN" | "GUEST" | "PENDING_RQST" | "PENDING_INVTN" | "MEMBER" | "ADMIN";
|
|
1269
1276
|
type SearchResultCategory = "NONE" | "TITLE" | "LYRIC" | string;
|
|
1270
1277
|
type SearchResultType = "CFIRE" | "SONG" | "ACTIVESEED" | "SFAM" | "ACCOUNT" | "RECORDING";
|
|
1271
1278
|
type SearchResultSort = "POPULAR" | "RECENT" | "EXPIRE";
|
|
@@ -1296,12 +1303,13 @@ type avTmplSegment = {
|
|
|
1296
1303
|
tags: Array<any>;
|
|
1297
1304
|
};
|
|
1298
1305
|
type FeedItem = {
|
|
1299
|
-
recId
|
|
1306
|
+
recId?: string;
|
|
1307
|
+
postId?: number;
|
|
1300
1308
|
subject?: AccountIcon;
|
|
1301
|
-
action?: string | "LOVE";
|
|
1302
|
-
count?: number;
|
|
1309
|
+
action?: string | "LOVE" | "FamilyPost";
|
|
1303
1310
|
actionTime?: Date;
|
|
1304
|
-
|
|
1311
|
+
count?: number;
|
|
1312
|
+
source?: string | "MYNW" | "GHPS";
|
|
1305
1313
|
object: {
|
|
1306
1314
|
performance?: PerformanceIcon;
|
|
1307
1315
|
};
|
|
@@ -1319,6 +1327,20 @@ type Playlist = {
|
|
|
1319
1327
|
imgUrl: string;
|
|
1320
1328
|
trending: boolean;
|
|
1321
1329
|
};
|
|
1330
|
+
type PlaylistIcon = {
|
|
1331
|
+
playlistKey: string;
|
|
1332
|
+
type: "ACCT";
|
|
1333
|
+
visibility: PlaylistVisibility;
|
|
1334
|
+
name: string;
|
|
1335
|
+
webUrl: string;
|
|
1336
|
+
tags: string[];
|
|
1337
|
+
stats: {
|
|
1338
|
+
itemsCount: number;
|
|
1339
|
+
};
|
|
1340
|
+
accountIcon: AccountIcon;
|
|
1341
|
+
};
|
|
1342
|
+
type PlaylistVisibility = "PUB" | "PRI";
|
|
1343
|
+
type PlaylistSortMethod = "OLDEST_FIRST" | "NEWEST_FIRST";
|
|
1322
1344
|
/**
|
|
1323
1345
|
* An ad banner, usually on the home page
|
|
1324
1346
|
*/
|
|
@@ -1367,6 +1389,12 @@ declare const SmuleErrorCode: {
|
|
|
1367
1389
|
1013: string;
|
|
1368
1390
|
10: string;
|
|
1369
1391
|
1052: string;
|
|
1392
|
+
2017: string;
|
|
1393
|
+
2013: string;
|
|
1394
|
+
1044: string;
|
|
1395
|
+
};
|
|
1396
|
+
declare const SmuleRegisterErrorCode: {
|
|
1397
|
+
13: string;
|
|
1370
1398
|
};
|
|
1371
1399
|
type SMULE_APP = "UNKNOWN" | "MINIPIANO" | "SMULEDOTCOM" | "SING" | "MINIPIANO_ANDROID" | "AUTORAP_IOS" | "AUTORAP_GOOG" | "SING_GOOGLE" | "STUDIO_IOS" | "STUDIO_ANDROID" | "SING_HUAWEI" | "UNRECOGNIZED";
|
|
1372
1400
|
|
|
@@ -1407,6 +1435,11 @@ type ArrResult = {
|
|
|
1407
1435
|
type ArrByKeysResult = {
|
|
1408
1436
|
arrVersionLites: Arr[];
|
|
1409
1437
|
};
|
|
1438
|
+
type ArrBookmarkListResult = {
|
|
1439
|
+
songs: Arr;
|
|
1440
|
+
cursor: Cursor;
|
|
1441
|
+
totalCount: number;
|
|
1442
|
+
};
|
|
1410
1443
|
type AvTemplateCategoryListResult = {
|
|
1411
1444
|
recAvTemplateLites: Array<{
|
|
1412
1445
|
avtemplateLite: AvTemplateLite;
|
|
@@ -1426,6 +1459,13 @@ type CategorySongsResult = {
|
|
|
1426
1459
|
songs: Array<Song>;
|
|
1427
1460
|
cursor: Cursor;
|
|
1428
1461
|
};
|
|
1462
|
+
type ContactFindResult = {
|
|
1463
|
+
notFollowing: Array<{
|
|
1464
|
+
realName: string;
|
|
1465
|
+
accountIcon: AccountIcon;
|
|
1466
|
+
}>;
|
|
1467
|
+
hasMatches: boolean;
|
|
1468
|
+
};
|
|
1429
1469
|
type InviteMeResult = {
|
|
1430
1470
|
invites: SocialInvite[];
|
|
1431
1471
|
cursor: Cursor;
|
|
@@ -1434,6 +1474,60 @@ type InviteListResult = {
|
|
|
1434
1474
|
invites: SocialInvite2[];
|
|
1435
1475
|
next: number;
|
|
1436
1476
|
};
|
|
1477
|
+
type LoginResult = {
|
|
1478
|
+
sessionToken: string;
|
|
1479
|
+
sessionTtl: number;
|
|
1480
|
+
refreshToken: string;
|
|
1481
|
+
playerId: number;
|
|
1482
|
+
playerNew: boolean;
|
|
1483
|
+
playerNewlyRegistered: boolean;
|
|
1484
|
+
playerNewlyInAppFam: boolean;
|
|
1485
|
+
policyAccepted: boolean;
|
|
1486
|
+
policyVersion: string;
|
|
1487
|
+
policyUrl: string;
|
|
1488
|
+
termUrl: string;
|
|
1489
|
+
accountId: number;
|
|
1490
|
+
/**
|
|
1491
|
+
* Username
|
|
1492
|
+
*/
|
|
1493
|
+
handle: string;
|
|
1494
|
+
handleNew: boolean;
|
|
1495
|
+
/**
|
|
1496
|
+
* Username auto generated from email?
|
|
1497
|
+
*/
|
|
1498
|
+
handlePrefill: boolean;
|
|
1499
|
+
email: string;
|
|
1500
|
+
emailVerified: boolean;
|
|
1501
|
+
newsletter: number;
|
|
1502
|
+
showEmailOpt: boolean;
|
|
1503
|
+
language: string;
|
|
1504
|
+
picUrl: string;
|
|
1505
|
+
picUrlType: string;
|
|
1506
|
+
loginCount: number;
|
|
1507
|
+
serverTime: number;
|
|
1508
|
+
playerStat: {
|
|
1509
|
+
installDate: number;
|
|
1510
|
+
};
|
|
1511
|
+
elControl: {
|
|
1512
|
+
npt: boolean;
|
|
1513
|
+
};
|
|
1514
|
+
standardChat: {
|
|
1515
|
+
jid: string;
|
|
1516
|
+
xmppHosts: string[];
|
|
1517
|
+
};
|
|
1518
|
+
campfireChat: {
|
|
1519
|
+
jid: string;
|
|
1520
|
+
xmppHosts: string[];
|
|
1521
|
+
};
|
|
1522
|
+
/**
|
|
1523
|
+
* this is usually empty
|
|
1524
|
+
*/
|
|
1525
|
+
settings: string;
|
|
1526
|
+
birthDate?: {
|
|
1527
|
+
year: number;
|
|
1528
|
+
month: number;
|
|
1529
|
+
};
|
|
1530
|
+
};
|
|
1437
1531
|
type PerformanceResult = {
|
|
1438
1532
|
performance: PerformanceIcon;
|
|
1439
1533
|
lyricVid: boolean;
|
|
@@ -1450,6 +1544,11 @@ type PerformancePartsResult = {
|
|
|
1450
1544
|
storageLimit: number;
|
|
1451
1545
|
next: number;
|
|
1452
1546
|
};
|
|
1547
|
+
type PerformanceBookmarkSeedResult = {
|
|
1548
|
+
performanceIcons: Array<PerformanceIcon>;
|
|
1549
|
+
totalPerformances: number;
|
|
1550
|
+
next: number;
|
|
1551
|
+
};
|
|
1453
1552
|
type PerformanceCommentsResult = {
|
|
1454
1553
|
performanceKey: string;
|
|
1455
1554
|
commentUIViewInfo: {
|
|
@@ -1488,6 +1587,19 @@ type PlaylistGetResult = {
|
|
|
1488
1587
|
recPerformanceIcons: RecPerformanceIcon[];
|
|
1489
1588
|
next: number;
|
|
1490
1589
|
};
|
|
1590
|
+
type PlaylistViewResult = {
|
|
1591
|
+
items: Array<{
|
|
1592
|
+
performanceIcon: PerformanceIcon;
|
|
1593
|
+
}>;
|
|
1594
|
+
cursor: Cursor;
|
|
1595
|
+
playlistSortMethod: PlaylistSortMethod;
|
|
1596
|
+
};
|
|
1597
|
+
type PreferencesResult = {
|
|
1598
|
+
prefs: Array<{
|
|
1599
|
+
name: string;
|
|
1600
|
+
value: string;
|
|
1601
|
+
}>;
|
|
1602
|
+
};
|
|
1491
1603
|
type RecTrendingSearchResult = {
|
|
1492
1604
|
recTrendingSearches: TrendingSearch[];
|
|
1493
1605
|
};
|
|
@@ -1578,10 +1690,27 @@ type SettingsResult = {
|
|
|
1578
1690
|
"sing.tipping": sing_tipping;
|
|
1579
1691
|
"appFamily": appFamily;
|
|
1580
1692
|
};
|
|
1693
|
+
type SFamInfoResult = {
|
|
1694
|
+
sfamInfo: {
|
|
1695
|
+
sfam: SFam;
|
|
1696
|
+
membership: "GUEST" | "MEMBER";
|
|
1697
|
+
sfamStat: {
|
|
1698
|
+
postCount: number;
|
|
1699
|
+
memberCount: number;
|
|
1700
|
+
};
|
|
1701
|
+
owner: AccountIcon;
|
|
1702
|
+
adminIcons: AccountIcon[];
|
|
1703
|
+
webUrl: string;
|
|
1704
|
+
};
|
|
1705
|
+
};
|
|
1581
1706
|
type SFamListResult = {
|
|
1582
1707
|
sfamList: SFamList[];
|
|
1583
1708
|
cursor: Cursor;
|
|
1584
1709
|
};
|
|
1710
|
+
type SFamMemberListResult = {
|
|
1711
|
+
members: Array<AccountIcon>;
|
|
1712
|
+
cursor: Cursor;
|
|
1713
|
+
};
|
|
1585
1714
|
type SingUserProfileResult = {
|
|
1586
1715
|
profile: Profile;
|
|
1587
1716
|
singProfile?: SingProfile;
|
|
@@ -1625,6 +1754,18 @@ type SongbookResult = {
|
|
|
1625
1754
|
cat1Cursor: Cursor;
|
|
1626
1755
|
disinterestedSongs: Array<Song>;
|
|
1627
1756
|
};
|
|
1757
|
+
type TopicOptionResult = {
|
|
1758
|
+
options: Array<{
|
|
1759
|
+
id: number;
|
|
1760
|
+
recId: string;
|
|
1761
|
+
displayName: string;
|
|
1762
|
+
coverUrls: string[];
|
|
1763
|
+
}>;
|
|
1764
|
+
};
|
|
1765
|
+
type UserUploadPictureResult = {
|
|
1766
|
+
picUrl: string;
|
|
1767
|
+
picUrlType: "user";
|
|
1768
|
+
};
|
|
1628
1769
|
|
|
1629
1770
|
type SmuleMessage = {
|
|
1630
1771
|
content: string;
|
|
@@ -1661,6 +1802,7 @@ declare namespace SmuleUtil {
|
|
|
1661
1802
|
function checkLoggedIn(session: SmuleSession): boolean;
|
|
1662
1803
|
function isVerified(verifiedType: string): boolean;
|
|
1663
1804
|
function isVIP(subApps: string[]): boolean;
|
|
1805
|
+
function getGroupMembershipType(membership: number): SFamMembershipType;
|
|
1664
1806
|
function getFilesFromArr(arr: ArrExtended): {
|
|
1665
1807
|
preview: string;
|
|
1666
1808
|
cover: string;
|
|
@@ -1956,6 +2098,7 @@ declare class Smule {
|
|
|
1956
2098
|
* @returns The account's details
|
|
1957
2099
|
*/
|
|
1958
2100
|
byId: (accountId: number) => Promise<AccountIcon>;
|
|
2101
|
+
byContacts: (contacts: Array<Contact>) => Promise<ContactFindResult>;
|
|
1959
2102
|
};
|
|
1960
2103
|
/**
|
|
1961
2104
|
* Logs in as a guest
|
|
@@ -1990,6 +2133,89 @@ declare class Smule {
|
|
|
1990
2133
|
* @returns The user's details
|
|
1991
2134
|
*/
|
|
1992
2135
|
fetchOne: (accountId: number) => Promise<SingUserProfileResult>;
|
|
2136
|
+
/**
|
|
2137
|
+
* Registers a new account on smule
|
|
2138
|
+
* @param email Your email address
|
|
2139
|
+
* @param password Your password
|
|
2140
|
+
* @returns The server response
|
|
2141
|
+
*/
|
|
2142
|
+
createWithEmail: (email: string, password: string) => Promise<LoginResult>;
|
|
2143
|
+
/**
|
|
2144
|
+
* Uploads a profile picture
|
|
2145
|
+
* @param imageData The image data (jpeg)
|
|
2146
|
+
* @returns The server response
|
|
2147
|
+
*/
|
|
2148
|
+
uploadProfilePicture: (imageData: Uint8Array) => Promise<UserUploadPictureResult>;
|
|
2149
|
+
/**
|
|
2150
|
+
* Deletes your profile picture
|
|
2151
|
+
*/
|
|
2152
|
+
deleteProfilePicture: () => Promise<void>;
|
|
2153
|
+
/**
|
|
2154
|
+
* Uploads a cover picture
|
|
2155
|
+
* @param imageData The image data
|
|
2156
|
+
* @remarks Requires VIP
|
|
2157
|
+
*/
|
|
2158
|
+
uploadCoverPicture: (imageData: Uint8Array) => Promise<void>;
|
|
2159
|
+
/**
|
|
2160
|
+
* Deletes your cover picture
|
|
2161
|
+
* @remarks Requires VIP
|
|
2162
|
+
*/
|
|
2163
|
+
deleteCoverPicture: () => Promise<void>;
|
|
2164
|
+
/**
|
|
2165
|
+
* Changes your username
|
|
2166
|
+
* @param username The new username
|
|
2167
|
+
*/
|
|
2168
|
+
changeUsername: (username: string) => Promise<void>;
|
|
2169
|
+
/**
|
|
2170
|
+
* Changes your email
|
|
2171
|
+
* @param email The new email
|
|
2172
|
+
*/
|
|
2173
|
+
changeEmail: (email: string) => Promise<void>;
|
|
2174
|
+
/**
|
|
2175
|
+
* Changes your bio
|
|
2176
|
+
* @param text The new bio
|
|
2177
|
+
*/
|
|
2178
|
+
changeBio: (text: string) => Promise<void>;
|
|
2179
|
+
/**
|
|
2180
|
+
* Customize your VIP profile
|
|
2181
|
+
* @param colorTheme The background and foreground colors (RRGGBB hex), and whether the text should be white or black
|
|
2182
|
+
* @param displayMentions Whether to display mentions
|
|
2183
|
+
* @param displayName Your new display name
|
|
2184
|
+
* @remarks Requires VIP
|
|
2185
|
+
*/
|
|
2186
|
+
changeVIPProfileStuff: (colorTheme: {
|
|
2187
|
+
background: number;
|
|
2188
|
+
foreground: number;
|
|
2189
|
+
lightText: boolean;
|
|
2190
|
+
}, displayMentions: boolean, displayName: string) => Promise<void>;
|
|
2191
|
+
/**
|
|
2192
|
+
* Changes your full name
|
|
2193
|
+
* @param firstName Your first name
|
|
2194
|
+
* @param lastName Your last name
|
|
2195
|
+
*/
|
|
2196
|
+
changeFullName: (firstName: string, lastName: string) => Promise<void>;
|
|
2197
|
+
/**
|
|
2198
|
+
* Changes your password
|
|
2199
|
+
* @param newPassword The new password
|
|
2200
|
+
*/
|
|
2201
|
+
changePassword: (newPassword: string) => Promise<void>;
|
|
2202
|
+
/**
|
|
2203
|
+
* @returns Your preferences
|
|
2204
|
+
*/
|
|
2205
|
+
fetchPreferences: () => Promise<PreferencesResult>;
|
|
2206
|
+
/**
|
|
2207
|
+
* Changes your preferences
|
|
2208
|
+
* @param preferences The modified preferences
|
|
2209
|
+
*/
|
|
2210
|
+
changePreferences: (preferences: Array<{
|
|
2211
|
+
name: string;
|
|
2212
|
+
value: string;
|
|
2213
|
+
}>) => Promise<void>;
|
|
2214
|
+
/**
|
|
2215
|
+
* Changes whether you wish to receive newsletter emails
|
|
2216
|
+
* @param consent Whether to consent
|
|
2217
|
+
*/
|
|
2218
|
+
changeNewsletterConsent: (consent: boolean) => Promise<void>;
|
|
1993
2219
|
};
|
|
1994
2220
|
/**
|
|
1995
2221
|
* Social and chat related stuff
|
|
@@ -2290,6 +2516,15 @@ declare class Smule {
|
|
|
2290
2516
|
*/
|
|
2291
2517
|
fetch: (keys: string[]) => Promise<ArrByKeysResult>;
|
|
2292
2518
|
fetchOwnedBy: (ownerId: number, offset?: number, limit?: number) => Promise<any>;
|
|
2519
|
+
/**
|
|
2520
|
+
* Fetches free songs from a list of genres
|
|
2521
|
+
*
|
|
2522
|
+
* This endpoint is usually used at register, to recommend
|
|
2523
|
+
* some songs to the new user.
|
|
2524
|
+
* @param genreIds The ids of the genres
|
|
2525
|
+
* @returns A stupid nested list with free "compositions"
|
|
2526
|
+
*/
|
|
2527
|
+
fetchFromGenres: (genreIds: number[]) => Promise<TopicOptionResult>;
|
|
2293
2528
|
/**
|
|
2294
2529
|
* Fetches the lyrics and pitches for a certain arrangement
|
|
2295
2530
|
* @param key The song / arr key
|
|
@@ -2303,22 +2538,20 @@ declare class Smule {
|
|
|
2303
2538
|
/**
|
|
2304
2539
|
* Bookmarks a song.
|
|
2305
2540
|
* @param key The song / arr key.
|
|
2306
|
-
* @returns idk
|
|
2307
2541
|
*/
|
|
2308
|
-
bookmark: (key: string) => Promise<
|
|
2542
|
+
bookmark: (key: string) => Promise<void>;
|
|
2309
2543
|
/**
|
|
2310
2544
|
* Unbookmarks a song.
|
|
2311
2545
|
* @param key The song / arr key.
|
|
2312
|
-
* @returns idk
|
|
2313
2546
|
*/
|
|
2314
|
-
unbookmark: (key: string) => Promise<
|
|
2547
|
+
unbookmark: (key: string) => Promise<void>;
|
|
2315
2548
|
/**
|
|
2316
2549
|
* Fetches bookmarked songs.
|
|
2317
2550
|
* @param cursor Paging
|
|
2318
2551
|
* @param limit The maximum number of songs to fetch
|
|
2319
2552
|
* @returns idk prolly bookmarks
|
|
2320
2553
|
*/
|
|
2321
|
-
fetchBookmarks: (cursor?: string, limit?: number) => Promise<
|
|
2554
|
+
fetchBookmarks: (cursor?: string, limit?: number) => Promise<ArrBookmarkListResult>;
|
|
2322
2555
|
update: (key: string, artist?: string, name?: string, tags?: string[]) => Promise<any>;
|
|
2323
2556
|
vote: (key: string, arrVersion: number, reason: string, vote: "UP" | "DOWN") => Promise<any>;
|
|
2324
2557
|
delete: (key: string, deletePerformances?: boolean) => Promise<any>;
|
|
@@ -2361,6 +2594,16 @@ declare class Smule {
|
|
|
2361
2594
|
* @returns The performances associated with the given AV template.
|
|
2362
2595
|
*/
|
|
2363
2596
|
byAvTemplate: (templateId: number, cursor?: string, limit?: number, performanceKey?: string) => Promise<PerformancesByAvTemplateResult>;
|
|
2597
|
+
/**
|
|
2598
|
+
* Fetches performances based on the specified genre.
|
|
2599
|
+
* @param genreId The id of the genre
|
|
2600
|
+
* @param offset The starting point
|
|
2601
|
+
* @param limit The maximum number of performances
|
|
2602
|
+
* @param fillStatus Type of performances
|
|
2603
|
+
* @param sort The order
|
|
2604
|
+
* @returns The performances
|
|
2605
|
+
*/
|
|
2606
|
+
byGenre: (genreId: number, offset?: number, limit?: number, fillStatus?: PerformancesFillStatus, sort?: PerformancesSortOrder) => Promise<PerformanceList>;
|
|
2364
2607
|
};
|
|
2365
2608
|
/**
|
|
2366
2609
|
* Retrieves a list of performances based on the specified criteria.
|
|
@@ -2409,6 +2652,7 @@ declare class Smule {
|
|
|
2409
2652
|
* @returns The performances of the user
|
|
2410
2653
|
*/
|
|
2411
2654
|
fetchFromAccount: (accountId: number, fillStatus?: PerformancesFillStatus, sortMethod?: PerformanceSortMethod, limit?: number, offset?: number) => Promise<PerformancePartsResult>;
|
|
2655
|
+
fetchBookmarkedInvites: (offset?: number, limit?: number) => Promise<PerformanceBookmarkSeedResult>;
|
|
2412
2656
|
/**
|
|
2413
2657
|
* Fetches the children performances of a specific performance.
|
|
2414
2658
|
* @param performanceKey The performance's key.
|
|
@@ -2459,6 +2703,8 @@ declare class Smule {
|
|
|
2459
2703
|
* @param performanceKey The key of the performance to be deleted.
|
|
2460
2704
|
*/
|
|
2461
2705
|
deleteOne: (performanceKey: string) => Promise<void>;
|
|
2706
|
+
bookmarkInvites: (performanceKeys: string[]) => Promise<void>;
|
|
2707
|
+
unbookmarkInvites: (performanceKeys: string[]) => Promise<void>;
|
|
2462
2708
|
};
|
|
2463
2709
|
/**
|
|
2464
2710
|
* Search related stuff
|
|
@@ -2552,6 +2798,7 @@ declare class Smule {
|
|
|
2552
2798
|
* @returns The users that match the specified criteria.
|
|
2553
2799
|
*/
|
|
2554
2800
|
fetchAccounts: (cursor?: string, limit?: number) => Promise<AccountExploreResult>;
|
|
2801
|
+
fetchRecommendedAccounts: (cursor?: string, limit?: number) => Promise<AccountExploreResult>;
|
|
2555
2802
|
/**
|
|
2556
2803
|
* Explores the groups on Smule, which are often used for collaboration.
|
|
2557
2804
|
* @param cursor The paging cursor for the groups. Default is "start".
|
|
@@ -2577,6 +2824,18 @@ declare class Smule {
|
|
|
2577
2824
|
* @remarks You must be logged in in order to fetch your feed.
|
|
2578
2825
|
*/
|
|
2579
2826
|
fetchFeed: (cursor?: string, limit?: number) => Promise<SocialFeedListResult>;
|
|
2827
|
+
/**
|
|
2828
|
+
* Fetches a list of genres
|
|
2829
|
+
* @param cursor The offset to start from
|
|
2830
|
+
* @param limit The number of genres to fetch
|
|
2831
|
+
* @returns A list of genres
|
|
2832
|
+
*/
|
|
2833
|
+
fetchGenres: (cursor?: number, limit?: number) => Promise<TopicOptionResult>;
|
|
2834
|
+
/**
|
|
2835
|
+
* Fetches your selected genres
|
|
2836
|
+
* @returns A list of genres
|
|
2837
|
+
*/
|
|
2838
|
+
fetchYourGenres: () => Promise<TopicOptionResult>;
|
|
2580
2839
|
};
|
|
2581
2840
|
settings: {
|
|
2582
2841
|
fetch: () => Promise<SettingsResult>;
|
|
@@ -2639,6 +2898,75 @@ declare class Smule {
|
|
|
2639
2898
|
};
|
|
2640
2899
|
fetch: (campfireId: number) => Promise<CampfireSyncResult>;
|
|
2641
2900
|
};
|
|
2901
|
+
groups: {
|
|
2902
|
+
/**
|
|
2903
|
+
* Fetches a group's details
|
|
2904
|
+
* @param groupId The ID of the group
|
|
2905
|
+
* @returns The group
|
|
2906
|
+
*/
|
|
2907
|
+
fetchOne: (groupId: number) => Promise<SFamInfoResult>;
|
|
2908
|
+
/**
|
|
2909
|
+
* Fetches a group's posts
|
|
2910
|
+
* @param groupId The ID of the group
|
|
2911
|
+
* @param cursor The starting point
|
|
2912
|
+
* @param limit How many to fetch
|
|
2913
|
+
* @returns The posts
|
|
2914
|
+
*/
|
|
2915
|
+
fetchPosts: (groupId: number, cursor?: string, limit?: number) => Promise<SocialFeedListResult>;
|
|
2916
|
+
/**
|
|
2917
|
+
* Fetches a group's members
|
|
2918
|
+
* @param groupId The ID of the group
|
|
2919
|
+
* @param cursor Starting point
|
|
2920
|
+
* @param limit How many
|
|
2921
|
+
* @param roles Member roles (0 - owner, 1 - admin, 2 - member)
|
|
2922
|
+
* @returns The members
|
|
2923
|
+
*/
|
|
2924
|
+
fetchMembers: (groupId: number, cursor?: string, limit?: number, roles?: number[]) => Promise<SFamMemberListResult>;
|
|
2925
|
+
/**
|
|
2926
|
+
* Sends a request to join a group
|
|
2927
|
+
* @param groupId The ID of the group
|
|
2928
|
+
* @returns The membership status
|
|
2929
|
+
*/
|
|
2930
|
+
join: (groupId: number) => Promise<SFamMembershipType>;
|
|
2931
|
+
/**
|
|
2932
|
+
* Uploads a cover picture for a group
|
|
2933
|
+
* @param imageData The image data
|
|
2934
|
+
* @returns The resource ID of the uploaded image, to be used in `create`
|
|
2935
|
+
*/
|
|
2936
|
+
uploadCoverPicture: (imageData: Uint8Array) => Promise<any>;
|
|
2937
|
+
/**
|
|
2938
|
+
* Creates a group
|
|
2939
|
+
* @param name The name of the group
|
|
2940
|
+
* @param desc The description of the group
|
|
2941
|
+
* @param lang The language
|
|
2942
|
+
* @param loc The location (XX - global)
|
|
2943
|
+
* @param picId The resource id of the cover picture
|
|
2944
|
+
* @param sfamTag The global group tag
|
|
2945
|
+
* @returns The group
|
|
2946
|
+
*/
|
|
2947
|
+
create: (name: string, desc: string, lang: string, loc: string, picId: number, sfamTag: string) => Promise<SFam>;
|
|
2948
|
+
/**
|
|
2949
|
+
* Posts multiple performances to a group's feed
|
|
2950
|
+
* @param performanceKeys The performances to post
|
|
2951
|
+
* @param groupId The ID of the group
|
|
2952
|
+
*/
|
|
2953
|
+
postPerformances: (performanceKeys: string[], groupId: number) => Promise<void>;
|
|
2954
|
+
/**
|
|
2955
|
+
* Removes a post from a group
|
|
2956
|
+
* @param groupId The ID of the group
|
|
2957
|
+
* @param postId The ID of the post
|
|
2958
|
+
* @param postType The type of the post
|
|
2959
|
+
*/
|
|
2960
|
+
removePost: (groupId: number, postId: number, postType?: "FEED") => Promise<void>;
|
|
2961
|
+
};
|
|
2962
|
+
playlists: {
|
|
2963
|
+
create: (name: string, visibility?: PlaylistVisibility) => Promise<PlaylistIcon>;
|
|
2964
|
+
addPerformance: (playlistKey: string, performanceKey: string) => Promise<void>;
|
|
2965
|
+
changeVisibility: (playlistKey: string, visibility: PlaylistVisibility) => Promise<PlaylistIcon>;
|
|
2966
|
+
changeName: (playlistKey: string, name: string) => Promise<PlaylistIcon>;
|
|
2967
|
+
fetchOne: (playlistKey: string, sortMethod: PlaylistSortMethod, cursor?: string, limit?: number) => Promise<PlaylistViewResult>;
|
|
2968
|
+
deleteOne: (playlistKey: string) => Promise<void>;
|
|
2969
|
+
};
|
|
2642
2970
|
TEST: {
|
|
2643
2971
|
runRawRequest: (url: string, data: any) => Promise<AxiosResponse<any, any>>;
|
|
2644
2972
|
};
|
|
@@ -3210,6 +3538,7 @@ declare namespace SmuleUrls {
|
|
|
3210
3538
|
const SfamMembershipInvitationReject: string;
|
|
3211
3539
|
const SfamMembershipInvitationSend: string;
|
|
3212
3540
|
const SfamMembershipRequestRoles: string;
|
|
3541
|
+
const SfamMembershipRequestSend: string;
|
|
3213
3542
|
const SfamPostAdd: string;
|
|
3214
3543
|
const SfamPostFeed: string;
|
|
3215
3544
|
const SfamPostRemove: string;
|
|
@@ -3256,6 +3585,7 @@ declare namespace SmuleUrls {
|
|
|
3256
3585
|
const UserLogin: string;
|
|
3257
3586
|
const UserLookup: string;
|
|
3258
3587
|
const UserPasswordReset: string;
|
|
3588
|
+
const UserPersonalUpdate: string;
|
|
3259
3589
|
const UserProfileUpdate: string;
|
|
3260
3590
|
const UserPhoneConnect: string;
|
|
3261
3591
|
const UserPictureDelete: string;
|
|
@@ -3272,6 +3602,123 @@ declare namespace SmuleUrls {
|
|
|
3272
3602
|
const NoSessionRequired: Set<string>;
|
|
3273
3603
|
}
|
|
3274
3604
|
|
|
3605
|
+
declare namespace SmuleEffects {
|
|
3606
|
+
type AVFile = {
|
|
3607
|
+
component_library: ComponentLibrary;
|
|
3608
|
+
template: Template;
|
|
3609
|
+
copyright: string;
|
|
3610
|
+
files: {
|
|
3611
|
+
[key: string]: {} | string;
|
|
3612
|
+
};
|
|
3613
|
+
};
|
|
3614
|
+
type ComponentLibrary = {
|
|
3615
|
+
components: Component[];
|
|
3616
|
+
copyright: string;
|
|
3617
|
+
fallback_component_id: number;
|
|
3618
|
+
};
|
|
3619
|
+
type Component = {
|
|
3620
|
+
component_id: string;
|
|
3621
|
+
duration: number;
|
|
3622
|
+
file_path: string;
|
|
3623
|
+
input_count: number;
|
|
3624
|
+
name: string;
|
|
3625
|
+
parameters: ComponentParameter[];
|
|
3626
|
+
preview_file_path: string;
|
|
3627
|
+
tags: string[];
|
|
3628
|
+
type: "Audio Effect" | string;
|
|
3629
|
+
};
|
|
3630
|
+
type ComponentParameter = {
|
|
3631
|
+
default_value: number;
|
|
3632
|
+
expose_to_joiner: boolean;
|
|
3633
|
+
expose_to_singer: boolean;
|
|
3634
|
+
max_value: number;
|
|
3635
|
+
min_value: number;
|
|
3636
|
+
name: string;
|
|
3637
|
+
targets: string[];
|
|
3638
|
+
type: "Number" | string;
|
|
3639
|
+
};
|
|
3640
|
+
type Template = {
|
|
3641
|
+
copyright: string;
|
|
3642
|
+
default_parameter_value: number[];
|
|
3643
|
+
description: string;
|
|
3644
|
+
inverse_background_color: number[];
|
|
3645
|
+
min_renderer_generation: number;
|
|
3646
|
+
name: string;
|
|
3647
|
+
parameters: TemplateParameter[];
|
|
3648
|
+
segments: TemplateSegment[];
|
|
3649
|
+
tags: string[];
|
|
3650
|
+
type: "standard" | string;
|
|
3651
|
+
};
|
|
3652
|
+
type TemplateParameter = {
|
|
3653
|
+
data_type: "Float" | string;
|
|
3654
|
+
default_value: number;
|
|
3655
|
+
expose_to_joiner: boolean;
|
|
3656
|
+
max_value: number;
|
|
3657
|
+
min_value: number;
|
|
3658
|
+
name: string;
|
|
3659
|
+
};
|
|
3660
|
+
type TemplateSegment = {
|
|
3661
|
+
afx?: TemplateAFX[];
|
|
3662
|
+
always_show_all_participants: boolean;
|
|
3663
|
+
apply_global_effects_first: boolean;
|
|
3664
|
+
max_performer_count: number;
|
|
3665
|
+
override_global_video_effects: boolean;
|
|
3666
|
+
type: "Global" | "Intro" | "Verse" | "Pre-Chorus" | "Chorus" | "Bridge" | "Outro" | string;
|
|
3667
|
+
};
|
|
3668
|
+
type TemplateAFX = {
|
|
3669
|
+
metadata_id: string;
|
|
3670
|
+
metadata_name: string;
|
|
3671
|
+
expressions: {
|
|
3672
|
+
[key: string]: AFXExpression;
|
|
3673
|
+
};
|
|
3674
|
+
};
|
|
3675
|
+
type AFXExpression = {
|
|
3676
|
+
modifier_end_value: number[];
|
|
3677
|
+
modifier_start_value: number[];
|
|
3678
|
+
modifiers: any[];
|
|
3679
|
+
numeric_value: number[];
|
|
3680
|
+
};
|
|
3681
|
+
type AFXExpressionModifier = {
|
|
3682
|
+
curve: AFXExpressionModifierCurve;
|
|
3683
|
+
end_value: number;
|
|
3684
|
+
source: "Template Parameter" | string;
|
|
3685
|
+
source_parameter_name: string;
|
|
3686
|
+
start_value: number;
|
|
3687
|
+
};
|
|
3688
|
+
type AFXExpressionModifierCurve = {
|
|
3689
|
+
key_frames: number[][];
|
|
3690
|
+
key_frames_offset_x: number;
|
|
3691
|
+
};
|
|
3692
|
+
type AlygFile = {
|
|
3693
|
+
layout: {
|
|
3694
|
+
[key: string]: number[];
|
|
3695
|
+
};
|
|
3696
|
+
filters: AlygFilter[];
|
|
3697
|
+
ui_graph_view_width?: number;
|
|
3698
|
+
input_count: number;
|
|
3699
|
+
description: string;
|
|
3700
|
+
ui_window_frame?: number[];
|
|
3701
|
+
parameters: AlygParameter[];
|
|
3702
|
+
};
|
|
3703
|
+
type AlygParameter = {
|
|
3704
|
+
initial_value: number;
|
|
3705
|
+
name: string;
|
|
3706
|
+
};
|
|
3707
|
+
type AlygFilter = {
|
|
3708
|
+
shader_type: "filter_graph";
|
|
3709
|
+
inputs: string[];
|
|
3710
|
+
name: string;
|
|
3711
|
+
expressions: string[];
|
|
3712
|
+
shader_settings: {
|
|
3713
|
+
file_path?: string;
|
|
3714
|
+
scale_mode?: "fill_aspect_ratio" | string;
|
|
3715
|
+
blend_mode?: "normal" | string;
|
|
3716
|
+
};
|
|
3717
|
+
};
|
|
3718
|
+
function processZipFile(filePath: string): Promise<AVFile>;
|
|
3719
|
+
function processRawEffects(data: AVFile): void;
|
|
3720
|
+
}
|
|
3721
|
+
|
|
3275
3722
|
declare enum SmuleUserSinging {
|
|
3276
3723
|
BOTH = 0,
|
|
3277
3724
|
PART_ONE = 1,
|
|
@@ -3316,4 +3763,4 @@ type SmulePitchesData = {
|
|
|
3316
3763
|
smallestNote: number;
|
|
3317
3764
|
};
|
|
3318
3765
|
|
|
3319
|
-
export { type AccountIcon, Arr, type ArrExtended, AvTemplateCategoryListRequest, type AvTemplateLite, Banner, type Campfire, type CampfirePlayStream, type CampfireSyncResult, CategoryRequest, type Comment, type Cursor, CustomFormData, Device, type EnsembleType, type FeedItem, type GiftIcon, IsFollowingRequest, LoginAsGuestRequest, LoginCommonData, LoginRequest, type ParticipationIcon, PerformanceCreateRequest, type PerformanceDetail, type PerformanceIcon, PerformanceList, PerformancePartsRequest, PerformanceReq, type PerformanceSortMethod, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, PreferencesRequest, PreuploadRequest, type Profile, RecAccount, type RecPerformanceIcon, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SFam, type SFamList, type SMULE_APP, SearchAutocompleteRequest, SearchRequest, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SingProfile, SingUserProfileRequest, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialInvite, type SocialInvite2, type Song, type SongCategory, SongbookRequest, type TippingHandleType, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, Util, type Wallet, type avTmplSegment };
|
|
3766
|
+
export { type AccountIcon, Arr, type ArrExtended, AvTemplateCategoryListRequest, type AvTemplateLite, Banner, type Campfire, type CampfirePlayStream, type CampfireSyncResult, CategoryRequest, type Comment, type Contact, type Cursor, CustomFormData, Device, type EnsembleType, type FeedItem, type GiftIcon, IsFollowingRequest, LoginAsGuestRequest, LoginCommonData, LoginRequest, type ParticipationIcon, PerformanceCreateRequest, type PerformanceDetail, type PerformanceIcon, PerformanceList, PerformancePartsRequest, PerformanceReq, type PerformanceSortMethod, type PerformancesFillStatus, PerformancesListRequest, type PerformancesSortOrder, type Playlist, type PlaylistDetailed, type PlaylistIcon, type PlaylistSortMethod, type PlaylistVisibility, PreferencesRequest, PreuploadRequest, type Profile, RecAccount, type RecPerformanceIcon, type SDCArr, type SDCArrSongConfig, type SDCDetectLanguageResponse, type SDCGeneratedSegmentsResponse, type SDCGenre, type SDCLanguage, type SDCLoginResult, type SDCLyric, type SDCLyricVideoParagraph, type SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, type SFam, type SFamList, type SFamMembershipType, type SMULE_APP, SearchAutocompleteRequest, SearchRequest, type SearchResultCategory, type SearchResultSort, type SearchResultType, SettingsRequest, type SingProfile, SingUserProfileRequest, Smule, type SmuleChatContainer, type SmuleChatState, SmuleDotCom, SmuleEffects, SmuleErrorCode, type SmuleLyric, type SmuleLyricsData, type SmuleMessage, type SmuleMidiData, type SmulePartnerStatus, type SmulePitch, type SmulePitchesData, SmuleRegisterErrorCode, SmuleSession, type SmuleSyllable, SmuleUrls, SmuleUserSinging, SmuleUtil, type SocialInvite, type SocialInvite2, type Song, type SongCategory, SongbookRequest, type TippingHandleType, type TrendingSearch, UpdateFollowingRequest, type UserTippingPref, type UserTippingProvider, Util, type Wallet, type avTmplSegment };
|