smule.js 1.1.1 → 1.2.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.cjs +578 -85
- package/dist/index.d.cts +527 -10
- package/dist/index.d.ts +527 -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
|
|
|
@@ -1381,6 +1409,9 @@ type ApiResult<T> = {
|
|
|
1381
1409
|
};
|
|
1382
1410
|
data?: T;
|
|
1383
1411
|
};
|
|
1412
|
+
type AccessTokenResult = {
|
|
1413
|
+
accessToken: string;
|
|
1414
|
+
};
|
|
1384
1415
|
type AccountExploreResult = {
|
|
1385
1416
|
recAccountIcons: RecAccount[];
|
|
1386
1417
|
cursor: Cursor;
|
|
@@ -1401,17 +1432,28 @@ type AccountProfileStatsViewsResult = {
|
|
|
1401
1432
|
};
|
|
1402
1433
|
cursor: Cursor;
|
|
1403
1434
|
};
|
|
1435
|
+
type AccountWalletResult = {
|
|
1436
|
+
wallet: Wallet;
|
|
1437
|
+
};
|
|
1404
1438
|
type ArrResult = {
|
|
1405
1439
|
arrVersion: ArrExtended;
|
|
1406
1440
|
};
|
|
1407
1441
|
type ArrByKeysResult = {
|
|
1408
1442
|
arrVersionLites: Arr[];
|
|
1409
1443
|
};
|
|
1444
|
+
type ArrBookmarkListResult = {
|
|
1445
|
+
songs: Arr;
|
|
1446
|
+
cursor: Cursor;
|
|
1447
|
+
totalCount: number;
|
|
1448
|
+
};
|
|
1410
1449
|
type AvTemplateCategoryListResult = {
|
|
1411
1450
|
recAvTemplateLites: Array<{
|
|
1412
1451
|
avtemplateLite: AvTemplateLite;
|
|
1413
1452
|
}>;
|
|
1414
1453
|
};
|
|
1454
|
+
type BannersResult = {
|
|
1455
|
+
banners: Array<Banner>;
|
|
1456
|
+
};
|
|
1415
1457
|
type CampfireListResult = {
|
|
1416
1458
|
campfires: Campfire[];
|
|
1417
1459
|
cursor: Cursor;
|
|
@@ -1426,6 +1468,23 @@ type CategorySongsResult = {
|
|
|
1426
1468
|
songs: Array<Song>;
|
|
1427
1469
|
cursor: Cursor;
|
|
1428
1470
|
};
|
|
1471
|
+
type ContactFindResult = {
|
|
1472
|
+
notFollowing: Array<{
|
|
1473
|
+
realName: string;
|
|
1474
|
+
accountIcon: AccountIcon;
|
|
1475
|
+
}>;
|
|
1476
|
+
hasMatches: boolean;
|
|
1477
|
+
};
|
|
1478
|
+
type DeviceSettingsResult = {
|
|
1479
|
+
over_air_latency_v5: number;
|
|
1480
|
+
};
|
|
1481
|
+
type GiftsResult = {
|
|
1482
|
+
gifts: Array<{
|
|
1483
|
+
giftIcon: GiftIcon;
|
|
1484
|
+
count: number;
|
|
1485
|
+
}>;
|
|
1486
|
+
giftCount: number;
|
|
1487
|
+
};
|
|
1429
1488
|
type InviteMeResult = {
|
|
1430
1489
|
invites: SocialInvite[];
|
|
1431
1490
|
cursor: Cursor;
|
|
@@ -1434,6 +1493,75 @@ type InviteListResult = {
|
|
|
1434
1493
|
invites: SocialInvite2[];
|
|
1435
1494
|
next: number;
|
|
1436
1495
|
};
|
|
1496
|
+
type LoginResult = {
|
|
1497
|
+
sessionToken: string;
|
|
1498
|
+
sessionTtl: number;
|
|
1499
|
+
refreshToken: string;
|
|
1500
|
+
playerId: number;
|
|
1501
|
+
playerNew: boolean;
|
|
1502
|
+
playerNewlyRegistered: boolean;
|
|
1503
|
+
playerNewlyInAppFam: boolean;
|
|
1504
|
+
policyAccepted: boolean;
|
|
1505
|
+
policyVersion: string;
|
|
1506
|
+
policyUrl: string;
|
|
1507
|
+
termUrl: string;
|
|
1508
|
+
accountId: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* Username
|
|
1511
|
+
*/
|
|
1512
|
+
handle: string;
|
|
1513
|
+
handleNew: boolean;
|
|
1514
|
+
/**
|
|
1515
|
+
* Username auto generated from email?
|
|
1516
|
+
*/
|
|
1517
|
+
handlePrefill: boolean;
|
|
1518
|
+
email: string;
|
|
1519
|
+
emailVerified: boolean;
|
|
1520
|
+
newsletter: number;
|
|
1521
|
+
showEmailOpt: boolean;
|
|
1522
|
+
language: string;
|
|
1523
|
+
picUrl: string;
|
|
1524
|
+
picUrlType: string;
|
|
1525
|
+
loginCount: number;
|
|
1526
|
+
serverTime: number;
|
|
1527
|
+
playerStat: {
|
|
1528
|
+
installDate: number;
|
|
1529
|
+
};
|
|
1530
|
+
elControl: {
|
|
1531
|
+
npt: boolean;
|
|
1532
|
+
};
|
|
1533
|
+
standardChat: {
|
|
1534
|
+
jid: string;
|
|
1535
|
+
xmppHosts: string[];
|
|
1536
|
+
};
|
|
1537
|
+
campfireChat: {
|
|
1538
|
+
jid: string;
|
|
1539
|
+
xmppHosts: string[];
|
|
1540
|
+
};
|
|
1541
|
+
/**
|
|
1542
|
+
* this is usually empty
|
|
1543
|
+
*/
|
|
1544
|
+
settings: string;
|
|
1545
|
+
birthDate?: {
|
|
1546
|
+
year: number;
|
|
1547
|
+
month: number;
|
|
1548
|
+
};
|
|
1549
|
+
};
|
|
1550
|
+
type LoginInfoResult = {
|
|
1551
|
+
notificationCount: {
|
|
1552
|
+
activity: number;
|
|
1553
|
+
pubInvite: number;
|
|
1554
|
+
gift: number;
|
|
1555
|
+
};
|
|
1556
|
+
feedActivity: boolean;
|
|
1557
|
+
apiHosts: string[];
|
|
1558
|
+
performanceCount: number;
|
|
1559
|
+
splittests: string[];
|
|
1560
|
+
};
|
|
1561
|
+
type LoginAsGuestResult = {
|
|
1562
|
+
loginResult: LoginResult;
|
|
1563
|
+
settings: SettingsResult;
|
|
1564
|
+
};
|
|
1437
1565
|
type PerformanceResult = {
|
|
1438
1566
|
performance: PerformanceIcon;
|
|
1439
1567
|
lyricVid: boolean;
|
|
@@ -1450,6 +1578,15 @@ type PerformancePartsResult = {
|
|
|
1450
1578
|
storageLimit: number;
|
|
1451
1579
|
next: number;
|
|
1452
1580
|
};
|
|
1581
|
+
type PerformanceBookmarkSeedResult = {
|
|
1582
|
+
performanceIcons: Array<PerformanceIcon>;
|
|
1583
|
+
totalPerformances: number;
|
|
1584
|
+
next: number;
|
|
1585
|
+
};
|
|
1586
|
+
type PerformanceCreateResult = {
|
|
1587
|
+
performance: PerformanceIcon;
|
|
1588
|
+
trackKey: string;
|
|
1589
|
+
};
|
|
1453
1590
|
type PerformanceCommentsResult = {
|
|
1454
1591
|
performanceKey: string;
|
|
1455
1592
|
commentUIViewInfo: {
|
|
@@ -1488,6 +1625,30 @@ type PlaylistGetResult = {
|
|
|
1488
1625
|
recPerformanceIcons: RecPerformanceIcon[];
|
|
1489
1626
|
next: number;
|
|
1490
1627
|
};
|
|
1628
|
+
type PlaylistViewResult = {
|
|
1629
|
+
items: Array<{
|
|
1630
|
+
performanceIcon: PerformanceIcon;
|
|
1631
|
+
}>;
|
|
1632
|
+
cursor: Cursor;
|
|
1633
|
+
playlistSortMethod: PlaylistSortMethod;
|
|
1634
|
+
};
|
|
1635
|
+
type PreferencesResult = {
|
|
1636
|
+
prefs: Array<{
|
|
1637
|
+
name: string;
|
|
1638
|
+
value: string;
|
|
1639
|
+
}>;
|
|
1640
|
+
};
|
|
1641
|
+
type PreuploadResult = {
|
|
1642
|
+
resources: Array<{
|
|
1643
|
+
pop: string;
|
|
1644
|
+
resourceType: "IMAGE" | "META" | "AUDIO";
|
|
1645
|
+
resourceId: number;
|
|
1646
|
+
hostname: string;
|
|
1647
|
+
}>;
|
|
1648
|
+
};
|
|
1649
|
+
type RecAccountsResult = {
|
|
1650
|
+
recAccountIcons: Array<RecAccount>;
|
|
1651
|
+
};
|
|
1491
1652
|
type RecTrendingSearchResult = {
|
|
1492
1653
|
recTrendingSearches: TrendingSearch[];
|
|
1493
1654
|
};
|
|
@@ -1578,10 +1739,27 @@ type SettingsResult = {
|
|
|
1578
1739
|
"sing.tipping": sing_tipping;
|
|
1579
1740
|
"appFamily": appFamily;
|
|
1580
1741
|
};
|
|
1742
|
+
type SFamInfoResult = {
|
|
1743
|
+
sfamInfo: {
|
|
1744
|
+
sfam: SFam;
|
|
1745
|
+
membership: "GUEST" | "MEMBER";
|
|
1746
|
+
sfamStat: {
|
|
1747
|
+
postCount: number;
|
|
1748
|
+
memberCount: number;
|
|
1749
|
+
};
|
|
1750
|
+
owner: AccountIcon;
|
|
1751
|
+
adminIcons: AccountIcon[];
|
|
1752
|
+
webUrl: string;
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1581
1755
|
type SFamListResult = {
|
|
1582
1756
|
sfamList: SFamList[];
|
|
1583
1757
|
cursor: Cursor;
|
|
1584
1758
|
};
|
|
1759
|
+
type SFamMemberListResult = {
|
|
1760
|
+
members: Array<AccountIcon>;
|
|
1761
|
+
cursor: Cursor;
|
|
1762
|
+
};
|
|
1585
1763
|
type SingUserProfileResult = {
|
|
1586
1764
|
profile: Profile;
|
|
1587
1765
|
singProfile?: SingProfile;
|
|
@@ -1625,6 +1803,39 @@ type SongbookResult = {
|
|
|
1625
1803
|
cat1Cursor: Cursor;
|
|
1626
1804
|
disinterestedSongs: Array<Song>;
|
|
1627
1805
|
};
|
|
1806
|
+
type StoreSubscriptionStatusResult = {
|
|
1807
|
+
isActive: boolean;
|
|
1808
|
+
status: string;
|
|
1809
|
+
skipTrial: boolean;
|
|
1810
|
+
storeCancellable: boolean;
|
|
1811
|
+
};
|
|
1812
|
+
type TopicOptionResult = {
|
|
1813
|
+
options: Array<{
|
|
1814
|
+
id: number;
|
|
1815
|
+
recId: string;
|
|
1816
|
+
displayName: string;
|
|
1817
|
+
coverUrls: string[];
|
|
1818
|
+
}>;
|
|
1819
|
+
};
|
|
1820
|
+
type TopicChooseResult = {
|
|
1821
|
+
freeCompositions: Array<{
|
|
1822
|
+
recId: string;
|
|
1823
|
+
compositionLite: {
|
|
1824
|
+
type: "ARR";
|
|
1825
|
+
arrangementVersionLite: Arr;
|
|
1826
|
+
};
|
|
1827
|
+
}>;
|
|
1828
|
+
};
|
|
1829
|
+
type UserUploadPictureResult = {
|
|
1830
|
+
picUrl: string;
|
|
1831
|
+
picUrlType: "user";
|
|
1832
|
+
};
|
|
1833
|
+
type ListEntitlementsResult = {
|
|
1834
|
+
/**
|
|
1835
|
+
* This is empty for a free account, soo...
|
|
1836
|
+
*/
|
|
1837
|
+
products: Array<any>;
|
|
1838
|
+
};
|
|
1628
1839
|
|
|
1629
1840
|
type SmuleMessage = {
|
|
1630
1841
|
content: string;
|
|
@@ -1661,6 +1872,7 @@ declare namespace SmuleUtil {
|
|
|
1661
1872
|
function checkLoggedIn(session: SmuleSession): boolean;
|
|
1662
1873
|
function isVerified(verifiedType: string): boolean;
|
|
1663
1874
|
function isVIP(subApps: string[]): boolean;
|
|
1875
|
+
function getGroupMembershipType(membership: number): SFamMembershipType;
|
|
1664
1876
|
function getFilesFromArr(arr: ArrExtended): {
|
|
1665
1877
|
preview: string;
|
|
1666
1878
|
cover: string;
|
|
@@ -1956,6 +2168,7 @@ declare class Smule {
|
|
|
1956
2168
|
* @returns The account's details
|
|
1957
2169
|
*/
|
|
1958
2170
|
byId: (accountId: number) => Promise<AccountIcon>;
|
|
2171
|
+
byContacts: (contacts: Array<Contact>) => Promise<ContactFindResult>;
|
|
1959
2172
|
};
|
|
1960
2173
|
/**
|
|
1961
2174
|
* Logs in as a guest
|
|
@@ -1990,6 +2203,89 @@ declare class Smule {
|
|
|
1990
2203
|
* @returns The user's details
|
|
1991
2204
|
*/
|
|
1992
2205
|
fetchOne: (accountId: number) => Promise<SingUserProfileResult>;
|
|
2206
|
+
/**
|
|
2207
|
+
* Registers a new account on smule
|
|
2208
|
+
* @param email Your email address
|
|
2209
|
+
* @param password Your password
|
|
2210
|
+
* @returns The server response
|
|
2211
|
+
*/
|
|
2212
|
+
createWithEmail: (email: string, password: string) => Promise<LoginResult>;
|
|
2213
|
+
/**
|
|
2214
|
+
* Uploads a profile picture
|
|
2215
|
+
* @param imageData The image data (jpeg)
|
|
2216
|
+
* @returns The server response
|
|
2217
|
+
*/
|
|
2218
|
+
uploadProfilePicture: (imageData: Uint8Array) => Promise<UserUploadPictureResult>;
|
|
2219
|
+
/**
|
|
2220
|
+
* Deletes your profile picture
|
|
2221
|
+
*/
|
|
2222
|
+
deleteProfilePicture: () => Promise<void>;
|
|
2223
|
+
/**
|
|
2224
|
+
* Uploads a cover picture
|
|
2225
|
+
* @param imageData The image data
|
|
2226
|
+
* @remarks Requires VIP
|
|
2227
|
+
*/
|
|
2228
|
+
uploadCoverPicture: (imageData: Uint8Array) => Promise<void>;
|
|
2229
|
+
/**
|
|
2230
|
+
* Deletes your cover picture
|
|
2231
|
+
* @remarks Requires VIP
|
|
2232
|
+
*/
|
|
2233
|
+
deleteCoverPicture: () => Promise<void>;
|
|
2234
|
+
/**
|
|
2235
|
+
* Changes your username
|
|
2236
|
+
* @param username The new username
|
|
2237
|
+
*/
|
|
2238
|
+
changeUsername: (username: string) => Promise<void>;
|
|
2239
|
+
/**
|
|
2240
|
+
* Changes your email
|
|
2241
|
+
* @param email The new email
|
|
2242
|
+
*/
|
|
2243
|
+
changeEmail: (email: string) => Promise<void>;
|
|
2244
|
+
/**
|
|
2245
|
+
* Changes your bio
|
|
2246
|
+
* @param text The new bio
|
|
2247
|
+
*/
|
|
2248
|
+
changeBio: (text: string) => Promise<void>;
|
|
2249
|
+
/**
|
|
2250
|
+
* Customize your VIP profile
|
|
2251
|
+
* @param colorTheme The background and foreground colors (RRGGBB hex), and whether the text should be white or black
|
|
2252
|
+
* @param displayMentions Whether to display mentions
|
|
2253
|
+
* @param displayName Your new display name
|
|
2254
|
+
* @remarks Requires VIP
|
|
2255
|
+
*/
|
|
2256
|
+
changeVIPProfileStuff: (colorTheme: {
|
|
2257
|
+
background: number;
|
|
2258
|
+
foreground: number;
|
|
2259
|
+
lightText: boolean;
|
|
2260
|
+
}, displayMentions: boolean, displayName: string) => Promise<void>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Changes your full name
|
|
2263
|
+
* @param firstName Your first name
|
|
2264
|
+
* @param lastName Your last name
|
|
2265
|
+
*/
|
|
2266
|
+
changeFullName: (firstName: string, lastName: string) => Promise<void>;
|
|
2267
|
+
/**
|
|
2268
|
+
* Changes your password
|
|
2269
|
+
* @param newPassword The new password
|
|
2270
|
+
*/
|
|
2271
|
+
changePassword: (newPassword: string) => Promise<void>;
|
|
2272
|
+
/**
|
|
2273
|
+
* @returns Your preferences
|
|
2274
|
+
*/
|
|
2275
|
+
fetchPreferences: () => Promise<PreferencesResult>;
|
|
2276
|
+
/**
|
|
2277
|
+
* Changes your preferences
|
|
2278
|
+
* @param preferences The modified preferences
|
|
2279
|
+
*/
|
|
2280
|
+
changePreferences: (preferences: Array<{
|
|
2281
|
+
name: string;
|
|
2282
|
+
value: string;
|
|
2283
|
+
}>) => Promise<void>;
|
|
2284
|
+
/**
|
|
2285
|
+
* Changes whether you wish to receive newsletter emails
|
|
2286
|
+
* @param consent Whether to consent
|
|
2287
|
+
*/
|
|
2288
|
+
changeNewsletterConsent: (consent: boolean) => Promise<void>;
|
|
1993
2289
|
};
|
|
1994
2290
|
/**
|
|
1995
2291
|
* Social and chat related stuff
|
|
@@ -2290,6 +2586,15 @@ declare class Smule {
|
|
|
2290
2586
|
*/
|
|
2291
2587
|
fetch: (keys: string[]) => Promise<ArrByKeysResult>;
|
|
2292
2588
|
fetchOwnedBy: (ownerId: number, offset?: number, limit?: number) => Promise<any>;
|
|
2589
|
+
/**
|
|
2590
|
+
* Fetches free songs from a list of genres
|
|
2591
|
+
*
|
|
2592
|
+
* This endpoint is usually used at register, to recommend
|
|
2593
|
+
* some songs to the new user.
|
|
2594
|
+
* @param genreIds The ids of the genres
|
|
2595
|
+
* @returns A stupid nested list with free "compositions"
|
|
2596
|
+
*/
|
|
2597
|
+
fetchFromGenres: (genreIds: number[]) => Promise<TopicOptionResult>;
|
|
2293
2598
|
/**
|
|
2294
2599
|
* Fetches the lyrics and pitches for a certain arrangement
|
|
2295
2600
|
* @param key The song / arr key
|
|
@@ -2303,22 +2608,20 @@ declare class Smule {
|
|
|
2303
2608
|
/**
|
|
2304
2609
|
* Bookmarks a song.
|
|
2305
2610
|
* @param key The song / arr key.
|
|
2306
|
-
* @returns idk
|
|
2307
2611
|
*/
|
|
2308
|
-
bookmark: (key: string) => Promise<
|
|
2612
|
+
bookmark: (key: string) => Promise<void>;
|
|
2309
2613
|
/**
|
|
2310
2614
|
* Unbookmarks a song.
|
|
2311
2615
|
* @param key The song / arr key.
|
|
2312
|
-
* @returns idk
|
|
2313
2616
|
*/
|
|
2314
|
-
unbookmark: (key: string) => Promise<
|
|
2617
|
+
unbookmark: (key: string) => Promise<void>;
|
|
2315
2618
|
/**
|
|
2316
2619
|
* Fetches bookmarked songs.
|
|
2317
2620
|
* @param cursor Paging
|
|
2318
2621
|
* @param limit The maximum number of songs to fetch
|
|
2319
2622
|
* @returns idk prolly bookmarks
|
|
2320
2623
|
*/
|
|
2321
|
-
fetchBookmarks: (cursor?: string, limit?: number) => Promise<
|
|
2624
|
+
fetchBookmarks: (cursor?: string, limit?: number) => Promise<ArrBookmarkListResult>;
|
|
2322
2625
|
update: (key: string, artist?: string, name?: string, tags?: string[]) => Promise<any>;
|
|
2323
2626
|
vote: (key: string, arrVersion: number, reason: string, vote: "UP" | "DOWN") => Promise<any>;
|
|
2324
2627
|
delete: (key: string, deletePerformances?: boolean) => Promise<any>;
|
|
@@ -2361,6 +2664,16 @@ declare class Smule {
|
|
|
2361
2664
|
* @returns The performances associated with the given AV template.
|
|
2362
2665
|
*/
|
|
2363
2666
|
byAvTemplate: (templateId: number, cursor?: string, limit?: number, performanceKey?: string) => Promise<PerformancesByAvTemplateResult>;
|
|
2667
|
+
/**
|
|
2668
|
+
* Fetches performances based on the specified genre.
|
|
2669
|
+
* @param genreId The id of the genre
|
|
2670
|
+
* @param offset The starting point
|
|
2671
|
+
* @param limit The maximum number of performances
|
|
2672
|
+
* @param fillStatus Type of performances
|
|
2673
|
+
* @param sort The order
|
|
2674
|
+
* @returns The performances
|
|
2675
|
+
*/
|
|
2676
|
+
byGenre: (genreId: number, offset?: number, limit?: number, fillStatus?: PerformancesFillStatus, sort?: PerformancesSortOrder) => Promise<PerformanceList>;
|
|
2364
2677
|
};
|
|
2365
2678
|
/**
|
|
2366
2679
|
* Retrieves a list of performances based on the specified criteria.
|
|
@@ -2409,6 +2722,7 @@ declare class Smule {
|
|
|
2409
2722
|
* @returns The performances of the user
|
|
2410
2723
|
*/
|
|
2411
2724
|
fetchFromAccount: (accountId: number, fillStatus?: PerformancesFillStatus, sortMethod?: PerformanceSortMethod, limit?: number, offset?: number) => Promise<PerformancePartsResult>;
|
|
2725
|
+
fetchBookmarkedInvites: (offset?: number, limit?: number) => Promise<PerformanceBookmarkSeedResult>;
|
|
2412
2726
|
/**
|
|
2413
2727
|
* Fetches the children performances of a specific performance.
|
|
2414
2728
|
* @param performanceKey The performance's key.
|
|
@@ -2459,6 +2773,8 @@ declare class Smule {
|
|
|
2459
2773
|
* @param performanceKey The key of the performance to be deleted.
|
|
2460
2774
|
*/
|
|
2461
2775
|
deleteOne: (performanceKey: string) => Promise<void>;
|
|
2776
|
+
bookmarkInvites: (performanceKeys: string[]) => Promise<void>;
|
|
2777
|
+
unbookmarkInvites: (performanceKeys: string[]) => Promise<void>;
|
|
2462
2778
|
};
|
|
2463
2779
|
/**
|
|
2464
2780
|
* Search related stuff
|
|
@@ -2552,6 +2868,7 @@ declare class Smule {
|
|
|
2552
2868
|
* @returns The users that match the specified criteria.
|
|
2553
2869
|
*/
|
|
2554
2870
|
fetchAccounts: (cursor?: string, limit?: number) => Promise<AccountExploreResult>;
|
|
2871
|
+
fetchRecommendedAccounts: (cursor?: string, limit?: number) => Promise<AccountExploreResult>;
|
|
2555
2872
|
/**
|
|
2556
2873
|
* Explores the groups on Smule, which are often used for collaboration.
|
|
2557
2874
|
* @param cursor The paging cursor for the groups. Default is "start".
|
|
@@ -2577,6 +2894,18 @@ declare class Smule {
|
|
|
2577
2894
|
* @remarks You must be logged in in order to fetch your feed.
|
|
2578
2895
|
*/
|
|
2579
2896
|
fetchFeed: (cursor?: string, limit?: number) => Promise<SocialFeedListResult>;
|
|
2897
|
+
/**
|
|
2898
|
+
* Fetches a list of genres
|
|
2899
|
+
* @param cursor The offset to start from
|
|
2900
|
+
* @param limit The number of genres to fetch
|
|
2901
|
+
* @returns A list of genres
|
|
2902
|
+
*/
|
|
2903
|
+
fetchGenres: (cursor?: number, limit?: number) => Promise<TopicOptionResult>;
|
|
2904
|
+
/**
|
|
2905
|
+
* Fetches your selected genres
|
|
2906
|
+
* @returns A list of genres
|
|
2907
|
+
*/
|
|
2908
|
+
fetchYourGenres: () => Promise<TopicOptionResult>;
|
|
2580
2909
|
};
|
|
2581
2910
|
settings: {
|
|
2582
2911
|
fetch: () => Promise<SettingsResult>;
|
|
@@ -2639,6 +2968,75 @@ declare class Smule {
|
|
|
2639
2968
|
};
|
|
2640
2969
|
fetch: (campfireId: number) => Promise<CampfireSyncResult>;
|
|
2641
2970
|
};
|
|
2971
|
+
groups: {
|
|
2972
|
+
/**
|
|
2973
|
+
* Fetches a group's details
|
|
2974
|
+
* @param groupId The ID of the group
|
|
2975
|
+
* @returns The group
|
|
2976
|
+
*/
|
|
2977
|
+
fetchOne: (groupId: number) => Promise<SFamInfoResult>;
|
|
2978
|
+
/**
|
|
2979
|
+
* Fetches a group's posts
|
|
2980
|
+
* @param groupId The ID of the group
|
|
2981
|
+
* @param cursor The starting point
|
|
2982
|
+
* @param limit How many to fetch
|
|
2983
|
+
* @returns The posts
|
|
2984
|
+
*/
|
|
2985
|
+
fetchPosts: (groupId: number, cursor?: string, limit?: number) => Promise<SocialFeedListResult>;
|
|
2986
|
+
/**
|
|
2987
|
+
* Fetches a group's members
|
|
2988
|
+
* @param groupId The ID of the group
|
|
2989
|
+
* @param cursor Starting point
|
|
2990
|
+
* @param limit How many
|
|
2991
|
+
* @param roles Member roles (0 - owner, 1 - admin, 2 - member)
|
|
2992
|
+
* @returns The members
|
|
2993
|
+
*/
|
|
2994
|
+
fetchMembers: (groupId: number, cursor?: string, limit?: number, roles?: number[]) => Promise<SFamMemberListResult>;
|
|
2995
|
+
/**
|
|
2996
|
+
* Sends a request to join a group
|
|
2997
|
+
* @param groupId The ID of the group
|
|
2998
|
+
* @returns The membership status
|
|
2999
|
+
*/
|
|
3000
|
+
join: (groupId: number) => Promise<SFamMembershipType>;
|
|
3001
|
+
/**
|
|
3002
|
+
* Uploads a cover picture for a group
|
|
3003
|
+
* @param imageData The image data
|
|
3004
|
+
* @returns The resource ID of the uploaded image, to be used in `create`
|
|
3005
|
+
*/
|
|
3006
|
+
uploadCoverPicture: (imageData: Uint8Array) => Promise<any>;
|
|
3007
|
+
/**
|
|
3008
|
+
* Creates a group
|
|
3009
|
+
* @param name The name of the group
|
|
3010
|
+
* @param desc The description of the group
|
|
3011
|
+
* @param lang The language
|
|
3012
|
+
* @param loc The location (XX - global)
|
|
3013
|
+
* @param picId The resource id of the cover picture
|
|
3014
|
+
* @param sfamTag The global group tag
|
|
3015
|
+
* @returns The group
|
|
3016
|
+
*/
|
|
3017
|
+
create: (name: string, desc: string, lang: string, loc: string, picId: number, sfamTag: string) => Promise<SFam>;
|
|
3018
|
+
/**
|
|
3019
|
+
* Posts multiple performances to a group's feed
|
|
3020
|
+
* @param performanceKeys The performances to post
|
|
3021
|
+
* @param groupId The ID of the group
|
|
3022
|
+
*/
|
|
3023
|
+
postPerformances: (performanceKeys: string[], groupId: number) => Promise<void>;
|
|
3024
|
+
/**
|
|
3025
|
+
* Removes a post from a group
|
|
3026
|
+
* @param groupId The ID of the group
|
|
3027
|
+
* @param postId The ID of the post
|
|
3028
|
+
* @param postType The type of the post
|
|
3029
|
+
*/
|
|
3030
|
+
removePost: (groupId: number, postId: number, postType?: "FEED") => Promise<void>;
|
|
3031
|
+
};
|
|
3032
|
+
playlists: {
|
|
3033
|
+
create: (name: string, visibility?: PlaylistVisibility) => Promise<PlaylistIcon>;
|
|
3034
|
+
addPerformance: (playlistKey: string, performanceKey: string) => Promise<void>;
|
|
3035
|
+
changeVisibility: (playlistKey: string, visibility: PlaylistVisibility) => Promise<PlaylistIcon>;
|
|
3036
|
+
changeName: (playlistKey: string, name: string) => Promise<PlaylistIcon>;
|
|
3037
|
+
fetchOne: (playlistKey: string, sortMethod: PlaylistSortMethod, cursor?: string, limit?: number) => Promise<PlaylistViewResult>;
|
|
3038
|
+
deleteOne: (playlistKey: string) => Promise<void>;
|
|
3039
|
+
};
|
|
2642
3040
|
TEST: {
|
|
2643
3041
|
runRawRequest: (url: string, data: any) => Promise<AxiosResponse<any, any>>;
|
|
2644
3042
|
};
|
|
@@ -3210,6 +3608,7 @@ declare namespace SmuleUrls {
|
|
|
3210
3608
|
const SfamMembershipInvitationReject: string;
|
|
3211
3609
|
const SfamMembershipInvitationSend: string;
|
|
3212
3610
|
const SfamMembershipRequestRoles: string;
|
|
3611
|
+
const SfamMembershipRequestSend: string;
|
|
3213
3612
|
const SfamPostAdd: string;
|
|
3214
3613
|
const SfamPostFeed: string;
|
|
3215
3614
|
const SfamPostRemove: string;
|
|
@@ -3256,6 +3655,7 @@ declare namespace SmuleUrls {
|
|
|
3256
3655
|
const UserLogin: string;
|
|
3257
3656
|
const UserLookup: string;
|
|
3258
3657
|
const UserPasswordReset: string;
|
|
3658
|
+
const UserPersonalUpdate: string;
|
|
3259
3659
|
const UserProfileUpdate: string;
|
|
3260
3660
|
const UserPhoneConnect: string;
|
|
3261
3661
|
const UserPictureDelete: string;
|
|
@@ -3272,6 +3672,123 @@ declare namespace SmuleUrls {
|
|
|
3272
3672
|
const NoSessionRequired: Set<string>;
|
|
3273
3673
|
}
|
|
3274
3674
|
|
|
3675
|
+
declare namespace SmuleEffects {
|
|
3676
|
+
type AVFile = {
|
|
3677
|
+
component_library: ComponentLibrary;
|
|
3678
|
+
template: Template;
|
|
3679
|
+
copyright: string;
|
|
3680
|
+
files: {
|
|
3681
|
+
[key: string]: {} | string;
|
|
3682
|
+
};
|
|
3683
|
+
};
|
|
3684
|
+
type ComponentLibrary = {
|
|
3685
|
+
components: Component[];
|
|
3686
|
+
copyright: string;
|
|
3687
|
+
fallback_component_id: number;
|
|
3688
|
+
};
|
|
3689
|
+
type Component = {
|
|
3690
|
+
component_id: string;
|
|
3691
|
+
duration: number;
|
|
3692
|
+
file_path: string;
|
|
3693
|
+
input_count: number;
|
|
3694
|
+
name: string;
|
|
3695
|
+
parameters: ComponentParameter[];
|
|
3696
|
+
preview_file_path: string;
|
|
3697
|
+
tags: string[];
|
|
3698
|
+
type: "Audio Effect" | string;
|
|
3699
|
+
};
|
|
3700
|
+
type ComponentParameter = {
|
|
3701
|
+
default_value: number;
|
|
3702
|
+
expose_to_joiner: boolean;
|
|
3703
|
+
expose_to_singer: boolean;
|
|
3704
|
+
max_value: number;
|
|
3705
|
+
min_value: number;
|
|
3706
|
+
name: string;
|
|
3707
|
+
targets: string[];
|
|
3708
|
+
type: "Number" | string;
|
|
3709
|
+
};
|
|
3710
|
+
type Template = {
|
|
3711
|
+
copyright: string;
|
|
3712
|
+
default_parameter_value: number[];
|
|
3713
|
+
description: string;
|
|
3714
|
+
inverse_background_color: number[];
|
|
3715
|
+
min_renderer_generation: number;
|
|
3716
|
+
name: string;
|
|
3717
|
+
parameters: TemplateParameter[];
|
|
3718
|
+
segments: TemplateSegment[];
|
|
3719
|
+
tags: string[];
|
|
3720
|
+
type: "standard" | string;
|
|
3721
|
+
};
|
|
3722
|
+
type TemplateParameter = {
|
|
3723
|
+
data_type: "Float" | string;
|
|
3724
|
+
default_value: number;
|
|
3725
|
+
expose_to_joiner: boolean;
|
|
3726
|
+
max_value: number;
|
|
3727
|
+
min_value: number;
|
|
3728
|
+
name: string;
|
|
3729
|
+
};
|
|
3730
|
+
type TemplateSegment = {
|
|
3731
|
+
afx?: TemplateAFX[];
|
|
3732
|
+
always_show_all_participants: boolean;
|
|
3733
|
+
apply_global_effects_first: boolean;
|
|
3734
|
+
max_performer_count: number;
|
|
3735
|
+
override_global_video_effects: boolean;
|
|
3736
|
+
type: "Global" | "Intro" | "Verse" | "Pre-Chorus" | "Chorus" | "Bridge" | "Outro" | string;
|
|
3737
|
+
};
|
|
3738
|
+
type TemplateAFX = {
|
|
3739
|
+
metadata_id: string;
|
|
3740
|
+
metadata_name: string;
|
|
3741
|
+
expressions: {
|
|
3742
|
+
[key: string]: AFXExpression;
|
|
3743
|
+
};
|
|
3744
|
+
};
|
|
3745
|
+
type AFXExpression = {
|
|
3746
|
+
modifier_end_value: number[];
|
|
3747
|
+
modifier_start_value: number[];
|
|
3748
|
+
modifiers: any[];
|
|
3749
|
+
numeric_value: number[];
|
|
3750
|
+
};
|
|
3751
|
+
type AFXExpressionModifier = {
|
|
3752
|
+
curve: AFXExpressionModifierCurve;
|
|
3753
|
+
end_value: number;
|
|
3754
|
+
source: "Template Parameter" | string;
|
|
3755
|
+
source_parameter_name: string;
|
|
3756
|
+
start_value: number;
|
|
3757
|
+
};
|
|
3758
|
+
type AFXExpressionModifierCurve = {
|
|
3759
|
+
key_frames: number[][];
|
|
3760
|
+
key_frames_offset_x: number;
|
|
3761
|
+
};
|
|
3762
|
+
type AlygFile = {
|
|
3763
|
+
layout: {
|
|
3764
|
+
[key: string]: number[];
|
|
3765
|
+
};
|
|
3766
|
+
filters: AlygFilter[];
|
|
3767
|
+
ui_graph_view_width?: number;
|
|
3768
|
+
input_count: number;
|
|
3769
|
+
description: string;
|
|
3770
|
+
ui_window_frame?: number[];
|
|
3771
|
+
parameters: AlygParameter[];
|
|
3772
|
+
};
|
|
3773
|
+
type AlygParameter = {
|
|
3774
|
+
initial_value: number;
|
|
3775
|
+
name: string;
|
|
3776
|
+
};
|
|
3777
|
+
type AlygFilter = {
|
|
3778
|
+
shader_type: "filter_graph";
|
|
3779
|
+
inputs: string[];
|
|
3780
|
+
name: string;
|
|
3781
|
+
expressions: string[];
|
|
3782
|
+
shader_settings: {
|
|
3783
|
+
file_path?: string;
|
|
3784
|
+
scale_mode?: "fill_aspect_ratio" | string;
|
|
3785
|
+
blend_mode?: "normal" | string;
|
|
3786
|
+
};
|
|
3787
|
+
};
|
|
3788
|
+
function processZipFile(filePath: string): Promise<AVFile>;
|
|
3789
|
+
function processRawEffects(data: AVFile): void;
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3275
3792
|
declare enum SmuleUserSinging {
|
|
3276
3793
|
BOTH = 0,
|
|
3277
3794
|
PART_ONE = 1,
|
|
@@ -3316,4 +3833,4 @@ type SmulePitchesData = {
|
|
|
3316
3833
|
smallestNote: number;
|
|
3317
3834
|
};
|
|
3318
3835
|
|
|
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 };
|
|
3836
|
+
export { type AccessTokenResult, type AccountExploreResult, type AccountIcon, type AccountLookupResult, type AccountProfileStatsViewsResult, type AccountWalletResult, type ApiResult, Arr, type ArrBookmarkListResult, type ArrByKeysResult, type ArrExtended, 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 SDCResourceCreationResult, type SDCSaveArrResponse, type SDCSegment, 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, SmuleEffects, 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 };
|